How to transformate a Vector ? (Continue...)

Need help, or want to share a macro? Post here!
freecadlzh
Posts: 57
Joined: Fri Mar 06, 2020 12:52 pm

How to transformate a Vector ? (Continue...)

Postby freecadlzh » Tue Jun 23, 2020 10:52 pm

Code: Select all


#Creat a Cube object
import Part
App.ActiveDocument.addObject("Part::Box","Box")
App.ActiveDocument.ActiveObject.Label = "Cube"

#Add some Vector to my Points List 
FreeCAD.MyPointsList.append(FreeCAD.Vector(10,10,10))
FreeCAD.MyPointsList.append(FreeCAD.Vector(20,20,20))
FreeCAD.MyPointsList.append(FreeCAD.Vector(30,30,30))

Now , prog runs , user transformate the "Cube" model in the 3d View. So the Placement property of the "Cube" object changed. Assume user translate the cube 3mm in X , and rotate the cube 30°, So the placement property of the cube will be "Cube.Placement.Angle = 30" and "Cube.Placement.Position.X = 3" .

Now ,I want the Vectors in FreeCAD.MyPointsList can transformate simultaneously to the "Cube" object. So I want to set the Vector's "Placement" property, but I find there is no Placement property in Vector.

Now ,How can I transformate the Vectors in FreeCAD.MyPointsList ?

Need suggestions, Thanks a lot.
User avatar
Chris_G
Posts: 1343
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: How to transformate a Vector ? (Continue...)

Postby Chris_G » Wed Jun 24, 2020 6:21 am

Why this new topic ?
There is already a topic opened, with exactly the same post.
Spamming the forum that way is not very subtle.
chrisb
Posts: 25206
Joined: Tue Mar 17, 2015 9:14 am

Re: How to transformate a Vector ? (Continue...)

Postby chrisb » Wed Jun 24, 2020 6:38 am

I have already warned freecadlzh that this is a strong spam indcator, especially if further inquiries of helpers are not answered.
freecadlzh
Posts: 57
Joined: Fri Mar 06, 2020 12:52 pm

Re: How to transformate a Vector ? (Continue...)

Postby freecadlzh » Mon Jun 29, 2020 4:46 pm

Chris_G wrote:
Wed Jun 24, 2020 6:21 am
Why this new topic ?
There is already a topic opened, with exactly the same post.
Spamming the forum that way is not very subtle.
Thank you for your advice. I will follow your advice.
freecadlzh
Posts: 57
Joined: Fri Mar 06, 2020 12:52 pm

Re: How to transformate a Vector ? (Continue...)

Postby freecadlzh » Mon Jun 29, 2020 4:46 pm

chrisb wrote:
Wed Jun 24, 2020 6:38 am
I have already warned freecadlzh that this is a strong spam indcator, especially if further inquiries of helpers are not answered.
Thank you for your advice. I will follow your advice.