I create two wires, the start point of ‘wire2’ being at the endpoint of ‘wire1’. I then create a new wire, ‘unionOfWires’ by joining the two wires. I also create a new wire ‘unionOfEdges’ by joining the edges:[code]Wire myWires;
Edge myEdges;
Body unionWire;
Body unionOfWires;
Body unionOfEdges;
// Create wires
Body wire1 = Body.CreateLine(new Vector3(0.0, 0.0, 0.01), new Vector3(0.01, 0.0, 0.01));
Body wire2 = Body.CreateLine(new Vector3(0.01, 0.0, 0.01), new Vector3(0.02, 0.0, 0.01));
// Create new wire by joining wires
myWires = new Wire[2] { wire1.Shells[0].Wires[0], wire2.Shells[0].Wires[0] };
unionWire = Body.JoinCurves(myWires);
unionOfWires = unionWire[0];
// Create new wire by joining edges
myEdges = new Edge[2] { wire1.Shells[0].Wires[0].Coedges[0].Edge,
wire2.Shells[0].Wires[0].Coedges[0].Edge };
unionWire = Body.JoinEdges(myEdges, 0.00001);
unionOfEdges = unionWire[0];[/code]
Then unionOfWires.Shells[0].Wires[0].StartVertex.Position)); and
unionOfWires.Shells[0].Wires[0].EndVertex.Position)); return the same values as for 'wire1. The same happens with ‘unionOfEdges’. I would expect the EndVertex of the new wire to be the same as the EndVertex of ‘wire2’. Is this behaviour correct?
I did also expect the EndVertex of wire2 to coincide with the EndVertex of unionOfWires.
If you look into the resulting Body unionOfWires, it consists of one Wire (no surprise), which in turns consists of two coedges/edges, corresponding to to wire1 and wire2.
The individual coedges has the same Start/EndVertex as wire1 and wire2.