bernd wrote:Why is it possible to add all Edges to the BooleanFragments and the BooleanFragments behaves like a magician and deletes the doubeled ones?
I don't quite understand shat you are asking. I'll try to explain why did I do what I suggested.
In OCC, the connectivity of things is usually defined by sharing. For example, a compsolid. Compsolid is merely a list of solids, and the connectivity is defined by face sharing.Same with shells, and wires. I'm not sure if that's the only information about wire connectivity, but vertex sharing is at least required.
Part.Wire(edges) assembles wires. If the edges have coincident but not shared vertices, the vertices are made shared. As consequence, new edges are created. However if you feed edges where vertexes are pre-shared, Part.Wire will use the very edges you supply, and you can then test if the edge is in wire by looping through wire edges and comparing with isSame() method.
That's what booleanfragments was for. I used it as a way to establish vertex sharing, before building the wire.
I think the final bit of the puzzle is suggested by microelly2. That is why we have to add edges twice. I think, OCC adds edges one by one, and will silently reject an edge if it doesn't connect to the rest of the wire. Adding all edges the second time is a hacky workaround, which assumes that most of the wire was built by the very first call, and that adding an edge that already is in the wire will be ignored.