mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-12 17:34:34 +05:00
PAL11200. fix Deflection1D example
This commit is contained in:
parent
a32a7716fb
commit
5fc163de50
@ -284,58 +284,54 @@ else
|
|||||||
|
|
||||||
<p class="whs3"># create vertices</p>
|
<p class="whs3"># create vertices</p>
|
||||||
|
|
||||||
<p class="whs2">px =
|
<p class="whs2">px =geompy.MakeVertex(100., 0. ,0. )</p>
|
||||||
geompy.MakeVertex(100., 0. ,
|
|
||||||
0. )</p>
|
|
||||||
|
|
||||||
<p class="whs2">py =
|
<p class="whs2">py =geompy.MakeVertex(0. ,100., 0. )</p>
|
||||||
geompy.MakeVertex(0. ,
|
|
||||||
100., 0. )</p>
|
|
||||||
|
|
||||||
<p class="whs2">pz =
|
<p class="whs2">pz =geompy.MakeVertex(0. ,0. , 100.)</p>
|
||||||
geompy.MakeVertex(0. ,
|
|
||||||
0. , 100.)</p>
|
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># create a vector from
|
<p class="whs3"># create a vector from
|
||||||
two points</p>
|
two points</p>
|
||||||
|
|
||||||
<p class="whs2">vxy = geompy.MakeVector(px,
|
<p class="whs2">vxy = geompy.MakeVector(px,py)</p>
|
||||||
py)</p>
|
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># create an arc from
|
<p class="whs3"># create an arc from
|
||||||
three points</p>
|
three points</p>
|
||||||
|
|
||||||
<p class="whs2">arc = geompy.MakeArc(py,
|
<p class="whs2">arc = geompy.MakeArc(py, pz, px)</p>
|
||||||
pz, px)</p>
|
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># create a wire</p>
|
<p class="whs3"># create a wire</p>
|
||||||
|
|
||||||
<p class="whs2">wire = geompy.MakeWire([vxy,
|
<p class="whs2">wire = geompy.MakeWire([vxy,arc])</p>
|
||||||
arc])</p>
|
|
||||||
|
|
||||||
<p class="whs2">isPlanarFace = 1</p>
|
<p class="whs2">isPlanarFace = 1</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># create a face from
|
<p class="whs3"># create a face from the wire</p>
|
||||||
the wire</p>
|
|
||||||
|
|
||||||
<p class="whs2">face1 = geompy.MakeFace(wire,
|
<p class="whs2">face1 = geompy.MakeFace(wire,isPlanarFace)</p>
|
||||||
isPlanarFace)</p>
|
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># add objects in the
|
<p class="whs3"># get edges from the face</p>
|
||||||
study</p>
|
|
||||||
|
<p class="whs2">vxy, arc = geompy.SubShapeAll(face1, geompy.ShapeType["EDGE"])</p>
|
||||||
|
|
||||||
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
|
<p class="whs3"># add objects in the study</p>
|
||||||
|
|
||||||
<p class="whs2">id_face1 = geompy.addToStudy(face1,"Face1")</p>
|
<p class="whs2">id_face1 = geompy.addToStudy(face1,"Face1")</p>
|
||||||
|
|
||||||
|
<p class="whs2">id_arc = geompy.addToStudyInFather(face1,arc,"Arc Edge")</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># display faces</p>
|
<p class="whs3"># display faces</p>
|
||||||
@ -350,44 +346,34 @@ else
|
|||||||
|
|
||||||
<p class="whs3"># create hexahedral mesh</p>
|
<p class="whs3"># create hexahedral mesh</p>
|
||||||
|
|
||||||
<p class="whs2">hexa = smesh.Mesh(face1,
|
<p class="whs2">hexa = smesh.Mesh(face1,"Face compound : hexahedrical mesh")</p>
|
||||||
"Face compound : hexahedrical mesh")</p>
|
|
||||||
|
|
||||||
<p class="whs2">algo = hexa.Triangle()</p>
|
<p class="whs2">algo = hexa.Triangle()</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># define "MaxElementArea"
|
<p class="whs3"># define "MaxElementArea"hypothesis</p>
|
||||||
hypothesis to be applied to
|
|
||||||
each triangle</p>
|
|
||||||
|
|
||||||
<p class="whs2">algo.MaxElementArea(30)</p>
|
<p class="whs2">algo.MaxElementArea(30)</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># create a quadrangle
|
<p class="whs3"># create a local hypothesis on the wire</p>
|
||||||
2D algorithm for faces</p>
|
|
||||||
|
|
||||||
<p class="whs2">hexa.Quadrangle()</p>
|
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
|
||||||
|
|
||||||
<p class="whs3"># create a local hypothesis</p>
|
|
||||||
|
|
||||||
<p class="whs2">algo = hexa.Segment(wire)</p>
|
<p class="whs2">algo = hexa.Segment(wire)</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># define "NumberOfSegments"
|
<p class="whs3"># define "NumberOfSegments"hypothesis to cut
|
||||||
hypothesis to cut an edge in a fixed number of segments</p>
|
a straight edge in a fixed number of segments</p>
|
||||||
|
|
||||||
<p class="whs2">algo.NumberOfSegments(6)</p>
|
<p class="whs2">algo.NumberOfSegments(6)</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
|
||||||
<p class="whs3"># define "Deflection1D"
|
<p class="whs3"># define a local "Deflection1D"hypothesis on the arc</p>
|
||||||
hypothesis</p>
|
|
||||||
|
|
||||||
|
<p class="whs2">algo = hexa.Segment(arc)</p>
|
||||||
<p class="whs2">algo.Deflection1D(1)</p>
|
<p class="whs2">algo.Deflection1D(1)</p>
|
||||||
|
|
||||||
<p class="whs2"> </p>
|
<p class="whs2"> </p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user