Vector API/ro: Difference between revisions
(Created page with "Exempluː") |
(Created page with "{{APIProperty|Length|returnează lungimea vectorului.}} {{APIFunction|add|Vector|adaugă un alt vector la acesta.|vector}} {{APIFunction|cross|Vector|produsul vectorial între...") |
||
Line 13: | Line 13: | ||
{{APIProperty|Length| |
{{APIProperty|Length|returnează lungimea vectorului.}} |
||
{{APIFunction|add|Vector| |
{{APIFunction|add|Vector|adaugă un alt vector la acesta.|vector}} |
||
{{APIFunction|cross|Vector| |
{{APIFunction|cross|Vector|produsul vectorial între acest vector și un altul.|vector}} |
||
{{APIFunction|distanceToLine|Vector1,Vector2| |
{{APIFunction|distanceToLine|Vector1,Vector2| distanța dintre vector și o linie prin Vector1 în direcția Vector2.|float}} |
||
{{APIFunction|distanceToLineSegment|Vector1,Vector2|a vector to the closest point on a line segment from Vector1 to Vector2.|vector}} |
{{APIFunction|distanceToLineSegment|Vector1,Vector2|a vector to the closest point on a line segment from Vector1 to Vector2.|vector}} |
||
{{APIFunction|distanceToPlane|Vector1,Vector2|the distance between the vector and a plane defined by a point and a normal.|float}} |
{{APIFunction|distanceToPlane|Vector1,Vector2|the distance between the vector and a plane defined by a point and a normal.|float}} |
||
Line 26: | Line 26: | ||
{{APIFunction|projectToPlane|Vector1,Vector2|projects the vector on a plane defined by a point (Vector1) and a normal (Vector2).|nothing}} |
{{APIFunction|projectToPlane|Vector1,Vector2|projects the vector on a plane defined by a point (Vector1) and a normal (Vector2).|nothing}} |
||
{{APIFunction|scale|Float,Float,Float|Same as multiply but lets specify different values for x, y and z directions. (non-uniform scale)|nothing}} |
{{APIFunction|scale|Float,Float,Float|Same as multiply but lets specify different values for x, y and z directions. (non-uniform scale)|nothing}} |
||
{{APIFunction|sub|Vector| |
{{APIFunction|sub|Vector|scăderea altui vector din acesta.|vector}} |
||
{{APIProperty|x| |
{{APIProperty|x|coordonata x a vectorului.}} |
||
{{APIProperty|y| |
{{APIProperty|y|coordonata y a vectorului.}} |
||
{{APIProperty|z| |
{{APIProperty|z|coordonata z a vectorului}} |
||
[[Category:API]] |
[[Category:API]] |
Revision as of 08:32, 5 February 2019
Vectorii sunt utilizați peste tot în FreeCAD.
Exempluː
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: distanța dintre vector și o linie prin Vector1 în direcția Vector2.
Returns: float
Description: a vector to the closest point on a line segment from Vector1 to Vector2.
Returns: vector
Description: the distance between the vector and a plane defined by a point and a normal.
Returns: float
Description: multiplies (uniform scale) a vector by the given factor.
Returns: nothing
Description: projects the vector on a line through Vector1 in direction Vector2.
Returns: nothing
Description: projects the vector on a plane defined by a point (Vector1) and a normal (Vector2).
Returns: nothing
Description: Same as multiply but lets specify different values for x, y and z directions. (non-uniform scale)
Returns: nothing