how to transform a vertex object into a vector?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

how to transform a vertex object into a vector?

Post by Vincent B »

When I turn a objet into a Part face, there no error.

Code: Select all

f = obj.TargetFace[0].getSubObject(obj.TargetFace[1][0])
face = Part.Face (f)
But what if the same fonction to make a Base vector?

Code: Select all

p = obj.TargetVertex[0].getSubObject(obj.TargetVertex[1][0])
center = Part.Vertex (p)
Give an error. :roll:
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: how to transform a vertex object into a vector?

Post by Gift »

Code: Select all

Part.Vertex(FreeCAD.Vector()).Point
:D
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: how to transform a vertex object into a vector?

Post by Vincent B »

just that! thanks. its working.
Post Reply