Merge from V6_5_BR 05/06/2012

This commit is contained in:
vsr 2012-06-05 11:33:32 +00:00
parent 36036343a0
commit 40f5df35aa
1799 changed files with 13702 additions and 102387 deletions

View File

@ -1,4 +1,4 @@
// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
// //
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
dnl dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
dnl dnl
dnl This library is free software; you can redistribute it and/or dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public dnl modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2007-2011 CEA/DEN, EDF R&D dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
dnl dnl
dnl This library is free software; you can redistribute it and/or dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public dnl modify it under the terms of the GNU Lesser General Public
@ -81,7 +81,7 @@ fi
if test "x$opencv_ok" == xno ; then if test "x$opencv_ok" == xno ; then
AC_MSG_RESULT([for OPENCV: no]) AC_MSG_RESULT([for OPENCV: no])
AC_MSG_WARN([OPENCV includes or libraries are not found or are not properly installed]) AC_MSG_WARN([OPENCV includes or libraries are not found or are not properly installed])
AC_MSG_WARN([Cannot build without OPENCV. Use --with-opencv option to define OPENCV installation.]) AC_MSG_WARN([Use --with-opencv option to define OPENCV installation.])
else else
OPENCV_INCLUDES=$LOCAL_INCLUDES OPENCV_INCLUDES=$LOCAL_INCLUDES
OPENCV_LIBS=$LOCAL_LIBS OPENCV_LIBS=$LOCAL_LIBS

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
#! /usr/bin/env python #! /usr/bin/env python
# -*- coding: iso-8859-1 -*- # -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
@REM Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE @REM Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
@REM @REM
@REM This library is free software; you can redistribute it and/or @REM This library is free software; you can redistribute it and/or
@REM modify it under the terms of the GNU Lesser General Public @REM modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public
@ -24,7 +24,7 @@
# Modified by : Alexander BORODIN (OCN) - autotools usage # Modified by : Alexander BORODIN (OCN) - autotools usage
# Created from configure.in.base # Created from configure.in.base
# #
AC_INIT([Salome2 Project GEOM module], [6.4.0], [webmaster.salome@opencascade.com], [SalomeGEOM]) AC_INIT([Salome2 Project GEOM module], [6.5.0], [webmaster.salome@opencascade.com], [SalomeGEOM])
AC_CONFIG_AUX_DIR(adm_local/unix/config_files) AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
@ -318,19 +318,6 @@ echo
CHECK_CAS CHECK_CAS
echo "OCC_VERSION_DEVELOPMENT = ${OCC_VERSION_DEVELOPMENT}"
NMTDS_VAR=NMTDS
NMTTools_VAR=NMTTools
GEOMAlgo_VAR=GEOMAlgo
if test "${OCC_VERSION_DEVELOPMENT}" == "1"; then
NMTDS_VAR=NMTDS_NEW
NMTTools_VAR=NMTTools_NEW
GEOMAlgo_VAR=GEOMAlgo_NEW
fi
AC_SUBST(NMTDS_VAR)
AC_SUBST(NMTTools_VAR)
AC_SUBST(GEOMAlgo_VAR)
echo echo
echo --------------------------------------------- echo ---------------------------------------------
echo Testing html generators echo Testing html generators
@ -371,24 +358,77 @@ echo Summary
echo --------------------------------------------- echo ---------------------------------------------
echo echo
echo Configure if test "${SalomeGUI_need}" == "no"; then
echo "* Configuration options (without GUI):"
if test "${gui_ok}" = "yes"; then
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok sphinx_ok opencv_ok Kernel_ok gui_ok"
elif test "${SalomeGUI_need}" != "no"; then
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok gui_ok"
else else
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok" echo "* Configuration options:"
fi
echo
obligatory_vars="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok"
optional_vars="opencv_ok"
gui_vars="OpenGL_ok qt_ok gui_ok"
###
# mandatory products
###
echo "--- Mandatory products:"
missing_obligatory=no
for var in $obligatory_vars
do
eval toto=\$$var
if test x$toto == "x"; then toto="no" ; fi
if test x$toto == "xno"; then missing_obligatory=yes ; fi
printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
eval echo \$$var
#fi
done
if test x$missing_obligatory == "xyes"; then
AC_MSG_ERROR([one or more obligatory product is missing])
fi fi
for var in $variables ###
# gui products
###
if test "${SalomeGUI_need}" == "yes"; then
# SALOME GUI is mandatory
if test "${gui_ok}" != "yes"; then
AC_MSG_ERROR([SALOME GUI is missing])
fi
fi
if test "${SalomeGUI_need}" != "no"; then
echo "--- GUI products (optional):"
for var in $gui_vars
do
eval toto=\$$var
if test x$toto == "x"; then toto="no"; fi
printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
eval echo \$toto
done
fi
###
# optional products
###
echo "--- Other products (optional):"
for var in $optional_vars
do do
printf " %10s : " `echo \$var | sed -e "s,_ok,,"` eval toto=\$$var
eval echo \$$var if test x$toto != "x"; then
printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
eval echo \$$var
fi
done done
echo echo
echo "Default ORB : $DEFAULT_ORB" echo "* Default ORB : $DEFAULT_ORB"
echo echo
dnl We don t need to say when we re entering directories if we re using dnl We don t need to say when we re entering directories if we re using
@ -460,7 +500,6 @@ AC_OUTPUT([ \
src/EntityGUI/Makefile \ src/EntityGUI/Makefile \
src/GEOM/Makefile \ src/GEOM/Makefile \
src/GEOMAlgo/Makefile \ src/GEOMAlgo/Makefile \
src/GEOMAlgo_NEW/Makefile \
src/GEOMBase/Makefile \ src/GEOMBase/Makefile \
src/GEOMClient/Makefile \ src/GEOMClient/Makefile \
src/GEOMFiltersSelection/Makefile \ src/GEOMFiltersSelection/Makefile \
@ -480,9 +519,7 @@ AC_OUTPUT([ \
src/IGESImport/Makefile \ src/IGESImport/Makefile \
src/MeasureGUI/Makefile \ src/MeasureGUI/Makefile \
src/NMTDS/Makefile \ src/NMTDS/Makefile \
src/NMTDS_NEW/Makefile \
src/NMTTools/Makefile \ src/NMTTools/Makefile \
src/NMTTools_NEW/Makefile \
src/OBJECT/Makefile \ src/OBJECT/Makefile \
src/OCC2VTK/Makefile \ src/OCC2VTK/Makefile \
src/OperationGUI/Makefile \ src/OperationGUI/Makefile \

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
# -*- coding: iso-8859-1 -*- # -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
# #
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,20 @@
/*!
\page angle_page Angle
Returns the angle between two lines or linear edges in degrees.
\note If both arguments are <b>vectors</b>, the angle is computed in
accordance with their orientations, otherwise the minimum angle
is computed.
\n <b>TUI Command:</b> <em>geompy.GetAngle(shape1, shape2),</em> where
Shape1 and Shape2 are shapes between which the angle is computed.
Another TUI command is <em>geompy.GetAngleRadians(shape1,shape2),</em>
which returns the value of angle in radians.
See also a \ref tui_angle_page "TUI example".
\image html angle.png
*/

View File

@ -0,0 +1,17 @@
/*!
\page basic_prop_page Basic Properties
Returns the properties (Length, Surface & Volume) for the selected
geometrical object.
<b>Result:</b> Display Length, Surface & Volume in the form of
Python Tuple.
\n<b>TUI Command:</b> <em>geompy.BasicProperties(Shape),</em> where
\em Shape is a shape whose properties are inquired.
See also a \ref tui_basic_properties_page "TUI example".
\image html neo-basicprop.png
*/

View File

@ -0,0 +1,18 @@
/*!
\page boundaries_page Check Free Boundaries
Detects and highlights wires and edges that are not shared between
two faces and are considered a shape's boundary.
<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.
See also a \ref tui_free_boundaries_page "TUI example".
\image html repair9.png
*/

View File

@ -0,0 +1,25 @@
/*!
\page bounding_box_page Bounding Box
Returns the dimensions of the bounding box for the selected
geometrical object.
\note To take into account any possible shape distortion
that affects the resulting bounding box, the algorithm enlarges
the bounding box to the maximum deflection value of
faces (by iterating through all faces of a shape).
This functionallity is implemented in such a way to have
a satisfactory performance.
<b>Result:</b> Displays the bounding box dimensions of a
geometrical object in form of a Python Tuple (Xmin, Xmax, Ymin,
Ymax, Zmin, Zmax).
\n <b>TUI Command:</b> <em>geompy.BoundingBox(Shape),</em> where \em Shape
is the shape for which a bounding box is computed.
See also a \ref tui_bounding_box_page "TUI example".
\image html measures5.png
*/

View File

@ -2,9 +2,20 @@
\page bring_to_front_page Bring To Front \page bring_to_front_page Bring To Front
\n This option is relevant for better viewing of the complex 3D models. \n This option is relevant for better viewing of complex 3D models.
This item allow to bring to front of viewer selected geometrical object. It allows to bring to the viewer foreground the selected geometrical object.
\image html bring_example.png Let's take for example two coincident primitives: a box and a cylinder.
In the first picture the box has been visually superimposed over the
cylinder using <b>Bring to front</b> option.
\image html front1.png
In the second picture the box has been returned to its normal state
using <b>Clear Top Level State</b> context menu command, however, the
cylinder has been brought to front.
\image html front2.png
*/ */

View File

@ -0,0 +1,16 @@
/*!
\page center_mass_page Center of Mass
Calculates and returns the coordinates of the gravity center for
the selected geometrical object.
<b>Result:</b> GEOM_Object (vertex).
\n <b>TUI Command:</b> <em> geompy.MakeCDG(Shape),</em> where \em Shape is
the shape for which a center of gravity is computed.
See also a \ref tui_center_of_mass_page "TUI example".
\image html measures3.png
*/

View File

@ -0,0 +1,33 @@
/*!
\page check_compound_of_blocks_page Check Compound of Blocks
Checks whether a shape is a compound of glued blocks. To be
considered as a compound of blocks, the given shape must satisfy the
following conditions:
<ul>
<li>Each element of the compound should be a Block (6 faces and 12 edges);</li>
<li>A connection between two Blocks should be an entire quadrangle face or an entire edge;</li>
<li>The compound should be connected;</li>
<li>Two quadrangle faces should be glued.</li>
</ul>
\n Informs of the following possible errors:
<ul>
<li>not a block;</li>
<li>not glued;</li>
<li>not connected;</li>
<li>extra or degenerated edge.</li>
</ul>
\n <b>Result:</b> Boolean; highlight in the viewer.
\n <b>TUI Command:</b>
<em>geompy.CheckCompoundOfBlocks(Compound).</em> Checks if the shape
is a valid compound of blocks. If it is true, then the validity flag
is returned, and encountered errors are printed in the python console.
See also a \ref tui_check_compound_of_blocks_page "TUI example".
\image html measures10.png
*/

View File

@ -0,0 +1,22 @@
/*!
\page check_self_intersections_page Detect Self-intersections
\n Checks the topology of the selected shape to detect self-intersections.
Returns True if there are no self-intersections. Reports pairs of
intersected sub-shapes, if there are any.
\note This tool is useful for detection of shapes, not suitable for
arguments of Boolean operations and Partition algorithm.
For more information about Partition and Boolean Operations Algorithms
and their limitations refer to <a href="SALOME_BOA_PA.pdf">this document</a>.
\n <b>Result:</b> Boolean.
\n <b>TUI Command:</b> <em>geompy.CheckSelfIntersections(theShape),</em>
where \em theShape is the shape checked for validity.
See also a \ref tui_check_self_intersections_page "TUI example".
\image html measures11.png
*/

View File

@ -0,0 +1,18 @@
/*!
\page check_shape_page Check Shape
\n Checks the topology of the selected geometrical object and returns
True if it is valid. Check also geometry checkbox allows to test the
geometry as well.
\n <b>Result:</b> Boolean.
\n <b>TUI Command:</b> <em>geompy.CheckShape(theShape, theIsCheckGeom = 0),</em>
where \em theShape is the shape checked for validity.
See also a \ref tui_check_shape_page "TUI example".
\image html measures9.png
*/

View File

@ -6,6 +6,9 @@
<b>Select Color</b> menu accessible by right-clicking on an object and <b>Select Color</b> menu accessible by right-clicking on an object and
selecting \b Color in the pop-up menu box. selecting \b Color in the pop-up menu box.
This functionality is avalible only if \em artificial
\ref material "material model" is assigned to the selected shape.
\n <b>TUI Command:</b> <em>gg.setColor(ID, Short, Short, Short)</em> \n <b>TUI Command:</b> <em>gg.setColor(ID, Short, Short, Short)</em>
\image html selectcolor.png \image html selectcolor.png

View File

@ -18,12 +18,16 @@ created surface and the reference edge;
iterations are repeated until the required tolerance is reached. So, a iterations are repeated until the required tolerance is reached. So, a
greater number of iterations allows producing a better surface. greater number of iterations allows producing a better surface.
\n <b>Method</b> - Kind of method to perform filling operation \n <b>Method</b> - Kind of method to perform filling operation
1. Default - the standard behaviour.
2. Use edges orientation - the edges orientation is used: if an edge is <ol>
<li>Default - the standard behaviour.</li>
<li>Use edges orientation - the edges orientation is used: if an edge is
reversed, the curve from this edge is reversed before being used by the filling reversed, the curve from this edge is reversed before being used by the filling
algorithm. algorithm.</li>
3. Auto-correct edges orientation - curves orientation is changed to <li>Auto-correct edges orientation - curves orientation is changed to
minimize the sum of distances between ends points of edges. minimize the sum of distances between ends points of edges.</li>
</ol>
\n <b>Approximation</b> - if checked, BSpline curves are generated in \n <b>Approximation</b> - if checked, BSpline curves are generated in
the process of surface construction (using the process of surface construction (using
GeomAPI_PointsToBSplineSurface functionality). By default the surface GeomAPI_PointsToBSplineSurface functionality). By default the surface

View File

@ -2,53 +2,70 @@
\page create_sketcher_page 2D Sketcher \page create_sketcher_page 2D Sketcher
The 2D Sketcher allows you to create a profile made of curves of 2 types: line segments and arcs. The 2D Sketcher allows you to draw 2D shapes on a working plane. You
can create sketches of two types:
<b>Example:</b> <ul>
<li> \b Profile made of connected curves of 2 types: <b>line segments</b> and \b arcs.
\b or
<li> \b Rectangle
</ul>
The \b Result is a \b Wire
\n <b>Example:</b>
\image html sketch_example.png \image html sketch_example.png
To create a \b 2D Sketch: To create a <b> 2D Sketch</b>:
<ol> <ol>
<li>In the main menu select <em>New Entity -> Basic -> 2D Sketch</em> or click on \image html sketch.png </li> <li>In the main menu select <b>New Entity -> Basic -> 2D Sketch</b> or click on \image html sketch.png </li>
<li> Select the plane or the planar face on which to create the sketch. By default the sketch is created on the XOY plane of the global coordinate system. <li> Select the \b plane or the <b>planar face</b> on which to create the sketch.
If Local Coordinate systems have been created in the study they appear in the combobox and can be selected as reference coordinate system.</li> \note By default the sketch is created on the XOY plane of the global coordinate system.
If Local Coordinate Systems have been created in the study they appear
in the combobox and can be selected as a reference coordinate system.</li>
<li> Choose a \b segment or an \b arc element to start a \b profile or choose \b rectangle to draw a rectangle.
\n If you draw a \b profile:
<li> Select a start point. By default the start point of the curve is located at the point of <li> Select a start point. By default the start point of the curve is located at the point of
origin of the reference coordinate system and the curve lies in the origin of the reference coordinate system.</li>
plane XOY.</li>
<li> Create curve portions and click on \b Apply after each step.</li> <li> Create curve portions and click on \b Apply after each step.</li>
<li> Select either \b Close or <b>Sketch Closure</b> if you want to close the profile before closing the window.</li> <li> Select either \b Close or <b>Sketch Closure</b> if you want to close the profile before closing the window.</li>
</ol> </ol>
To create a \b Segment: \n To create a \b Segment:
<ol> <ol>
<li> In the <b>Element Type</b> part of the dialog box select: <li> In the <b>Element Type</b> part of the dialog box select:
\image html line_icon.png </li> \image html line_icon.png </li>
<li> You can define the segment by either it's <b>end point</b> or a \b direction and a length. The direction is defined relatively to the tangent at the last point of the sketch. It can be: <li> You can define the segment by either its <b>end point</b> or \b direction and \b length. The direction is defined relatively to the tangent at the last point of the sketch. It can be:
<ul>
- Tangent (colinear to the tangent at the last point) <li> Tangent (colinear to the tangent at the last point)</li>
- Perpendicular <li> Perpendicular</li>
- Defined by an angle <li> Defined by an angle</li>
- Defined by a vector (Vx, Vy) <li> Defined by a vector (Vx, Vy)</li>
</ul>
</li> </li>
</ol> </ol>
To create an \b Arc: \n To create an \b Arc:
<ol> <ol>
<li> In the <b>Element Type</b> part of the dialog box select \image html arc_icon.png </li> <li> In the <b>Element Type</b> part of the dialog box select \image html arc_icon.png </li>
<li> You can define the segment by either it's <b>end point</b> or a \b direction a \b radius and an \b angle. </li> <li> You can define the segment by either its <b>end point</b> or \b direction \b radius and \b angle. </li>
<ul> <ul>
<li>In case of an end point the arc can be built in three different ways:</li> <li>In case of an end point the arc can be built in three different ways:</li>
@ -71,10 +88,7 @@ To create an \b Arc:
</ol> </ol>
For the first segment or arc of the sketch the reference direction is the X direction of the reference coordinate system. \note For the first segment or arc of the sketch the reference direction is the X direction of the reference coordinate system.
\n The Result of the operation will be a \b Wire.
\n <b>Dialog Box:</b> \n <b>Dialog Box:</b>
@ -82,8 +96,9 @@ For the first segment or arc of the sketch the reference direction is the X dire
\n <b>Arguments:</b> \n <b>Arguments:</b>
<ol> <ol>
<li>Coordinate system (Local or Global CS can be selected)</li> <li>Coordinate system (Existing Local CS or Global CS can be selected)</li>
<li>Element type (segment or arc).</li> <li>A plane or a planar face to define a new Local Coordinate System
<li>Element type (segment, arc or rectangle).</li>
<li>Destination type (point or direction).</li> <li>Destination type (point or direction).</li>
<li>Destination point by means of:</li> <li>Destination point by means of:</li>
<ul> <ul>
@ -94,7 +109,7 @@ For the first segment or arc of the sketch the reference direction is the X dire
<li>Destination direction by means of:</li> <li>Destination direction by means of:</li>
<ul> <ul>
<li>angle between the new segment and the previous one;</li> <li>angle between the new segment and the previous one;</li>
<li>perpendicular to the previous segment (same as previous, but angle <li>perpendicular to the previous segment (same as previous, but the angle
is predefined and is equal to 90 degrees);</li> is predefined and is equal to 90 degrees);</li>
<li>tangent to the previous segment;</li> <li>tangent to the previous segment;</li>
<li>vector components DX, DY.</li> <li>vector components DX, DY.</li>
@ -105,8 +120,30 @@ is predefined and is equal to 90 degrees);</li>
\b Buttons: \b Buttons:
<b>"Restore"</b> button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all its objects. <b>"Restore"</b> button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all its objects.
\n <b>"Sketch Validation"</b> button applies the wire, only red part will be built by "Sketch Validation". \n <b>"Close"</b> button applies the wire, only the red part will be built.
\n <b>"Sketch Closure"</b> will close the Sketch by straight line from last red part and apply it. \n <b>"Sketch Closure"</b> will close the Sketch by a straight line
from the last red part and apply it.
\n To draw a \b rectangle:
<ol>
<li> In the <b>Element Type</b> part of the dialog box select \image html rectangle_icon.png </li>
<li> Draw a rectangle with the mouse directly in the view or fill in the coordinates of two opposite vertices of the rectangle.</li>
<li> <b>Apply and Close</b> </li>
</ol>
\n <b>Dialog Box:</b>
\image html sketcher_dlg2.png
\n <b>Arguments:</b>
<ol>
<li>Coordinate system (Existing Local CS or Global CS can be selected)</li>
<li>A plane or a planar face to define a new Local Coordinate System
<li>Element type (segment, arc or rectangle).</li>
<li>The X,Y coordinates of two opposite vertices of the rectangle</li>
</ol>
\n <b>TUI Command:</b> <em>geompy.MakeSketcherOnPlane(Command, WorkingPlane)</em> \n <b>TUI Command:</b> <em>geompy.MakeSketcherOnPlane(Command, WorkingPlane)</em>

View File

@ -0,0 +1,17 @@
/*!
\page create_topological_obj_page Creating Topological Objects
<b>New Entity -> Build </b> submenu allows to create topological
entities:
<ul>
<li>\subpage create_edge_page</li>
<li>\subpage create_wire_page</li>
<li>\subpage create_face_page</li>
<li>\subpage create_shell_page</li>
<li>\subpage create_solid_page</li>
<li>\subpage create_compound_page</li>
</ul>
*/

View File

@ -8,18 +8,26 @@ The <b>Extruded boss</b> operation allows you to easily add material on a \b sol
To produce the <b>extruded boss</b>: To produce the <b>extruded boss</b>:
1. Draw the \b profile of the extrusion. It can be: <ol>
<li>Draw the \b profile of the extrusion. It can be:
- a <a href="create_sketcher_page.html">\b Sketch </a> drawn on a planar face of the object you want to boss. <ul>
<li> a <a href="create_sketcher_page.html">\b Sketch </a> drawn on a
planar face of the initial shape you want to boss.</li>
- any closed edge or wire of the desired shape (circle, ellipse ...). <li> any closed edge or wire of this shape (circle, ellipse ...).</li>
</ul>
2. In the <b>Main Menu</b> select <b>Operations - > Extruded Boss</b> or click on </li>
\image html extruded_boss.png
3. Fill in the dialog box fields: <li> In the <b>Main Menu</b> select <b>Operations - > Extruded Boss</b> or click on
\image html extruded_boss.png </li>
\image html extruded_boss_dlg.png <li> Fill in the dialog box fields:
\image html extruded_boss_dlg.png </li>
</ol>
The input arguments are: The input arguments are:
@ -27,7 +35,7 @@ The input arguments are:
- The \b profile. It must be a \b closed edge or wire and it must be \b planar. - The \b profile. It must be a \b closed edge or wire and it must be \b planar.
- The \b height of extrusion. It's calculated from the <b>base profile</b> along the normal to its plane. - The \b height of extrusion. It is calculated from the <b>base profile</b> along the normal to its plane.
And optionnaly: And optionnaly:

View File

@ -8,18 +8,26 @@ The <b>Extruded cut</b> operation allows you to easily remove material from a \b
To produce the <b>extruded cut</b>: To produce the <b>extruded cut</b>:
1. Draw the \b profile of the extrusion. It can be: <ol>
<li> Draw the \b profile of the extrusion. It can be:
<ul>
<li> a <a href="create_sketcher_page.html">\b Sketch </a> drawn on a planar face of the object you want to cut.</li>
<li> any closed edge or wire of the desired shape (circle, ellipse ...).</li>
</ul>
</li>
- a <a href="create_sketcher_page.html">\b Sketch </a> drawn on a planar face of the object you want to cut. <li> In the <b>Main Menu</b> select <b>Operations - > Extruded Cut</b> or click on
- any closed edge or wire of the desired shape (circle, ellipse ...). \image html extruded_cut.png
2. In the <b>Main Menu</b> select <b>Operations - > Extruded Cut</b> or click on </li>
\image html extruded_cut.png
3. Fill in the dialog box fields: <li> Fill in the dialog box fields:
\image html extruded_cut_dlg.png \image html extruded_cut_dlg.png
</li>
</ol>
The input arguments are: The input arguments are:

View File

@ -0,0 +1,20 @@
/*!
\page features_page Features
Geometry module provides the following Features,
which allow to:
<ul>
<li>Produce a \subpage fillet1d_operation_page "1D Fillet" on the
corners of a Wire with Planar Edges.</li>
<li>Produce a \subpage fillet2d_operation_page "2D Fillet" on the corners of a Planar Face.</li>
<li>Produce a \subpage fillet_operation_page "3D Fillet" on the selected
edges of an object.</li>
<li>Produce a \subpage chamfer_operation_page "Chamfer" on the selected edges of an object.</li>
<li>Remove matter from an object by producing an \subpage extruded_cut_operation_page "Extruded Cut".</li>
<li>Add matter to an object by producing an \subpage extruded_boss_operation_page "Extruded Boss".</li>
</ul>
*/

View File

@ -0,0 +1,19 @@
/*!
\page free_faces_page Check Free Faces
Highlights all free faces of a given shape. A free
face is a face which is not shared between two objects of the shape.
\note This functionality works only in VTK viewer.
\b Result: a list of IDs of all free faces, containing in the shape.
<b>TUI Command:</b> <em>GetFreeFacesIDs(Shape),</em> where \em Shape is
a shape to be checked.
See also a \ref tui_free_faces_page "TUI example".
\image html repair10.png
*/

View File

@ -1,8 +1,6 @@
/*! /*!
\page geometrical_obj_prop_page Geometrical Object Properties \page geometrical_obj_prop_page Geometrical Object Types
<h2>Geometrical Object Types</h2>
<b>GetType function:</b> <b>GetType function:</b>
@ -67,6 +65,7 @@ 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>201</td><td>PIPETSHAPE</td></tr>
</table> </table>
Also geompy.py module provides a helper function ShapeIdToType() Also geompy.py module provides a helper function ShapeIdToType()

View File

@ -0,0 +1,93 @@
/*!
\page geometry_preferences_page Geometry preferences
In the \b Geometry module you can set preferences for visualisation of
geometrical figures, which can be used in later sessions with this module.
There is also a special group of preferences controlling input
precision for floating-point data.
\image html pref15.png
\par
To redefine any color click on the corresponding line to access to
the <b>Select Color</b> dialog box.
<ul>
<li><b>General</b></li>
<ul>
<li><b>Default display mode</b> - allows to choose between wireframe, shading or
shading with edges.</li>
<li><b>Default shading color</b> - allows to select default shading
color.</li>
<li><b>Edges in shading</b> - allows to select default edges color in shading mode.</li>
<li><b> Default wireframe color</b> - allows to select default
wireframe color (to be applied to any lines not being free boundaries
or isolated lines).</li>
<li><b>Color of free boundaries</b> - allows to select default color for free boundaries.</li>
<li><b>Color of edges, vectors and wires</b> - allows to select
default color for edges, vectors and wires (isolated lines).</li>
<li><b>Color of points</b> - allows to select default color for
vertices.</li>
<li><b>Color of isolines</b> - allows to select default color for
isolines.</li>
<li><b>Step value for spin boxes</b> - allows to define the increment
of values set in spin boxes.</li>
<li><b>Deflection coefficient</b> - allows to define default deflection
coefficient for lines and surfaces. A smaller coefficient provides
better quality of a shape in the viewer.</li>
<li><b>Default front material</b> - allows to define default front face material.</li>
<li><b>Default back material</b> - allows to define default back face material.</li>
<li><b>Edges width</b> - allows to define default width of the edges.</li>
<li><b>Isolines width</b> - allows to define default width of the isolines.</li>
<li><b>Preview edges width</b> - allows to define width of the edges for preview.</li>
<li><b>Measures line width</b> - allows to define lines width of measurements tools.</li>
</ul>
</ul>
<ul>
<li><b>Input fields precision</b></li>
<ul>
<li><b>Length precision</b> - allows to ajust input precision of coordinates and dimensions.</li>
<li><b>Angular precision</b> - allows to ajust input precision of angles.</li>
<li><b>Length tolerance precision</b> - allows to ajust input precision of tolerance of coordinates and dimensions.</li>
<li><b>Angular tolerance precision</b> - allows to ajust input precision of tolerance of angles.</li>
<li><b>Weight precision</b> - allows to ajust input precision of weight and mass.</li>
<li><b>Density precision</b> - allows to ajust input precision of density.</li>
<li><b>Parametric precision</b> - allows to ajust input precision of parametric values.</li>
<li><b>Parametric tolerance precision</b> - allows to ajust input precision of tolerance in parametric space.</li>
</ul>
</ul>
<ul>
<li><b>Marker of Points</b></li>
<ul>
<li><b>Type</b> - allows to select the symbol for representation of
points (cross, asterisk, etc.).</li>
<li><b>Size</b> - allows to define the size of the marker from 1
(smallest) to 7 (largest).</li>
</ul>
</ul>
<ul>
<li><b>Origin and base vectors</b></li>
<ul>
<li><b>Length of base vectors</b> - allows to define the length
of base vectors.</li>
<li><b>Auto create</b> - allows to automatically create a point
of origin and three base vectors of the rectangular coordinate
system immediately after the module activation.</li>
</ul>
</ul>
<ul>
<li><b>Operations</b></li>
<ul>
<li><b>Preview</b> - allows to customize the displaying preview by default.</li>
</ul>
</ul>
*/

View File

@ -0,0 +1,32 @@
/*!
\page import_picture_page Import a picture in the OCC viewer
It is possible in GEOM to import a picture file in the OCC view.
The supported formats are : .bmp, .gif, .pix, .xwd, .rgb, .rs
The imported picture (engineering drawing, nautical chart, etc.) may be used as a support for 2D shape design.
It is possible to create a \ref create_sketcher_page "sketch" on top of this picture or use the
\ref shape_recognition_page "Shape recognition"
functionalities to build geometrical shapes from some elements of the picture (contours, corners ...).
To <b>import a picture</b> in the view:
<ul>
<li> select <b>New Entity -> Import a picture in the view</b> or click on \image html import_picture.png </li>
<li> Click on <b>...</b> and browse your image files to select one of them</li>
<li> Apply</li>
</ul>
A new <b>Picture</b> object is created. Pan, zoom and rotation operations are available in the view like for any other object.
\image html picture_import_dlg.png
*/

View File

@ -5,20 +5,24 @@
\image html geomscreen.png \image html geomscreen.png
\b Geometry module of SALOME is destined for: \b Geometry module of SALOME is destined for:
<ul> - \subpage import_export_geom_obj_page "import and export of geometrical models"
<li>\subpage import_export_geom_obj_page "import and export of geometrical models" in IGES, BREP and STEP formats;</li> in IGES, BREP and STEP formats;
<li>\subpage create_geom_obj_page "construction of geometrical objects" - \subpage create_geom_obj_page "construction of geometrical objects"
using a wide range of functions;</li> using a wide range of functions;
<li>\subpage view_geom_obj_page "viewing geometrical objects" in the OCC viewer;</li> - \subpage view_geom_obj_page "viewing geometrical objects" in the OCC
<li>\subpage transform_geom_obj_page "transformation of geometrical objects" using viewer;
various algorithms;</li> - \subpage transform_geom_obj_page "transformation of geometrical objects"
<li>\subpage repairing_operations_page "optimization of geometrical objects";</li> using various algorithms;
<li>viewing \subpage geometrical_obj_prop_page "geometrical object properties".</li> - \subpage repairing_operations_page "optimization of geometrical objects";
<li>and other information about geometrical objects using - viewing \subpage geometrical_obj_prop_page "geometrical object properties"
\subpage using_measurement_tools_page "measurement tools".</li> and other information about geometrical objects using
<li>easily setting parameters via the variables predefined in \subpage using_measurement_tools_page "measurement tools";
\subpage using_notebook_geom_page "Salome notebook".</li> - \subpage pictures_page "designing shapes from pictures";
</ul> - easily setting parameters via the variables predefined in
\subpage using_notebook_geom_page "SALOME notebook".
Geometry module preferences are described in the
\subpage geometry_preferences_page section of SALOME Geometry Help.
Almost all geometry module functionalities are accessible via Almost all geometry module functionalities are accessible via
\subpage geompy_page "Geometry module Python Interface" \subpage geompy_page "Geometry module Python Interface"

View File

@ -0,0 +1,21 @@
/*!
\page inertia_page Inertia
Returns the axial moments of inertia for the selected geometrical object.
\n <b>Result:</b> Displays the matrix of the own moments of inertia and
the relative moments of inertia in the form of Python Tuple
<center>(I11, I12, I13,</center>
<center>I21, I22, I23,</center>
<center>I31, I32, I33,</center>
<center>Ix, Iy, Iz).</center>
\n <b>TUI Command:</b> <em>geompy.Inertia(Shape),</em> where \em Shape is
a shape for which the own matrix of inertia and the relative moments of inertia are
returned.
See also a \ref tui_inertia_page "TUI example".
\image html measures4.png
*/

View File

@ -1,56 +1,145 @@
/*! /*!
\page material_page Material \page material_page Material properties
\n You can change the material properties of the selected shape(s) by \tableofcontents
- choosing one of predefined global materials,
- choosing one of predefined user materials,
- creating a new user material and applying it to the selected shape(s)
in the following dialog box. \section material_general_description General description
\image html material_front.png \note The functionality related to the material properties is
<center><em><b>Set Material Properties</b> dialog: <b>Front material</b> tab</em></center> \b experimental, so it might work not as expected. The behaviour might
be changed in the future versions of SALOME Geometry module.
\image html material_back.png \n You can change the material properties of the selected shape(s) in
<center><em><b>Set Material Properties</b> dialog: <b>Back material</b> tab</em></center> the dedicated dialog box. This dialog box can be invoked from the
context popup menu using "Material properties" item:
This functionality is available in both OCC and VTK viewers. \image html material.png
User can changed the following material properties In this dialog box you can:
- modify the properties of the material model currenly assigned to the
shape presentation;
- assign one of predefined global materials to the shape;
- create a custom material model and apply it to the shape.
- ambient color and coefficient \note This functionality is available in both OCC and VTK 3D
- diffuse color and coefficient viewers. However, note that due to the differencies between underlying API
- specular color and coefficient of OCC and VTK libraries the behaviour of the functionality related to
- emission color and coefficient (available only in OCC viewer) the materials is different:
- shininess - presentation of the shape in OCC and VTK viewers is not fully identical;
- some material attributes can affect presentation in a different way.
With help of <b>Front material</b> and <b>Back material</b> tabs of \section material_opengl_model OpenGL ligthing model
<b>Set Material Properties</b> dialog it is possible to set front and
back materials of the selected shape(s). To make <b>Back material</b>
tab visible it is needed to check <b>Enable back material</b> check
box. If back material is not defined, front material specified for the
selected shape(s) is used as both front and back materials.
All currently available materials are shown in the left-side list box The material is specifed by several attributes of the lighting
of the <b>Set Material Properties</b> dialog. model. More details can be found in the documentation related to the
OpenGL programming, for example here: http://www.glprogramming.com/red/chapter05.html.
- <b>[Current]</b> item in the list corresponds to In the OpenGL lighting model, the light in a scene comes from several
the front/back (depending on what tab is currently active) material light sources; the light sources have an effect only when there are
currently used for the selected shape(s) surfaces that absorb and reflect light. Each surface is assumed to be
- <b>[Default]</b> item in the list corresponds to the front/back material composed of a material with various properties. A material might emit
specified in Geometry module preferences its own light (like headlights on an automobile), it might scatter
- <b>Global</b> materials are shown in blue color in the list some incoming light in all directions, and it might reflect a
- <b>User</b> materials are shown in black color in the list portion of the incoming light in a preferential direction like a
mirror or other shiny surface.
The OpenGL lighting model considers the lighting to be divided into
four independent components: emissive, ambient, diffuse, and
specular. All four components are computed independently and then
added together.
Ambient illumination is the light that has been scattered so much by the
environment that its direction is impossible to determine - it seems
to come from all directions. Backlighting in a room has a large
ambient component, since most of the light that reaches your eye has
first bounced off many surfaces. A spotlight outdoors has a tiny
ambient component; most of the light travels in the same direction,
and since you're outdoors, very little of the light reaches your eye
after bouncing off other objects. When ambient light strikes a
surface, it is scattered equally in all directions.
The diffuse component is the light that comes from one direction, so
it is brighter if it comes squarely down on a surface than if it barely
glances off the surface. Once it hits a surface, however, it's
scattered equally in all directions, so it appears equally bright, no
matter where the eye is located. Any light coming from a particular
position or direction probably has a diffuse component.
Finally, the specular light comes from a particular direction, and it
tends to bounce off the surface in a preferred direction. A
well-collimated laser beam bouncing off a high-quality mirror produces
specular reflection by almost 100 percent. Shiny metal or plastic has a
high specular component, and chalk or carpet has almost none. You can
think of specularity as shininess.
Although a light source delivers a single distribution of frequencies,
the ambient, diffuse, and specular components might be different. For
example, if you have a white light in a room with red walls, the
scattered light tends to be red, although the light directly striking
objects is white. OpenGL allows you to set the red, green, and blue
values for each component of light independently.
\section material Material properties dialog box
The dialog box consists of two parts:
- The list box at the left shows all available material models, both
predefined by the application and custom one specified by the user.
- The widgets in the right part of the dialog box allows modifyng of
different properties of the material model.
The following properties of the material model can be specified:
- \b Ambient color and coefficient (floating point value between 0 and 1)
- \b Diffuse color and coefficient (floating point value between 0 and 1)
- \b Specular color and coefficient (floating point value between 0 and 1)
- \b Emissive color and coefficient (floating point value between 0
and 1). Note: this attribute is applicable only for the OCC viewer;
it simulates light originating from an object.
- \b Shininess
- \b Type of material model: \em physical or \em artificial.
If the material model is specified as a \em physical one (like \em Gold,
for instance), this means that the color of the shape (more precisely
its \em ambient color) can not be modified. If you assign a physical
material model to the shape, the "Color" menu item will not be
available in the popup menu.
If the model is non-physical (\em artificial), the color can be changed
to any appopriate one, only other attributes will be constant. In the
dialog box you will be able to modify the color of the shape via the
"Color" button. "Ambient color" button becomes disabled to signalize
that this attribute of the model is ignored. Also, it will be possible
to modify the color of the shape via the
\ref color_page "corresponding popup menu command".
All available predefined material models are shown in the list box of
the <b>Color and Material Properties</b> dialog:
- <b>[Current]</b> item in the list corresponds to the material model
currently assigned to the selected shape(s). This model can be
freely modified by the user.
- <b>Global</b> material models are shown in blue color in the list;
these are the models predefined by the SALOME Geometry module. The user
is not allowed to modify the global models.
- <b>User</b> materials are shown in black color in the list. These
models are specified by the user and can be modified at any moment.
The buttons "Add material" and "Remove material" in the lower part of
the dialog box can be used to create or remove custom material
models. The same commands are also available via the popup menu that
is shown if the user presses right mouse button in the materials list
box. An additional "Rename material" command, available in popup menu,
can be used to change the name of material model.
<b>Examples:</b> <b>Examples:</b>
\image html material_OCC.png \image html material_OCC.png
<center><em>Different materials in OCC viewer</em></center> <em>Different materials in OCC viewer</em>
\image html material_VTK.png \image html material_VTK.png
<center><em>Different materials in VTK viewer</em></center> <em>Different materials in VTK viewer</em>
The default material model is specified via the preferences of Geometry
module.
*/ */

View File

@ -0,0 +1,16 @@
/*!
\page min_distance_page Min. Distance
Returns the minimum distance between two geometrical objects and
the coordinates of the vector of distance and shows the vector in the viewer.
<b>TUI Command:</b> <em>geompy.MinDistance(Shape1, Shape2),</em>
where \em Shape1 and \em Shape2 are shapes between which the minimal
distance is computed.
See also a \ref tui_min_distance_page "TUI example".
\image html distance.png
*/

View File

@ -12,7 +12,9 @@ or two dimensions basing on the initial geometrical object.
\n To produce a <b>Simple Multi Rotation</b> (in one dimension) you \n To produce a <b>Simple Multi Rotation</b> (in one dimension) you
need to define a \b Shape to be rotated, an \b Axis of rotation and a need to define a \b Shape to be rotated, an \b Axis of rotation and a
<b>Number of Times</b> the shape must be rotated. <b>Rotation Angle</b> will <b>Number of Times</b> the shape must be rotated. <b>Rotation Angle</b> will
be 2*PI/NbTimes be 2 * \a PI / \a NbTimes. Number of shapes in the resulting compound will be equal
to \a NbTimes (if \a NbTimes = 1, the result will contain only the initial
non-transformed shape).
\n <b>TUI Command:</b> <em>geompy.MultiRotate1D(Shape, Axis, NbTimes)</em> \n <b>TUI Command:</b> <em>geompy.MultiRotate1D(Shape, Axis, NbTimes)</em>
\n <b>Arguments:</b> Name + 1 shape + 1 vector for direction + 1 value \n <b>Arguments:</b> Name + 1 shape + 1 vector for direction + 1 value
(repetition). (repetition).
@ -32,7 +34,10 @@ the same way, but the Axis is defined by direction and point.
\b Object around the given \b Axis on the given \b Angle a given \b Object around the given \b Axis on the given \b Angle a given
<b>Number of Times</b> and multi-translates each rotation <b>Number of Times</b> and multi-translates each rotation
result. Translation direction passes through the center of gravity of result. Translation direction passes through the center of gravity of
the rotated shape and its projection on the rotation axis. the rotated shape and its projection on the rotation axis. Number of
shapes in the resulting compound will be equal to \a NbTimes1 x \a NbTimes2 (if
both \a NbTimes1 and \a NbTimes2 are equal to 1, the result will contain
only the initial non-transformed shape).
\b Reverse checkbox allows to set the direction of rotation. \b Reverse checkbox allows to set the direction of rotation.
\n <b>TUI Command:</b> <em>geompy.MultiRotate2D(Shape, Axis, Angle, NbTimes1, Step, NbTimes2)</em> \n <b>TUI Command:</b> <em>geompy.MultiRotate2D(Shape, Axis, Angle, NbTimes1, Step, NbTimes2)</em>
\n <b>Arguments:</b> Name + 1 shape + 1 vector for direction + 1 angle \n <b>Arguments:</b> Name + 1 shape + 1 vector for direction + 1 angle

View File

@ -7,8 +7,18 @@ select <b>Operations - > Transformation - > Multi Translation</b>
\n This operation makes several translations of a shape in \b one or \b \n This operation makes several translations of a shape in \b one or \b
two directions. two directions.
\n The \b Result will be one or several \b GEOM_Objects (compound). \n The \b Result will be one or several \b GEOM_Objects
(compound). The total number of shapes in the resulting compound (for
a single initial selected shape) will be equal to:
- in case of \ref single_multi_translation "Single multi translation":
\a NbTimes (if \a NbTimes parameter is equal to 1, the result will
contain only the initial non-translated shape).
- in case of \ref double_multi_translation "Double multi translation":
\a NbTimes1 x \a NbTimes2 (if \a NbTimes1 and \a NbTimes2 parameters
are both equal to 1, the result will contain a single non-translated
initial shape).
\anchor single_multi_translation
\n To produce a <b>Simple Multi Translation</b> (in one direction) you \n To produce a <b>Simple Multi Translation</b> (in one direction) you
need to indicate an \b Object to be translated, a \b Vector of need to indicate an \b Object to be translated, a \b Vector of
translation, a \b Step of translation and a <b>Number of Times</b> the translation, a \b Step of translation and a <b>Number of Times</b> the
@ -26,6 +36,7 @@ step value + 1 value (repetition).
\image html multi_translation1dsn.png "The result of a simple multi-translation" \image html multi_translation1dsn.png "The result of a simple multi-translation"
\anchor double_multi_translation
\n To produce a <b>Double Multi Translation</b> (in two directions) you need to \n To produce a <b>Double Multi Translation</b> (in two directions) you need to
indicate an \b Object to be translated, and, for both axes, a \b indicate an \b Object to be translated, and, for both axes, a \b
Vector of translation, a \b Step of translation and a <b>Number of Times</b> the shape must be duplicated. Vector of translation, a \b Step of translation and a <b>Number of Times</b> the shape must be duplicated.

View File

@ -0,0 +1,16 @@
/*!
\page normal_page Normal to a Face
\n Calculates the normal vector to the selected \b Face. The \b Point
is a point of the \b Face, where the Normal should be calculated.
\n <b>TUI Command:</b> <em>geompy.GetNormal(Face, OptionalPoint = None),</em> where \em Face is
the face to define normale of and \em OptionalPoint is the point to compute the normal at.
If the point is not given, the normale is calculated at the center of mass.
See also a \ref tui_normal_face_page "TUI example".
\image html normaletoface.png
*/

View File

@ -0,0 +1,12 @@
/*!
\page pictures_page Designing shapes from pictures
Some tools in GEOM allow you to create shapes, basing the design on imported pictures (engineering drawings, nautical charts ...) :
<ul>
<li>\subpage import_picture_page, such as engeneering drawings or nautical charts as a support for shape design.
<li>\subpage shape_recognition_page previously imported in the OCC viewer .
</ul>
*/

View File

@ -0,0 +1,15 @@
/*!
\page point_coordinates_page Point Coordinates
Returns the coordinates of a point.
<b>Result:</b> Point coordinates (X, Y, Z) in 3D space in the form of Python Tuple.
\n<b>TUI Command:</b> <em>geompy.PointCoordinates(Point),</em>
where \em Point is a point whose coordinates are inquired.
See also a \ref tui_point_coordinates_page "TUI example".
\image html measures1.png
*/

View File

@ -1,6 +1,6 @@
/*! /*!
\page repairing_operations_page Repairing Operations \page repairing_operations_page Repairing geometrical objects
Repairing operations improve the shapes, processing them with complex algorithms: Repairing operations improve the shapes, processing them with complex algorithms:

View File

@ -0,0 +1,98 @@
/*!
\page shape_recognition_page Shape recognition from a picture
\note
<ol>
<li>This functionality is not fully operational yet. It is provided for testing purpose and because it might already be helpful in some situations.
(Do not hesitate to make feedbacks on possible bugs ...) </li>
<li>The functionality is only available if SALOME has been built with the optional prerequisite OpenCV. </li>
</ol>
This tool allows you to automatically create geometrical shapes from
pictures with help of shape recognition algorithms.
<b>Contours</b> or <b>Corners</b> can be built.
\b Example:
Detection of the cost line on a nautical chart
\image html contour_detection_example2.png
\n
To use the <b>Shape recogition</b> tool:
<ol>
<li>\ref import_picture_page "Import a picture" in the view</li>
<li> Select <b>New Entity -> Shape Recognition</b> or click on \image html feature_detect.png </li>
</ol>
Then you can choose to create either <b>contours</b> or <b>corners</b> from this picture.
\n
To create <b>Contours</b> :
<ol>
<li> Select in the <b>Picture</b> field a previously imported picture.</li>
<li> Click on \image html occ_view_camera_dump.png </li>
<li> Draw a rectangle in the zone whose contour is to be found. The
zone will be identified by the colors of this <b>Filtering Sample</b>.
\b Example:
In the picture shown above, the contours have been drawn basing on
the sample, containing white and violet color, thus all white and
violet areas in the picture are included in the outlined zone.
\image html feature_detection_dlg3.png
<li> <b> Output type </b>
<ul>
<li> \b Spline : The \b result will be a \b Compound of \b Edges. Each contour will be a single \b edge based on a B-Spline curve (it will be smooth).</li>
<li> \b Polyline : The \b result will be a \b Compound of \b Wires. Each contour will be a wire made of lines (i.e. a \b Polygon)</li>
</ul>
In both cases each contour can then be retrieved by an explode operation with the appropriate subshape type.
</li>
\note It is better to use the \b Spline output type unless you want to find the frontier of a polygon (rectangle ...)
</ol>
\n
To create <b>Corners</b> :
<ol>
<li> In the <b>Picture</b> field select a previously imported picture.</li>
<li> Apply </li>
The \b Result will be a \b Compound of \b Vertices
\image html feature_detection_dlg2.png
</ol>
*/

View File

@ -0,0 +1,17 @@
/*!
\page tolerance_page Tolerance
\n Returns the maximum and the minimum tolerance for the selected
geometrical object.
\n <b>Result:</b> Displays the tolerance values (FaceMinTol,
FaceMaxTol, EgdeMinTol, EgdeMaxTol, VertexMinTol, VertexMaxTol).
\n <b>TUI Command:</b> <em>geompy.Tolerance(Shape),</em> where \em Shape
is a shape for which minimal and maximal tolerances are returned.
See also a \ref tui_tolerance_page "TUI example".
\image html new-tolerance.png
*/

View File

@ -18,14 +18,6 @@ which allow to:
<li>Create a \subpage projection_operation_page "Projection" of an object on a face.</li> <li>Create a \subpage projection_operation_page "Projection" of an object on a face.</li>
<li>Create a simultaneous \subpage multi_translation_operation_page "Translation in several directions".</li> <li>Create a simultaneous \subpage multi_translation_operation_page "Translation in several directions".</li>
<li>Create a simultaneous \subpage multi_rotation_operation_page</li> "Rotation in several directions".</li> <li>Create a simultaneous \subpage multi_rotation_operation_page</li> "Rotation in several directions".</li>
<li>Produce a \subpage fillet_operation_page "Fillet" on the selected
edges of an object.</li>
<li>Produce a \subpage fillet1d_operation_page "1D Fillet" on the
corners of a Wire with Planar Edges.</li>
<li>Produce a \subpage fillet2d_operation_page "2D Fillet" on the corners of a Planar Face.</li>
<li>Produce a \subpage chamfer_operation_page "Chamfer" on the selected edges of an object.</li>
<li>Remove matter from an object by producing an \subpage extruded_cut_operation_page "Extruded Cut".</li>
<li>Add matter to an object by producing an \subpage extruded_boss_operation_page "Extruded Boss".</li>
</ul> </ul>
*/ */

View File

@ -6,11 +6,16 @@ The objects created in Salome can be processed with Transformation
operations, which can be classified into: operations, which can be classified into:
<ul> <ul>
<li>\subpage using_boolean_operations_page "Boolean operations" using <li>\subpage using_boolean_operations_page "Boolean operations", which allow combining objects
Boolean logical operators.</li> with boolean logical operators.</li>
<li>\subpage transformation_operations_page "Transformation operations", <li>\subpage transformation_operations_page "Transformation operations",
which modify shape or location of the selected object.</li> which modify shape or location of the selected object.</li>
<li>\subpage features_page "Features",
which allow adding or removing matter from an object.</li>
<li>Operations with \subpage blocks_operations_page "Blocks".</li>
<li>\subpage partition_page "Partition" operation, which creates a compound <li>\subpage partition_page "Partition" operation, which creates a compound
by intersection of several shapes with a tool object or a plane.</li> by intersection of several shapes with a tool object or a plane.</li>
<li>\subpage archimede_page "Archimede" operation, which creates a <li>\subpage archimede_page "Archimede" operation, which creates a
@ -21,8 +26,6 @@ special case of \b Explode operation. </li>
<li>\subpage shared_shapes_page "Get shared shapes" operation, a <li>\subpage shared_shapes_page "Get shared shapes" operation, a
special case of \b Explode operation. </li> special case of \b Explode operation. </li>
<li>Operations with \subpage blocks_operations_page "Blocks".</li>
<li>\subpage restore_presentation_parameters_page "Restore presentation parameters". <li>\subpage restore_presentation_parameters_page "Restore presentation parameters".
This cross-operation functionality allows the resulting shape to This cross-operation functionality allows the resulting shape to

View File

@ -0,0 +1,53 @@
/*!
\page tui_angle_page Angle
\code
import salome
salome.salome_init()
import math
import geompy
geompy.init_geom(salome.myStudy)
OX = geompy.MakeVectorDXDYDZ(10, 0,0)
OXY = geompy.MakeVectorDXDYDZ(10,10,0)
# in one plane
Angle = geompy.GetAngle(OX, OXY)
print "\nAngle between OX and OXY = ", Angle
if math.fabs(Angle - 45.0) > 1e-05:
print " Error: returned angle is", Angle, "while must be 45.0"
pass
Angle = geompy.GetAngleRadians(OX, OXY)
print "\nAngle between OX and OXY in radians = ", Angle
if math.fabs(Angle - math.pi/4) > 1e-05:
print " Error: returned angle is", Angle, "while must be pi/4"
pass
# not in one plane
OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
Angle = geompy.GetAngle(OX, OXY_shift)
print "Angle between OX and OXY_shift = ", Angle
if math.fabs(Angle - 45.0) > 1e-05:
print " Error: returned angle is", Angle, "while must be 45.0"
pass
# not linear
pnt1 = geompy.MakeVertex(0, 0, 0)
pnt2 = geompy.MakeVertex(10, 0, 0)
pnt3 = geompy.MakeVertex(20, 10, 0)
arc = geompy.MakeArc(pnt1, pnt2, pnt3)
Angle = geompy.GetAngle(OX, arc)
if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()):
print "Error. Angle must not be computed on curvilinear edges"
pass
\endcode
*/

View File

@ -0,0 +1,26 @@
/*!
\page tui_basic_properties_page Basic Properties
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
props = geompy.BasicProperties(box)
print "\nBox 100x30x100 Basic Properties:"
print " Wires length: ", props[0]
print " Surface area: ", props[1]
print " Volume : ", props[2]
length = math.sqrt((props[0] - 1840)*(props[0] - 1840))
area = math.sqrt((props[1] - 32000)*(props[1] - 32000))
volume = math.sqrt((props[2] - 300000)*(props[2] - 300000))
if length > 1e-7 or area > 1e-7 or volume > 1e-7:
print "While must be:"
print " Wires length: ", 1840
print " Surface area: ", 32000
print " Volume : ", 300000.
\endcode
*/

View File

@ -0,0 +1,17 @@
/*!
\page tui_bounding_box_page Bounding Box
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
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]
\endcode
*/

View File

@ -0,0 +1,25 @@
/*!
\page tui_center_of_mass_page Center of masses
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
cm = geompy.MakeCDG(box)
if cm is None:
raise RuntimeError, "MakeCDG(box) failed"
else:
print "\nCentre of gravity of box has been successfully obtained:"
coords = geompy.PointCoordinates(cm)
print "(", coords[0], ", ", coords[1], ", ", coords[2], ")"
dx = math.sqrt((coords[0] - 50)*(coords[0] - 50))
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)"
\endcode
*/

View File

@ -0,0 +1,27 @@
/*!
\page tui_check_compound_of_blocks_page Check Compound of Blocks
\code
import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")
# create boxes
box1 = geompy.MakeBox(0,0,0,100,50,100)
box2 = geompy.MakeBox(100,0,0,250,50,100)
# make a compound
compound = geompy.MakeCompound([box1, box2])
# glue the faces of the compound
tolerance = 1e-5
glue = geompy.MakeGlueFaces(compound, tolerance)
IsValid = geompy.CheckCompoundOfBlocks(glue)
if IsValid == 0:
raise RuntimeError, "Invalid compound created"
else:
print "\nCompound is valid"
\endcode
*/

View File

@ -0,0 +1,17 @@
/*!
\page tui_check_self_intersections_page Detect Self-intersections
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
IsValid = geompy.CheckSelfIntersections(box)
if IsValid == 0:
raise RuntimeError, "Box with self-intersections created"
else:
print "\nBox is valid"
\endcode
*/

View File

@ -0,0 +1,17 @@
/*!
\page tui_check_shape_page Check Shape
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
IsValid = geompy.CheckShape(box)
if IsValid == 0:
raise RuntimeError, "Invalid box created"
else:
print "\nBox is valid"
\endcode
*/

View File

@ -0,0 +1,85 @@
/*!
\page tui_free_boundaries_page Check Free Boundaries
\code
import os
import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")
# create boxes
box1 = geompy.MakeBox(0,0,0,100,50,100)
box2 = geompy.MakeBox(100,0,0,250,50,100)
# make a compound
compound = geompy.MakeCompound([box1, box2])
# import from *.brep
ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep")
# get a face
faces = geompy.SubShapeAllSortedCentres(ImportFromBREP, geompy.ShapeType["FACE"])
# get the free boundary for face 32
Res = geompy.GetFreeBoundary(faces[32])
isSuccess = Res[0]
ClosedWires = Res[1]
OpenWires = Res[2]
if isSuccess == 1 :
print "Checking free boudaries is OK."
else :
print "Checking free boudaries is KO!"
print "len(ClosedWires) = ", len(ClosedWires)
i = 0
for wire in ClosedWires :
wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1)
geompy.addToStudy(ClosedWires[i], wire_name)
if i < len(ClosedWires) :
i = i+ 1
print "len(OpenWires) = ", len(OpenWires)
i = 0
for wire in OpenWires :
wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1)
geompy.addToStudy(OpenWires[i], wire_name)
if i < len(OpenWires) :
i = i+ 1
# get the free boundary for face 41
Res = geompy.GetFreeBoundary(faces[41])
isSuccess = Res[0]
ClosedWires = Res[1]
OpenWires = Res[2]
if isSuccess == 1 :
print "Checking free boudaries is OK."
else :
print "Checking free boudaries is KO!"
print "len(ClosedWires) = ", len(ClosedWires)
i = 0
for wire in ClosedWires :
wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1)
geompy.addToStudy(ClosedWires[i], wire_name)
if i < len(ClosedWires) :
i = i+ 1
print "len(OpenWires) = ", len(OpenWires)
i = 0
for wire in OpenWires :
wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1)
geompy.addToStudy(OpenWires[i], wire_name)
if i < len(OpenWires) :
i = i+ 1
# add the imported object to the study
id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP")
salome.sg.updateObjBrowser(1)
\endcode
*/

View File

@ -0,0 +1,52 @@
/*!
\page tui_free_faces_page Check Free Faces
\code
import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
p1 = geompy.MakeVertex(35, 35, 0)
p2 = geompy.MakeVertex(35, 35, 50)
v = geompy.MakeVector(p1, p2)
# create a cylinder
cylinder = geompy.MakeCone(p1, v, 30, 20, 20)
# create a cone
cone = geompy.MakeCone(p1, v, 70, 40, 60)
# make cut
cut = geompy.MakeCut(cone, cylinder)
# get faces as sub-shapes
faces = []
faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
f_2 = geompy.GetSubShapeID(cut, faces[0])
# remove one face from the shape
cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
# suppress the specified wire
result = geompy.GetFreeFacesIDs(cut_without_f_2)
print "A number of free faces is ", len(result)
# add objects in the study
all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])
for face in all_faces :
sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face)
if result.count(sub_shape_id) > 0 :
face_name = "Free face %d"%(sub_shape_id)
geompy.addToStudy(face, face_name)
# in this example all faces from cut_without_f_2 are free
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)
\endcode
*/

View File

@ -0,0 +1,20 @@
/*!
\page tui_inertia_page Inertia
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
In = geompy.Inertia(box)
print "\nInertia matrix of box 100x30x100:"
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]
\endcode
*/

View File

@ -2,425 +2,22 @@
\page tui_measurement_tools_page Measurement Tools \page tui_measurement_tools_page Measurement Tools
<br><h2>Point Coordinates</h2> <ul>
<li>\subpage tui_point_coordinates_page</li>
\code <li>\subpage tui_basic_properties_page</li>
import math <li>\subpage tui_center_of_mass_page</li>
import geompy <li>\subpage tui_inertia_page</li>
<li>\subpage tui_normal_face_page</li>
# create a point <li>\subpage tui_bounding_box_page</li>
point = geompy.MakeVertex(15., 23., 80.) <li>\subpage tui_min_distance_page</li>
<li>\subpage tui_angle_page</li>
# get the coordinates of the point and check its values <li>\subpage tui_tolerance_page</li>
coords = geompy.PointCoordinates(point) <li>\subpage tui_whatis_page</li>
<li>\subpage tui_free_boundaries_page</li>
# check the obtained coordinate values <li>\subpage tui_free_faces_page</li>
tolerance = 1.e-07 <li>\subpage tui_check_shape_page</li>
def IsEqual(val1, val2): return (math.fabs(val1 - val2) < tolerance) <li>\subpage tui_check_compound_of_blocks_page</li>
<li>\subpage tui_check_self_intersections_page</li>
if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.): </ul>
print "All values are OK."
else :
print "Coordinates of point must be (15, 23, 80), but returned (",
print coords[0], ", ", coords[1], ", ", coords[2], ")"
pass
\endcode
<br><h2>Basic Properties</h2>
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
props = geompy.BasicProperties(box)
print "\nBox 100x30x100 Basic Properties:"
print " Wires length: ", props[0]
print " Surface area: ", props[1]
print " Volume : ", props[2]
length = math.sqrt((props[0] - 1840)*(props[0] - 1840))
area = math.sqrt((props[1] - 32000)*(props[1] - 32000))
volume = math.sqrt((props[2] - 300000)*(props[2] - 300000))
if length > 1e-7 or area > 1e-7 or volume > 1e-7:
print "While must be:"
print " Wires length: ", 1840
print " Surface area: ", 32000
print " Volume : ", 300000.
\endcode
<br><h2>Center of masses</h2>
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
cm = geompy.MakeCDG(box)
if cm is None:
raise RuntimeError, "MakeCDG(box) failed"
else:
print "\nCentre of gravity of box has been successfully obtained:"
coords = geompy.PointCoordinates(cm)
print "(", coords[0], ", ", coords[1], ", ", coords[2], ")"
dx = math.sqrt((coords[0] - 50)*(coords[0] - 50))
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)"
\endcode
<br><h2>Get vertex by index</h2>
\code
import geompy
# Create auxiliary objects
Vertex_1 = geompy.MakeVertex(0, 0, 0)
Vertex_2 = geompy.MakeVertex(10, 20, 0)
Vertex_3 = geompy.MakeVertex(0, 40, 0)
Vertex_4 = geompy.MakeVertex(-10, 60, 0)
Vertex_5 = geompy.MakeVertex(0, 80, 0)
Curve_1 = geompy.MakeInterpol([Vertex_1, Vertex_2, Vertex_3])
Curve_2 = geompy.MakeInterpol([Vertex_5, Vertex_4, Vertex_3])
Wire_1 = geompy.MakeWire([Curve_1, Curve_2])
Reversed_Wire = geompy.ChangeOrientationShellCopy(Wire_1)
# Get The vertexes from Reversed Wire by different functions
vertex_0 = geompy.GetFirstVertex(Reversed_Wire)
vertex_1 = geompy.GetVertexByIndex(Reversed_Wire, 1)
vertex_2 = geompy.GetLastVertex(Reversed_Wire)
# Publish objects in study
geompy.addToStudy( Wire_1, "Wire_1" )
geompy.addToStudy( Reversed_Wire, "Reversed_Wire" )
geompy.addToStudy( vertex_0, "vertex_0" )
geompy.addToStudy( vertex_1, "vertex_1" )
geompy.addToStudy( vertex_2, "vertex_2" )
\endcode
<br><h2>Inertia</h2>
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
In = geompy.Inertia(box)
print "\nInertia matrix of box 100x30x100:"
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]
\endcode
<br><h2>Check Free Boundaries</h2>
\code
import os
import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")
# create boxes
box1 = geompy.MakeBox(0,0,0,100,50,100)
box2 = geompy.MakeBox(100,0,0,250,50,100)
# make a compound
compound = geompy.MakeCompound([box1, box2])
# import from *.brep
ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep")
# get a face
faces = geompy.SubShapeAllSortedCentres(ImportFromBREP, geompy.ShapeType["FACE"])
# get the free boundary for face 32
Res = geompy.GetFreeBoundary(faces[32])
isSuccess = Res[0]
ClosedWires = Res[1]
OpenWires = Res[2]
if isSuccess == 1 :
print "Checking free boudaries is OK."
else :
print "Checking free boudaries is KO!"
print "len(ClosedWires) = ", len(ClosedWires)
i = 0
for wire in ClosedWires :
wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1)
geompy.addToStudy(ClosedWires[i], wire_name)
if i < len(ClosedWires) :
i = i+ 1
print "len(OpenWires) = ", len(OpenWires)
i = 0
for wire in OpenWires :
wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1)
geompy.addToStudy(OpenWires[i], wire_name)
if i < len(OpenWires) :
i = i+ 1
# get the free boundary for face 41
Res = geompy.GetFreeBoundary(faces[41])
isSuccess = Res[0]
ClosedWires = Res[1]
OpenWires = Res[2]
if isSuccess == 1 :
print "Checking free boudaries is OK."
else :
print "Checking free boudaries is KO!"
print "len(ClosedWires) = ", len(ClosedWires)
i = 0
for wire in ClosedWires :
wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1)
geompy.addToStudy(ClosedWires[i], wire_name)
if i < len(ClosedWires) :
i = i+ 1
print "len(OpenWires) = ", len(OpenWires)
i = 0
for wire in OpenWires :
wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1)
geompy.addToStudy(OpenWires[i], wire_name)
if i < len(OpenWires) :
i = i+ 1
# add the imported object to the study
id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP")
salome.sg.updateObjBrowser(1)
\endcode
<br><h2>Check Free Faces</h2>
\code
import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")
# create a vertex and a vector
p1 = geompy.MakeVertex(35, 35, 0)
p2 = geompy.MakeVertex(35, 35, 50)
v = geompy.MakeVector(p1, p2)
# create a cylinder
cylinder = geompy.MakeCone(p1, v, 30, 20, 20)
# create a cone
cone = geompy.MakeCone(p1, v, 70, 40, 60)
# make cut
cut = geompy.MakeCut(cone, cylinder)
# get faces as sub-shapes
faces = []
faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
f_2 = geompy.GetSubShapeID(cut, faces[0])
# remove one face from the shape
cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
# suppress the specified wire
result = geompy.GetFreeFacesIDs(cut_without_f_2)
print "A number of free faces is ", len(result)
# add objects in the study
all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])
for face in all_faces :
sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face)
if result.count(sub_shape_id) > 0 :
face_name = "Free face %d"%(sub_shape_id)
geompy.addToStudy(face, face_name)
# in this example all faces from cut_without_f_2 are free
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)
\endcode
<br><h2>Bounding Box</h2>
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
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]
\endcode
<br><h2>Minimal Distance</h2>
\code
import geompy
# create boxes
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
\endcode
<br><h2>Tolerance</h2>
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
Toler = geompy.Tolerance(box)
print "\nBox 100x30x100 tolerance:"
print " Face min. tolerance: ", Toler[0]
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]
\endcode
<br><h2>Angle</h2>
\code
import salome
salome.salome_init()
import math
import geompy
geompy.init_geom(salome.myStudy)
OX = geompy.MakeVectorDXDYDZ(10, 0,0)
OXY = geompy.MakeVectorDXDYDZ(10,10,0)
# in one plane
Angle = geompy.GetAngle(OX, OXY)
print "\nAngle between OX and OXY = ", Angle
if math.fabs(Angle - 45.0) > 1e-05:
print " Error: returned angle is", Angle, "while must be 45.0"
pass
Angle = geompy.GetAngleRadians(OX, OXY)
print "\nAngle between OX and OXY in radians = ", Angle
if math.fabs(Angle - math.pi/4) > 1e-05:
print " Error: returned angle is", Angle, "while must be pi/4"
pass
# not in one plane
OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
Angle = geompy.GetAngle(OX, OXY_shift)
print "Angle between OX and OXY_shift = ", Angle
if math.fabs(Angle - 45.0) > 1e-05:
print " Error: returned angle is", Angle, "while must be 45.0"
pass
# not linear
pnt1 = geompy.MakeVertex(0, 0, 0)
pnt2 = geompy.MakeVertex(10, 0, 0)
pnt3 = geompy.MakeVertex(20, 10, 0)
arc = geompy.MakeArc(pnt1, pnt2, pnt3)
Angle = geompy.GetAngle(OX, arc)
if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()):
print "Error. Angle must not be computed on curvilinear edges"
pass
\endcode
<br><h2>What Is</h2>
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
Descr = geompy.WhatIs(box)
print "\nBox 100x30x100 description:"
print Descr
\endcode
<br><h2>NbShapes and ShapeInfo</h2>
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
nbSolids = geompy.NbShapes(box, geompy.ShapeType["SOLID"])
print "\nBox 100x30x100 quantity of solids:", nbSolids
boxInfo = geompy.ShapeInfo(box)
print "\nBox 100x30x100 shapes:"
print boxInfo
\endcode
<br><h2>Check Shape</h2>
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
IsValid = geompy.CheckShape(box)
if IsValid == 0:
raise RuntimeError, "Invalid box created"
else:
print "\nBox is valid"
\endcode
<br><h2>Detect Self-intersections</h2>
\code
import geompy
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
IsValid = geompy.CheckSelfIntersections(box)
if IsValid == 0:
raise RuntimeError, "Box with self-intersections created"
else:
print "\nBox is valid"
\endcode
<br><h2>Check Compound of Blocks</h2>
\code
import geompy
import salome
gg = salome.ImportComponentGUI("GEOM")
# create boxes
box1 = geompy.MakeBox(0,0,0,100,50,100)
box2 = geompy.MakeBox(100,0,0,250,50,100)
# make a compound
compound = geompy.MakeCompound([box1, box2])
# glue the faces of the compound
tolerance = 1e-5
glue = geompy.MakeGlueFaces(compound, tolerance)
IsValid = geompy.CheckCompoundOfBlocks(glue)
if IsValid == 0:
raise RuntimeError, "Invalid compound created"
else:
print "\nCompound is valid"
\endcode
*/ */

View File

@ -0,0 +1,15 @@
/*!
\page tui_min_distance_page Minimal Distance
\code
import geompy
# create boxes
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
\endcode
*/

View File

@ -0,0 +1,23 @@
/*!
\page tui_normal_face_page Normal to a Face
\code
import geompy
import math
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
face0 = faces[0]
vnorm = geompy.GetNormal(face0)
if vnorm is None:
raise RuntimeError, "GetNormal(face0) failed"
else:
geompy.addToStudy(face0, "Face0")
geompy.addToStudy(vnorm, "Normale to Face0")
print "\nNormale of face has been successfully obtained"
\endcode
*/

Some files were not shown because too many files have changed in this diff Show More