I have this object once I do a projection I can't get the wire anymore to recreate a face from the projected object, does anyone know how to fix that?
Code: Select all
print("original wire")
Part.Wire(App.ActiveDocument.a.Shape.Edges).Edges
print("create a projection")
e=App.ActiveDocument.b.Shape.project([App.ActiveDocument.a.Shape])
e.Edges
print("sort edges, wrong grouped - original wire is dead")
Part.sortEdges(e.Edges)
Code: Select all
>>> print("original wire")
original wire
>>> Part.Wire(App.ActiveDocument.a.Shape.Edges).Edges
[<Edge object at 0x7ffb0cae6c50>, <Edge object at 0x7ffb0ae17aa0>, <Edge object at 0x7ffb0ae8a750>, <Edge object at 0x7ffb0ae99130>, <Edge object at 0x7ffb0ae92e50>]
>>> print("create a projection")
create a projection
>>> e=App.ActiveDocument.b.Shape.project([App.ActiveDocument.a.Shape])
>>> e.Edges
[<Edge object at 0x7ffb0ab879c0>, <Edge object at 0x7ffb0ab0ae30>, <Edge object at 0x7ffb0abb6ee0>, <Edge object at 0x7ffb0ab0cee0>, <Edge object at 0x7ffb0c897970>]
>>> print("sort edges, wrong grouped - original wire is dead")
sort edges, wrong grouped - original wire is dead
>>> Part.sortEdges(e.Edges)
[[<Edge object at 0x7ffb0ad47610>, <Edge object at 0x7ffb0ad0af30>], [<Edge object at 0x7ffb0cbd4b20>, <Edge object at 0x7ffb0cbd4ba0>, <Edge object at 0x7ffb0cbfe460>]]
Code: Select all
>>> for i in e.Edges:
... print("%s %s" % (str(i.valueAt(i.FirstParameter)), str(i.valueAt(i.LastParameter))))
...
Vector (62.0, -11.819997052357218, -4.200000000000213) Vector (62.0, -3.3199967188075306, -4.200000000000213)
Vector (62.0, -11.819997052357218, -4.200000000000213) Vector (57.74453838142966, -11.819997052357218, -4.200000000000213)
Vector (57.74453755985066, -11.819997526696032, -4.200000000000213) Vector (50.668701354376935, -4.499997052357316, -4.200000000000214)
Vector (50.668701354376935, -4.499997052357315, -4.200000000000213) Vector (48.502275716517204, -3.3199970523573406, -4.200000000000213)
Vector (62.0, -3.319997052357227, -4.200000000000213) Vector (48.50227571651723, -3.319997052357227, -4.200000000000213)