Vertex to Vector conversion

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
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Vertex to Vector conversion

Post by Joel_graff »

Just curious, is there a built-in way of converting a Vertex object to a FreeCAD.Vector object?
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Vertex to Vector conversion

Post by wandererfan »

Joel_graff wrote: Wed Oct 17, 2018 3:59 pm Just curious, is there a built-in way of converting a Vertex object to a FreeCAD.Vector object?
Sure is.....

Code: Select all

>>> ov0 = obj.Shape.Vertexes[0]
>>> ov0
<Vertex object at 0x64f26d0>
>>> ov0.Point
Vector (-2.64350581169, -1.19633114338, 0.0)
>>> 
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Vertex to Vector conversion

Post by Joel_graff »

wandererfan wrote: Wed Oct 17, 2018 4:55 pm Sure is.....
Aha! I thought there was. I think I even used that at one time. ..

Thanks!
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply