For me ... it was supposed to be without a dialog. I think it must come from wings_u:error_msg
maybe.
This is for Dan G ... Dan ... sometimes it picks the wrong part of loop to keep ... see this video.
BTW ... there was a reason why calc_planes was returning three planes. Part of that reason was to ensure the outer part of the loop was not selected. Now it is a "misnomer" because it only returns 1 plane.
I'm fairly certain you won't be able to connect/collect the proper set of faces without the two planes you decided to forgoe. They were critical to the process. If you don't use them ... then you must be doing some topological thing ... which will be wrong.
So ... original implementation (even if hacky) ... used three planes.
Two of then are "Book end" plane that go through the start and ene vertices ... one plane for each vertex. Then there is third plane (the cutter plane). The two book end planes were design to be perpendicular to the cutting/slicing plane. You want to keep the vertices/edges ... cut the ones ... that are between the two book end planes. I think you also need the MIDPOINT I was generating as well. See the logic in my original collect faces ...
This is a projection of the cut object. The cutting plan is not important ...
It is the other two planes that feel even more important than the cutting plane. Sure ... you cut with the cutting plane. But the other two plus the midpoint are carefully crafted so that we can avoid wrong loop parts.
Together the three planes form an "H" as I did depict in code comment at one point.
maybe.
This is for Dan G ... Dan ... sometimes it picks the wrong part of loop to keep ... see this video.
BTW ... there was a reason why calc_planes was returning three planes. Part of that reason was to ensure the outer part of the loop was not selected. Now it is a "misnomer" because it only returns 1 plane.
I'm fairly certain you won't be able to connect/collect the proper set of faces without the two planes you decided to forgoe. They were critical to the process. If you don't use them ... then you must be doing some topological thing ... which will be wrong.
So ... original implementation (even if hacky) ... used three planes.
Two of then are "Book end" plane that go through the start and ene vertices ... one plane for each vertex. Then there is third plane (the cutter plane). The two book end planes were design to be perpendicular to the cutting/slicing plane. You want to keep the vertices/edges ... cut the ones ... that are between the two book end planes. I think you also need the MIDPOINT I was generating as well. See the logic in my original collect faces ...
Code:
collect_faces(Mid, Plane1, Plane2, Es, #we{}=We) ->
FaceSet = wings_face:from_edges(Es,We),
MyFs = fun(Fi, Acc) ->
Center = wings_face:center(Fi, We),
S1a = e3d_vec:plane_side(Mid, Plane1),
S2a = e3d_vec:plane_side(Center, Plane1),
S1b = e3d_vec:plane_side(Mid, Plane2),
S2b = e3d_vec:plane_side(Center, Plane2),
if (S1a ==S2a) andalso (S1b ==S2b) -> gb_sets:add(Fi,Acc); true -> Acc end
end,
gb_sets:fold(MyFs, gb_sets:empty(), FaceSet).
This is a projection of the cut object. The cutting plan is not important ...
It is the other two planes that feel even more important than the cutting plane. Sure ... you cut with the cutting plane. But the other two plus the midpoint are carefully crafted so that we can avoid wrong loop parts.
Together the three planes form an "H" as I did depict in code comment at one point.
