0020654: [CEA 386] GetType() function

This commit is contained in:
dmv 2010-01-20 13:08:18 +00:00
parent 48993d6de4
commit 9359c346c2

View File

@ -2,7 +2,9 @@
\page geometrical_obj_prop_page Geometrical Object Properties \page geometrical_obj_prop_page Geometrical Object Properties
<h2>Geometrical Object Type</h2> <h2>Geometrical Object Types</h2>
<b>GetType function:</b>
The <b>Type</b> property of the geometrical object specifies the The <b>Type</b> property of the geometrical object specifies the
way the object has been created. It is an integer identifier that way the object has been created. It is an integer identifier that
@ -16,8 +18,7 @@ IGES, STEP or other CAD file, has type equal to 1.
The possible values of the geometrical objects are listed in the table below: The possible values of the geometrical objects are listed in the table below:
<table border="1" align="center" width="250" cellpadding="3" <table border="1" align="center" width="250" cellpadding="3" cellspacing="0" bgcolor="#EEEEEE">
cellspacing="0" bgcolor="#EEEEEE">
<tr align=center bgcolor=#999999><td>ID</td><td>STRING</td></tr> <tr align=center bgcolor=#999999><td>ID</td><td>STRING</td></tr>
<tr align=center><td>0</td><td>COPY</td></tr> <tr align=center><td>0</td><td>COPY</td></tr>
<tr align=center><td>1</td><td>IMPORT</td></tr> <tr align=center><td>1</td><td>IMPORT</td></tr>
@ -66,13 +67,14 @@ The possible values of the geometrical objects are listed in the table below:
<tr align=center><td>44</td><td>3DSKETCHER</td></tr> <tr align=center><td>44</td><td>3DSKETCHER</td></tr>
<tr align=center><td>45</td><td>FILLET_2D</td></tr> <tr align=center><td>45</td><td>FILLET_2D</td></tr>
<tr align=center><td>46</td><td>FILLET_1D</td></tr> <tr align=center><td>46</td><td>FILLET_1D</td></tr>
<tr align=center><td>&nbps;</td><td>&nbps;</td></tr>
</table> </table>
Also geompy.py module provides a helper function ShapeIdToType() Also geompy.py module provides a helper function ShapeIdToType()
that allows converting of the geometrical object type id value that allows converting of the geometrical object type id value
to its string representation. to its string representation.
<b>For example:</b> For example:
\code \code
import geompy import geompy
box = geompy.MakeBoxDXDYDZ(10,10,10) box = geompy.MakeBoxDXDYDZ(10,10,10)
@ -82,4 +84,22 @@ print type
The above code prints "BOX" value. The above code prints "BOX" value.
<b>GetShapeType function:</b>
There are the shape type in terms of its topology nature, possible
values are: { COMPOUND, COMPSOLID, SOLID, SHELL, FACE, WIRE, EDGE,
VERTEX, SHAPE }<br>
This type can be retrieved using geompy function GetShapeType().
Example code:
\code
import geompy
import GEOM
box = geompy.MakeBoxDXDYDZ(10,10,10)
type = geompy.GetShapeType()
print type == GEOM.SOLID
\endcode
The code above prints "True".
*/ */