Skip to content

add missing visitor calls - #9579

Open
sloriot wants to merge 1 commit into
CGAL:6.2.x-branchfrom
sloriot:PMP-clip_convex_visitor
Open

add missing visitor calls#9579
sloriot wants to merge 1 commit into
CGAL:6.2.x-branchfrom
sloriot:PMP-clip_convex_visitor

Conversation

@sloriot

@sloriot sloriot commented Jul 29, 2026

Copy link
Copy Markdown
Member

@LeoValque Could you please double check that you aren't missing more?

*/
template <class PolygonMesh, class NamedParameters = parameters::Default_named_parameters>
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor
find_crossing_edge(PolygonMesh& pm,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_crossing_edge(const PolygonMesh& pm,

if (triangulate){
halfedge_descriptor sh_opp = opposite(sh, pm);
if(!is_triangle(sh_opp, pm)){
visitor.before_subface_created(pm);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
visitor.before_subface_creations(face(sh_opp, pm), pm);

if(!is_triangle(sh_opp, pm)){
visitor.before_subface_created(pm);
halfedge_descriptor newh = CGAL::Euler::split_face(sh_opp, next(next(sh_opp, pm), pm), pm);
visitor.after_subface_created(face(opposite(newh, pm), pm), pm);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
visitor.after_subface_creations(pm);

boundaries.emplace_back(sh);
set_halfedge(target(sh, pm), sh, pm);
visitor.add_retriangulation_edge(sh, pm);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The input is assumed to be triangulated

put(f2f, f, plane_fd);
}
if(triangulate)
triangulate_face(f, pm, parameters::vertex_point_map(vpm));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
triangulate_face(f, pm, parameters::vertex_point_map(vpm));
triangulate_face(f, pm, parameters::vertex_point_map(vpm).visitor(visitor));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably requires a wrapper


// Fill the hole
if (clip_volume && faces(pm).size()>1){ // If there is only one face, the output is flat does not need to be closed
face_descriptor f=add_face(pm);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creation of a new face here

}
return *vertices(pm).begin();

} else if(faces(pm).size()==1){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2D cases here, but it was wrote for untriangulated case (only one face)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants