Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
Scotty3D
Commits
406c0f29
Commit
406c0f29
authored
Mar 19, 2021
by
TheNumbat
Browse files
don't subdivide boundaries
parent
abf3e05e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/geometry/halfedge.cpp
View file @
406c0f29
...
@@ -557,7 +557,7 @@ bool Halfedge_Mesh::subdivide(SubD strategy) {
...
@@ -557,7 +557,7 @@ bool Halfedge_Mesh::subdivide(SubD strategy) {
Index
idx
=
0
;
Index
idx
=
0
;
size_t
nV
=
vertices
.
size
();
size_t
nV
=
vertices
.
size
();
size_t
nE
=
edges
.
size
();
size_t
nE
=
edges
.
size
();
size_t
nF
=
faces
.
size
();
size_t
nF
=
faces
.
size
()
-
n_boundaries
()
;
verts
.
resize
(
nV
+
nE
+
nF
);
verts
.
resize
(
nV
+
nE
+
nF
);
for
(
VertexRef
v
=
vertices_begin
();
v
!=
vertices_end
();
v
++
,
idx
++
)
{
for
(
VertexRef
v
=
vertices_begin
();
v
!=
vertices_end
();
v
++
,
idx
++
)
{
...
@@ -569,11 +569,13 @@ bool Halfedge_Mesh::subdivide(SubD strategy) {
...
@@ -569,11 +569,13 @@ bool Halfedge_Mesh::subdivide(SubD strategy) {
layout
[
e
->
id
()]
=
idx
;
layout
[
e
->
id
()]
=
idx
;
}
}
for
(
FaceRef
f
=
faces_begin
();
f
!=
faces_end
();
f
++
,
idx
++
)
{
for
(
FaceRef
f
=
faces_begin
();
f
!=
faces_end
();
f
++
,
idx
++
)
{
if
(
f
->
is_boundary
())
continue
;
verts
[
idx
]
=
f
->
new_pos
;
verts
[
idx
]
=
f
->
new_pos
;
layout
[
f
->
id
()]
=
idx
;
layout
[
f
->
id
()]
=
idx
;
}
}
for
(
auto
f
=
faces_begin
();
f
!=
faces_end
();
f
++
)
{
for
(
auto
f
=
faces_begin
();
f
!=
faces_end
();
f
++
)
{
if
(
f
->
is_boundary
())
continue
;
Index
i
=
layout
[
f
->
id
()];
Index
i
=
layout
[
f
->
id
()];
HalfedgeRef
h
=
f
->
halfedge
();
HalfedgeRef
h
=
f
->
halfedge
();
do
{
do
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment