Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenMesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenMesh
OpenMesh
Commits
47fcf4ed
Commit
47fcf4ed
authored
Apr 27, 2017
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split test into two blocks
parent
b303f73f
Pipeline
#4857
failed with stage
in 77 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
6 deletions
+75
-6
src/Unittests/unittests_trimesh_split.cc
src/Unittests/unittests_trimesh_split.cc
+75
-6
No files found.
src/Unittests/unittests_trimesh_split.cc
View file @
47fcf4ed
...
...
@@ -34,7 +34,7 @@ class OpenMeshSplitTriangleMesh : public OpenMeshBase {
/* splits a face that has a property in a triangle mesh with split_copy
* the property should be copied to the new faces
*/
TEST_F
(
OpenMeshSplitTriangleMesh
,
Split_Triangle_Mesh_1_4
)
{
TEST_F
(
OpenMeshSplitTriangleMesh
,
Split_Triangle_Mesh_1_4
_center
)
{
mesh_
.
clear
();
...
...
@@ -107,18 +107,87 @@ TEST_F(OpenMeshSplitTriangleMesh, Split_Triangle_Mesh_1_4) {
EXPECT_EQ
(
10u
,
mesh_
.
n_faces
());
Mesh
::
FaceHandle
boundary_split
=
mesh_
.
face_handle
(
0
);
}
// split face at boundary
mesh_
.
split
(
boundary_split
);
/* splits a face that has a property in a triangle mesh with split_copy
* the property should be copied to the new faces
*/
TEST_F
(
OpenMeshSplitTriangleMesh
,
Split_Triangle_Mesh_1_4_boundary
)
{
mesh_
.
garbage_collection
();
mesh_
.
clear
();
EXPECT_EQ
(
15u
,
mesh_
.
n_faces
());
mesh_
.
request_vertex_status
();
mesh_
.
request_edge_status
();
mesh_
.
request_face_status
();
// Add some vertices
Mesh
::
VertexHandle
vhandle
[
6
];
vhandle
[
0
]
=
mesh_
.
add_vertex
(
Mesh
::
Point
(
0
,
1
,
0
));
vhandle
[
1
]
=
mesh_
.
add_vertex
(
Mesh
::
Point
(
1
,
0
,
0
));
vhandle
[
2
]
=
mesh_
.
add_vertex
(
Mesh
::
Point
(
2
,
1
,
0
));
vhandle
[
3
]
=
mesh_
.
add_vertex
(
Mesh
::
Point
(
3
,
0
,
0
));
vhandle
[
4
]
=
mesh_
.
add_vertex
(
Mesh
::
Point
(
4
,
1
,
0
));
vhandle
[
5
]
=
mesh_
.
add_vertex
(
Mesh
::
Point
(
2
,
-
1
,
0
));
// Add three faces
std
::
vector
<
Mesh
::
VertexHandle
>
face_vhandles
;
face_vhandles
.
push_back
(
vhandle
[
0
]);
face_vhandles
.
push_back
(
vhandle
[
1
]);
face_vhandles
.
push_back
(
vhandle
[
2
]);
Mesh
::
FaceHandle
to_split
=
mesh_
.
add_face
(
face_vhandles
);
face_vhandles
.
clear
();
face_vhandles
.
push_back
(
vhandle
[
2
]);
face_vhandles
.
push_back
(
vhandle
[
1
]);
face_vhandles
.
push_back
(
vhandle
[
3
]);
mesh_
.
add_face
(
face_vhandles
);
face_vhandles
.
clear
();
face_vhandles
.
push_back
(
vhandle
[
2
]);
face_vhandles
.
push_back
(
vhandle
[
3
]);
face_vhandles
.
push_back
(
vhandle
[
4
]);
mesh_
.
add_face
(
face_vhandles
);
face_vhandles
.
clear
();
face_vhandles
.
push_back
(
vhandle
[
1
]);
face_vhandles
.
push_back
(
vhandle
[
5
]);
face_vhandles
.
push_back
(
vhandle
[
3
]);
mesh_
.
add_face
(
face_vhandles
);
/* Test setup:
*
* edge x => halfedge x/x+1
* i.e. edge 0 => halfedge 0/1
*
* 0 --4--- 2 ------ 4
* \ / \ /
* 0 0 2 6 2 /
* \ / 1 \ /
* 1 ---8--- 3
* \ /
* \ 3 /
* \ /
* \ /
* 5
*/
EXPECT_EQ
(
4u
,
mesh_
.
n_faces
());
// split face at boundary
mesh_
.
split
(
to_split
);
mesh_
.
garbage_collection
();
EXPECT_EQ
(
8u
,
mesh_
.
n_faces
());
}
}
...
...
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