Code: Select all
TotalNumofPoint=numpy.size(PointsListX)
listtmpPoints = []
for i in range(TotalNumofPoint):
listtmpPoints.append(FreeCAD.Vector(PointsListX[0][i],PointsListY[0][i],PointsListZ[0][i]))
subline = Draft.makeWire(listtmpPoints,closed=False,face=False,support=None)
mydistance = FreeCAD.Vector(1, 0, -1)
Draft.move(subline , mydistance)
Draft.autogroup(subline )
Now I selected the model and using the property panel,The property "Placement"\"Position"\"X"or"Y"or"Z" can change the Draft model place.
When I changed the model, I find the "End" property and the "Start" property will changed Automatically.
But by the python script "App.ActiveDocument.getObject("Wire001").Points[1]", I can find the points data in the Draft model "is not changed".
I have asked this question before. Some friends tell me to "Change the points data manually". I think it is a good way.
But my question is: Where can I write the code? I guess there is some event may be activated when I changed the Draft model's Placement property, but I do not know what name is the event,an where the event code is?
Need suggestion,Thanks a lot.