NPAL18500: structured help for GEOM python interface.

This commit is contained in:
jfa 2008-05-20 07:50:41 +00:00
parent 1f1f37c2ae
commit f3dc6a8a84
19 changed files with 1098 additions and 704 deletions

View File

@ -377,6 +377,7 @@ AC_OUTPUT([ \
./doc/salome/gui/Makefile \
./doc/salome/gui/GEOM/doxyfile \
./doc/salome/gui/GEOM/doxyfile_py \
./doc/salome/gui/GEOM/doxyfile_tui \
./doc/salome/tui/Makefile \
./doc/salome/tui/GEOM/doxyfile \
./doc/salome/tui/GEOM/sources/static/tree.js \

View File

@ -18,6 +18,7 @@ WARNINGS = YES
#---------------------------------------------------------------------------
INPUT = @srcdir@/input
FILE_PATTERNS = *.doc
EXCLUDE =
IMAGE_PATH = @srcdir@/images
#---------------------------------------------------------------------------
@ -46,4 +47,5 @@ GENERATE_RTF = NO
#---------------------------------------------------------------------------
#External reference options
#---------------------------------------------------------------------------
TAGFILES = geompy_doc.tag=./geompy_doc
TAGFILES = geompy_doc.tag=./geompy_doc
ALLEXTERNALS = NO

View File

@ -80,6 +80,7 @@ EXAMPLE_RECURSIVE = NO
INPUT = @top_srcdir@/src/GEOM_SWIG
FILE_PATTERNS = geompyDC.py
IMAGE_PATH = @srcdir@/images
EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG
RECURSIVE = NO
#---------------------------------------------------------------------------
@ -142,3 +143,4 @@ DOT_CLEANUP = YES
#External reference options
#---------------------------------------------------------------------------
GENERATE_TAGFILE = geompy_doc.tag
TAGFILES = tui_examples.tag=./..

View File

@ -0,0 +1,49 @@
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Geometry Module Reference Manual v.@VERSION@"
OUTPUT_DIRECTORY = ./
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
TAB_SIZE = 5
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
#---------------------------------------------------------------------------
#Input related options
#---------------------------------------------------------------------------
INPUT = @srcdir@/input
FILE_PATTERNS = tui_*.doc
IMAGE_PATH = @srcdir@/images
#---------------------------------------------------------------------------
#HTML related options
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = ./
HTML_HEADER = @srcdir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
#HTML_STYLESHEET = @srcdir@/static/doxygen.css
TOC_EXPAND = YES
DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 300
#---------------------------------------------------------------------------
#LaTeX related option
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
#---------------------------------------------------------------------------
#RTF related options
#---------------------------------------------------------------------------
GENERATE_RTF = NO
#---------------------------------------------------------------------------
#External reference options
#---------------------------------------------------------------------------
GENERATE_TAGFILE = tui_examples.tag

View File

@ -20,7 +20,7 @@ Dimension (radius) of the chamfer.
\n In the algorithms below there exist two ways to define the \b
Dimension of the Chamfer
\n Firstly the \b Dimension can be defined via \b D1 and \D2, which
\n Firstly the \b Dimension can be defined via \b D1 and \b D2, which
represent the offset on the first and the second face forming the
edge.
\n Secondly the \b Dimension can be defined via \b D, which represents

View File

@ -1,29 +0,0 @@
/*!
\page check_free_boundaries_operation_page Check Free Boundaries
\n To <b>Check Free Boundaries</b> in the <b>Main Menu</b> select <b>Repair - > Check Free Boundaries</b>.
\n This operation detects wires and edges that are not shared between
two faces and are considered a shape's boundary. This control highlights them.
\n The \b Result will be a \b GEOM_Object.
\n <b>TUI Command:</b> <em>(NoError, ClosedWires, OpenWires) =
geompy.GetFreeBoundary(Shape),</em> where \em Shape is a shape to be
checked, \em NoError is false if an error occurred while checking free
boundaries, \em ClosedWires is a list of closed free boundary wires,
\em OpenWires is a list of open free boundary wires.
\image html repair9.png
\n <b>Example:</b>
\image html free_boudaries1.png
\image html free_boudaries2.png
Our <b>TUI Scripts</b> provide you with useful examples of the use of
\ref tui_check_free_boundaries "Repairing Operations".
*/

View File

@ -1,27 +0,0 @@
/*!
\page check_free_faces_operation_page Check Free Faces
\n To <b>Check Free Faces</b> in the <b>Main Menu</b> select <b>Repair - > Check Free Faces</b>.
\n This operation highlights all free faces from a given shape. A free
face is a face which is not shared between two objects of the shape.
\n \b NOTE: This functionality works only in VTK viewer.
\n The \b Result will be a \b GEOM_Object (a list of IDs of all free
faces, containing in the shape).
\n <b>TUI Command:</b> <em>GetFreeFacesIDs(Shape),</em> where \em Shape is
a shape to be checked.
\image html repair10.png
\n <b>Example:</b>
\image html free_faces1.png
\image html free_faces2.png
Our <b>TUI Scripts</b> provide you with useful examples of the use of
\ref tui_check_free_faces "Repairing Operations".
*/

View File

@ -2,6 +2,6 @@
\page geompy_page Python Interface geompy.py
\n Please, see \ref geompyDC::geompyDC "documentation for geompy.py"
\n Please, see <a href="geompy_doc/modules.html">documentation for geompy.py</a>
*/
*/

View File

@ -102,8 +102,6 @@
<li>\ref sewing_operation_page</li>
<li>\ref glue_faces_operation_page</li>
<li>\ref add_point_on_edge_operation_page</li>
<li>\ref check_free_boundaries_operation_page</li>
<li>\ref check_free_faces_operation_page</li>
<li>\ref change_orientation_operation_page</li>
<li>\ref remove_extra_edges_operation_page</li>
</ul>

View File

@ -8,23 +8,28 @@ To use this operation, select in the Main Menu <b>Operations -> Get Shapes on Sh
\image html shapesonshape.png
\n <li> <b>Name</b> is the name of the resulting group of shapes;
\n <b>Shape for exploding</b> is the shape that will be exploded;
\n <b>Shape for checking</b> is the reference shape;
\n <b>Reconstruction Limit</b> is the type of created sub-shapes: solid, shell, face, wire, edge, vertex;
\n <b>State</b> is the position of the created sub-shapes relatively the reference shapes:
<ul> \n IN - the created sub-shapes are located inside the reference shape;
\n OUT - the created sub-shapes are located outside the reference shape;
\n ON - the created sub-shapes lie on the reference shape;
\n ONIN - the created sub-shapes lie on the reference shape or are located inside it;
\n ONOUT - the created sub-shapes lie on the reference shape or are located outside it; </ul> </li>
<ul>
<li> <b>Name</b> is the name of the resulting group of shapes; </li>
<li> <b>Shape for exploding</b> is the shape that will be exploded; </li>
<li> <b>Shape for checking</b> is the reference shape; </li>
<li> <b>Reconstruction Limit</b> is the type of created sub-shapes:
solid, shell, face, wire, edge, vertex; </li>
<li> <b>State</b> is the position of the created sub-shapes relatively the reference shapes:
<ul>
<li> IN - the created sub-shapes are located inside the reference shape; </li>
<li> OUT - the created sub-shapes are located outside the reference shape; </li>
<li> ON - the created sub-shapes lie on the reference shape; </li>
<li> ONIN - the created sub-shapes lie on the reference shape or are located inside it; </li>
<li> ONOUT - the created sub-shapes lie on the reference shape or are located outside it; </li>
</ul> </li>
</ul>
Example:
In the images below the box is the exploded shape and the cylinder is the reference shape. In the first image the edge IN the reference cylinder is highlighted in red, in the second the edges OUT of the reference cylinder are highlighted.
\image html shonshex1
\image html shonshex2
\image html shonshex1.png
\image html shonshex2.png
*/

View File

@ -45,8 +45,6 @@
<li>\ref sewing_operation_page</li>
<li>\ref glue_faces_operation_page</li>
<li>\ref add_point_on_edge_operation_page</li>
<li>\ref check_free_boundaries_operation_page</li>
<li>\ref check_free_faces_operation_page</li>
<li>\ref change_orientation_operation_page</li>
<li>\ref remove_extra_edges_operation_page</li>
</ul>

View File

@ -24,20 +24,24 @@ cylinder = geompy.MakeCylinder(p1, v, radius1, height)
sphere = geompy.MakeSphereR(40)
# fuse
fuse = geompy.MakeFuse(cylinder, sphere)
fuse1 = geompy.MakeFuse(cylinder, sphere)
fuse2 = geompy.MakeBoolean(cylinder, sphere, 3)
# add objects in the study
id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
id_sphere = geompy.addToStudy(sphere, "Sphere")
id_fuse = geompy.addToStudy(fuse, "Fuse")
id_fuse1 = geompy.addToStudy(fuse1, "Fuse_1")
id_fuse2 = geompy.addToStudy(fuse2, "Fuse_2")
# display results
gg.createAndDisplayGO(id_cylinder)
gg.setDisplayMode(id_cylinder,1)
gg.createAndDisplayGO(id_sphere)
gg.setDisplayMode(id_sphere,1)
gg.createAndDisplayGO(id_fuse)
gg.setDisplayMode(id_fuse,1)
gg.createAndDisplayGO(id_fuse1)
gg.setDisplayMode(id_fuse1,1)
gg.createAndDisplayGO(id_fuse2)
gg.setDisplayMode(id_fuse2,1)
\endcode
\anchor tui_common
@ -104,7 +108,7 @@ gg.createAndDisplayGO(id_cut)
gg.setDisplayMode(id_cut,1)
\endcode
\anchor tui_section
\anchor tui_section
<br><h2>Section</h2>
\code
@ -136,4 +140,4 @@ gg.createAndDisplayGO(id_section)
gg.setDisplayMode(id_section,1)
\endcode
*/
*/

View File

@ -45,12 +45,14 @@ face2 = geompy.MakeFace(wire2, isPlanarWanted)
# create prisms
prism1 = geompy.MakePrism(face2, p1, p5)
prism2 = geompy.MakePrismVecH(face1, vector, 50)
prism3 = geompy.MakePrismVecH2Ways(face1, vector, 50)
# add objects in the study
id_face1 = geompy.addToStudy(face1,"Face1")
id_face2 = geompy.addToStudy(face2,"Face2")
id_prism1 = geompy.addToStudy(prism1,"Prism1")
id_prism2 = geompy.addToStudy(prism2,"Prism2")
id_prism3 = geompy.addToStudy(prism3,"Prism3")
# display cylinders
gg.createAndDisplayGO(id_face1)
@ -61,6 +63,8 @@ gg.createAndDisplayGO(id_prism1)
gg.setDisplayMode(id_prism1,1)
gg.createAndDisplayGO(id_prism2)
gg.setDisplayMode(id_prism2,1)
gg.createAndDisplayGO(id_prism3)
gg.setDisplayMode(id_prism3,1)
\endcode
\anchor tui_creation_revolution
@ -186,4 +190,4 @@ gg.createAndDisplayGO(id_pipe)
gg.setDisplayMode(id_pipe,1)
\endcode
*/
*/

View File

@ -23,7 +23,7 @@ if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80
else :
print "Coordinates of point must be (15, 23, 80), but returned (",
print coords[0], ", ", coords[1], ", ", coords[2], ")"
pass
pass
\endcode
<br><h2>Basic Properties</h2>
@ -68,7 +68,7 @@ else:
dy = math.sqrt((coords[1] - 15)*(coords[1] - 15))
dz = math.sqrt((coords[2] - 50)*(coords[2] - 50))
if dx > 1e-7 or dy > 1e-7 or dz > 1e-7:
print "But must be (50, 15, 50)"
print "But must be (50, 15, 50)"
\endcode
<br><h2>Inertia</h2>
@ -85,7 +85,7 @@ print " (", In[0], ", ", In[1], ", ", In[2], ")"
print " (", In[3], ", ", In[4], ", ", In[5], ")"
print " (", In[6], ", ", In[7], ", ", In[8], ")"
print "Main moments of inertia of box 100x30x100:"
print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
\endcode
<br><h2>Check Free Boundaries</h2>
@ -217,7 +217,7 @@ id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2")
# display the results
gg.createAndDisplayGO(id_cut_without_f_2)
gg.setDisplayMode(id_cut_without_f_2,1)
gg.setDisplayMode(id_cut_without_f_2,1)
\endcode
@ -233,7 +233,7 @@ bb = geompy.BoundingBox(box)
print "\nBounding Box of box 100x30x100:"
print " Xmin = ", bb[0], ", Xmax = ", bb[1]
print " Ymin = ", bb[2], ", Ymax = ", bb[3]
print " Zmin = ", bb[4], ", Zmax = ", bb[5]
print " Zmin = ", bb[4], ", Zmax = ", bb[5]
\endcode
<br><h2>Minimal Distance</h2>
@ -245,9 +245,9 @@ import geompy
box1 = geompy.MakeBoxDXDYDZ(100,30,100)
box2 = geompy.MakeBox(105,0,0,200,30,100)
min_dist = geompy.MinDistance(box1,box2)
print "\nMinimal distance between box1 and box2 = ", min_dist
print "\nMinimal distance between box1 and box2 = ", min_dist
\endcode
<br><h2>Tolerance</h2>
\code
@ -262,7 +262,7 @@ print " Face max. tolerance: ", Toler[1]
print " Edge min. tolerance: ", Toler[2]
print " Edge max. tolerance: ", Toler[3]
print " Vertex min. tolerance: ", Toler[4]
print " Vertex max. tolerance: ", Toler[5]
print " Vertex max. tolerance: ", Toler[5]
\endcode
<br><h2>Angle</h2>
@ -309,7 +309,6 @@ if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()):
\endcode
<br><h2>What Is</h2>
\code
@ -319,7 +318,7 @@ import geompy
box = geompy.MakeBoxDXDYDZ(100,30,100)
Descr = geompy.WhatIs(box)
print "\nBox 100x30x100 description:"
print Descr
print Descr
\endcode
<br><h2>Check Shape</h2>
@ -333,9 +332,9 @@ IsValid = geompy.CheckShape(box)
if IsValid == 0:
raise RuntimeError, "Invalid box created"
else:
print "\nBox is valid"
print "\nBox is valid"
\endcode
<br><h2>Check Compound of Blocks</h2>
\code
@ -357,7 +356,7 @@ IsValid = geompy.CheckCompoundOfBlocks(glue)
if IsValid == 0:
raise RuntimeError, "Invalid compound created"
else:
print "\nCompound is valid"
print "\nCompound is valid"
\endcode
*/

View File

@ -64,7 +64,7 @@ id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2")
gg.createAndDisplayGO(id_cylinder1)
gg.setDisplayMode(id_cylinder1,1)
gg.createAndDisplayGO(id_cylinder2)
gg.setDisplayMode(id_cylinder2,1)
gg.setDisplayMode(id_cylinder2,1)
\endcode
\anchor tui_creation_sphere
@ -97,10 +97,10 @@ gg.setDisplayMode(id_sphere1,1)
gg.createAndDisplayGO(id_sphere2)
gg.setDisplayMode(id_sphere2,1)
gg.createAndDisplayGO(id_sphere3)
gg.setDisplayMode(id_sphere3,1)
gg.setDisplayMode(id_sphere3,1)
\endcode
\anchor tui_creation_torus
\anchor tui_creation_torus
<br><h2>Creation of a Torus</h2>
\code
@ -125,7 +125,7 @@ id_torus2 = geompy.addToStudy(torus2,"Torus2")
gg.createAndDisplayGO(id_torus1)
gg.setDisplayMode(id_torus1,1)
gg.createAndDisplayGO(id_torus2)
gg.setDisplayMode(id_torus2,1)
gg.setDisplayMode(id_torus2,1)
\endcode
\anchor tui_creation_cone
@ -153,7 +153,7 @@ id_cone2 = geompy.addToStudy(cone2,"Cone2")
gg.createAndDisplayGO(id_cone1)
gg.setDisplayMode(id_cone1,1)
gg.createAndDisplayGO(id_cone2)
gg.setDisplayMode(id_cone2,1)
gg.setDisplayMode(id_cone2,1)
\endcode
*/
*/

View File

@ -27,12 +27,14 @@ cylinder = geompy.MakeCylinder(p1, v, radius1, height)
translation1 = geompy.MakeTranslationTwoPoints(cylinder, p1, p3)
translation2 = geompy.MakeTranslation(cylinder, 40, 40, 0)
translation3 = geompy.MakeTranslationVector(cylinder, vt)
translation4 = geompy.MakeTranslationVectorDistance(cylinder, vt, 200)
# add objects in the study
id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
id_translation1 = geompy.addToStudy(translation1, "Translation1")
id_translation2 = geompy.addToStudy(translation2, "Translation2")
id_translation3 = geompy.addToStudy(translation3, "Translation3")
id_translation4 = geompy.addToStudy(translation4, "Translation4")
# display the results
gg.createAndDisplayGO(id_cylinder)
@ -43,6 +45,8 @@ gg.createAndDisplayGO(id_translation2)
gg.setDisplayMode(id_translation2,1)
gg.createAndDisplayGO(id_translation3)
gg.setDisplayMode(id_translation3,1)
gg.createAndDisplayGO(id_translation4)
gg.setDisplayMode(id_translation4,1)
\endcode
\anchor tui_rotation
@ -461,4 +465,4 @@ gg.createAndDisplayGO(id_chamfer_all)
gg.setDisplayMode(id_chamfer_all,1)
\endcode
*/
*/

View File

@ -87,7 +87,7 @@ returned.
<br><h2>Normal to a Face</h2>
\n Calculates the normal vector to the selected \b Face. The \b Point
is a point of the \Face, where the Normal should be calculated.
is a point of the \b Face, where the Normal should be calculated.
\image html normaletoface.png

View File

@ -35,6 +35,8 @@ doxygen=@DOXYGEN@
#
usr_docs:
cd ./GEOM; \
echo "Running doxygen in directory: "`pwd`; \
$(doxygen) ./doxyfile_tui; \
echo "Processing geompyDC.py file: "; \
$(doxygen) ./doxyfile_py; \
cd ./geompy_doc; \
@ -43,7 +45,9 @@ usr_docs:
sed 's/\([^s1e]\)geompyDC\|^geompyDC/\1geompy/g' $${filen} > ./tmp1; \
sed 's/geompy\.geompy/geompy/g' ./tmp1 > ./tmp; \
rm -f tmp1; \
mv -f tmp $${filen}; \
sed 's/geompy::geompy/geompy/g' ./tmp > ./tmp1; \
rm -f tmp; \
mv -f tmp1 $${filen}; \
done; \
cd ..; \
echo "Running doxygen in directory: "`pwd`; \

File diff suppressed because it is too large Load Diff