Hi!
In my efforts to improve revolve, it was decided it’s a good idea to unify some of the code for making faces with holes from wires (from sketches, and not).
There are 5 routines I’m aware of:
- in PartDesign
- in Part Extrude
- in Part Make Face From Sketch
- in Part Revolve
- the new one I made for Part Revolve
I’m trying to digest them. So far, I’ve digested PartDesign one, and here’s the outline of what it does:
PartDesign FaceMaker
- sort wires by diagonal lengths of their bounding boxes. This ensures that outer wires come before inner (hole) wires in the list.
- split wires into groups, each group corresponding to a single face. This is done by adding wires one by one to the groups, by testing if the first vertex of the wire being added is inside a temporary face made of outer wire of the group.
- make the faces (there is a check that the orientation of the inner wire is correct, by making a temporary face and comparing normal)
Capability. Makes set of faces with holes.
Requirements/Limitations:
- faces must be on one plane (but it’s not required to know the plane beforehand).
- if wires are intersecting, the result may be horribly broken (not just a compound of faces that intersect - some faces may have badly formed holes)
- takes list of wires as input, so pre-processing/wrapping is required for compound traversal and looped edge support.