PAL11200. Fix deflection example

This commit is contained in:
eap 2006-02-16 11:05:40 +00:00
parent 00c8816937
commit f11ae15a45

View File

@ -284,57 +284,46 @@ else
<p class="whs3"># create vertices</p> <p class="whs3"># create vertices</p>
<p class="whs2">px &nbsp;&nbsp;= <p class="whs2">px &nbsp;&nbsp;=geompy.MakeVertex(100., 0. &nbsp;,0. &nbsp;)</p>
geompy.MakeVertex(100., 0. &nbsp;,
0. &nbsp;)</p>
<p class="whs2">py &nbsp;&nbsp;= <p class="whs2">py &nbsp;&nbsp;=geompy.MakeVertex(0. &nbsp;,100., 0. &nbsp;)</p>
geompy.MakeVertex(0. &nbsp;,
100., 0. &nbsp;)</p>
<p class="whs2">pz &nbsp;&nbsp;= <p class="whs2">pz &nbsp;&nbsp;=geompy.MakeVertex(0. &nbsp;,0. &nbsp;, 100.)</p>
geompy.MakeVertex(0. &nbsp;,
0. &nbsp;, 100.)</p>
<p class="whs2">&nbsp;</p> <p class="whs2">&nbsp;</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">&nbsp;</p> <p class="whs2">&nbsp;</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">&nbsp;</p> <p class="whs2">&nbsp;</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">&nbsp;</p> <p class="whs2">&nbsp;</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">&nbsp;</p> <p class="whs2">&nbsp;</p>
<p class="whs3"># add objects in the <p class="whs3"># add objects in the study</p>
study</p>
<p class="whs2">id_face1 = geompy.addToStudy(face1,&quot;Face1&quot;)</p> <p class="whs2">id_face1 = geompy.addToStudy(face1,&quot;Face1&quot;)</p>
<p class="whs2">id_arc = geompy.addToStudyInFather(arc,&quot;Arc Edge&quot;)</p>
<p class="whs2">&nbsp;</p> <p class="whs2">&nbsp;</p>
@ -350,44 +339,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,&quot;Face compound : hexahedrical mesh&quot;)</p>
&quot;Face compound : hexahedrical mesh&quot;)</p>
<p class="whs2">algo = hexa.Triangle()</p> <p class="whs2">algo = hexa.Triangle()</p>
<p class="whs2">&nbsp;</p> <p class="whs2">&nbsp;</p>
<p class="whs3"># define &quot;MaxElementArea&quot; <p class="whs3"># define &quot;MaxElementArea&quot;hypothesis</p>
hypothesis to be applied &nbsp;to
each triangle</p>
<p class="whs2">algo.MaxElementArea(30)</p> <p class="whs2">algo.MaxElementArea(30)</p>
<p class="whs2">&nbsp;</p> <p class="whs2">&nbsp;</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">&nbsp;</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">&nbsp;</p> <p class="whs2">&nbsp;</p>
<p class="whs3"># define &quot;NumberOfSegments&quot; <p class="whs3"># define &quot;NumberOfSegments&quot;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">&nbsp;</p> <p class="whs2">&nbsp;</p>
<p class="whs3"># define &quot;Deflection1D&quot; <p class="whs3"># define a local &quot;Deflection1D&quot;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">&nbsp;</p> <p class="whs2">&nbsp;</p>