Vector API: Difference between revisions
mNo edit summary |
Renatorivo (talk | contribs) (languages it) |
||
Line 41: | Line 41: | ||
{{APIProperty|z|the z coordinate of a vector.}} |
{{APIProperty|z|the z coordinate of a vector.}} |
||
{{languages | {{es|Vector_API/es}} }} |
{{languages | {{es|Vector_API/es}} {{it|Vector_API/it}} }} |
||
[[Category:API]] |
[[Category:API]] |
Revision as of 19:03, 25 April 2013
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.