Vector API/en: Difference between revisions
(Updating to match new version of source page) |
Renatorivo (talk | contribs) No edit summary |
||
Line 29: | Line 29: | ||
{{APIProperty|z|the z coordinate of a vector.}} |
{{APIProperty|z|the z coordinate of a vector.}} |
||
[[Category:API]] |
[[Category:API/en]] |
||
{{clear}} |
{{clear}} |
Revision as of 21:07, 11 March 2016
Vectors are used everywhere in FreeCAD.
Example:
v=FreeCAD.Vector()
v=FreeCAD.Vector(1,0,0)
v=FreeCAD.Base.Vector()
v2 = FreeCAD.Vector(3,2,-5)
v3 = v.add(v2)
print v3.Length
Description:
Returns: the distance between the vector and a line between Vector1 and Vector2.
Description:
Returns: the distance between the vector and a plane defined by a point and a normal.
Description: projects the vector on a line between Vector1 and Vector2.
Returns: nothing.
Description: projects the vector on a plane defined by a point and a normal.
Returns: nothing.
Description: Same as multiply but lets specify different values for x, y and z directions.
Returns: nothing.
Description: subtracts another vector from the first one.
Returns: the resulting vector.