/
PlacementPy.xml
150 lines (149 loc) · 5.38 KB
/
PlacementPy.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PyObjectBase"
Name="PlacementPy"
Twin="Placement"
TwinPointer="Placement"
Include="Base/Placement.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Placement
A placement defines an orientation (rotation) and a position (base) in 3D space.
It is used when no scaling or other distortion is needed.
The following constructors are supported:
Placement() -- empty constructor
Placement(Placement) -- copy constructor
Placement(Matrix) -- 4D matrix consisting of rotation and translation
Placement(Base, Rotation) -- define position and rotation
Placement(Base, Rotation,Center) -- define position and rotation with center
Placement(Base, Axis, Angle) -- define position and rotation
</UserDocu>
<DeveloperDocu>Placement</DeveloperDocu>
</Documentation>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>
copy()
Returns a copy of this Placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="move">
<Documentation>
<UserDocu>
move(Vector)
Move the placement along the vector
</UserDocu>
</Documentation>
</Methode>
<Methode Name="translate">
<Documentation>
<UserDocu>
translate(Vector)
alias to move(), to be compatible with TopoShape.translate()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotate">
<Documentation>
<UserDocu>
rotate(center,axis,degree) - rotate the current placement around center and axis with degree
This method is compatible with TopoShape.rotate()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="multiply" Const="true">
<Documentation>
<UserDocu>
multiply(Placement)
Multiply this placement with another placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="multVec" Const="true">
<Documentation>
<UserDocu>
multVector(Vector) -> Vector
Compute the transformed vector using the placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toMatrix" Const="true">
<Documentation>
<UserDocu>
toMatrix()
convert the placement to a matrix representation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverse" Const="true">
<Documentation>
<UserDocu>
inverse() -> Placement
compute the inverse placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="pow" Const="true">
<Documentation>
<UserDocu>
pow(t, shorten = true): raise this placement to real power using ScLERP interpolation.
If 'shorten' is true, ensures rotation quaternion is net positive, to make the path shorter.
Also available as ** operator.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="sclerp" Const="true">
<Documentation>
<UserDocu>
sclerp(placement2, t, shorten = True): interpolate between self and placement2.
Interpolation is a continuous motion along a helical path, made of equal transforms if discretized.
t = 0.0 - return self. t = 1.0 - return placement2. t can also be outside of 0..1 range, for extrapolation.
If quaternions of rotations of the two placements differ in sign, the interpolation will
take a long path. If 'shorten' is true, the signs are harmonized before interpolation, and the
interpolation takes the shorter path.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isIdentity" Const="true">
<Documentation>
<UserDocu>
isIdentity() -> Bool
returns True if the placement has no displacement and no rotation
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Base" ReadOnly="false">
<Documentation>
<UserDocu>Vector to the Base Position of the Placement</UserDocu>
</Documentation>
<Parameter Name="Base" Type="Object" />
</Attribute>
<Attribute Name="Rotation" ReadOnly="false">
<Documentation>
<UserDocu>Orientation of the placement expressed as rotation</UserDocu>
</Documentation>
<Parameter Name="Rotation" Type="Object" />
</Attribute>
<Attribute Name="Matrix" ReadOnly="false">
<Documentation>
<UserDocu>Set/get matrix representation of this placement</UserDocu>
</Documentation>
<Parameter Name="Matrix" Type="Object" />
</Attribute>
<ClassDeclarations>public:
PlacementPy(const Placement & pla, PyTypeObject *T = &Type)
:PyObjectBase(new Placement(pla),T){}
Placement value() const
{ return *(getPlacementPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>