PAL11898: Improve docs for Extrusion Along a Path.
@ -14,22 +14,48 @@ if (navigator.appName !="Netscape")
|
|||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
<!--
|
<!--
|
||||||
table.whs1 { x-cell-content-align:top; width:100%; border-spacing:0px; }
|
img_whs1 { border:none; width:27px; height:24px; border-style:none; }
|
||||||
col.whs2 { width:50%; }
|
img_whs2 { border:none; width:387px; height:334px; float:none; border-style:none; }
|
||||||
tr.whs3 { x-cell-content-align:top; }
|
ul.whs3 { list-style:disc; }
|
||||||
td.whs4 { width:50%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }
|
table.whs4 { x-cell-content-align:top; width:100%; border-spacing:0px; }
|
||||||
img_whs5 { border:none; width:335px; height:323px; border-style:none; }
|
col.whs5 { width:50%; }
|
||||||
td.whs6 { width:50%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }
|
tr.whs6 { x-cell-content-align:top; }
|
||||||
img_whs7 { border:none; width:350px; height:323px; border-style:none; }
|
td.whs7 { width:50%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-top-style:none; border-bottom-style:none; }
|
||||||
p.whs8 { margin-left:40px; }
|
p.whs8 { margin-left:0px; margin-right:53px; }
|
||||||
img_whs9 { border:none; width:27px; height:24px; border-style:none; }
|
img_whs9 { border:none; width:389px; height:334px; float:none; border-style:none; }
|
||||||
img_whs10 { border:none; width:434px; height:541px; float:none; border-style:none; }
|
td.whs10 { width:50%; padding-right:10px; padding-left:10px; border-top-style:none; border-bottom-style:none; border-right-style:none; }
|
||||||
ul.whs11 { list-style:disc; }
|
p.whs11 { margin-left:0px; }
|
||||||
p.whs12 { margin-left:84px; }
|
p.whs12 { margin-left:40px; }
|
||||||
img_whs13 { border:none; width:26px; height:25px; border-style:none; }
|
col.whs13 { width:33.333%; }
|
||||||
img_whs14 { border:none; width:29px; height:28px; border-style:none; }
|
td.whs14 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-left-style:none; border-top-style:none; }
|
||||||
|
td.whs15 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-top-style:none; }
|
||||||
|
td.whs16 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-top-style:none; border-right-style:none; }
|
||||||
|
td.whs17 { width:33.333%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-bottom-style:none; }
|
||||||
|
td.whs18 { width:33.333%; padding-right:10px; padding-left:10px; border-right-style:none; border-bottom-style:none; }
|
||||||
|
td.whs19 { width:33.333%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; }
|
||||||
|
p.whs20 { font-weight:bold; margin-left:0px; }
|
||||||
|
p.whs21 { font-weight:bold; }
|
||||||
|
img_whs22 { border:none; width:441px; height:541px; float:none; border-style:none; }
|
||||||
|
p.whs23 { margin-left:84px; }
|
||||||
|
p.whs24 { margin-left:156px; }
|
||||||
|
p.whs25 { margin-left:156px; font-weight:bold; }
|
||||||
|
img_whs26 { border:none; width:26px; height:25px; border-style:none; }
|
||||||
|
img_whs27 { border:none; width:29px; height:28px; border-style:none; }
|
||||||
-->
|
-->
|
||||||
</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
|
</style><script type="text/javascript" language="JavaScript">
|
||||||
|
<!--
|
||||||
|
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
|
||||||
|
{
|
||||||
|
var strNSS = "<style type='text/css'>";
|
||||||
|
strNSS += "p.whs8 {margin-left:1pt; }";
|
||||||
|
strNSS += "p.whs11 {margin-left:1pt; }";
|
||||||
|
strNSS += "p.whs20 {margin-left:1pt; }";
|
||||||
|
strNSS +="</style>";
|
||||||
|
document.write(strNSS);
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
|
||||||
<!--
|
<!--
|
||||||
function reDo() {
|
function reDo() {
|
||||||
if (innerWidth != origWidth || innerHeight != origHeight)
|
if (innerWidth != origWidth || innerHeight != origHeight)
|
||||||
@ -88,96 +114,251 @@ if (window.writeIntopicBar)
|
|||||||
writeIntopicBar(4);
|
writeIntopicBar(4);
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<h1>Extrusion along a path</h1>
|
<h1><img src="image101.gif" width="27px" height="24px" border="0" class="img_whs1">Extrusion along a path</h1>
|
||||||
|
|
||||||
<p>In principle, Extrusion along a path works in the same way as Extrusion,
|
<p>In principle, <span style="font-weight: bold;"><B>Extrusion along a path</B></span>
|
||||||
|
works in the same way as <span style="font-weight: bold;"><B>Extrusion</B></span>,
|
||||||
the main difference is that we define not a vector, but a path of extrusion
|
the main difference is that we define not a vector, but a path of extrusion
|
||||||
which must be a meshed edge or wire. To get an idea of how this algorithm
|
which must be a meshed edge. To get an idea of how this algorithm works,
|
||||||
works, let's see the left image, where we have a 1D circle edge and a
|
examine several examples, starting from the most simple case of extrusion
|
||||||
2D hexagon to be extruded along this path (in the picture they are angular
|
along a straight edge. In all examples the same mesh will be extruded
|
||||||
because we show the wireframe of the mesh). And now let's see the right
|
along different paths and with different parameters. This sample 2D mesh
|
||||||
image, showing the result of the operation. </p>
|
has two quadrangle faces and seven edges. Look at the picture, where white
|
||||||
|
digits are the node numbers and green are the element numbers:</p>
|
||||||
|
|
||||||
|
<p><span style="margin-left: 40px;"><img src="pics/mesh_for_extr_along_path.png" x-maintain-ratio="TRUE" width="387px" height="334px" border="0" class="img_whs2"> .</span></p>
|
||||||
|
|
||||||
<p> </p>
|
<p> </p>
|
||||||
|
|
||||||
<table x-use-null-cells cellspacing="0" width="100%" class="whs1">
|
<ul type="disc" class="whs3">
|
||||||
<col class="whs2">
|
|
||||||
<col class="whs2">
|
|
||||||
|
|
||||||
<tr valign="top" class="whs3">
|
<li class=kadov-p><p><span style="font-weight: bold;"><B>Extrusion along
|
||||||
<td width="50%" class="whs4">
|
a straight edge</B></span> (not using base point or angles)</p></li>
|
||||||
<p><img src="image102.gif" width="335px" height="323px" border="0" class="img_whs5"></td>
|
</ul>
|
||||||
<td width="50%" class="whs6">
|
|
||||||
<p><img src="image104.gif" width="350px" height="323px" border="0" class="img_whs7"></td></tr>
|
<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
|
||||||
|
<col class="whs5">
|
||||||
|
<col class="whs5">
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="50%" class="whs7">
|
||||||
|
<p class="whs8"><img src="pics/straight_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="50%" class="whs10">
|
||||||
|
<p class="whs11"><img src="pics/straight_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p> </p>
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
<p> </p>
|
<p class="whs12">The left image shows a 1D path mesh, built
|
||||||
|
on a linear edge, and the initial 2D mesh. The right image shows the result
|
||||||
|
of extrusion of two edges (#1 and #2) of the initial mesh along the path.
|
||||||
|
Node #1 of path mesh has been selected as <span style="font-weight: bold;"><B>Start
|
||||||
|
node</B></span>.</p>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
|
<li class=kadov-p><p><span style="font-weight: bold;"><B>Extrusion along
|
||||||
|
a curvilinear edge</B></span> (with and without angles)</p></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
|
||||||
|
<col class="whs13">
|
||||||
|
<col class="whs13">
|
||||||
|
<col class="whs13">
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="33.333%" class="whs14">
|
||||||
|
<p><img src="pics/curvi_simple_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="33.333%" class="whs15">
|
||||||
|
<p><img src="pics/curvi_simple_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="33.333%" class="whs16">
|
||||||
|
<p><img src="pics/curvi_angles_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="33.333%" class="whs17">
|
||||||
|
<p>The left image shows a 1D path mesh, built on curvilinear edge, and
|
||||||
|
the initial 2D
|
||||||
|
mesh.</td>
|
||||||
|
<td width="33.333%" class="whs18">
|
||||||
|
<p>The central image shows the result of extrusion of one edge (#2) of
|
||||||
|
the initial mesh along the path. Node
|
||||||
|
#1 of path mesh has been selected as <span style="font-weight: bold;"><B>Start
|
||||||
|
node</B></span>.</td>
|
||||||
|
<td width="33.333%" class="whs19">
|
||||||
|
<p>The same, but using angles {45, 45, 45, 0, -45, -45, -45}</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="whs11"> </p>
|
||||||
|
|
||||||
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
|
<li class=kadov-p><p class="whs11"><span style="font-weight: bold;"><B>Extrusion
|
||||||
|
along a sub-mesh.</B></span></p></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
|
||||||
|
<col class="whs5">
|
||||||
|
<col class="whs5">
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="50%" class="whs7">
|
||||||
|
<p><img src="pics/edge_wire_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="50%" class="whs10">
|
||||||
|
<p><img src="pics/edge_wire_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
|
<p class="whs12">In this example the path mesh has been built
|
||||||
|
on a wire (polyline with six edges). The first edge of the wire was used
|
||||||
|
as <span style="font-weight: bold;"><B>Shape (edge)</B></span>, node #1 as <span
|
||||||
|
style="font-weight: bold;"><B>Start node</B></span>. The angles have been defined
|
||||||
|
as {10, 10, 10}. The middle edge (#4) of the initial mesh has been extruded.</p>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
|
<li class=kadov-p><p class="whs20">Extrusion
|
||||||
|
of 2d elements along a sub-mesh.</p></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
|
||||||
|
<col class="whs5">
|
||||||
|
<col class="whs5">
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="50%" class="whs7">
|
||||||
|
<p><img src="pics/edge_wire_3d_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="50%" class="whs10">
|
||||||
|
<p><img src="pics/edge_wire_3d_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
|
<p class="whs12">This extrusion bases on the same path mesh
|
||||||
|
as in the previous example but the third edge of the wire was set as <span
|
||||||
|
style="font-weight: bold;"><B>Shape (edge)</B></span> and node #4 as <span style="font-weight: bold;"><B>Start
|
||||||
|
node</B></span>. Please note, that the extrusion has been done in direction
|
||||||
|
from node #4 to node #3, i.e. against the wire direction. In this example
|
||||||
|
both faces of the initial mesh have been extruded.</p>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
|
<li class=kadov-p><p class="whs21">Extrusion of 2d elements
|
||||||
|
along a closed path.</p></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<table x-use-null-cells cellspacing="0" width="100%" class="whs4">
|
||||||
|
<col class="whs13">
|
||||||
|
<col class="whs13">
|
||||||
|
<col class="whs13">
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="33.333%" class="whs14">
|
||||||
|
<p><img src="pics/circle_simple_before.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="33.333%" class="whs15">
|
||||||
|
<p><img src="pics/circle_simple_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td>
|
||||||
|
<td width="33.333%" class="whs16">
|
||||||
|
<p><img src="pics/circle_angles_after.png" x-maintain-ratio="TRUE" width="389px" height="334px" border="0" class="img_whs9"></td></tr>
|
||||||
|
|
||||||
|
<tr valign="top" class="whs6">
|
||||||
|
<td width="33.333%" class="whs17">
|
||||||
|
<p>The left image shows a path mesh built on a closed edge (circle).</td>
|
||||||
|
<td width="33.333%" class="whs18">
|
||||||
|
<p>The central image shows the result of extrusion of both faces of the
|
||||||
|
initial mesh. Note, that no sewing has been done, so, there are six coincident
|
||||||
|
nodes and two coincident faces in the resulting mesh.</td>
|
||||||
|
<td width="33.333%" class="whs19">
|
||||||
|
<p>The same, but using angles {45, -45, 45, -45, 45, -45, 45, -45}</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
<p> </p>
|
<p> </p>
|
||||||
|
|
||||||
<p class=TODO>To use Extrusion along a path:</p>
|
<p class=TODO>To use Extrusion along a path:</p>
|
||||||
|
|
||||||
<p class="whs8">1. From the <span style="font-weight: bold;"><B>Modification
|
<p class="whs12">1. From the <span style="font-weight: bold;"><B>Modification
|
||||||
</B></span>menu choose the <span style="font-weight: bold;"><B>Extrusion along
|
</B></span>menu choose the <span style="font-weight: bold;"><B>Extrusion along
|
||||||
a path </B></span>item or click <img src="image101.gif" width="27px" height="24px" border="0" class="img_whs9"> button in the toolbar. The
|
a path </B></span>item or click <img src="image101.gif" width="27px" height="24px" border="0" class="img_whs1"> button in the toolbar. The
|
||||||
following dialog box will appear:</p>
|
following dialog box will appear:</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
<p class=TODO
|
<p class=TODO
|
||||||
style="margin-left: 80px;"><img src="pics/a-extusionalongapath2.png" x-maintain-ratio="TRUE" width="434px" height="541px" border="0" class="img_whs10"></p>
|
style="margin-left: 80px;"><img src="pics/extrusion1.png" x-maintain-ratio="TRUE" width="441px" height="541px" border="0" class="img_whs22"></p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
<p class="whs8">2. In the dialog box you should </p>
|
<p class="whs12">2. In the dialog box you should </p>
|
||||||
|
|
||||||
<ul type="disc" class="whs11">
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
<li class=kadov-p><p class="whs12">select the type of
|
<li class=kadov-p><p class="whs23">select the type of
|
||||||
elements which will be extruded (1D or 2D),</p></li>
|
elements which will be extruded (1D or 2D),</p></li>
|
||||||
|
|
||||||
<li class=kadov-p><p class="whs12">specify the IDs of
|
<li class=kadov-p><p class="whs23">specify the <span style="font-weight: bold;"><B>IDs
|
||||||
the elements which will be extruded by selecting them in the 3D viewer
|
of the elements</B></span> which will be extruded by selecting them in the
|
||||||
or <span style="font-weight: bold;"><B>Select the whole mesh, submesh or
|
3D viewer or <span style="font-weight: bold;"><B>Select the whole mesh, submesh
|
||||||
grou</B></span>p,</p></li>
|
or group</B></span>,</p></li>
|
||||||
|
|
||||||
<li class=kadov-p><p class="whs12">specify the path along
|
<li class=kadov-p><p class="whs23">define the <span style="font-weight: bold;"><B>Path</B></span>
|
||||||
which the elements will be extruded, for this you should specify the <span
|
along which the elements will be extruded, </p></li>
|
||||||
style="font-weight: bold;"><B>Mesh</B></span>, the <span style="font-weight: bold;"><B>Shape</B></span>,
|
|
||||||
and the <span style="font-weight: bold;"><B>Start point</B></span> for the extrusion.
|
|
||||||
</p></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs24">Path definition consists of several elements
|
||||||
|
</p>
|
||||||
|
|
||||||
<p class="whs8">3. There are two optional parameters, which
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
|
<li class=kadov-p><p class="whs25">Mesh
|
||||||
|
- <span style="font-weight: normal;">containing a 1D sub-mesh on the edge,
|
||||||
|
along which proceeds the extrusion.</span></p></li>
|
||||||
|
|
||||||
|
<li class=kadov-p><p class="whs25">Shape
|
||||||
|
(edge) - <span style="font-weight: normal;">as the mesh can be complex,
|
||||||
|
the edge is used to define the sub-mesh for the path.</span></p></li>
|
||||||
|
|
||||||
|
<li class=kadov-p><p class="whs25">Start
|
||||||
|
node - <span style="font-weight: normal;"> the
|
||||||
|
first or the last node on the edge. It is used to define the direction
|
||||||
|
of extrusion.</span></p></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
|
<p class="whs12">3. There are two optional parameters, which
|
||||||
can be very useful.</p>
|
can be very useful.</p>
|
||||||
|
|
||||||
<ul type="disc" class="whs11">
|
<ul type="disc" class="whs3">
|
||||||
|
|
||||||
<li class=kadov-p><p class="whs12">If the path of extrusion
|
<li class=kadov-p><p class="whs23">If the path of extrusion
|
||||||
is curvilinear, at each iteration the extruded shape is rotated to keep
|
is curvilinear, at each iteration the extruded shape is rotated to keep
|
||||||
its initial angularity to the curve. By default, the <span style="font-weight: bold;"><B>Base
|
its initial angularity to the curve. By default, the <span style="font-weight: bold;"><B>Base
|
||||||
point</B></span> around which the shape is rotated is the mass center of the
|
Point</B></span> around which the shape is rotated is the mass center of the
|
||||||
shape, however, you can specify any point as the <span style="font-weight: bold;"><B>Base
|
shape, however, you can specify any point as the <span style="font-weight: bold;"><B>Base
|
||||||
Point</B></span> and the shape will be rotated with respect to this point.</p></li>
|
Point</B></span> and the shape will be rotated with respect to this point.</p></li>
|
||||||
|
|
||||||
<li class=kadov-p><p class="whs12">The shape can also
|
<li class=kadov-p><p class="whs23">The shape can also
|
||||||
be rotated around the path to get the resulting mesh in a helical fashion.
|
be rotated around the path to get the resulting mesh in a helical fashion.
|
||||||
At the picture above we see both "oblique-angled" and "right-angled"
|
You can set the values of angles at the right, add them to the list of
|
||||||
mesh elements because <span style="font-weight: bold;"><B>Rotation Angles</B></span>
|
angles at the left by pressing the <img src="image105.gif" width="26px" height="25px" border="0" class="img_whs26"> button and remove them
|
||||||
have not been set for all iterations. You set the values of the angles
|
from the list by pressing the <img src="image106.gif" width="29px" height="28px" border="0" class="img_whs27"> button. </p></li>
|
||||||
at the right and add them to the list of angles at the left by pressing
|
|
||||||
the <img src="image105.gif" width="26px" height="25px" border="0" class="img_whs13"> button and remove the values from the list by pressing
|
|
||||||
the <img src="image106.gif" width="29px" height="28px" border="0" class="img_whs14"> button. </p></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p class="whs8">4. Click the <span style="font-weight: bold;"><B>Apply
|
<p class="whs12">4. Click the <span style="font-weight: bold;"><B>Apply
|
||||||
</B></span>or <span style="font-weight: bold;"><B>OK </B></span>button.</p>
|
</B></span>or <span style="font-weight: bold;"><B>OK </B></span>button. Mesh edges
|
||||||
|
will be extruded into faces, faces into volumes. The external surface
|
||||||
|
of the resulting 3d mesh (if faces have been extruded) is covered with
|
||||||
|
faces, and corners with edges. If the path is closed, the resulting mesh
|
||||||
|
can contain duplicated nodes and faces, because no sewing is done.</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs12"> </p>
|
||||||
|
|
||||||
<p> <span style="font-weight: bold;"><B>See
|
<p> <span style="font-weight: bold;"><B>See
|
||||||
Also</B></span> a sample TUI Script of an <a href="modifying_meshes.htm#bookmark10">Extrusion
|
Also</B></span> a sample TUI Script of an <a href="modifying_meshes.htm#bookmark10">Extrusion
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 9.1 KiB |
@ -20,7 +20,11 @@ p.whs5 { margin-top:0.5pt; margin-bottom:0pt; font-family:'Lucida Console' , mon
|
|||||||
p.whs6 { margin-top:0.5pt; margin-bottom:0pt; }
|
p.whs6 { margin-top:0.5pt; margin-bottom:0pt; }
|
||||||
p.whs7 { font-family:'Lucida Console' , monospace; }
|
p.whs7 { font-family:'Lucida Console' , monospace; }
|
||||||
p.whs8 { font-family:'Times New Roman' , serif; }
|
p.whs8 { font-family:'Times New Roman' , serif; }
|
||||||
p.whs9 { margin-left:40px; font-family:'Lucida Console' , monospace; }
|
p.whs9 { margin-left:36px; font-family:'Lucida Console' , monospace; }
|
||||||
|
p.whs10 { margin-left:36px; }
|
||||||
|
p.whs11 { margin-left:192px; font-family:'Lucida Console' , monospace; }
|
||||||
|
p.whs12 { margin-left:48px; font-family:'Lucida Console' , monospace; }
|
||||||
|
p.whs13 { margin-left:40px; font-family:'Lucida Console' , monospace; }
|
||||||
-->
|
-->
|
||||||
</style><script type="text/javascript" language="JavaScript">
|
</style><script type="text/javascript" language="JavaScript">
|
||||||
<!--
|
<!--
|
||||||
@ -1206,191 +1210,444 @@ if (window.writeIntopicBar)
|
|||||||
|
|
||||||
<h3><a name=bookmark9>Extrusion</a></h3>
|
<h3><a name=bookmark9>Extrusion</a></h3>
|
||||||
|
|
||||||
<p class="whs8">import SMESH</p>
|
<p class="whs7">import SMESH</p>
|
||||||
|
|
||||||
<p class="whs8">import SMESH_mechanic</p>
|
<p class="whs7">import SMESH_mechanic</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8">smesh =
|
<p class="whs7">smesh =
|
||||||
SMESH_mechanic.smesh</p>
|
SMESH_mechanic.smesh</p>
|
||||||
|
|
||||||
<p class="whs8">mesh =
|
<p class="whs7">mesh =
|
||||||
SMESH_mechanic.mesh</p>
|
SMESH_mechanic.mesh</p>
|
||||||
|
|
||||||
<p class="whs8">salome = SMESH_mechanic.salome</p>
|
<p class="whs7">salome = SMESH_mechanic.salome</p>
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8"># extrusion of the group</p>
|
<p class="whs8"># extrusion of the group</p>
|
||||||
|
|
||||||
<p class="whs8">point = SMESH.PointStruct(0,
|
<p class="whs7">point = SMESH.PointStruct(0,
|
||||||
0, 5)</p>
|
0, 5)</p>
|
||||||
|
|
||||||
<p class="whs8">vector = SMESH.DirStruct(point)</p>
|
<p class="whs7">vector = SMESH.DirStruct(point)</p>
|
||||||
|
|
||||||
<p class="whs8">FacesTriToQuad = [2381,
|
<p class="whs7">FacesTriToQuad = [2381,
|
||||||
2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393,
|
2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393,
|
||||||
2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405,
|
2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405,
|
||||||
2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417,
|
2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417,
|
||||||
2418, 2419, 2420, 2421, 2422]</p>
|
2418, 2419, 2420, 2421, 2422]</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8">GroupTriToQuad = mesh.CreateGroup(SMESH.FACE,"Group
|
<p class="whs7">GroupTriToQuad = mesh.CreateGroup(SMESH.FACE,"Group
|
||||||
of faces (quad)")</p>
|
of faces (quad)")</p>
|
||||||
|
|
||||||
<p class="whs8">GroupTriToQuad.Add(FacesTriToQuad)</p>
|
<p class="whs7">GroupTriToQuad.Add(FacesTriToQuad)</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8">aMeshEditor = mesh.GetMeshEditor()</p>
|
<p class="whs7">aMeshEditor = mesh.GetMeshEditor()</p>
|
||||||
|
|
||||||
<p class="whs8">aMeshEditor.ExtrusionSweepObject(GroupTriToQuad,
|
<p class="whs7">aMeshEditor.ExtrusionSweepObject(GroupTriToQuad,
|
||||||
vector, 5)</p>
|
vector, 5)</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8">salome.sg.updateObjBrowser(1)
|
<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
<h3><a name=bookmark10>Extrusion along a Path</a></h3>
|
<h3><a name=bookmark10>Extrusion along a Path</a></h3>
|
||||||
|
|
||||||
<p class="whs7">import geompy</p>
|
<p class="whs7">import math</p>
|
||||||
|
|
||||||
<p class="whs7">import smesh</p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs7">import salome</p>
|
<p class="whs7">import salome</p>
|
||||||
|
|
||||||
|
<p class="whs7">salome.salome_init()</p>
|
||||||
|
|
||||||
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># Geometry</p>
|
||||||
|
|
||||||
|
<p class="whs7">import geompy</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 1. Create points</p>
|
||||||
|
|
||||||
|
<p class="whs7">points = [[0, 0],
|
||||||
|
[50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]</p>
|
||||||
|
|
||||||
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
|
<p class="whs7">iv = 1</p>
|
||||||
|
|
||||||
|
<p class="whs7">vertices = []</p>
|
||||||
|
|
||||||
|
<p class="whs7">for point in points:</p>
|
||||||
|
|
||||||
|
<p class="whs9">vert
|
||||||
|
= geompy.MakeVertex(point[0], point[1], 0)</p>
|
||||||
|
|
||||||
|
<p class="whs9">geompy.addToStudy(vert,
|
||||||
|
"Vertex_" + `iv`)</p>
|
||||||
|
|
||||||
|
<p class="whs9">vertices.append(vert)</p>
|
||||||
|
|
||||||
|
<p class="whs9">iv
|
||||||
|
+= 1</p>
|
||||||
|
|
||||||
|
<p class="whs9">pass</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 2. Create edges and
|
||||||
|
wires</p>
|
||||||
|
|
||||||
|
<p class="whs7">Edge_straight = geompy.MakeEdge(vertices[0],
|
||||||
|
vertices[4])</p>
|
||||||
|
|
||||||
|
<p class="whs7">Edge_bezierrr = geompy.MakeBezier(vertices)</p>
|
||||||
|
|
||||||
|
<p class="whs7">Wire_polyline = geompy.MakePolyline(vertices)</p>
|
||||||
|
|
||||||
|
<p class="whs7">Edge_Circle =
|
||||||
|
geompy.MakeCircleThreePnt(vertices[0], vertices[1], vertices[2])</p>
|
||||||
|
|
||||||
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
|
<p class="whs7">geompy.addToStudy(Edge_straight,
|
||||||
|
"Edge_straight")</p>
|
||||||
|
|
||||||
|
<p class="whs7">geompy.addToStudy(Edge_bezierrr,
|
||||||
|
"Edge_bezierrr")</p>
|
||||||
|
|
||||||
|
<p class="whs7">geompy.addToStudy(Wire_polyline,
|
||||||
|
"Wire_polyline")</p>
|
||||||
|
|
||||||
|
<p class="whs7">geompy.addToStudy(Edge_Circle
|
||||||
|
, "Edge_Circle")</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 3. Explode wire on
|
||||||
|
edges, as they will be used for mesh extrusion</p>
|
||||||
|
|
||||||
|
<p class="whs7">Wire_polyline_edges
|
||||||
|
= geompy.SubShapeAll(Wire_polyline, geompy.ShapeType["EDGE"])</p>
|
||||||
|
|
||||||
|
<p class="whs7">for ii in range(len(Wire_polyline_edges)):</p>
|
||||||
|
|
||||||
|
<p class="whs9">geompy.addToStudyInFather(Wire_polyline,
|
||||||
|
Wire_polyline_edges[ii], "Edge_" + `ii + 1`)</p>
|
||||||
|
|
||||||
|
<p class="whs9">pass</p>
|
||||||
|
|
||||||
|
<p class="whs10"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># Mesh</p>
|
||||||
|
|
||||||
|
<p class="whs7">import smesh</p>
|
||||||
|
|
||||||
<p class="whs7">import SMESH</p>
|
<p class="whs7">import SMESH</p>
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8"># create a face to be
|
<p class="whs7">gen = smesh.smesh</p>
|
||||||
meshed</p>
|
|
||||||
|
|
||||||
<p class="whs7">px = geompy.MakeVertex(100.,
|
|
||||||
0. , 0.
|
|
||||||
)</p>
|
|
||||||
|
|
||||||
<p class="whs7">py = geompy.MakeVertex(0.
|
|
||||||
, 100.,
|
|
||||||
0. )</p>
|
|
||||||
|
|
||||||
<p class="whs7">pz = geompy.MakeVertex(0.
|
|
||||||
, 0. ,
|
|
||||||
100.)</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs7">vxy = geompy.MakeVector(px,
|
<p class="whs7">smeshgui = salome.ImportComponentGUI("SMESH")</p>
|
||||||
py)</p>
|
|
||||||
|
|
||||||
<p class="whs7">arc = geompy.MakeArc(py,
|
<p class="whs7">smeshgui.Init(salome.myStudyId)</p>
|
||||||
pz, px)</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">wire = geompy.MakeWire([vxy,
|
|
||||||
arc])</p>
|
|
||||||
|
|
||||||
<p class="whs7">isPlanarFace = 1</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">face1 = geompy.MakeFace(wire,
|
|
||||||
isPlanarFace)</p>
|
|
||||||
|
|
||||||
<p class="whs7">id_face1 = geompy.addToStudy(face1,
|
|
||||||
"Face1")</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs8"># create a 2D mesh on
|
|
||||||
the face</p>
|
|
||||||
|
|
||||||
<p class="whs7">trias = smesh.Mesh(face1,
|
|
||||||
"Face : 2D mesh")</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">algo = trias.Segment()</p>
|
|
||||||
|
|
||||||
<p class="whs7">algo.NumberOfSegments(6)</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">algo = trias.Triangle()</p>
|
|
||||||
|
|
||||||
<p class="whs7">algo.LengthFromEdges()</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">trias.Compute()</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs8"># create a path mesh</p>
|
|
||||||
|
|
||||||
<p class="whs7">px1 = geompy.MakeVertex(100.,
|
|
||||||
100. ,
|
|
||||||
0. )</p>
|
|
||||||
|
|
||||||
<p class="whs7">py1 = geompy.MakeVertex(-100.
|
|
||||||
, -100.,
|
|
||||||
0. )</p>
|
|
||||||
|
|
||||||
<p class="whs7">pz1 = geompy.MakeVertex(0.
|
|
||||||
, 0. ,
|
|
||||||
50.)</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">circle = geompy.MakeCircleThreePnt(py1,
|
|
||||||
pz1, px1)</p>
|
|
||||||
|
|
||||||
<p class="whs7">id_circle = geompy.addToStudy(circle,
|
|
||||||
"Path")</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">circlemesh = smesh.Mesh(circle,
|
|
||||||
"Path mesh")</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">algo = circlemesh.Segment()</p>
|
|
||||||
|
|
||||||
<p class="whs7">algo.NumberOfSegments(10)</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs7">circlemesh.Compute()</p>
|
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
|
||||||
|
|
||||||
<p class="whs8"># extrusion of the mesh</p>
|
|
||||||
|
|
||||||
<p class="whs8"># The mesh "trias"
|
|
||||||
will be extruded along another mesh, which is a sub-mesh of "circlemesh",</p>
|
|
||||||
|
|
||||||
<p class="whs8"><span style="font-family: 'Times New Roman', serif;">#
|
|
||||||
corresponding to geometry "circle". In this particular case
|
|
||||||
the path mesh will be the whole "circlemesh"</span></p>
|
|
||||||
|
|
||||||
<p class="whs8"> </p>
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
<p class="whs7">aMeshEditor = trias.GetMesh().GetMeshEditor()</p>
|
<p class="whs8"># 1D algorithm and three
|
||||||
|
1D hypotheses</p>
|
||||||
|
|
||||||
<p class="whs7">aMeshEditor.ExtrusionAlongPathObject(trias.GetMesh(),
|
<p class="whs7">Wire_discretisation
|
||||||
circlemesh.GetMesh(), circle, 1, 0, [], 0, SMESH.PointStruct(0, 0, 0))</p>
|
= gen.CreateHypothesis('Regular_1D', 'libStdMeshersEngine.so')</p>
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
<p class="whs8"><span style="font-family: 'Lucida Console', monospace;">salome.sg.updateObjBrowser(1)</span>
|
<p class="whs7">Nb_Segments_3 = gen.CreateHypothesis('NumberOfSegments',
|
||||||
</p>
|
'libStdMeshersEngine.so')</p>
|
||||||
|
|
||||||
|
<p class="whs7">Nb_Segments_7 = gen.CreateHypothesis('NumberOfSegments',
|
||||||
|
'libStdMeshersEngine.so')</p>
|
||||||
|
|
||||||
|
<p class="whs7">Nb_Segments_8 = gen.CreateHypothesis('NumberOfSegments',
|
||||||
|
'libStdMeshersEngine.so')</p>
|
||||||
|
|
||||||
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
|
<p class="whs7">Nb_Segments_3.SetNumberOfSegments(3)</p>
|
||||||
|
|
||||||
|
<p class="whs7">Nb_Segments_7.SetNumberOfSegments(7)</p>
|
||||||
|
|
||||||
|
<p class="whs7">Nb_Segments_8.SetNumberOfSegments(8)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># Mesh given shape with
|
||||||
|
given 1d hypothesis</p>
|
||||||
|
|
||||||
|
<p class="whs7">def Mesh1D(shape1d,
|
||||||
|
hyp1d, name):</p>
|
||||||
|
|
||||||
|
<p class="whs9">mesh1d_tool
|
||||||
|
= smesh.Mesh(shape1d)</p>
|
||||||
|
|
||||||
|
<p class="whs9">mesh1d
|
||||||
|
= mesh1d_tool.GetMesh()</p>
|
||||||
|
|
||||||
|
<p class="whs9">status
|
||||||
|
= mesh1d.AddHypothesis(shape1d, hyp1d)</p>
|
||||||
|
|
||||||
|
<p class="whs9">status
|
||||||
|
= mesh1d.AddHypothesis(shape1d, Wire_discretisation)</p>
|
||||||
|
|
||||||
|
<p class="whs9">isDone
|
||||||
|
= mesh1d_tool.Compute()</p>
|
||||||
|
|
||||||
|
<p class="whs9">if
|
||||||
|
not isDone: print 'Mesh ', name, ': computation failed'</p>
|
||||||
|
|
||||||
|
<p class="whs9">return
|
||||||
|
mesh1d</p>
|
||||||
|
|
||||||
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># Create mesh with six
|
||||||
|
nodes, seven edges and two quadrangle faces</p>
|
||||||
|
|
||||||
|
<p class="whs7">def MakeQuadMesh2(mesh_name):</p>
|
||||||
|
|
||||||
|
<p class="whs9">quad_1
|
||||||
|
= gen.CreateEmptyMesh()</p>
|
||||||
|
|
||||||
|
<p class="whs9">smeshgui.SetName(salome.ObjectToID(quad_1),
|
||||||
|
mesh_name)</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1
|
||||||
|
= quad_1.GetMeshEditor()</p>
|
||||||
|
|
||||||
|
<p class="whs10"> </p>
|
||||||
|
|
||||||
|
<p class="whs10"># six nodes</p>
|
||||||
|
|
||||||
|
<p class="whs9">n1
|
||||||
|
= editor_1.AddNode(0, 20, 10)</p>
|
||||||
|
|
||||||
|
<p class="whs9">n2
|
||||||
|
= editor_1.AddNode(0, 40, 10)</p>
|
||||||
|
|
||||||
|
<p class="whs9">n3
|
||||||
|
= editor_1.AddNode(0, 40, 30)</p>
|
||||||
|
|
||||||
|
<p class="whs9">n4
|
||||||
|
= editor_1.AddNode(0, 20, 30)</p>
|
||||||
|
|
||||||
|
<p class="whs9">n5
|
||||||
|
= editor_1.AddNode(0, 0,
|
||||||
|
30)</p>
|
||||||
|
|
||||||
|
<p class="whs9">n6
|
||||||
|
= editor_1.AddNode(0, 0,
|
||||||
|
10)</p>
|
||||||
|
|
||||||
|
<p class="whs10"> </p>
|
||||||
|
|
||||||
|
<p class="whs10"># seven edges</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n1,
|
||||||
|
n2]) # 1</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n2,
|
||||||
|
n3]) # 2</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n3,
|
||||||
|
n4]) # 3</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n4,
|
||||||
|
n1]) # 4</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n4,
|
||||||
|
n5]) # 5</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n5,
|
||||||
|
n6]) # 6</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddEdge([n6,
|
||||||
|
n1]) # 7</p>
|
||||||
|
|
||||||
|
<p class="whs10"> </p>
|
||||||
|
|
||||||
|
<p class="whs10"># two quadrangle faces</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddFace([n1,
|
||||||
|
n2, n3, n4]) # 8</p>
|
||||||
|
|
||||||
|
<p class="whs9">editor_1.AddFace([n1,
|
||||||
|
n4, n5, n6]) # 9</p>
|
||||||
|
|
||||||
|
<p class="whs9">return
|
||||||
|
[quad_1, editor_1, [1,2,3,4,5,6,7], [8,9]]</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># Path meshes</p>
|
||||||
|
|
||||||
|
<p class="whs7">Edge_straight_mesh
|
||||||
|
= Mesh1D(Edge_straight, Nb_Segments_7, "Edge_straight")</p>
|
||||||
|
|
||||||
|
<p class="whs7">Edge_bezierrr_mesh
|
||||||
|
= Mesh1D(Edge_bezierrr, Nb_Segments_7, "Edge_bezierrr")</p>
|
||||||
|
|
||||||
|
<p class="whs7">Wire_polyline_mesh
|
||||||
|
= Mesh1D(Wire_polyline, Nb_Segments_3, "Wire_polyline")</p>
|
||||||
|
|
||||||
|
<p class="whs7">Edge_Circle_mesh =
|
||||||
|
Mesh1D(Edge_Circle ,
|
||||||
|
Nb_Segments_8, "Edge_Circle")</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># Initial meshes (to
|
||||||
|
be extruded)</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_1, editor_1,
|
||||||
|
ee_1, ff_1] = MakeQuadMesh2("quad_1")</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_2, editor_2,
|
||||||
|
ee_2, ff_2] = MakeQuadMesh2("quad_2")</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_3, editor_3,
|
||||||
|
ee_3, ff_3] = MakeQuadMesh2("quad_3")</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_4, editor_4,
|
||||||
|
ee_4, ff_4] = MakeQuadMesh2("quad_4")</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_5, editor_5,
|
||||||
|
ee_5, ff_5] = MakeQuadMesh2("quad_5")</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_6, editor_6,
|
||||||
|
ee_6, ff_6] = MakeQuadMesh2("quad_6")</p>
|
||||||
|
|
||||||
|
<p class="whs7">[quad_7, editor_7,
|
||||||
|
ee_7, ff_7] = MakeQuadMesh2("quad_7")</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># ExtrusionAlongPath</p>
|
||||||
|
|
||||||
|
<p class="whs8"># IDsOfElements, PathMesh,
|
||||||
|
PathShape, NodeStart,</p>
|
||||||
|
|
||||||
|
<p class="whs8"># HasAngles, Angles,
|
||||||
|
HasRefPoint, RefPoint</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs7">refPoint = SMESH.PointStruct(0,
|
||||||
|
0, 0)</p>
|
||||||
|
|
||||||
|
<p class="whs7"> </p>
|
||||||
|
|
||||||
|
<p class="whs7">a10 = 10.0*math.pi/180.0</p>
|
||||||
|
|
||||||
|
<p class="whs7">a45 = 45.0*math.pi/180.0</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 1. Extrusion of two
|
||||||
|
mesh edges along straight path</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_1.ExtrusionAlongPath([1,2],
|
||||||
|
Edge_straight_mesh, Edge_straight, 1,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 0,
|
||||||
|
[], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 2. Extrusion of one
|
||||||
|
mesh edge along curved path</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_2.ExtrusionAlongPath([2],
|
||||||
|
Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 0,
|
||||||
|
[], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 3. Extrusion of one
|
||||||
|
mesh edge along curved path with angles usage</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_3.ExtrusionAlongPath([2],
|
||||||
|
Edge_bezierrr_mesh, Edge_bezierrr, 1,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 1,
|
||||||
|
[a45, a45, a45, 0, -a45, -a45, -a45], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 4. Extrusion of one
|
||||||
|
mesh edge along path, which is a part of meshed wire</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_4.ExtrusionAlongPath([4],
|
||||||
|
Wire_polyline_mesh, Wire_polyline_edges[0], 1,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 1,
|
||||||
|
[a10, a10, a10], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 5. Extrusion of two
|
||||||
|
mesh faces along path, which is a part of meshed wire</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_5.ExtrusionAlongPath(ff_5
|
||||||
|
, Wire_polyline_mesh, Wire_polyline_edges[2], 4,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 0,
|
||||||
|
[], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 6. Extrusion of two
|
||||||
|
mesh faces along closed path</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_6.ExtrusionAlongPath(ff_6
|
||||||
|
, Edge_Circle_mesh, Edge_Circle, 1,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 0,
|
||||||
|
[], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs8"># 7. Extrusion of two
|
||||||
|
mesh faces along closed path with angles usage</p>
|
||||||
|
|
||||||
|
<p class="whs7">error = editor_7.ExtrusionAlongPath(ff_7,
|
||||||
|
Edge_Circle_mesh, Edge_Circle, 1,</p>
|
||||||
|
|
||||||
|
<p class="whs11"> 1,
|
||||||
|
[a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)</p>
|
||||||
|
|
||||||
|
<p class="whs8"> </p>
|
||||||
|
|
||||||
|
<p class="whs7">if salome.sg.hasDesktop():</p>
|
||||||
|
|
||||||
|
<p class="whs12">salome.sg.updateObjBrowser(1)</p>
|
||||||
|
|
||||||
|
<p class="whs12">pass</p>
|
||||||
|
|
||||||
<h3><a name=bookmark11>Revolution</a></h3>
|
<h3><a name=bookmark11>Revolution</a></h3>
|
||||||
|
|
||||||
@ -1443,9 +1700,6 @@ if (window.writeIntopicBar)
|
|||||||
|
|
||||||
<h3><a name=bookmark13>Pattern Mapping</a></h3>
|
<h3><a name=bookmark13>Pattern Mapping</a></h3>
|
||||||
|
|
||||||
<p>Attention! This script was written using old approach, based on direct usage of SMESH idl interface. To be updated for version 3.2.1 to use <b>smesh</b> package.
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<p class="whs7">import salome</p>
|
<p class="whs7">import salome</p>
|
||||||
|
|
||||||
<p class="whs7">import geompy</p>
|
<p class="whs7">import geompy</p>
|
||||||
@ -1545,7 +1799,7 @@ if (window.writeIntopicBar)
|
|||||||
|
|
||||||
<p class="whs7">if (isDone != 1):</p>
|
<p class="whs7">if (isDone != 1):</p>
|
||||||
|
|
||||||
<p class="whs9">print
|
<p class="whs13">print
|
||||||
'LoadFromFace :', pattern.GetErrorCode()</p>
|
'LoadFromFace :', pattern.GetErrorCode()</p>
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
<p class="whs7"> </p>
|
||||||
@ -1561,7 +1815,7 @@ if (window.writeIntopicBar)
|
|||||||
|
|
||||||
<p class="whs7">if (isDone != 1):</p>
|
<p class="whs7">if (isDone != 1):</p>
|
||||||
|
|
||||||
<p class="whs9">print
|
<p class="whs13">print
|
||||||
'MakeMesh :', pattern.GetErrorCode()</p>
|
'MakeMesh :', pattern.GetErrorCode()</p>
|
||||||
|
|
||||||
<p class="whs7"> </p>
|
<p class="whs7"> </p>
|
||||||
|
Before Width: | Height: | Size: 20 KiB |
BIN
doc/salome/gui/SMESH/pics/circle_angles_after.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
doc/salome/gui/SMESH/pics/circle_simple_after.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
doc/salome/gui/SMESH/pics/circle_simple_before.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
doc/salome/gui/SMESH/pics/curvi_angles_after.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
doc/salome/gui/SMESH/pics/curvi_simple_after.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
doc/salome/gui/SMESH/pics/curvi_simple_before.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
doc/salome/gui/SMESH/pics/edge_wire_3d_after.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
doc/salome/gui/SMESH/pics/edge_wire_3d_before.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
doc/salome/gui/SMESH/pics/edge_wire_after.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
doc/salome/gui/SMESH/pics/edge_wire_before.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
doc/salome/gui/SMESH/pics/extrusion1.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
doc/salome/gui/SMESH/pics/mesh_for_extr_along_path.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
doc/salome/gui/SMESH/pics/straight_after.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
doc/salome/gui/SMESH/pics/straight_before.png
Normal file
After Width: | Height: | Size: 3.5 KiB |