FreeCAD

Форк
0
/
TopoShapeWirePy.xml 
192 строки · 7.6 Кб
1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
3
  <PythonExport
4
      Father="TopoShapePy"
5
      Name="TopoShapeWirePy"
6
      Twin="TopoShape"
7
      TwinPointer="TopoShape"
8
      Include="Mod/Part/App/TopoShape.h"
9
      Namespace="Part"
10
      FatherInclude="Mod/Part/App/TopoShapePy.h"
11
      FatherNamespace="Part"
12
      Constructor="true">
13
    <Documentation>
14
      <Author Licence="LGPL" Name="Juergen Riegel" EMail="Juergen.Riegel@web.de" />
15
      <UserDocu>TopoShapeWire is the OpenCasCade topological wire wrapper</UserDocu>
16
    </Documentation>
17
        <Methode Name="makeOffset" Const="true">
18
            <Documentation>
19
                <UserDocu>Offset the shape by a given amount. DEPRECATED - use makeOffset2D instead.</UserDocu>
20
            </Documentation>
21
        </Methode>
22
        <Methode Name="add">
23
            <Documentation>
24
                <UserDocu>Add an edge to the wire
25
add(edge)
26
                </UserDocu>
27
            </Documentation>
28
        </Methode>
29
        <Methode Name="fixWire">
30
            <Documentation>
31
                <UserDocu>Fix wire
32
fixWire([face, tolerance])
33
--
34
A face and a tolerance can optionally be supplied to the algorithm:
35
                </UserDocu>
36
            </Documentation>
37
        </Methode>
38
        <Methode Name="makeHomogenousWires" Const="true">
39
        <Documentation>
40
            <UserDocu>Make this and the given wire homogeneous to have the same number of edges
41
makeHomogenousWires(wire) -> Wire
42
            </UserDocu>
43
        </Documentation>
44
    </Methode>
45
    <Methode Name="makePipe" Const="true">
46
      <Documentation>
47
        <UserDocu>Make a pipe by sweeping along a wire.
48
makePipe(profile) -> Shape
49
        </UserDocu>
50
      </Documentation>
51
    </Methode>
52
    <Methode Name="makePipeShell" Const="true">
53
      <Documentation>
54
        <UserDocu>Make a loft defined by a list of profiles along a wire.
55
makePipeShell(shapeList,[isSolid=False,isFrenet=False,transition=0]) -> Shape
56
--
57
Transition can be 0 (default), 1 (right corners) or 2 (rounded corners).
58
        </UserDocu>
59
      </Documentation>
60
    </Methode>
61
    <Methode Name="makeEvolved" Const="true" Keyword="true">
62
        <Documentation>
63
            <UserDocu>Profile along the spine</UserDocu>
64
        </Documentation>
65
    </Methode>
66
    <Methode Name="approximate" Const="true" Keyword="true">
67
      <Documentation>
68
        <UserDocu>Approximate B-Spline-curve from this wire
69
approximate([Tol2d,Tol3d=1e-4,MaxSegments=10,MaxDegree=3]) -> BSpline
70
        </UserDocu>
71
      </Documentation>
72
    </Methode>
73
    <Methode Name="discretize" Const="true" Keyword="true">
74
      <Documentation>
75
        <UserDocu>Discretizes the wire and returns a list of points.
76
discretize(kwargs) -> list
77
--
78
The function accepts keywords as argument:
79
discretize(Number=n) => gives a list of 'n' equidistant points
80
discretize(QuasiNumber=n) => gives a list of 'n' quasi equidistant points (is faster than the method above)
81
discretize(Distance=d) => gives a list of equidistant points with distance 'd'
82
discretize(Deflection=d) => gives a list of points with a maximum deflection 'd' to the wire
83
discretize(QuasiDeflection=d) => gives a list of points with a maximum deflection 'd' to the wire (faster)
84
discretize(Angular=a,Curvature=c,[Minimum=m]) => gives a list of points with an angular deflection of 'a'
85
                                    and a curvature deflection of 'c'. Optionally a minimum number of points
86
                                    can be set which by default is set to 2.
87

88
Optionally you can set the keywords 'First' and 'Last' to define a sub-range of the parameter range
89
of the wire.
90

91
If no keyword is given then it depends on whether the argument is an int or float.
92
If it's an int then the behaviour is as if using the keyword 'Number', if it's float
93
then the behaviour is as if using the keyword 'Distance'.
94

95
Example:
96

97
import Part
98
V=App.Vector
99

100
e1=Part.makeCircle(5,V(0,0,0),V(0,0,1),0,180)
101
e2=Part.makeCircle(5,V(10,0,0),V(0,0,1),180,360)
102
w=Part.Wire([e1,e2])
103

104
p=w.discretize(Number=50)
105
s=Part.Compound([Part.Vertex(i) for i in p])
106
Part.show(s)
107

108

109
p=w.discretize(Angular=0.09,Curvature=0.01,Minimum=100)
110
s=Part.Compound([Part.Vertex(i) for i in p])
111
Part.show(s)
112
        </UserDocu>
113
      </Documentation>
114
    </Methode>
115
    <Attribute Name="Mass" ReadOnly="true">
116
      <Documentation>
117
        <UserDocu>Returns the mass of the current system.</UserDocu>
118
      </Documentation>
119
      <Parameter Name="Mass" Type="Object"/>
120
    </Attribute>
121
    <Attribute Name="CenterOfMass" ReadOnly="true">
122
      <Documentation>
123
        <UserDocu>Returns the center of mass of the current system.
124
If the gravitational field is uniform, it is the center of gravity.
125
The coordinates returned for the center of mass are expressed in the
126
absolute Cartesian coordinate system.</UserDocu>
127
      </Documentation>
128
      <Parameter Name="CenterOfMass" Type="Object"/>
129
    </Attribute>
130
    <Attribute Name="MatrixOfInertia" ReadOnly="true">
131
      <Documentation>
132
        <UserDocu>Returns the matrix of inertia. It is a symmetrical matrix.
133
The coefficients of the matrix are the quadratic moments of
134
inertia.
135

136
 | Ixx Ixy Ixz 0 |
137
 | Ixy Iyy Iyz 0 |
138
 | Ixz Iyz Izz 0 |
139
 | 0   0   0   1 |
140

141
The moments of inertia are denoted by Ixx, Iyy, Izz.
142
The products of inertia are denoted by Ixy, Ixz, Iyz.
143
The matrix of inertia is returned in the central coordinate
144
system (G, Gx, Gy, Gz) where G is the centre of mass of the
145
system and Gx, Gy, Gz the directions parallel to the X(1,0,0)
146
Y(0,1,0) Z(0,0,1) directions of the absolute cartesian
147
coordinate system.</UserDocu>
148
      </Documentation>
149
      <Parameter Name="MatrixOfInertia" Type="Object"/>
150
    </Attribute>
151
    <Attribute Name="StaticMoments" ReadOnly="true">
152
      <Documentation>
153
        <UserDocu>Returns Ix, Iy, Iz, the static moments of inertia of the
154
 current system; i.e. the moments of inertia about the
155
 three axes of the Cartesian coordinate system.</UserDocu>
156
      </Documentation>
157
      <Parameter Name="StaticMoments" Type="Object"/>
158
    </Attribute>
159
    <Attribute Name="PrincipalProperties" ReadOnly="true">
160
      <Documentation>
161
        <UserDocu>Computes the principal properties of inertia of the current system.
162
 There is always a set of axes for which the products
163
 of inertia of a geometric system are equal to 0; i.e. the
164
 matrix of inertia of the system is diagonal. These axes
165
 are the principal axes of inertia. Their origin is
166
 coincident with the center of mass of the system. The
167
 associated moments are called the principal moments of inertia.
168
 This function computes the eigen values and the
169
 eigen vectors of the matrix of inertia of the system.</UserDocu>
170
      </Documentation>
171
      <Parameter Name="PrincipalProperties" Type="Dict"/>
172
    </Attribute>
173
    <Attribute Name="OrderedEdges" ReadOnly="true">
174
      <Documentation>
175
       <UserDocu>List of ordered edges in this shape.</UserDocu>
176
      </Documentation>
177
      <Parameter Name="OrderedEdges" Type="List"/>
178
   </Attribute>
179
   <Attribute Name="Continuity" ReadOnly="true">
180
       <Documentation>
181
           <UserDocu>Returns the continuity</UserDocu>
182
       </Documentation>
183
       <Parameter Name="Continuity" Type="String"/>
184
   </Attribute>
185
   <Attribute Name="OrderedVertexes" ReadOnly="true">
186
     <Documentation>
187
      <UserDocu>List of ordered vertexes in this shape.</UserDocu>
188
     </Documentation>
189
     <Parameter Name="OrderedVertexes" Type="List"/>
190
  </Attribute>
191
  </PythonExport>
192
</GenerateModel>
193

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.