Skip to content

Commit

Permalink
add a way to collect input coplanar faces after corefinement
Browse files Browse the repository at this point in the history
  • Loading branch information
sloriot committed Apr 25, 2024
1 parent 94d4555 commit 45e3bd5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,34 @@ class Face_graph_output_builder
Patches1 patches_of_tm1(tm1, tm1_patch_ids, fids1, intersection_edges1, nb_patches_tm1);
Patches2 patches_of_tm2(tm2, tm2_patch_ids, fids2, intersection_edges2, nb_patches_tm2);

// report input coplanar faces
if (coplanar_patches_of_tm1.any())
{
for (std::size_t i = coplanar_patches_of_tm1.find_first();
i < coplanar_patches_of_tm1.npos;
i = coplanar_patches_of_tm1.find_next(i))
{

for (face_descriptor f : patches_of_tm1[i].faces)
{
user_visitor.input_coplanar_face(f, tm1);
}
}
}
if (coplanar_patches_of_tm2.any())
{
for (std::size_t i = coplanar_patches_of_tm2.find_first();
i < coplanar_patches_of_tm2.npos;
i = coplanar_patches_of_tm2.find_next(i))
{

for (face_descriptor f : patches_of_tm2[i].faces)
{
user_visitor.input_coplanar_face(f, tm2);
}
}
}

// for each boolean operation, define two bitsets of patches contributing
// to the result
std::vector< boost::dynamic_bitset<> > patches_of_tm1_used(4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ struct Default_visitor{
void before_face_copy(face_descriptor /*f_old*/, const TriangleMesh&, TriangleMesh&){}
void after_face_copy(face_descriptor /*f_old*/, const TriangleMesh&,
face_descriptor /* f_new */, TriangleMesh&){}
void input_coplanar_face(face_descriptor /*f*/, TriangleMesh&) {}
// edge visitor functions
void before_edge_split(halfedge_descriptor /* h */, TriangleMesh& /* tm */){}
void edge_split(halfedge_descriptor /* hnew */, TriangleMesh& /* tm */){}
Expand Down

0 comments on commit 45e3bd5

Please sign in to comment.