Sun, 04/10/2022 - 12:01
Hi,
I have several offset curves, each converted to a wire (kcCurve01.jpg). Although all depend on the same contour, they have different direction. To visualize this, I painted the first segment with green color, the last segment with red.
(by the way - offset curves from first picture have different offset, but that should not change anything)
I wanted to cut those wires by the transparent cylinder, but BRepAlgoAPI_Splitter did not do the job. Probabely my fault, but without help I was not able to solve the problem. So I wrote my own clipping algo (kcCurve06.jpg).
The idea on that picture was, to process all subwires of one quadrant with the same color. But obviously, the order of the subwires created has no specific order. So for easier handling of subwires I exported it to a custom format. Then after sorting I converted it back to new wires (kcCurve07.jpg). Although I already check orientation of TopoDS_Edge before working with Geom-objects, some wires look weird after converting it back.
Where else should I look for inversion of direction, beside TopoDS_Edge?
Looks like some curves are double inverted.
Or is there a better way to sort wires without converting to custom format?