diff --git a/build_configure b/build_configure
index cce3dce8f..27672f14d 100755
--- a/build_configure
+++ b/build_configure
@@ -14,6 +14,7 @@
ORIG_DIR=`pwd`
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+GEOM_WITH_GUI="yes"
########################################################################
# Test if the KERNEL_ROOT_DIR is set correctly
@@ -28,16 +29,36 @@ fi
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
+
+for option
+do
+ case $option in
+ -with-ihm | --with-ihm)
+ GEOM_WITH_GUI="yes"
+ break;;
+ -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
+ GEOM_WITH_GUI="no"
+ break;;
+ esac
+done
+
########################################################################
# Test if the GUI_ROOT_DIR is set correctly
-if test ! -d "${GUI_ROOT_DIR}"; then
- echo "failed : GUI_ROOT_DIR variable is not correct !"
- exit
+if test ${GEOM_WITH_GUI} = yes; then
+ if test ! -d "${GUI_ROOT_DIR}"; then
+ echo "failed : GUI_ROOT_DIR variable is not correct !"
+ exit
+ fi
fi
cd ${CONF_DIR}
ABS_CONF_DIR=`pwd`
+#######################################################################
+# Update configure.ac script: to set NETGENPLUGIN_WITH_GUI variable
+sed -e s/GEOM_WITH_GUI=[a-z]*/GEOM_WITH_GUI=${GEOM_WITH_GUI}/g configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
+
mkdir -p salome_adm/unix/config_files
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
@@ -64,9 +85,14 @@ cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
# autom4te.cache (directory)
echo "====================================================== aclocal"
-aclocal -I adm_local/unix/config_files \
- -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
- -I ${GUI_ROOT_DIR}/adm_local/unix/config_files || exit 1
+if test ${GEOM_WITH_GUI} = yes; then
+ aclocal -I adm_local/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+ -I ${GUI_ROOT_DIR}/adm_local/unix/config_files || exit 1
+else
+ aclocal -I adm_local/unix/config_files \
+ -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files || exit 1
+fi
# ____________________________________________________________________
# libtoolize creates some configuration files (ltmain.sh,
diff --git a/configure.ac b/configure.ac
index 032af63cc..d8ef0003b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,21 +213,6 @@ corba=make_$ORB
CORBA=adm_local/unix/$corba
fi
-echo
-echo ---------------------------------------------
-echo testing openGL
-echo ---------------------------------------------
-echo
-
-CHECK_OPENGL
-
-echo
-echo ---------------------------------------------
-echo testing QT
-echo ---------------------------------------------
-echo
-
-CHECK_QT
echo
echo ---------------------------------------------
@@ -237,13 +222,56 @@ echo
CHECK_MSG2QM
-echo
-echo ---------------------------------------------
-echo testing VTK
-echo ---------------------------------------------
-echo
-CHECK_VTK
+GEOM_WITH_GUI=yes
+
+AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${GEOM_WITH_GUI}" = "yes"])
+
+if test "${GEOM_WITH_GUI}" = "yes"; then
+ echo
+ echo ---------------------------------------------
+ echo testing openGL
+ echo ---------------------------------------------
+ echo
+
+ CHECK_OPENGL
+
+ echo
+ echo ---------------------------------------------
+ echo testing QT
+ echo ---------------------------------------------
+ echo
+
+ CHECK_QT
+
+ echo
+ echo ---------------------------------------------
+ echo testing VTK
+ echo ---------------------------------------------
+ echo
+
+ CHECK_VTK
+
+ echo
+ echo ---------------------------------------------
+ echo Testing GUI
+ echo ---------------------------------------------
+ echo
+
+ CHECK_SALOME_GUI
+
+ echo
+ echo ---------------------------------------------
+ echo Testing full GUI
+ echo ---------------------------------------------
+ echo
+
+ CHECK_CORBA_IN_GUI
+ if test "x${CORBA_IN_GUI}" != "xyes"; then
+ echo "failed : For configure GEOM module necessary full GUI !"
+ exit
+ fi
+fi
echo
echo ---------------------------------------------
@@ -277,26 +305,6 @@ echo
CHECK_HTML_GENERATORS
-echo
-echo ---------------------------------------------
-echo Testing GUI
-echo ---------------------------------------------
-echo
-
-CHECK_SALOME_GUI
-
-echo
-echo ---------------------------------------------
-echo Testing full GUI
-echo ---------------------------------------------
-echo
-
-CHECK_CORBA_IN_GUI
-if test "x${CORBA_IN_GUI}" != "xyes"; then
- echo "failed : For configure GEOM module necessary full GUI !"
- exit
-fi
-
echo
echo ---------------------------------------------
echo Testing Kernel
@@ -387,6 +395,7 @@ AC_OUTPUT([ \
./src/GEOM_I/Makefile \
./src/GEOM_I_Superv/Makefile \
./src/GEOM_SWIG/Makefile \
+ ./src/GEOM_SWIG_WITHIHM/Makefile \
./src/GenerationGUI/Makefile \
./src/GroupGUI/Makefile \
./src/IGESExport/Makefile \
diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl
index 05c9fe46f..118971724 100644
--- a/idl/GEOM_Gen.idl
+++ b/idl/GEOM_Gen.idl
@@ -896,7 +896,7 @@ module GEOM
* \param theSeqSubBases - list of corresponding subshapes of section shapes.
* \param theLocations - list of locations on the path corresponding
* specified list of the Bases shapes. Number of locations
- * should be equal to number of bases or list of locations can be empty.
+ * should be equal to number of bases.
* \param thePath - Path shape to extrude the base shape along it.
* \param theWithContact - the mode defining that the section is translated to be in
* contact with the spine.
@@ -985,9 +985,10 @@ module GEOM
* Replace coincident faces in theShape by one face.
* \param theShape Initial shape.
* \param theTolerance Maximum distance between faces, which can be considered as coincident.
+ * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
* \return New GEOM_Object, containing a copy of theShape without coincident faces.
*/
- GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance);
+ GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
/*!
* Find coincident faces in theShape for possible gluing.
@@ -1003,10 +1004,11 @@ module GEOM
* \param theShape Initial shape.
* \param theTolerance Maximum distance between faces, which can be considered as coincident.
* \param theFaces List of faces for gluing.
+ * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
* \return New GEOM_Object, containing a copy of theShape without some faces.
*/
GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
- in ListOfGO theFaces);
+ in ListOfGO theFaces, in boolean doKeepNonSolids);
/*!
* Explode a shape on subshapes of a given type.
@@ -1309,7 +1311,7 @@ module GEOM
in shape_state theState);
/*!
- * Get sub-shape(s) of theShapeWhere, which are
+ * Get sub-shape(s) of \a theShapeWhere, which are
* coincident with \a theShapeWhat or could be a part of it.
* \param theShapeWhere Shape to find sub-shapes of.
* \param theShapeWhat Shape, specifying what to find.
@@ -1318,6 +1320,23 @@ module GEOM
GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
in GEOM_Object theShapeWhat);
+ /*!
+ * Get sub-shape(s) of \a theShapeWhere, which are
+ * coincident with \a theShapeWhat or could be a part of it.
+ *
+ * Implementation of this method is based on a saved history of an operation,
+ * produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
+ * arguments (an argument shape or a sub-shape of an argument shape).
+ * The operation could be the Partition or one of boolean operations,
+ * performed on simple shapes (not on compounds).
+ *
+ * \param theShapeWhere Shape to find sub-shapes of.
+ * \param theShapeWhat Shape, specifying what to find.
+ * \return Group of all found sub-shapes or a single found sub-shape.
+ */
+ GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
+ in GEOM_Object theShapeWhat);
+
/*!
* Get sub-shape of theShapeWhere, which are
* coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
@@ -1690,6 +1709,10 @@ module GEOM
* \note Each compound from ListShapes and ListTools will be exploded in order
* to avoid possible intersection between shapes from this compound.
* \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
+ # \param KeepNonlimitShapes: if this parameter == 0 - only shapes with
+ # type <= Limit are kept in the result,
+ # else - shapes with type > Limit are kept
+ # also (if they exist)
*
* After implementation new version of PartitionAlgo (October 2006)
* other parameters are ignored by current functionality. They are kept
@@ -1710,7 +1733,8 @@ module GEOM
in ListOfGO theRemoveInside,
in short theLimit,
in boolean theRemoveWebs,
- in ListOfLong theMaterials);
+ in ListOfLong theMaterials,
+ in short theKeepNonlimitShapes);
/*!
* Perform partition operation.
@@ -1731,7 +1755,8 @@ module GEOM
in ListOfGO theRemoveInside,
in short theLimit,
in boolean theRemoveWebs,
- in ListOfLong theMaterials);
+ in ListOfLong theMaterials,
+ in short theKeepNonlimitShapes);
/*!
* Perform partition of the Shape with the Plane
diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl
index 92e6fc36d..4ad14db98 100644
--- a/idl/GEOM_Superv.idl
+++ b/idl/GEOM_Superv.idl
@@ -198,7 +198,8 @@ module GEOM
in GEOM_List theRemoveInside,
in short theLimit,
in boolean theRemoveWebs,
- in GEOM_List theMaterials) ;
+ in GEOM_List theMaterials,
+ in short theKeepNonlimitShapes);
GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
in GEOM_Object thePlane) ;
@@ -312,12 +313,14 @@ module GEOM
GEOM_Object MakeSolidShells (in GEOM_List theShells) ;
GEOM_Object MakeCompound (in GEOM_List theShapes) ;
GEOM_Object MakeGlueFaces (in GEOM_Object theShape,
- in double theTolerance);
+ in double theTolerance,
+ in boolean doKeepNonSolids);
GEOM_List GetGlueFaces (in GEOM_Object theShape,
in double theTolerance);
GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape,
in double theTolerance,
- in ListOfGO theFaces);
+ in ListOfGO theFaces,
+ in boolean doKeepNonSolids);
GEOM_List MakeExplode (in GEOM_Object theShape,
in long theShapeType,
in boolean isSorted) ;
diff --git a/resources/GEOMCatalog.xml.in b/resources/GEOMCatalog.xml.in
index 4b05e9c22..2a3f4aa09 100644
--- a/resources/GEOMCatalog.xml.in
+++ b/resources/GEOMCatalog.xml.in
@@ -517,6 +517,44 @@
+
+ GetDumpName
+
+
+ unknown
+ 0
+
+
+ theStudyEntry
+ string
+ unknown
+
+
+
+
+ return
+ string
+ unknown
+
+
+
+
+
+ GetAllDumpNames
+
+
+ unknown
+ 0
+
+
+
+ return
+ string_array
+ unknown
+
+
+
+
hostname = localhost
@@ -526,11 +564,11 @@
GEOM_Superv
GEOM_Superv
OTHER
- mkr
+
@VERSION@
Supervision wrapper for Geometry component
1
- 1
+ 1
@@ -539,8 +577,8 @@
SetStudyID
- mkr
- 2.1.0
+
+
unknown
0
@@ -555,8 +593,8 @@
CreateListOfGO
- mkr
- 2.1.0
+
+
unknown
0
@@ -571,8 +609,8 @@
AddItemToListOfGO
- mkr
- 2.1.0
+
+
unknown
0
@@ -598,8 +636,8 @@
CreateListOfLong
- mkr
- 2.1.0
+
+
unknown
0
@@ -614,8 +652,8 @@
AddItemToListOfLong
- mkr
- 2.1.0
+
+
unknown
0
@@ -641,8 +679,8 @@
CreateListOfDouble
- mkr
- 2.1.0
+
+
unknown
0
@@ -657,8 +695,8 @@
AddItemToListOfDouble
- mkr
- 2.1.0
+
+
unknown
0
@@ -684,8 +722,8 @@
MakePointXYZ
- mkr
- 2.1.0
+
+
unknown
0
@@ -716,8 +754,8 @@
MakePointWithReference
- mkr
- 2.1.0
+
+
unknown
0
@@ -753,8 +791,35 @@
MakePointOnCurve
- mkr
- 2.1.0
+
+
+ unknown
+ 0
+
+
+ theRefCurve
+ GEOM_Object
+ unknown
+
+
+ theParameter
+ double
+ unknown
+
+
+
+
+ return
+ GEOM_Object
+ unknown
+
+
+
+
+
+ MakeTangentOnCurve
+
+
unknown
0
@@ -780,8 +845,8 @@
MakeVectorDXDYDZ
- mkr
- 2.1.0
+
+
unknown
0
@@ -812,8 +877,8 @@
MakeVectorTwoPnt
- mkr
- 2.1.0
+
+
unknown
0
@@ -839,8 +904,8 @@
MakeLineTwoPnt
- mkr
- 2.1.0
+
+
unknown
0
@@ -866,8 +931,8 @@
MakePlaneThreePnt
- mkr
- 2.1.0
+
+
unknown
0
@@ -903,8 +968,8 @@
MakePlanePntVec
- mkr
- 2.1.0
+
+
unknown
0
@@ -935,8 +1000,8 @@
MakePlaneFace
- mkr
- 2.1.0
+
+
unknown
0
@@ -962,8 +1027,8 @@
MakeMarker
- mkr
- 2.1.0
+
+
unknown
0
@@ -1022,10 +1087,47 @@
+
+ MakeTangentPlaneOnFace
+
+
+ unknown
+ 0
+
+
+ theFace
+ GEOM_Object
+ unknown
+
+
+ theParameterU
+ double
+ unknown
+
+
+ theParameterV
+ double
+ unknown
+
+
+ theTrimSize
+ double
+ unknown
+
+
+
+
+ return
+ GEOM_Object
+ unknown
+
+
+
+
MakeBox
- mkr
- 2.1.0
+
+
unknown
0
@@ -1071,8 +1173,8 @@
MakeBoxDXDYDZ
- mkr
- 2.1.0
+
+
unknown
0
@@ -1103,8 +1205,8 @@
MakeBoxTwoPnt
- mkr
- 2.1.0
+
+
unknown
0
@@ -1130,8 +1232,8 @@
MakeCylinderPntVecRH
- mkr
- 2.1.0
+
+
unknown
0
@@ -1167,8 +1269,8 @@
MakeCylinderRH
- mkr
- 2.1.0
+
+
unknown
0
@@ -1194,8 +1296,8 @@
MakeSphere
- mkr
- 2.1.0
+
+
unknown
0
@@ -1231,8 +1333,8 @@
MakeSphereR
- mkr
- 2.1.0
+
+
unknown
0
@@ -1253,8 +1355,8 @@
MakeSpherePntR
- mkr
- 2.1.0
+
+
unknown
0
@@ -1280,8 +1382,8 @@
MakeTorusPntVecRR
- mkr
- 2.1.0
+
+
unknown
0
@@ -1317,8 +1419,8 @@
MakeTorusRR
- mkr
- 2.1.0
+
+
unknown
0
@@ -1344,8 +1446,8 @@
MakeConePntVecR1R2H
- mkr
- 2.1.0
+
+
unknown
0
@@ -1386,8 +1488,8 @@
MakeConeR1R2H
- mkr
- 2.1.0
+
+
unknown
0
@@ -1418,8 +1520,8 @@
MakePrismVecH
- mkr
- 2.1.0
+
+
unknown
0
@@ -1450,8 +1552,8 @@
MakePrismTwoPnt
- mkr
- 2.1.0
+
+
unknown
0
@@ -1482,8 +1584,8 @@
MakePipe
- mkr
- 2.1.0
+
+
unknown
0
@@ -1509,8 +1611,8 @@
MakeRevolutionAxisAngle
- mkr
- 2.1.0
+
+
unknown
0
@@ -1541,8 +1643,8 @@
MakeFilling
- mkr
- 2.1.0
+
+
unknown
0
@@ -1586,10 +1688,136 @@
+
+ MakeThruSections
+
+
+ unknown
+ 0
+
+
+ theSeqSections
+ ListOfGO
+ unknown
+
+
+ theModeSolid
+ boolean
+ unknown
+
+
+ thePreci
+ double
+ unknown
+
+
+ theRuled
+ boolean
+ unknown
+
+
+
+
+ return
+ GEOM_Object
+ unknown
+
+
+
+
+
+ MakePipeWithDifferentSections
+
+
+ unknown
+ 0
+
+
+ theSeqBases
+ ListOfGO
+ unknown
+
+
+ theLocations
+ ListOfGO
+ unknown
+
+
+ thePath
+ GEOM_Object
+ unknown
+
+
+ theWithContact
+ boolean
+ unknown
+
+
+ theWithCorrection
+ boolean
+ unknown
+
+
+
+
+ return
+ GEOM_Object
+ unknown
+
+
+
+
+
+ MakePipeWithShellSections
+
+
+ unknown
+ 0
+
+
+ theSeqBases
+ ListOfGO
+ unknown
+
+
+ theSeqSubBases
+ ListOfGO
+ unknown
+
+
+ theLocations
+ ListOfGO
+ unknown
+
+
+ thePath
+ GEOM_Object
+ unknown
+
+
+ theWithContact
+ boolean
+ unknown
+
+
+ theWithCorrection
+ boolean
+ unknown
+
+
+
+
+ return
+ GEOM_Object
+ unknown
+
+
+
+
MakeBoolean
- mkr
- 2.1.0
+
+
unknown
0
@@ -1620,8 +1848,8 @@
MakeFuse
- mkr
- 2.1.0
+
+
unknown
0
@@ -1647,8 +1875,8 @@
MakePartition
- mkr
- 2.1.0
+
+
unknown
0
@@ -1687,6 +1915,11 @@
GEOM_List
unknown
+
+ theKeepNonlimitShapes
+ short
+ unknown
+
@@ -1699,8 +1932,8 @@
MakeHalfPartition
- mkr
- 2.1.0
+
+
unknown
0
@@ -1726,8 +1959,8 @@
MakeCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -1748,8 +1981,8 @@
Export
- mkr
- 2.1.0
+
+
unknown
0
@@ -1774,8 +2007,8 @@
Import
- mkr
- 2.1.0
+
+
unknown
0
@@ -1801,8 +2034,8 @@
ImportTranslators
- mkr
- 2.1.0
+
+
unknown
0
@@ -1822,8 +2055,8 @@
ExportTranslators
- mkr
- 2.1.0
+
+
unknown
0
@@ -1843,8 +2076,8 @@
TranslateTwoPoints
- mkr
- 2.1.0
+
+
unknown
0
@@ -1875,8 +2108,8 @@
TranslateTwoPointsCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -1907,8 +2140,8 @@
TranslateDXDYDZ
- mkr
- 2.1.0
+
+
unknown
0
@@ -1944,8 +2177,8 @@
TranslateDXDYDZCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -1981,8 +2214,8 @@
TranslateVector
- mkr
- 2.1.0
+
+
unknown
0
@@ -2008,8 +2241,8 @@
TranslateVectorCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2035,8 +2268,8 @@
MultiTranslate1D
- mkr
- 2.1.0
+
+
unknown
0
@@ -2072,8 +2305,8 @@
MultiTranslate2D
- mkr
- 2.1.0
+
+
unknown
0
@@ -2124,8 +2357,8 @@
Rotate
- mkr
- 2.1.0
+
+
unknown
0
@@ -2156,8 +2389,8 @@
RotateCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2188,8 +2421,8 @@
RotateThreePoints
- mkr
- 2.1.0
+
+
unknown
0
@@ -2225,8 +2458,8 @@
RotateThreePointsCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2262,8 +2495,8 @@
MultiRotate1D
- mkr
- 2.1.0
+
+
unknown
0
@@ -2294,8 +2527,8 @@
MultiRotate2D
- mkr
- 2.1.0
+
+
unknown
0
@@ -2341,8 +2574,8 @@
MirrorPlane
- mkr
- 2.1.0
+
+
unknown
0
@@ -2368,8 +2601,8 @@
MirrorPlaneCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2395,8 +2628,8 @@
MirrorAxis
- mkr
- 2.1.0
+
+
unknown
0
@@ -2422,8 +2655,8 @@
MirrorAxisCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2449,8 +2682,8 @@
MirrorPoint
- mkr
- 2.1.0
+
+
unknown
0
@@ -2476,8 +2709,8 @@
MirrorPointCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2503,8 +2736,8 @@
OffsetShape
- mkr
- 2.1.0
+
+
unknown
0
@@ -2530,8 +2763,8 @@
OffsetShapeCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2557,8 +2790,8 @@
ScaleShape
- mkr
- 2.1.0
+
+
unknown
0
@@ -2589,8 +2822,8 @@
ScaleShapeCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2621,8 +2854,8 @@
PositionShape
- mkr
- 2.1.0
+
+
unknown
0
@@ -2653,8 +2886,8 @@
PositionShapeCopy
- mkr
- 2.1.0
+
+
unknown
0
@@ -2685,8 +2918,8 @@
MakeEdge
- mkr
- 2.1.0
+
+
unknown
0
@@ -2712,8 +2945,8 @@
MakeWire
- mkr
- 2.1.0
+
+
unknown
0
@@ -2734,8 +2967,8 @@
MakeFace
- mkr
- 2.1.0
+
+
unknown
0
@@ -2761,8 +2994,8 @@
MakeFaceWires
- mkr
- 2.1.0
+
+
unknown
0
@@ -2788,8 +3021,8 @@
MakeShell
- mkr
- 2.1.0
+
+
unknown
0
@@ -2810,8 +3043,8 @@
MakeSolidShell
- mkr
- 2.1.0
+
+
unknown
0
@@ -2832,8 +3065,8 @@
MakeSolidShells
- mkr
- 2.1.0
+
+
unknown
0
@@ -2854,8 +3087,8 @@
MakeCompound
- mkr
- 2.1.0
+
+
unknown
0
@@ -2876,8 +3109,40 @@
MakeGlueFaces
- mkr
- 2.1.0
+
+
+ unknown
+ 0
+
+
+ theShape
+ GEOM_Object
+ unknown
+
+
+ theTolerance
+ double
+ unknown
+
+
+ doKeepNonSolids
+ boolean
+ unknown
+
+
+
+
+ return
+ GEOM_Object
+ unknown
+
+
+
+
+
+ GetGlueFaces
+
+
unknown
0
@@ -2892,6 +3157,43 @@
unknown
+
+
+ return
+ GEOM_List
+ unknown
+
+
+
+
+
+ MakeGlueFacesByList
+
+
+ unknown
+ 0
+
+
+ theShape
+ GEOM_Object
+ unknown
+
+
+ theTolerance
+ double
+ unknown
+
+
+ theFaces
+ ListOfGO
+ unknown
+
+
+ doKeepNonSolids
+ boolean
+ unknown
+
+
return
@@ -2903,8 +3205,8 @@
MakeExplode
- mkr
- 2.1.0
+
+
unknown
0
@@ -2935,8 +3237,8 @@
NumberOfFaces
- mkr
- 2.1.0
+
+
unknown
0
@@ -2957,8 +3259,8 @@
NumberOfEdges
- mkr
- 2.1.0
+
+
unknown
0
@@ -2979,8 +3281,8 @@
ChangeOrientation
- mkr
- 2.1.0
+
+
unknown
0
@@ -3001,8 +3303,8 @@
MakeQuad4Vertices
- mkr
- 2.1.0
+
+
unknown
0
@@ -3038,8 +3340,8 @@
MakeQuad
- mkr
- 2.1.0
+
+
unknown
0
@@ -3075,8 +3377,8 @@
MakeQuad2Edges
- mkr
- 2.1.0
+
+
unknown
0
@@ -3102,8 +3404,8 @@
MakeHexa
- mkr
- 2.1.0
+
+
unknown
0
@@ -3149,8 +3451,8 @@
MakeHexa2Faces
- mkr
- 2.1.0
+
+
unknown
0
@@ -3176,8 +3478,8 @@
GetPoint
- mkr
- 2.1.0
+
+
unknown
0
@@ -3218,8 +3520,8 @@
GetEdge
- mkr
- 2.1.0
+
+
unknown
0
@@ -3250,8 +3552,8 @@
GetEdgeNearPoint
- mkr
- 2.1.0
+
+
unknown
0
@@ -3277,8 +3579,8 @@
GetFaceByPoints
- mkr
- 2.1.0
+
+
unknown
0
@@ -3319,8 +3621,8 @@
GetFaceByEdges
- mkr
- 2.1.0
+
+
unknown
0
@@ -3351,8 +3653,8 @@
GetOppositeFace
- mkr
- 2.1.0
+
+
unknown
0
@@ -3378,8 +3680,8 @@
GetFaceNearPoint
- mkr
- 2.1.0
+
+
unknown
0
@@ -3405,8 +3707,8 @@
GetFaceByNormale
- mkr
- 2.1.0
+
+
unknown
0
@@ -3432,8 +3734,8 @@
IsCompoundOfBlocks
- mkr
- 2.1.0
+
+
unknown
0
@@ -3456,7 +3758,7 @@
return
- long
+ boolean
unknown
@@ -3469,8 +3771,8 @@
CheckCompoundOfBlocks
- mkr
- 2.1.0
+
+
unknown
0
@@ -3483,7 +3785,7 @@
return
- long
+ boolean
unknown
@@ -3496,8 +3798,8 @@
PrintBCErrors
- mkr
- 2.1.0
+
+
unknown
0
@@ -3523,8 +3825,8 @@
ExplodeCompoundOfBlocks
- mkr
- 2.1.0
+
+
unknown
0
@@ -3555,8 +3857,8 @@
GetBlockNearPoint
- mkr
- 2.1.0
+
+
unknown
0
@@ -3582,8 +3884,8 @@
GetBlockByParts
- mkr
- 2.1.0
+
+
unknown
0
@@ -3609,8 +3911,8 @@
GetBlocksByParts
- mkr
- 2.1.0
+
+
unknown
0
@@ -3636,8 +3938,8 @@
MakeMultiTransformation1D
- mkr
- 2.1.0
+
+
unknown
0
@@ -3673,8 +3975,8 @@
MakeMultiTransformation2D
- mkr
- 2.1.0
+
+
unknown
0
@@ -3725,8 +4027,8 @@
MakeCirclePntVecR
- mkr
- 2.1.0
+
+
unknown
0
@@ -3757,8 +4059,8 @@
MakeCircleThreePnt
- mkr
- 2.1.0
+
+
unknown
0
@@ -3789,8 +4091,8 @@
MakeEllipse
- mkr
- 2.1.0
+
+
unknown
0
@@ -3826,8 +4128,8 @@
MakeArc
- mkr
- 2.1.0
+
+
unknown
0
@@ -3858,8 +4160,8 @@
MakeArcCenter
- ngr
- 3.2.6
+
+
unknown
0
@@ -3892,10 +4194,11 @@
-
+
+
MakePolyline
- mkr
- 2.1.0
+
+
unknown
0
@@ -3916,8 +4219,8 @@
MakeSplineBezier
- mkr
- 2.1.0
+
+
unknown
0
@@ -3938,8 +4241,8 @@
MakeSplineInterpolation
- mkr
- 2.1.0
+
+
unknown
0
@@ -3960,8 +4263,8 @@
MakeSketcher
- mkr
- 2.1.0
+
+
unknown
0
@@ -3987,8 +4290,8 @@
MakeFilletAll
- mkr
- 2.1.0
+
+
unknown
0
@@ -4014,8 +4317,8 @@
MakeFilletEdges
- mkr
- 2.1.0
+
+
unknown
0
@@ -4046,8 +4349,8 @@
MakeFilletFaces
- mkr
- 2.1.0
+
+
unknown
0
@@ -4078,8 +4381,8 @@
MakeChamferAll
- mkr
- 2.1.0
+
+
unknown
0
@@ -4105,8 +4408,8 @@
MakeChamferEdge
- mkr
- 2.1.0
+
+
unknown
0
@@ -4147,8 +4450,8 @@
MakeChamferFaces
- mkr
- 2.1.0
+
+
unknown
0
@@ -4184,8 +4487,8 @@
MakeArchimede
- mkr
- 2.1.0
+
+
unknown
0
@@ -4221,8 +4524,8 @@
GetSubShapeIndex
- mkr
- 2.1.0
+
+
unknown
0
@@ -4248,8 +4551,8 @@
CreateGroup
- mkr
- 2.1.0
+
+
unknown
0
@@ -4275,8 +4578,8 @@
AddObject
- mkr
- 2.1.0
+
+
unknown
0
@@ -4296,8 +4599,8 @@
RemoveObject
- mkr
- 2.1.0
+
+
unknown
0
@@ -4317,8 +4620,8 @@
GetType
- mkr
- 2.1.0
+
+
unknown
0
@@ -4339,8 +4642,8 @@
GetMainShape
- mkr
- 2.1.0
+
+
unknown
0
@@ -4361,8 +4664,8 @@
GetObjects
- mkr
- 2.1.0
+
+
unknown
0
diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx
index fec43e01e..86ea68832 100644
--- a/src/BasicGUI/BasicGUI_ArcDlg.cxx
+++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx
@@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@@ -35,17 +35,10 @@
#include
-#include
-#include
-#include
-#include
-
#include "GEOMImpl_Types.hxx"
#include "utilities.h"
-using namespace std;
-
//=================================================================================
// class : BasicGUI_ArcDlg()
// purpose : Constructs a BasicGUI_ArcDlg which is a child of 'parent', with the
@@ -58,9 +51,10 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
: GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
- QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC")));
- QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC_CENTER")));
- QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ QPixmap image0(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ARC")));
+ QPixmap image1(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ARC_CENTER")));
+ QPixmap image2(aResMgr->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_ARC_TITLE"));
@@ -98,11 +92,12 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
Group3Pnts2->PushButton1->setPixmap(image2);
Group3Pnts2->PushButton2->setPixmap(image2);
Group3Pnts2->PushButton3->setPixmap(image2);
-
+
Group3Pnts2->radioButton4->setText(tr("GEOM_REVERSE"));
Layout1->addWidget( Group3Pnts, 2, 0 );
Layout1->addWidget( Group3Pnts2, 2, 0 );
+ /***************************************************************/
setHelpFileName("arc.htm");
@@ -126,13 +121,7 @@ BasicGUI_ArcDlg::~BasicGUI_ArcDlg()
void BasicGUI_ArcDlg::Init()
{
/* init variables */
- // myGeomGUI->SetState( 0 );
- globalSelection( GEOM_POINT );
-
- myConstructorId = -1;
myEditCurrentArgument = Group3Pnts->LineEdit1;
- myEditCurrentArgument->setFocus();
-
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
Group3Pnts2->radioButton4->setChecked(FALSE);
@@ -140,9 +129,9 @@ void BasicGUI_ArcDlg::Init()
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
-
+
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
-
+
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
@@ -153,7 +142,7 @@ void BasicGUI_ArcDlg::Init()
connect(Group3Pnts->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(Group3Pnts->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(Group3Pnts->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-
+
connect(Group3Pnts2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(Group3Pnts2->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(Group3Pnts2->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
@@ -161,19 +150,72 @@ void BasicGUI_ArcDlg::Init()
connect(Group3Pnts2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(Group3Pnts2->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(Group3Pnts2->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-
+
connect(Group3Pnts2->radioButton4, SIGNAL(stateChanged(int)), this, SLOT(ReverseSense(int)));
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- initName( tr( "GEOM_ARC" ));
-
-
+ initName( tr( "GEOM_ARC" ));
ConstructorsClicked( 0 );
}
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose : Radio button management
+//=================================================================================
+void BasicGUI_ArcDlg::ConstructorsClicked (int constructorId)
+{
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+
+ switch (constructorId)
+ {
+ case 0:
+ {
+ globalSelection( GEOM_POINT );
+
+ Group3Pnts->show();
+ resize(0, 0);
+ Group3Pnts2->hide();
+
+ Group3Pnts->LineEdit1->setText(Group3Pnts2->LineEdit1->text());
+ Group3Pnts->LineEdit2->setText(Group3Pnts2->LineEdit2->text());
+ Group3Pnts->LineEdit3->setText(Group3Pnts2->LineEdit3->text());
+
+ myEditCurrentArgument = Group3Pnts->LineEdit1;
+
+ break;
+ }
+ case 1:
+ {
+ globalSelection( GEOM_POINT );
+
+ Group3Pnts->hide();
+ resize(0, 0);
+ Group3Pnts2->show();
+
+ Group3Pnts2->LineEdit1->setText(Group3Pnts->LineEdit1->text());
+ Group3Pnts2->LineEdit2->setText(Group3Pnts->LineEdit2->text());
+ Group3Pnts2->LineEdit3->setText(Group3Pnts->LineEdit3->text());
+
+ myEditCurrentArgument = Group3Pnts2->LineEdit1;
+
+ break;
+ }
+ }
+
+ myEditCurrentArgument->setFocus();
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
+
+ if (CORBA::is_nil(myPoint1))
+ SelectionIntoArgument();
+
+ displayPreview();
+}
+
+
//=================================================================================
// function : ClickOnOk()
// purpose :
@@ -184,15 +226,6 @@ void BasicGUI_ArcDlg::ClickOnOk()
ClickOnCancel();
}
-//=================================================================================
-// function : ClickOnCancel()
-// purpose :
-//=================================================================================
-void BasicGUI_ArcDlg::ClickOnCancel()
-{
- GEOMBase_Skeleton::ClickOnCancel();
-}
-
//=================================================================================
// function : ClickOnApply()
// purpose :
@@ -203,19 +236,6 @@ bool BasicGUI_ArcDlg::ClickOnApply()
return false;
initName();
-
- // reset
- myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
- Group3Pnts->LineEdit1->setText( "" );
- Group3Pnts->LineEdit2->setText( "" );
- Group3Pnts->LineEdit3->setText( "" );
- Group3Pnts2->LineEdit1->setText( "" );
- Group3Pnts2->LineEdit2->setText( "" );
- Group3Pnts2->LineEdit3->setText( "" );
- if (getConstructorId() == 0) myEditCurrentArgument = Group3Pnts->LineEdit1;
- if (getConstructorId() == 1) myEditCurrentArgument = Group3Pnts2->LineEdit1;
-
- ConstructorsClicked( getConstructorId() );
return true;
}
@@ -228,21 +248,23 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
{
if ((getConstructorId() != 0) && (getConstructorId() != 1))
return;
-
+
myEditCurrentArgument->setText("");
- if ( IObjectCount() != 1 ){
+
+ if ( IObjectCount() != 1 )
+ {
switch (getConstructorId())
{
- case 0:
- {
- if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
- else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
- else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
- return;
- break;
+ case 0:
+ {
+ if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
+ else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
+ else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
+ return;
+ break;
}
- case 1:
- {
+ case 1:
+ {
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
@@ -250,7 +272,8 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
break;
}
}
- }
+ }
+
// nbSel == 1
Standard_Boolean aRes = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
@@ -281,6 +304,22 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
}
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose :
+//=================================================================================
+void BasicGUI_ArcDlg::LineEditReturnPressed()
+{
+ QLineEdit* send = (QLineEdit*)sender();
+ if (send == Group3Pnts->LineEdit1 || send == Group3Pnts->LineEdit2 || send == Group3Pnts->LineEdit3 ||
+ send == Group3Pnts2->LineEdit1 || send == Group3Pnts2->LineEdit2 || send == Group3Pnts2->LineEdit3)
+ {
+ myEditCurrentArgument = send;
+ GEOMBase_Skeleton::LineEditReturnPressed();
+ }
+}
+
+
//=================================================================================
// function : SetEditCurrentArgument()
// purpose :
@@ -310,22 +349,6 @@ void BasicGUI_ArcDlg::SetEditCurrentArgument()
}
-//=================================================================================
-// function : LineEditReturnPressed()
-// purpose :
-//=================================================================================
-void BasicGUI_ArcDlg::LineEditReturnPressed()
-{
- QLineEdit* send = (QLineEdit*)sender();
- if ( send == Group3Pnts->LineEdit1 || send == Group3Pnts->LineEdit2 || send == Group3Pnts->LineEdit3 ||
- send == Group3Pnts2->LineEdit1 || send == Group3Pnts2->LineEdit2 || send == Group3Pnts2->LineEdit3 )
- {
- myEditCurrentArgument = send;
- GEOMBase_Skeleton::LineEditReturnPressed();
- }
-}
-
-
//=================================================================================
// function : ActivateThisDialog()
// purpose :
@@ -333,33 +356,13 @@ void BasicGUI_ArcDlg::LineEditReturnPressed()
void BasicGUI_ArcDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+
+ connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- // myGeomGUI->SetState( 0 );
- globalSelection( GEOM_POINT );
-
- myEditCurrentArgument = Group3Pnts->LineEdit1;
- myEditCurrentArgument->setFocus();
-
- Group3Pnts->LineEdit1->setText( "" );
- Group3Pnts->LineEdit2->setText( "" );
- Group3Pnts->LineEdit3->setText( "" );
- myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
-
ConstructorsClicked( getConstructorId() );
-
}
-//=================================================================================
-// function : DeactivateActiveDialog()
-// purpose : public slot to deactivate if active
-//=================================================================================
-void BasicGUI_ArcDlg::DeactivateActiveDialog()
-{
- // myGeomGUI->SetState( -1 );
- GEOMBase_Skeleton::DeactivateActiveDialog();
-}
//=================================================================================
// function : enterEvent()
@@ -367,10 +370,11 @@ void BasicGUI_ArcDlg::DeactivateActiveDialog()
//=================================================================================
void BasicGUI_ArcDlg::enterEvent(QEvent* e)
{
- if ( !GroupConstructors->isEnabled() )
+ if (!GroupConstructors->isEnabled())
ActivateThisDialog();
}
+
//=================================================================================
// function : createOperation
// purpose :
@@ -410,73 +414,35 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
switch (getConstructorId())
{
- case 0:
+ case 0:
+ {
+ if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) )
{
- if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) ){
- anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->MakeArc(myPoint1, myPoint2, myPoint3);
- res = true;
- }
- break;
+ anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->
+ MakeArc(myPoint1, myPoint2, myPoint3);
+ res = true;
}
- case 1:
+ break;
+ }
+ case 1:
{
- bool Sense;
- (Group3Pnts2->radioButton4->isChecked()) ? Sense=true : Sense = false;
- if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) ){
- anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->MakeArcCenter(myPoint1, myPoint2, myPoint3,Sense);
- res = true;
- }
- break;
+ bool Sense;
+ (Group3Pnts2->radioButton4->isChecked()) ? Sense = true : Sense = false;
+ if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) )
+ {
+ anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->
+ MakeArcCenter(myPoint1, myPoint2, myPoint3, Sense);
+ res = true;
+ }
+ break;
}
}
- if ( !anObj->_is_nil() ){
+ if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
- }
+
return res;
}
-//=================================================================================
-// function : closeEvent
-// purpose :
-//=================================================================================
-void BasicGUI_ArcDlg::closeEvent( QCloseEvent* e )
-{
- GEOMBase_Skeleton::closeEvent( e );
-}
-
-//=================================================================================
-// function : ConstructorsClicked()
-// purpose : Radio button management
-//=================================================================================
-void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
-{
-
- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
-
- switch (constructorId)
- {
- case 0:
- {
- Group3Pnts->show();
- resize(0, 0);
- Group3Pnts2->hide();
-
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- break;
- }
- case 1:
- {
- Group3Pnts->hide();
- resize(0, 0);
- Group3Pnts2->show();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
-
- break;
- }
- }
- displayPreview();
-}
-
//=================================================================================
// function : ReverseSense()
// purpose : Orientation of the arc
diff --git a/src/BasicGUI/BasicGUI_ArcDlg.h b/src/BasicGUI/BasicGUI_ArcDlg.h
index 6a5e73217..9fdcc6ba6 100644
--- a/src/BasicGUI/BasicGUI_ArcDlg.h
+++ b/src/BasicGUI/BasicGUI_ArcDlg.h
@@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@@ -28,7 +28,7 @@
#ifndef DIALOGBOX_ARC_H
#define DIALOGBOX_ARC_H
-#include "GEOM_BasicGUI.hxx"
+#include "GEOM_BasicGUI.hxx"
#include "GEOMBase_Skeleton.h"
#include "DlgRef_3Sel_QTD.h"
@@ -53,12 +53,10 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& objects );
- virtual void closeEvent( QCloseEvent* e );
-
-private :
+private:
void Init();
void enterEvent(QEvent* e);
- int myConstructorId;
+
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
DlgRef_3Sel_QTD* Group3Pnts;
@@ -66,12 +64,10 @@ private :
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
-
+
void ActivateThisDialog();
- void DeactivateActiveDialog();
- void ConstructorsClicked( int );
+ void ConstructorsClicked(int);
void LineEditReturnPressed();
void SelectionIntoArgument();
void SetEditCurrentArgument();
diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx
index ce76529d0..42c3e5aa5 100644
--- a/src/BasicGUI/BasicGUI_CircleDlg.cxx
+++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx
@@ -125,7 +125,7 @@ void BasicGUI_CircleDlg::Init()
double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
/* min, max, step and decimals for spin boxes & initial values */
- GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
+ GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
GroupPntVecR->SpinBox_DX->SetValue( 100 );
/* signals and slots connections */
diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx
index ba6db7d30..7103838b5 100644
--- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx
+++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx
@@ -114,8 +114,8 @@ void BasicGUI_EllipseDlg::Init()
double aMajorR( 200. ), aMinorR( 100. );
/* min, max, step and decimals for spin boxes & initial values */
- GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 );
- GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 );
+ GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY );
+ GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY );
GroupPoints->SpinBox_DX->SetValue( aMajorR );
GroupPoints->SpinBox_DY->SetValue( aMinorR );
diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx
index 99e7ff9a5..17f6d25b4 100644
--- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx
+++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx
@@ -176,7 +176,7 @@ void BasicGUI_MarkerDlg::Init()
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
{
- anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
+ anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
connect( anIter.data(), SIGNAL( valueChanged( double ) ),
this, SLOT( onValueChanged( double ) ) );
}
diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx
index a48162902..62711faa6 100644
--- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx
+++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx
@@ -138,11 +138,11 @@ void BasicGUI_PlaneDlg::Init()
double aTrimSize = 2000.0;
/* min, max, step and decimals for spin boxes */
- GroupPntDir->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, aStep, 3 );
+ GroupPntDir->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
GroupPntDir->SpinBox_DX->SetValue( aTrimSize );
- Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
+ Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
Group3Pnts->SpinBox_DX->SetValue( aTrimSize );
- GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
+ GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
GroupFace->SpinBox_DX->SetValue( aTrimSize );
/* signals and slots connections */
diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx
index 16b642130..755a04b9b 100644
--- a/src/BasicGUI/BasicGUI_PointDlg.cxx
+++ b/src/BasicGUI/BasicGUI_PointDlg.cxx
@@ -157,22 +157,22 @@ void BasicGUI_PointDlg::Init()
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
/* min, max, step and decimals for spin boxes */
- GroupXYZ->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- GroupXYZ->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- GroupXYZ->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ GroupXYZ->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ GroupXYZ->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ GroupXYZ->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupXYZ->SpinBox_DX->SetValue(0.0);
GroupXYZ->SpinBox_DY->SetValue(0.0);
GroupXYZ->SpinBox_DZ->SetValue(0.0);
- GroupRefPoint->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- GroupRefPoint->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ GroupRefPoint->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ GroupRefPoint->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupRefPoint->SpinBox_DX->SetValue(0.0);
GroupRefPoint->SpinBox_DY->SetValue(0.0);
GroupRefPoint->SpinBox_DZ->SetValue(0.0);
step = 0.1;
- GroupOnCurve->SpinBox_DX->RangeStepAndValidator(0., 1., step, 3);
+ GroupOnCurve->SpinBox_DX->RangeStepAndValidator(0., 1., step, DBL_DIGITS_DISPLAY);
GroupOnCurve->SpinBox_DX->SetValue( 0.5 );
/* signals and slots connections */
diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx
index 48fb526cd..79a4f90c2 100644
--- a/src/BasicGUI/BasicGUI_VectorDlg.cxx
+++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx
@@ -118,9 +118,9 @@ void BasicGUI_VectorDlg::Init()
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
/* min, max, step and decimals for spin boxes */
- GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
double dx( 0. ), dy( 0. ), dz( 200. );
GroupDimensions->SpinBox_DX->SetValue( dx );
diff --git a/src/DlgRef/DlgRef_2Sel1List1Check_QTD.cxx b/src/DlgRef/DlgRef_2Sel1List1Check_QTD.cxx
new file mode 100644
index 000000000..b469af6b6
--- /dev/null
+++ b/src/DlgRef/DlgRef_2Sel1List1Check_QTD.cxx
@@ -0,0 +1,130 @@
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+/****************************************************************************
+** Form implementation generated from reading ui file 'DlgRef_4Sel1List_QTD.ui'
+**
+** Created: lun oct 31 17:21:04 2006
+** by: The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "DlgRef_2Sel1List1Check_QTD.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * Constructs a DlgRef_2Sel1List_QTD which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+DlgRef_2Sel1List1Check_QTD::DlgRef_2Sel1List1Check_QTD( QWidget* parent,
+ const char* name,
+ WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "DlgRef_2Sel1List1Check_QTD" );
+ resize( 129, 175 );
+ setCaption( trUtf8( "DlgRef_2Sel1List1Check_QTD" ) );
+ DlgRef_2Sel1List1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel1List1Check_QTDLayout");
+
+ GroupBox1 = new QGroupBox( this, "GroupBox1" );
+ GroupBox1->setTitle( trUtf8( "" ) );
+ GroupBox1->setColumnLayout(0, Qt::Vertical );
+ GroupBox1->layout()->setSpacing( 6 );
+ GroupBox1->layout()->setMargin( 11 );
+ GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
+ GroupBox1Layout->setAlignment( Qt::AlignTop );
+
+ Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
+
+ TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
+ TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
+ TextLabel1->setText( trUtf8( "TL1" ) );
+
+ Layout1->addWidget( TextLabel1, 0, 0 );
+
+ PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
+ PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
+ PushButton1->setText( trUtf8( "" ) );
+
+ Layout1->addWidget( PushButton1, 0, 1 );
+
+ LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
+
+ Layout1->addWidget( LineEdit1, 0, 2 );
+
+
+ TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
+ TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
+ TextLabel2->setText( trUtf8( "TL2" ) );
+
+ Layout1->addWidget( TextLabel2, 1, 0 );
+
+ PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
+ PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
+ PushButton2->setText( trUtf8( "" ) );
+
+ Layout1->addWidget( PushButton2, 1, 1 );
+
+ LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
+
+ Layout1->addWidget( LineEdit2, 1, 2 );
+
+
+ TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+ TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+ TextLabel3->setText( trUtf8( "TL3" ) );
+
+ Layout1->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
+
+ ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
+ ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
+
+ Layout1->addWidget( ComboBox1, 2, 2 );
+
+ radioButton4 = new QRadioButton( GroupBox1, "radioButton4" );
+ GroupBox1Layout->addMultiCellWidget( radioButton4, 3, 3, 0, 1 );
+
+ GroupBox1Layout->addLayout( Layout1, 0, 0 );
+
+ DlgRef_2Sel1List1Check_QTDLayout->addWidget( GroupBox1, 0, 0 );
+
+ QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ Layout1->addItem( spacer, 5, 2 );
+
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+DlgRef_2Sel1List1Check_QTD::~DlgRef_2Sel1List1Check_QTD()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/DlgRef/DlgRef_2Sel1List1Check_QTD.h b/src/DlgRef/DlgRef_2Sel1List1Check_QTD.h
new file mode 100644
index 000000000..14e7875f8
--- /dev/null
+++ b/src/DlgRef/DlgRef_2Sel1List1Check_QTD.h
@@ -0,0 +1,69 @@
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+/****************************************************************************
+** Form interface generated from reading ui file 'DlgRef_2Sel1List_QTD.ui'
+**
+** Created: lun oct 31 17:21:03 2006
+** by: The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef DLGREF_2SEL1LIST_QTD_H
+#define DLGREF_2SEL1LIST_QTD_H
+
+#include
+#include
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QRadioButton;
+
+class DlgRef_2Sel1List1Check_QTD : public QWidget
+{
+ Q_OBJECT
+
+public:
+ DlgRef_2Sel1List1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~DlgRef_2Sel1List1Check_QTD();
+
+ QGroupBox* GroupBox1;
+ QLineEdit* LineEdit2;
+ QPushButton* PushButton1;
+ QPushButton* PushButton2;
+ QLabel* TextLabel1;
+ QLineEdit* LineEdit1;
+ QLabel* TextLabel2;
+ QComboBox* ComboBox1;
+ QLabel* TextLabel3;
+ QRadioButton* radioButton4;
+
+
+protected:
+ QGridLayout* DlgRef_2Sel1List1Check_QTDLayout;
+ QGridLayout* GroupBox1Layout;
+ QGridLayout* Layout1;
+};
+
+#endif // DLGREF_2SEL1LIST1CHECK_QTD_H
diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.cxx b/src/DlgRef/DlgRef_Skeleton_QTD.cxx
index dddb3e087..0e2b081bc 100644
--- a/src/DlgRef/DlgRef_Skeleton_QTD.cxx
+++ b/src/DlgRef/DlgRef_Skeleton_QTD.cxx
@@ -20,7 +20,7 @@
/****************************************************************************
** Form implementation generated from reading ui file 'DlgRef_Skeleton_QTD.ui'
**
-** Created: Fri Mar 17 11:18:06 2006
+** Created: Tue Mar 13 14:40:34 2007
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
@@ -57,11 +57,6 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, boo
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
- GroupMedium = new QGroupBox( this, "GroupMedium" );
- GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) );
-
- Layout1->addWidget( GroupMedium, 2, 0 );
-
GroupButtons = new QGroupBox( this, "GroupButtons" );
GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) );
GroupButtons->setColumnLayout(0, Qt::Vertical );
@@ -155,19 +150,5 @@ DlgRef_Skeleton_QTD::~DlgRef_Skeleton_QTD()
*/
void DlgRef_Skeleton_QTD::languageChange()
{
- setCaption( tr( "DlgRef_Skeleton_QTD" ) );
- GroupMedium->setTitle( QString::null );
- GroupButtons->setTitle( QString::null );
- buttonOk->setText( tr( "&Ok" ) );
- buttonApply->setText( tr( "&Apply" ) );
- buttonCancel->setText( tr( "&Cancel" ) );
- buttonHelp->setText( tr( "&Help" ) );
- GroupConstructors->setTitle( QString::null );
- RadioButton1->setText( QString::null );
- RadioButton2->setText( QString::null );
- RadioButton3->setText( QString::null );
- RadioButton4->setText( QString::null );
- GroupBoxName->setTitle( tr( "Result name" ) );
- NameLabel->setText( tr( "Name" ) );
}
diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.h b/src/DlgRef/DlgRef_Skeleton_QTD.h
index 511d48993..0ecfdfcaa 100644
--- a/src/DlgRef/DlgRef_Skeleton_QTD.h
+++ b/src/DlgRef/DlgRef_Skeleton_QTD.h
@@ -20,7 +20,7 @@
/****************************************************************************
** Form interface generated from reading ui file 'DlgRef_Skeleton_QTD.ui'
**
-** Created: Fri Mar 17 11:18:06 2006
+** Created: Tue Mar 13 14:40:29 2007
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
@@ -53,7 +53,6 @@ public:
DlgRef_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~DlgRef_Skeleton_QTD();
- QGroupBox* GroupMedium;
QGroupBox* GroupButtons;
QPushButton* buttonOk;
QPushButton* buttonApply;
diff --git a/src/DlgRef/DlgRef_SpinBox.cxx b/src/DlgRef/DlgRef_SpinBox.cxx
index 8a7ad7931..35bec55ba 100644
--- a/src/DlgRef/DlgRef_SpinBox.cxx
+++ b/src/DlgRef/DlgRef_SpinBox.cxx
@@ -102,3 +102,28 @@ void DlgRef_SpinBox::RangeStepAndValidator(double min, double max,double step,
setLineStep(step);
((QDoubleValidator*)validator())->setRange(min, max, decimals);
}
+
+QString DlgRef_SpinBox::PrintDoubleValue (double theValue, int thePrecision)
+{
+ QString aRes;
+ aRes.setNum(theValue, 'g', thePrecision);
+
+ // remove trailing zeroes
+ QString delim( "." );
+
+ int idx = aRes.findRev( delim );
+ if ( idx == -1 )
+ return aRes;
+
+ QString iPart = aRes.left( idx );
+ QString fPart = aRes.mid( idx + 1 );
+
+ while ( !fPart.isEmpty() && fPart.at( fPart.length() - 1 ) == '0' )
+ fPart.remove( fPart.length() - 1, 1 );
+
+ aRes = iPart;
+ if ( !fPart.isEmpty() )
+ aRes += delim + fPart;
+
+ return aRes;
+}
diff --git a/src/DlgRef/DlgRef_SpinBox.h b/src/DlgRef/DlgRef_SpinBox.h
index d9675462b..e576781d0 100644
--- a/src/DlgRef/DlgRef_SpinBox.h
+++ b/src/DlgRef/DlgRef_SpinBox.h
@@ -36,6 +36,7 @@
#define COORD_MIN -1e+15
#define COORD_MAX +1e+15
#define MAX_NUMBER 100000
+#define DBL_DIGITS_DISPLAY 16
//=================================================================================
// class : DlgRef_SpinBox
@@ -54,10 +55,11 @@ public :
void SetValue(double v);
double GetValue();
QString GetString();
+
+ static QString PrintDoubleValue (double theValue, int Precision = DBL_DIGITS_DISPLAY);
public slots:
void SetStep(double newStep);
-
};
#endif // GEOMSPINBOX_H
diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am
index efc180f90..27a7a9d8b 100644
--- a/src/DlgRef/Makefile.am
+++ b/src/DlgRef/Makefile.am
@@ -56,6 +56,7 @@ dist_libDlgRef_la_SOURCES = \
DlgRef_3Sel4Spin2Check_QTD.cxx \
DlgRef_4Sel1List_QTD.cxx \
DlgRef_2Sel1List_QTD.cxx \
+ DlgRef_2Sel1List1Check_QTD.cxx \
DlgRef_1List1Spin1Btn_QTD.cxx \
DlgRef_4Sel1List1Check_QTD.cxx \
DlgRef_1Spin_QTD.cxx \
@@ -112,6 +113,7 @@ MOC_FILES = \
DlgRef_3Sel4Spin2Check_QTD_moc.cxx \
DlgRef_4Sel1List_QTD_moc.cxx \
DlgRef_2Sel1List_QTD_moc.cxx \
+ DlgRef_2Sel1List1Check_QTD_moc.cxx \
DlgRef_1List1Spin1Btn_QTD_moc.cxx \
DlgRef_4Sel1List1Check_QTD_moc.cxx \
DlgRef_1Spin_QTD_moc.cxx \
@@ -170,6 +172,7 @@ salomeinclude_HEADERS = \
DlgRef_3Sel4Spin2Check_QTD.h \
DlgRef_4Sel1List_QTD.h \
DlgRef_2Sel1List_QTD.h \
+ DlgRef_2Sel1List1Check_QTD.h \
DlgRef_1List1Spin1Btn_QTD.h \
DlgRef_4Sel1List1Check_QTD.h \
DlgRef_1Spin_QTD.h \
diff --git a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui
index b675f277c..8979116e8 100644
--- a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui
+++ b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui
@@ -20,9 +20,6 @@
0
-
- DlgRef_Skeleton_QTD
-
true
@@ -50,22 +47,6 @@
6
-
-
- GroupMedium
-
-
-
- 7
- 7
- 0
- 0
-
-
-
-
-
-
GroupButtons
@@ -78,9 +59,6 @@
0
-
-
-
unnamed
@@ -109,17 +87,11 @@
buttonOk
-
- &Ok
-
buttonApply
-
- &Apply
-
@@ -142,17 +114,11 @@
buttonCancel
-
- &Cancel
-
buttonHelp
-
- &Help
-
@@ -170,9 +136,6 @@
0
-
-
-
unnamed
@@ -201,33 +164,21 @@
RadioButton1
-
-
-
RadioButton2
-
-
-
RadioButton3
-
-
-
RadioButton4
-
-
-
@@ -237,9 +188,6 @@
GroupBoxName
-
- Result name
-
unnamed
@@ -273,9 +221,6 @@
NameLabel
-
- Name
-
diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx
index 863f45fe9..302635f39 100644
--- a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx
+++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx
@@ -20,7 +20,7 @@
/****************************************************************************
** Form implementation generated from reading ui file 'EntityGUI_Skeleton_QTD.ui'
**
-** Created: Fri Mar 17 15:47:14 2006
+** Created: Tue Mar 13 14:04:48 2007
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
@@ -30,9 +30,9 @@
#include
#include
-#include
#include
#include
+#include
#include
#include
#include
@@ -54,11 +54,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* nam
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
- GroupVal = new QGroupBox( this, "GroupVal" );
- GroupVal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupVal->sizePolicy().hasHeightForWidth() ) );
-
- Layout1->addWidget( GroupVal, 2, 0 );
-
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
GroupConstructors->setColumnLayout(0, Qt::Vertical );
@@ -111,26 +106,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* nam
Layout5->addMultiCellWidget( GroupDest1, 0, 0, 0, 1 );
- GroupDest2 = new QButtonGroup( GroupDest, "GroupDest2" );
- GroupDest2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest2->sizePolicy().hasHeightForWidth() ) );
- GroupDest2->setColumnLayout(0, Qt::Vertical );
- GroupDest2->layout()->setSpacing( 6 );
- GroupDest2->layout()->setMargin( 11 );
- GroupDest2Layout = new QGridLayout( GroupDest2->layout() );
- GroupDest2Layout->setAlignment( Qt::AlignTop );
-
- Layout5->addWidget( GroupDest2, 1, 0 );
-
- GroupDest3 = new QButtonGroup( GroupDest, "GroupDest3" );
- GroupDest3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest3->sizePolicy().hasHeightForWidth() ) );
- GroupDest3->setColumnLayout(0, Qt::Vertical );
- GroupDest3->layout()->setSpacing( 6 );
- GroupDest3->layout()->setMargin( 11 );
- GroupDest3Layout = new QGridLayout( GroupDest3->layout() );
- GroupDest3Layout->setAlignment( Qt::AlignTop );
-
- Layout5->addWidget( GroupDest3, 1, 1 );
-
GroupDestLayout->addLayout( Layout5, 0, 0 );
Layout1->addWidget( GroupDest, 1, 0 );
@@ -190,21 +165,5 @@ EntityGUI_Skeleton_QTD::~EntityGUI_Skeleton_QTD()
*/
void EntityGUI_Skeleton_QTD::languageChange()
{
- setCaption( tr( "EntityGUI_Skeleton_QTD" ) );
- GroupVal->setTitle( QString::null );
- GroupConstructors->setTitle( tr( "Element Type" ) );
- RadioButton1->setText( tr( "Segment" ) );
- RadioButton2->setText( tr( "Arc" ) );
- GroupDest->setTitle( tr( "Destination" ) );
- GroupDest1->setTitle( tr( "Type" ) );
- RB_Dest2->setText( tr( "Direction" ) );
- RB_Dest1->setText( tr( "Point" ) );
- GroupDest2->setTitle( QString::null );
- GroupDest3->setTitle( QString::null );
- GroupButtons->setTitle( QString::null );
- buttonEnd->setText( tr( "End Sketch" ) );
- buttonClose->setText( tr( "Close Sketch" ) );
- buttonCancel->setText( tr( "&Cancel" ) );
- buttonHelp->setText( tr( "&Help" ) );
}
diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.h b/src/EntityGUI/EntityGUI_Skeleton_QTD.h
index 70468d719..11b95f502 100644
--- a/src/EntityGUI/EntityGUI_Skeleton_QTD.h
+++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.h
@@ -20,7 +20,7 @@
/****************************************************************************
** Form interface generated from reading ui file 'EntityGUI_Skeleton_QTD.ui'
**
-** Created: Fri Mar 17 15:47:13 2006
+** Created: Tue Mar 13 14:04:42 2007
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
@@ -38,9 +38,9 @@ class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
-class QGroupBox;
class QButtonGroup;
class QRadioButton;
+class QGroupBox;
class QPushButton;
class GEOM_ENTITYGUI_EXPORT EntityGUI_Skeleton_QTD : public QDialog
@@ -51,7 +51,6 @@ public:
EntityGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~EntityGUI_Skeleton_QTD();
- QGroupBox* GroupVal;
QButtonGroup* GroupConstructors;
QRadioButton* RadioButton1;
QRadioButton* RadioButton2;
@@ -59,8 +58,6 @@ public:
QButtonGroup* GroupDest1;
QRadioButton* RB_Dest2;
QRadioButton* RB_Dest1;
- QButtonGroup* GroupDest2;
- QButtonGroup* GroupDest3;
QGroupBox* GroupButtons;
QPushButton* buttonEnd;
QPushButton* buttonClose;
@@ -76,8 +73,6 @@ protected:
QGridLayout* Layout5;
QGridLayout* GroupDest1Layout;
QGridLayout* Layout4;
- QGridLayout* GroupDest2Layout;
- QGridLayout* GroupDest3Layout;
QHBoxLayout* GroupButtonsLayout;
QHBoxLayout* Layout3;
QSpacerItem* Spacer1;
diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx
index 5a3baf23f..9fbd604b0 100644
--- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx
+++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx
@@ -82,10 +82,6 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent,
buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH"));
buttonHelp->setText(tr("GEOM_BUT_HELP"));
- GroupVal->close(TRUE);
- GroupDest2->close(TRUE);
- GroupDest3->close(TRUE);
-
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_UNDO")));
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_REDO")));
@@ -253,7 +249,6 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent,
Init();
}
-
//=================================================================================
// function : ~EntityGUI_SketcherDlg()
// purpose : Destroys the object and frees any allocated resources
@@ -263,7 +258,6 @@ EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg()
myGeometryGUI->SetActiveDialogBox( 0 );
}
-
//=================================================================================
// function : eventFilter()
// purpose : event filter for spin-boxes to provide Apply action on Return pressed
@@ -295,6 +289,16 @@ bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event)
}
}
+ if (event->type() == QEvent::KeyRelease) {
+ // NPAL16010 (Sketcher Apply non available if only one line is modified)
+ // To have Apply active as soon as value text changed
+ QString s = ((QtxDblSpinBox*) object)->text();
+ bool ok;
+ double newVal = s.toDouble( &ok );
+ if ( ok )
+ ValueChangedInSpinBox( newVal );
+ }
+
return EntityGUI_Skeleton_QTD::eventFilter(object, event);
}
@@ -324,16 +328,16 @@ void EntityGUI_SketcherDlg::Init()
double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 );
/* min, max, step and decimals for spin boxes */
- Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
- Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
- Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
+ Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
+ Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
+ Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
/* displays Dialog */
GroupConstructors->setEnabled(false);
@@ -434,8 +438,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId)
if ( constructorId == 1 )
{ // XY
mySketchType = PT_ABS;
- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
myX = 0.0;
@@ -450,8 +454,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId)
else if ( constructorId == 0 )
{ // DXDY
mySketchType = PT_RELATIVE;
- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
myDX = 0.0;
@@ -508,8 +512,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
myLength = 100.0;
if ( myConstructorDirId == 2 )
{ // Angle
- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
Group2Spin->SpinBox_DX->SetValue(myAngle);
Group2Spin->buttonApply->setFocus();
@@ -584,9 +588,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
}
else if ( myConstructorDirId == 3 )
{ // DXDY
- Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
- Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
- Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
myDX = 0.0;
@@ -622,54 +626,54 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
{ // Angle
if ( constructorId == 2 )
{ // Length
- mySketchType = DIR_ANGLE_LENGTH;
- Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
- Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
- Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2"));
- Group3Spin->SpinBox_DX->SetValue(myAngle);
- myRadius = 100.0;
- Group3Spin->SpinBox_DY->SetValue(myRadius);
- myLength = 30.0;
- Group3Spin->SpinBox_DZ->SetValue(myLength);
- Group3Spin->show();
- Group3Spin->buttonApply->setFocus();
+ mySketchType = DIR_ANGLE_LENGTH;
+ Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
+ Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
+ Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
+ Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2"));
+ Group3Spin->SpinBox_DX->SetValue(myAngle);
+ myRadius = 100.0;
+ Group3Spin->SpinBox_DY->SetValue(myRadius);
+ myLength = 30.0;
+ Group3Spin->SpinBox_DZ->SetValue(myLength);
+ Group3Spin->show();
+ Group3Spin->buttonApply->setFocus();
}
}
else if ( myConstructorDirId == 0 )
{ // Perpendicular
if ( constructorId == 2 )
{ // Length
- mySketchType = DIR_PER_LENGTH;
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
- Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
- myRadius = 100.0;
- Group2Spin->SpinBox_DX->SetValue(myRadius);
- myLength = 30.0;
- Group2Spin->SpinBox_DY->SetValue(myLength);
- Group2Spin->show();
- Group2Spin->buttonApply->setFocus();
+ mySketchType = DIR_PER_LENGTH;
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
+ Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
+ Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
+ myRadius = 100.0;
+ Group2Spin->SpinBox_DX->SetValue(myRadius);
+ myLength = 30.0;
+ Group2Spin->SpinBox_DY->SetValue(myLength);
+ Group2Spin->show();
+ Group2Spin->buttonApply->setFocus();
}
}
else if ( myConstructorDirId == 1 )
{ // Tangent
if ( constructorId == 2 )
{ // Length
- mySketchType = DIR_TAN_LENGTH;
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
- Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
- myRadius = 100.0;
- Group2Spin->SpinBox_DX->SetValue(myRadius);
- myLength = 30.0;
- Group2Spin->SpinBox_DY->SetValue(myLength);
- Group2Spin->show();
- Group2Spin->buttonApply->setFocus();
+ mySketchType = DIR_TAN_LENGTH;
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
+ Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
+ Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
+ myRadius = 100.0;
+ Group2Spin->SpinBox_DX->SetValue(myRadius);
+ myLength = 30.0;
+ Group2Spin->SpinBox_DY->SetValue(myLength);
+ Group2Spin->show();
+ Group2Spin->buttonApply->setFocus();
}
}
else if ( myConstructorDirId == 3 )
@@ -738,7 +742,18 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
myCommand.append( ":WW" );
}
else
+ {
+ // PAL16008 (Sketcher Validation should be equal to Apply&Close)
+ if (Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() ||
+ Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() ||
+ Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() ||
+ Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() ||
+ Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() )
+ {
+ ClickOnApply();
+ }
myIsAllAdded = true;
+ }
if( myCommand.size() > 2 )
if( !onAccept() )
@@ -753,7 +768,8 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
//=================================================================================
bool EntityGUI_SketcherDlg::ClickOnApply()
{
- ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948)
+ if (sender() && sender()->inherits("QPushButton"))
+ ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948)
myCommand.append( GetNewCommand() );
mySketchState = NEXT_POINT;
@@ -1091,6 +1107,68 @@ void EntityGUI_SketcherDlg::ValueChangedInSpinBox(double newValue)
vz = Group4Spin->SpinBox_DZ->GetValue();
vs = newValue;
}
+ // NPAL16010 (Sketcher Apply non available if only one line is modified)
+ // if ValueChangedInSpinBox() called from eventFilter()
+ else if ( Group1Spin->SpinBox_DX->hasFocus() )
+ {
+ vx = newValue;
+ }
+ else if ( Group2Spin->SpinBox_DX ->hasFocus() )
+ {
+ vx = newValue;
+ vy = Group2Spin->SpinBox_DY->GetValue();
+ }
+ else if ( Group2Spin->SpinBox_DY->hasFocus() )
+ {
+ vx = Group2Spin->SpinBox_DX->GetValue();
+ vy = newValue;
+ }
+ else if ( Group3Spin->SpinBox_DX->hasFocus() )
+ {
+ vx = newValue;
+ vy = Group3Spin->SpinBox_DY->GetValue();
+ vz = Group3Spin->SpinBox_DZ->GetValue();
+ }
+ else if ( Group3Spin->SpinBox_DY->hasFocus() )
+ {
+ vx = Group3Spin->SpinBox_DX->GetValue();
+ vy = newValue;
+ vz = Group3Spin->SpinBox_DZ->GetValue();
+ }
+ else if ( Group3Spin->SpinBox_DZ->hasFocus() )
+ {
+ vx = Group3Spin->SpinBox_DX->GetValue();
+ vy = Group3Spin->SpinBox_DY->GetValue();
+ vz = newValue;
+ }
+ else if ( Group4Spin->SpinBox_DX->hasFocus() )
+ {
+ vx = newValue;
+ vy = Group4Spin->SpinBox_DY->GetValue();
+ vz = Group4Spin->SpinBox_DZ->GetValue();
+ vs = Group4Spin->SpinBox_DS->GetValue();
+ }
+ else if ( Group4Spin->SpinBox_DY->hasFocus() )
+ {
+ vx = Group4Spin->SpinBox_DX->GetValue();
+ vy = newValue;
+ vz = Group4Spin->SpinBox_DZ->GetValue();
+ vs = Group4Spin->SpinBox_DS->GetValue();
+ }
+ else if ( Group4Spin->SpinBox_DZ->hasFocus() )
+ {
+ vx = Group4Spin->SpinBox_DX->GetValue();
+ vy = Group4Spin->SpinBox_DY->GetValue();
+ vz = newValue;
+ vs = Group4Spin->SpinBox_DS->GetValue();
+ }
+ else if ( Group4Spin->SpinBox_DS->hasFocus() )
+ {
+ vx = Group4Spin->SpinBox_DX->GetValue();
+ vy = Group4Spin->SpinBox_DY->GetValue();
+ vz = Group4Spin->SpinBox_DZ->GetValue();
+ vs = newValue;
+ }
if ( myConstructorId == 0 )
{ // SEGMENT
diff --git a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui
index c257a8086..cdcd86400 100644
--- a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui
+++ b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui
@@ -20,9 +20,6 @@
0
-
- EntityGUI_Skeleton_QTD
-
unnamed
@@ -47,22 +44,6 @@
6
-
-
- GroupVal
-
-
-
- 7
- 7
- 0
- 0
-
-
-
-
-
-
GroupConstructors
@@ -75,9 +56,6 @@
0
-
- Element Type
-
unnamed
@@ -106,17 +84,11 @@
RadioButton1
-
- Segment
-
RadioButton2
-
- Arc
-
@@ -134,9 +106,6 @@
0
-
- Destination
-
unnamed
@@ -173,9 +142,6 @@
0
-
- Type
-
unnamed
@@ -204,76 +170,16 @@
RB_Dest2
-
- Direction
-
RB_Dest1
-
- Point
-
-
-
- GroupDest2
-
-
-
- 7
- 7
- 0
- 0
-
-
-
-
-
-
-
- unnamed
-
-
- 11
-
-
- 6
-
-
-
-
-
- GroupDest3
-
-
-
- 7
- 7
- 0
- 0
-
-
-
-
-
-
-
- unnamed
-
-
- 11
-
-
- 6
-
-
-
@@ -290,9 +196,6 @@
0
-
-
-
unnamed
@@ -321,17 +224,11 @@
buttonEnd
-
- End Sketch
-
buttonClose
-
- Close Sketch
-
@@ -354,17 +251,11 @@
buttonCancel
-
- &Cancel
-
buttonHelp
-
- &Help
-
diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx
index f04bda383..5c91868fe 100644
--- a/src/GEOM/GEOM_Object.cxx
+++ b/src/GEOM/GEOM_Object.cxx
@@ -95,19 +95,31 @@ Handle(GEOM_Object) GEOM_Object::GetObject(TDF_Label& theLabel)
Handle(GEOM_Object) GEOM_Object::GetReferencedObject(TDF_Label& theLabel)
{
Handle(TDF_Reference) aRef;
- if (!theLabel.FindAttribute(TDF_Reference::GetID(), aRef)) return NULL;
+ if (!theLabel.FindAttribute(TDF_Reference::GetID(), aRef)) {
+ return NULL;
+ }
+
+ if(aRef.IsNull() || aRef->Get().IsNull()) {
+ return NULL;
+ }
+
// Get TreeNode of a referenced function
Handle(TDataStd_TreeNode) aT, aFather;
- if (!TDataStd_TreeNode::Find(aRef->Get(), aT)) return NULL;
+ if (!TDataStd_TreeNode::Find(aRef->Get(), aT)) {
+ return NULL;
+ }
+
// Get TreeNode of Object of the referenced function
aFather = aT->Father();
- if (aFather.IsNull()) return NULL;
+ if (aFather.IsNull()) {
+ return NULL;
+ }
// Get label of the referenced object
TDF_Label aLabel = aFather->Label();
-
+
return GEOM_Object::GetObject(aLabel);
}
@@ -395,8 +407,10 @@ Handle(TColStd_HSequenceOfTransient) GEOM_Object::GetAllDependency()
Standard_Integer aLength = aSeq.Length();
if(aLength > 0) {
anArray = new TColStd_HSequenceOfTransient;
- for(Standard_Integer j =1; j<=aLength; j++)
- anArray->Append(GetReferencedObject(aSeq(j)));
+ for(Standard_Integer j =1; j<=aLength; j++) {
+ Handle(GEOM_Object) aRefObj = GetReferencedObject(aSeq(j));
+ if(!aRefObj.IsNull()) anArray->Append(aRefObj);
+ }
}
return anArray;
diff --git a/src/GEOM/GEOM_PythonDump.cxx b/src/GEOM/GEOM_PythonDump.cxx
index a3ff987bd..41b9c184f 100644
--- a/src/GEOM/GEOM_PythonDump.cxx
+++ b/src/GEOM/GEOM_PythonDump.cxx
@@ -43,19 +43,12 @@ namespace GEOM
TCollection_AsciiString aDescr;
if ( myAppend )
aDescr = myFunction->GetDescription() + "\n\t";
- aDescr += (char *)myStream.str().c_str();
+ std::string aString = myStream.str();
+ aDescr += (char *)aString.c_str();
myFunction->SetDescription( aDescr );
}
}
-// TPythonDump::operator TCollection_AsciiString () const
-// {
-// if (myCounter == 1) {
-// return TCollection_AsciiString ((char *)myStream.str().c_str());
-// }
-// return TCollection_AsciiString ();
-// }
-
TPythonDump& TPythonDump::operator<< (long int theArg)
{
myStream<
-#include
-
#include
+#include
//=======================================================================
//function :
@@ -51,7 +50,7 @@
GEOMAlgo_BuilderShape()
{
myNbTypes=9;
- myDSFiller=NULL;
+ myPaveFiller=NULL;
myEntryPoint=0; // Entry point through PerformWithFiller ()
}
//=======================================================================
@@ -61,9 +60,9 @@
GEOMAlgo_Builder::~GEOMAlgo_Builder()
{
if (myEntryPoint==1) {
- if (myDSFiller) {
- delete myDSFiller;
- myDSFiller=NULL;
+ if (myPaveFiller) {
+ delete myPaveFiller;
+ myPaveFiller=NULL;
}
}
}
@@ -260,23 +259,19 @@
aBB.Add(aCS, aS);
}
//
- if (myDSFiller) {
- delete myDSFiller;
- myDSFiller=NULL;
- }
- NMTTools_DSFiller* pDSF=new NMTTools_DSFiller;
+ NMTTools_PaveFiller* pPF=new NMTTools_PaveFiller;
//
- pDSF->SetCompositeShape(aCS);
- pDSF->Perform();
+ pPF->SetCompositeShape(aCS);
+ pPF->Perform();
//
myEntryPoint=1;
- PerformInternal(*pDSF);
+ PerformInternal(*pPF);
}
//=======================================================================
//function : PerformWithFiller
//purpose :
//=======================================================================
- void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_DSFiller& theDSF)
+ void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF)
{
myEntryPoint=0;
//
@@ -286,18 +281,18 @@
//function : PerformInternal
//purpose :
//=======================================================================
- void GEOMAlgo_Builder::PerformInternal(const NMTTools_DSFiller& theDSF)
+ void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF)
{
myErrorStatus=0;
//
Standard_Boolean bIsDone;
//
- // 0. myDSFiller
- myDSFiller=(NMTTools_DSFiller *)&theDSF;
+ // 0. myPaveFiller
+ myPaveFiller=(NMTTools_PaveFiller *)&pPF;
//
- bIsDone=myDSFiller->IsDone();
+ bIsDone=myPaveFiller->IsDone();
if (!bIsDone) {
- myErrorStatus=2; // DSFiller is failed
+ myErrorStatus=2; // PaveFiller is failed
return;
}
//
@@ -406,6 +401,6 @@
//
// 0 - Ok
// 1 - The object is just initialized
-// 2 - DSFiller is failed
+// 2 - PaveFiller is failed
// 10 - No shapes to process
// 30 - SolidBuilder failed
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.hxx b/src/GEOMAlgo/GEOMAlgo_Builder.hxx
index 2f38d77fb..930b3edf0 100644
--- a/src/GEOMAlgo/GEOMAlgo_Builder.hxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder.hxx
@@ -20,8 +20,8 @@
#ifndef _GEOMAlgo_Builder_HeaderFile
#define _GEOMAlgo_Builder_HeaderFile
-#ifndef _NMTTools_PDSFiller_HeaderFile
-#include
+#ifndef _NMTTools_PPaveFiller_HeaderFile
+#include
#endif
#ifndef _TopTools_ListOfShape_HeaderFile
#include
@@ -50,7 +50,7 @@
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include
#endif
-class NMTTools_DSFiller;
+class NMTTools_PaveFiller;
class TopoDS_Shape;
class TopTools_ListOfShape;
class BRepAlgo_Image;
@@ -90,9 +90,9 @@ Standard_EXPORT virtual ~GEOMAlgo_Builder();
//! Performs calculations
Standard_EXPORT virtual void Perform() ;
-//! Performs calculations using prepared DSFiller
+//! Performs calculations using prepared PaveFiller
//! object theDSF
-Standard_EXPORT virtual void PerformWithFiller(const NMTTools_DSFiller& theDSF) ;
+Standard_EXPORT virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
//! Adds argument theShape of the operation
Standard_EXPORT virtual void AddShape(const TopoDS_Shape& theShape) ;
@@ -139,7 +139,7 @@ protected:
//! Performs calculations using prepared DSFiller
//! object theDSF
-Standard_EXPORT void PerformInternal(const NMTTools_DSFiller& theDSF) ;
+Standard_EXPORT virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
//! Prepare information for history support
Standard_EXPORT virtual void PrepareHistory() ;
@@ -214,7 +214,7 @@ Standard_EXPORT void BuildDraftSolid(const TopoDS_Shape& theSolid,TopoDS_Shape
// Fields PROTECTED
//
-NMTTools_PDSFiller myDSFiller;
+NMTTools_PPaveFiller myPaveFiller;
TopTools_ListOfShape myShapes;
Standard_Integer myNbTypes;
TopTools_MapOfShape myMapFence;
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.jxx b/src/GEOMAlgo/GEOMAlgo_Builder.jxx
index 1965f5ec7..4cc8d4a52 100644
--- a/src/GEOMAlgo/GEOMAlgo_Builder.jxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder.jxx
@@ -17,8 +17,8 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#ifndef _NMTTools_DSFiller_HeaderFile
-#include
+#ifndef _NMTTools_PaveFiller_HeaderFile
+#include
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx
index 72a8b39dc..728c8404d 100644
--- a/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx
@@ -20,7 +20,7 @@
#include
#include
-#include
+//#include
#include
#include
#include
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx
index d42da67e2..b6cdfee66 100755
--- a/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx
@@ -47,7 +47,6 @@
//
#include
//
-#include
#include
#include
#include
@@ -78,8 +77,8 @@ static
{
myErrorStatus=0;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
//
Standard_Integer i, aNb, iV;
//
@@ -94,7 +93,6 @@ static
myImages.Bind(aV, aVSD);
//
mySameDomainShapes.Add(aV, aVSD);
- //
}
}
}
@@ -108,8 +106,8 @@ static
{
myErrorStatus=0;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool();
NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool();
IntTools_Context& aCtx=pPF->ChangeContext();
@@ -218,8 +216,8 @@ static
TopTools_MapOfShape aMS;
TopTools_MapIteratorOfMapOfShape aItS;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx= pPF->ChangeContext();
//
aNbS=aDS.NumberOfShapesOfTheObject();
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx
index 068fbc564..92e9e2cc8 100755
--- a/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx
@@ -54,7 +54,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -68,7 +67,6 @@
#include
#include
-#include
#include
#include
#include
@@ -83,6 +81,7 @@
#include
#include
#include
+#include
static
void UpdateCandidates(const Standard_Integer ,
@@ -109,9 +108,9 @@ static
//=======================================================================
void GEOMAlgo_Builder::FillIn2DParts()
{
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
- BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*)&myDSFiller->InterfPool();
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
+ NMTDS_InterfPool* pIP=pPF->IP();
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool();
//
@@ -193,9 +192,9 @@ static
//=======================================================================
void GEOMAlgo_Builder::BuildSplitFaces()
{
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
- BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*)&myDSFiller->InterfPool();
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
+ NMTDS_InterfPool* pIP=pPF->IP();
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
IntTools_Context& aCtx= pPF->ChangeContext();
//
@@ -388,9 +387,9 @@ static
//=======================================================================
void GEOMAlgo_Builder::FillSameDomainFaces()
{
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
- BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*)&myDSFiller->InterfPool();
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
+ NMTDS_InterfPool* pIP=pPF->IP();
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
IntTools_Context& aCtx= pPF->ChangeContext();
//
@@ -513,7 +512,7 @@ static
TopTools_ListOfShape aLFx;
TopTools_ListIteratorOfListOfShape aIt;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
//
aNb=aDS.NumberOfShapesOfTheObject();
for (i=1; i<=aNb; ++i) {
@@ -557,9 +556,9 @@ static
//=======================================================================
void GEOMAlgo_Builder::FillInternalVertices()
{
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
- BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*)&myDSFiller->InterfPool();
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
+ NMTDS_InterfPool* pIP=pPF->IP();
IntTools_Context& aCtx= pPF->ChangeContext();
//
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx
index 220cc453f..649c60370 100755
--- a/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx
@@ -56,7 +56,6 @@
#include
#include
-#include
#include
#include
@@ -93,8 +92,8 @@ static
{
myErrorStatus=0;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx= pPF->ChangeContext();
//
Standard_Boolean bToReverse;
@@ -186,8 +185,8 @@ static
{
myErrorStatus=0;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx= pPF->ChangeContext();
//
Standard_Boolean bIsIN, bHasImage;
@@ -416,8 +415,8 @@ static
{
myErrorStatus=0;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx= pPF->ChangeContext();
//
Standard_Integer i, aNbS, iErr;
@@ -589,8 +588,8 @@ static
{
myErrorStatus=0;
//
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx= pPF->ChangeContext();
//
//Standard_Boolean bHasImage;
diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx
index 080093803..8465cebba 100755
--- a/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx
@@ -35,7 +35,6 @@
#include
#include
-#include
#include
@@ -49,8 +48,8 @@ static
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS)
{
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx=pPF->ChangeContext();
//
Standard_Boolean bHasImage, bToReverse;
@@ -104,8 +103,8 @@ static
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS)
{
- const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS();
- NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller());
+ const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
+ NMTTools_PaveFiller* pPF=myPaveFiller;
IntTools_Context& aCtx=pPF->ChangeContext();
//
Standard_Boolean bHasImage, bToReverse;
diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx
index 98f4afe30..78c540b08 100644
--- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx
@@ -41,6 +41,7 @@
#include
#include
#include
+#include
#include
#include
@@ -688,19 +689,32 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
aLP.Clear();
BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc);
if (aTRE.IsNull() || aPTE.IsNull()) {
- myErrorStatus=20; // no triangulation found
- return;
+ Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc);
+ if (aPE.IsNull()) {
+ myErrorStatus=20; // no triangulation found
+ return;
+ }
+ const gp_Trsf& aTrsf=aLoc.Transformation();
+ const TColgp_Array1OfPnt& aNodes=aPE->Nodes();
+ //
+ aNbNodes=aPE->NbNodes();
+ Standard_Integer low = aNodes.Lower(), up = aNodes.Upper();
+ for (j=low+1; jNodes();
- //
- aNbNodes=aPTE->NbNodes();
- const TColStd_Array1OfInteger& aInds=aPTE->Nodes();
- for (j=2; jNodes();
+ //
+ aNbNodes=aPTE->NbNodes();
+ const TColStd_Array1OfInteger& aInds=aPTE->Nodes();
+ for (j=2; j
#include
#include
+#include
#include
#include
@@ -748,19 +749,32 @@
aLP.Clear();
BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc);
if (aTRE.IsNull() || aPTE.IsNull()) {
- myErrorStatus=20; // no triangulation found
- return;
+ Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc);
+ if (aPE.IsNull()) {
+ myErrorStatus=20; // no triangulation found
+ return;
+ }
+ const gp_Trsf& aTrsf=aLoc.Transformation();
+ const TColgp_Array1OfPnt& aNodes=aPE->Nodes();
+ //
+ aNbNodes=aPE->NbNodes();
+ Standard_Integer low = aNodes.Lower(), up = aNodes.Upper();
+ for (j=low+1; jNodes();
- //
- aNbNodes=aPTE->NbNodes();
- const TColStd_Array1OfInteger& aInds=aPTE->Nodes();
- for (j=2; jNodes();
+ //
+ aNbNodes=aPTE->NbNodes();
+ const TColStd_Array1OfInteger& aInds=aPTE->Nodes();
+ for (j=2; j
#endif
+#ifndef _TopTools_MapOfShape_HeaderFile
+#include
+#endif
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#include
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include
#endif
+#ifndef _TopoDS_Compound_HeaderFile
+#include
+#endif
class TopTools_ListOfShape;
class TopoDS_Shape;
class TopoDS_Edge;
@@ -92,6 +98,9 @@ Standard_EXPORT void SetCheckGeometry(const Standard_Boolean aFlag) ;
Standard_EXPORT Standard_Boolean CheckGeometry() const;
+Standard_EXPORT void SetKeepNonSolids(const Standard_Boolean aFlag) ;
+
+
Standard_EXPORT virtual void Perform() ;
@@ -143,6 +152,11 @@ Standard_EXPORT void MakeShapes(const TopAbs_ShapeEnum aType) ;
Standard_EXPORT void MakeShells() ;
+Standard_EXPORT void MakeSubShapes(const TopoDS_Shape& theShape,
+ TopTools_MapOfShape& theMS,
+ TopoDS_Compound& theResult);
+
+
Standard_EXPORT void MakeSolids() ;
@@ -173,6 +187,7 @@ Standard_EXPORT Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
// Fields PROTECTED
//
Standard_Boolean myCheckGeometry;
+Standard_Boolean myKeepNonSolids;
Standard_Real myTol;
TopTools_DataMapOfShapeListOfShape myImages;
TopTools_DataMapOfShapeShape myOrigins;
diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx
index 0e53aa6e4..299fb5b1a 100644
--- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx
@@ -317,9 +317,6 @@ static
aF=TopoDS::Face(aS);
//
aNbWires=NbWires(aF);
- if (aNbWires>1) {
- return;
- }
//
aSurf=BRep_Tool::Surface(aF);
GeomAdaptor_Surface aGAS(aSurf);
@@ -342,6 +339,8 @@ static
aInfo.SetLocation(aP0);
aInfo.SetPosition(aAx3);
//
+ if (aNbWires>1) return;
+ //
//aSurf->Bounds(aUMin, aUMax, aVMin, aVMax);
BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
bInfU1=Precision::IsNegativeInfinite(aUMin);
@@ -374,6 +373,8 @@ static
aInfo.SetPosition(aAx3);
aInfo.SetRadius1(aR1);
//
+ if (aNbWires>1) return;
+ //
aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED);
//
@@ -394,6 +395,8 @@ static
aInfo.SetPosition(aAx3);
aInfo.SetRadius1(aR1);
//
+ if (aNbWires>1) return;
+ //
BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
bInfU1=Precision::IsNegativeInfinite(aUMin);
bInfU2=Precision::IsPositiveInfinite(aUMax);
@@ -424,6 +427,8 @@ static
aInfo.SetPosition(aAx3);
//aInfo.SetRadius1(aR1);
//
+ if (aNbWires>1) return;
+ //
BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
bInfU1=Precision::IsNegativeInfinite(aUMin);
bInfU2=Precision::IsPositiveInfinite(aUMax);
@@ -456,8 +461,10 @@ static
aInfo.SetRadius1(aR1);
aInfo.SetRadius2(aR2);
//
+ if (aNbWires>1) return;
+ //
aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
-
+ //
FillDetails(aF, aTorus);
}
}
diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.cdl b/src/GEOMAlgo/GEOMAlgo_Splitter.cdl
index a67c8e222..19991027d 100755
--- a/src/GEOMAlgo/GEOMAlgo_Splitter.cdl
+++ b/src/GEOMAlgo/GEOMAlgo_Splitter.cdl
@@ -63,6 +63,13 @@ is
Limit(me)
returns ShapeEnum from TopAbs;
+
+ SetLimitMode(me:out;
+ aLimitMode:Integer from Standard);
+
+ LimitMode(me)
+ returns Integer from Standard;
+
--
-- Protected methods
--
@@ -89,5 +96,7 @@ fields
myTools : ListOfShape from TopTools is protected;
myMapTools : MapOfShape from TopTools is protected;
myLimit : ShapeEnum from TopAbs is protected;
+ myLimitMode : Integer from Standard is protected;
+
end Splitter;
diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx
index 7ea27c32f..431719ab1 100755
--- a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx
+++ b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx
@@ -42,7 +42,10 @@
#include
-#include
+
+static
+ void TreatCompound(const TopoDS_Shape& aC,
+ TopTools_ListOfShape& aLSX);
//=======================================================================
//function :
@@ -53,6 +56,7 @@
GEOMAlgo_Builder()
{
myLimit=TopAbs_SHAPE;
+ myLimitMode=0;
}
//=======================================================================
//function : ~
@@ -112,6 +116,22 @@
return myLimit;
}
//=======================================================================
+//function : SetLimitMode
+//purpose :
+//=======================================================================
+ void GEOMAlgo_Splitter::SetLimitMode(const Standard_Integer aMode)
+{
+ myLimitMode=aMode;
+}
+//=======================================================================
+//function : LimitMode
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_Splitter::LimitMode()const
+{
+ return myLimitMode;
+}
+//=======================================================================
//function : Clear
//purpose :
//=======================================================================
@@ -168,27 +188,137 @@
Standard_Integer i, aNbS;
BRep_Builder aBB;
TopoDS_Compound aC;
- TopTools_IndexedMapOfShape aM;
+ TopTools_IndexedMapOfShape aMx;
//
aBB.MakeCompound(aC);
//
- TopExp::MapShapes(myShape, myLimit, aM);
- aNbS=aM.Extent();
+ TopExp::MapShapes(myShape, myLimit, aMx);
+ aNbS=aMx.Extent();
for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS=aM(i);
+ const TopoDS_Shape& aS=aMx(i);
aBB.Add(aC, aS);
}
+ //modified by NIZNHY-PKV Thu Feb 15 17:09:32 2007f
+ if (myLimitMode) {
+ Standard_Integer iType, iLimit, iTypeX;
+ TopAbs_ShapeEnum aType, aTypeX;
+ TopTools_ListOfShape aLSP, aLSX;
+ TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm;
+ TopTools_MapOfShape aM;
+ //
+ iLimit=(Standard_Integer)myLimit;
+ //
+ // 1. Collect the shapes to process aLSP
+ aIt.Initialize(myShapes);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aS=aIt.Value();
+ if (myMapTools.Contains(aS)) {
+ continue;
+ }
+ //
+ aType=aS.ShapeType();
+ iType=(Standard_Integer)aType;
+ //
+ if (iType>iLimit) {
+ aLSP.Append(aS);
+ }
+ //
+ else if (aType==TopAbs_COMPOUND) {
+ aLSX.Clear();
+ //
+ TreatCompound(aS, aLSX);
+ //
+ aItX.Initialize(aLSX);
+ for (; aItX.More(); aItX.Next()) {
+ const TopoDS_Shape& aSX=aItX.Value();
+ aTypeX=aSX.ShapeType();
+ iTypeX=(Standard_Integer)aTypeX;
+ //
+ if (iTypeX>iLimit) {
+ aLSP.Append(aSX);
+ }
+ }
+ }
+ }// for (; aIt.More(); aIt.Next()) {
+ //
+ // 2. Add them to aC
+ aIt.Initialize(aLSP);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aS=aIt.Value();
+ if (myImages.HasImage(aS)) {
+ const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
+ aItIm.Initialize(aLSIm);
+ for (; aItIm.More(); aItIm.Next()) {
+ const TopoDS_Shape& aSIm=aItIm.Value();
+ if (aM.Add(aSIm)) {
+ aBB.Add(aC, aSIm);
+ }
+ }
+ }
+ else {
+ if (aM.Add(aS)) {
+ aBB.Add(aC, aS);
+ }
+ }
+ }
+ }// if (myLimitMode) {
+ //modified by NIZNHY-PKV Thu Feb 15 17:09:34 2007t
myShape=aC;
- }
+ }//if (myLimit!=TopAbs_SHAPE) {
//
GEOMAlgo_Builder::PostTreat();
+}
+//=======================================================================
+//function : TreatCompound
+//purpose :
+//=======================================================================
+void TreatCompound(const TopoDS_Shape& aC1,
+ TopTools_ListOfShape& aLSX)
+{
+ Standard_Integer aNbC1;
+ TopAbs_ShapeEnum aType;
+ TopTools_ListOfShape aLC, aLC1;
+ TopTools_ListIteratorOfListOfShape aIt, aIt1;
+ TopoDS_Iterator aItC;
//
+ aLC.Append (aC1);
+ while(1) {
+ aLC1.Clear();
+ aIt.Initialize(aLC);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aC=aIt.Value(); //C is compound
+ //
+ aItC.Initialize(aC);
+ for (; aItC.More(); aItC.Next()) {
+ const TopoDS_Shape& aS=aItC.Value();
+ aType=aS.ShapeType();
+ if (aType==TopAbs_COMPOUND) {
+ aLC1.Append(aS);
+ }
+ else {
+ aLSX.Append(aS);
+ }
+ }
+ }
+ //
+ aNbC1=aLC1.Extent();
+ if (!aNbC1) {
+ break;
+ }
+ //
+ aLC.Clear();
+ aIt.Initialize(aLC1);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aSC=aIt.Value();
+ aLC.Append(aSC);
+ }
+ }// while(1)
}
//
// myErrorStatus
//
// 0 - Ok
// 1 - The object is just initialized
-// 2 - DSFiller is failed
+// 2 - PaveFiller is failed
// 10 - No shapes to process
// 30 - SolidBuilder failed
diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.hxx b/src/GEOMAlgo/GEOMAlgo_Splitter.hxx
index 6ef1e92ac..7f3b69fb7 100644
--- a/src/GEOMAlgo/GEOMAlgo_Splitter.hxx
+++ b/src/GEOMAlgo/GEOMAlgo_Splitter.hxx
@@ -29,6 +29,9 @@
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include
#endif
+#ifndef _Standard_Integer_HeaderFile
+#include
+#endif
#ifndef _GEOMAlgo_Builder_HeaderFile
#include
#endif
@@ -82,6 +85,12 @@ Standard_EXPORT void SetLimit(const TopAbs_ShapeEnum aLimit) ;
Standard_EXPORT TopAbs_ShapeEnum Limit() const;
+
+Standard_EXPORT void SetLimitMode(const Standard_Integer aLimitMode) ;
+
+
+Standard_EXPORT Standard_Integer LimitMode() const;
+
//! Adds Tool arguments of the operation as
//! shapes of upper level of container shape theShape
//! =====================================================
@@ -108,6 +117,7 @@ Standard_EXPORT virtual void PostTreat() ;
TopTools_ListOfShape myTools;
TopTools_MapOfShape myMapTools;
TopAbs_ShapeEnum myLimit;
+Standard_Integer myLimitMode;
private:
diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx
index 33a6fe5ac..c4e65d0bc 100644
--- a/src/GEOMBase/GEOMBase_Skeleton.cxx
+++ b/src/GEOMBase/GEOMBase_Skeleton.cxx
@@ -36,6 +36,7 @@
#include "SUIT_Session.h"
#include "SUIT_MessageBox.h"
+#include
#include
using namespace std;
@@ -57,12 +58,14 @@ GEOMBase_Skeleton::GEOMBase_Skeleton(GeometryGUI* theGeometryGUI, QWidget* paren
if (!name)
setName("GEOMBase_Skeleton");
+ GroupBoxName->setTitle(tr("GEOM_RESULT_NAME_GRP"));
+ NameLabel->setText(tr("GEOM_RESULT_NAME_LBL"));
+
buttonCancel->setText(tr("GEOM_BUT_CLOSE"));
buttonOk->setText(tr("GEOM_BUT_OK"));
buttonApply->setText(tr("GEOM_BUT_APPLY"));
buttonHelp->setText(tr("GEOM_BUT_HELP"));
- GroupMedium->close(TRUE);
resize(0, 0);
Init();
diff --git a/src/GEOMClient/GEOM_Client.cxx b/src/GEOMClient/GEOM_Client.cxx
index 2659f6209..3e8eb2058 100644
--- a/src/GEOMClient/GEOM_Client.cxx
+++ b/src/GEOMClient/GEOM_Client.cxx
@@ -222,7 +222,7 @@ TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_p
TopExp::MapShapes(aMainShape, anIndices);
/* Case of only one subshape */
- if (list->length() == 1) {
+ if (list->length() == 1 && list[0] > 0) {
S = anIndices.FindKey(list[0]);
}
else {
diff --git a/src/GEOMContext/GEOM_msg_en.po b/src/GEOMContext/GEOM_msg_en.po
index ae88996a2..7dc8d22ea 100644
--- a/src/GEOMContext/GEOM_msg_en.po
+++ b/src/GEOMContext/GEOM_msg_en.po
@@ -1189,6 +1189,9 @@ msgstr "\nShading"
msgid "GEOM_RECONSTRUCTION_LIMIT"
msgstr "Reconstruction Limit"
+msgid "GEOM_KEEP_NONLIMIT_SHAPES"
+msgstr "Keep nonlimit shapes"
+
msgid "GEOM_SUPPRESS_RESULT"
msgstr "Suppress Result"
diff --git a/src/GEOMContext/GEOM_msg_fr.po b/src/GEOMContext/GEOM_msg_fr.po
index 45c9b0ead..d88c44986 100644
--- a/src/GEOMContext/GEOM_msg_fr.po
+++ b/src/GEOMContext/GEOM_msg_fr.po
@@ -1190,6 +1190,9 @@ msgstr "Ombré"
msgid "GEOM_RECONSTRUCTION_LIMIT"
msgstr "Limite de Reconstruction"
+msgid "GEOM_KEEP_NONLIMIT_SHAPES"
+msgstr "Keep nonlimit shapes"
+
msgid "GEOM_SUPPRESS_RESULT"
msgstr "Supprimer le Resultat"
diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx
index 7af013b20..029e8922a 100644
--- a/src/GEOMGUI/GEOMGUI_Selection.cxx
+++ b/src/GEOMGUI/GEOMGUI_Selection.cxx
@@ -205,14 +205,14 @@ GEOM::GEOM_Object_ptr GEOMGUI_Selection::getObject( const int index ) const
return GEOM::GEOM_Object::_nil();
}
-QString GEOMGUI_Selection:: selectionMode() const
-{
+QString GEOMGUI_Selection::selectionMode() const
+{
SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
if (app) {
GeometryGUI* aGeomGUI = dynamic_cast( app->module( "Geometry" ) );
- if(aGeomGUI)
- switch(aGeomGUI->getLocalSelectionMode())
- {
+ if (aGeomGUI) {
+ switch (aGeomGUI->getLocalSelectionMode())
+ {
case GEOM_POINT : return "VERTEX";
case GEOM_EDGE : return "EDGE";
case GEOM_WIRE : return "WIRE";
@@ -222,6 +222,8 @@ QString GEOMGUI_Selection:: selectionMode() const
case GEOM_COMPOUND : return "COMPOUND";
case GEOM_ALLOBJECTS : return "ALL";
default: return "";
- }
+ }
+ }
}
+ return "";
}
diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx
index b0fd38adc..5b1c41de5 100644
--- a/src/GEOMGUI/GEOM_Displayer.cxx
+++ b/src/GEOMGUI/GEOM_Displayer.cxx
@@ -82,6 +82,7 @@
#include
#include
#include
+#include
// VTK Includes
#include
@@ -525,8 +526,12 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
Handle(GEOM_AISShape) AISShape;
if (myType == GEOM_VECTOR)
AISShape = new GEOM_AISVector (myShape, "");
- else
+ else {
+ if (myShape.ShapeType() != TopAbs_VERTEX && // fix pb with not displayed points
+ !TopoDS_Iterator(myShape).More())
+ return;// NPAL15983 (Bug when displaying empty groups)
AISShape = new GEOM_AISShape (myShape, "");
+ }
// Temporary staff: vertex must be infinite for correct visualization
AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX );
diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po
index 01825cc9d..3a2e2c94d 100644
--- a/src/GEOMGUI/GEOM_msg_en.po
+++ b/src/GEOMGUI/GEOM_msg_en.po
@@ -1312,6 +1312,9 @@ msgstr "\nShading"
msgid "GEOM_RECONSTRUCTION_LIMIT"
msgstr "Reconstruction Limit"
+msgid "GEOM_KEEP_NONLIMIT_SHAPES"
+msgstr "Keep nonlimit shapes"
+
msgid "GEOM_SUPPRESS_RESULT"
msgstr "Suppress Result"
@@ -2939,6 +2942,12 @@ msgstr "Rename"
msgid "NAME_LBL"
msgstr "Name: "
+msgid "GEOM_RESULT_NAME_GRP"
+msgstr "Result name"
+
+msgid "GEOM_RESULT_NAME_LBL"
+msgstr "Name"
+
msgid "GEOM_ERR_GET_ENGINE"
msgstr "Failed to obtain GEOM Engine component. Reload Geometry module and try again."
diff --git a/src/GEOMGUI/GEOM_msg_fr.po b/src/GEOMGUI/GEOM_msg_fr.po
index 8d5b1b24d..d4efd381d 100644
--- a/src/GEOMGUI/GEOM_msg_fr.po
+++ b/src/GEOMGUI/GEOM_msg_fr.po
@@ -1238,6 +1238,9 @@ msgstr "Ombré"
msgid "GEOM_RECONSTRUCTION_LIMIT"
msgstr "Limite de Reconstruction"
+msgid "GEOM_KEEP_NONLIMIT_SHAPES"
+msgstr "Keep nonlimit shapes"
+
msgid "GEOM_SUPPRESS_RESULT"
msgstr "Supprimer le Resultat"
diff --git a/src/GEOMImpl/GEOMImpl_ArcDriver.cxx b/src/GEOMImpl/GEOMImpl_ArcDriver.cxx
index d25eb2199..d08ae24cc 100644
--- a/src/GEOMImpl/GEOMImpl_ArcDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_ArcDriver.cxx
@@ -35,18 +35,16 @@
#include
#include
+#include
#include
#include
#include
#include
-#include
-#include
-#include
+#include
#include
-#include
-
#include "utilities.h"
+
//=======================================================================
//function : GetID
//purpose :
@@ -79,46 +77,54 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(TFunction_Logbook& log) const
Standard_Integer aType = aFunction->GetType();
TopoDS_Shape aShape;
- if ((aType == CIRC_ARC_THREE_PNT)||(aType == CIRC_ARC_CENTER)) {
+ if ((aType == CIRC_ARC_THREE_PNT) || (aType == CIRC_ARC_CENTER))
+ {
Handle(GEOM_Function) aRefPoint1 = aCI.GetPoint1();
Handle(GEOM_Function) aRefPoint2 = aCI.GetPoint2();
Handle(GEOM_Function) aRefPoint3 = aCI.GetPoint3();
+
TopoDS_Shape aShapePnt1 = aRefPoint1->GetValue();
TopoDS_Shape aShapePnt2 = aRefPoint2->GetValue();
TopoDS_Shape aShapePnt3 = aRefPoint3->GetValue();
+
if (aShapePnt1.ShapeType() == TopAbs_VERTEX &&
aShapePnt2.ShapeType() == TopAbs_VERTEX &&
- aShapePnt3.ShapeType() == TopAbs_VERTEX) {
+ aShapePnt3.ShapeType() == TopAbs_VERTEX)
+ {
gp_Pnt aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt1));
gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt2));
gp_Pnt aP3 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt3));
+
if (aP1.Distance(aP2) < gp::Resolution() ||
aP1.Distance(aP3) < gp::Resolution() ||
aP2.Distance(aP3) < gp::Resolution())
Standard_ConstructionError::Raise("Arc creation aborted: coincident points given");
+
if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
Standard_ConstructionError::Raise("Arc creation aborted: points lay on one line");
- if (aType == CIRC_ARC_THREE_PNT){
- GC_MakeArcOfCircle arc(aP1, aP2, aP3);
- aShape = BRepBuilderAPI_MakeEdge(arc).Edge();
+ if (aType == CIRC_ARC_THREE_PNT)
+ {
+ GC_MakeArcOfCircle arc (aP1, aP2, aP3);
+ aShape = BRepBuilderAPI_MakeEdge(arc).Edge();
}
- if (aType == CIRC_ARC_CENTER){
- Standard_Real Rad = aP1.Distance(aP2);
- gce_MakeCirc MC(aP1,gce_MakePln(aP1, aP2, aP3).Value(),Rad);
+ else // CIRC_ARC_CENTER
+ {
Standard_Boolean sense = aCI.GetSense();
- if (MC.IsDone()) {
- const gp_Circ& Circ = MC.Value();
- Standard_Real Alpha1 = ElCLib::Parameter(Circ,aP2);
- Standard_Real Alpha2 = ElCLib::Parameter(Circ,aP3);
- Handle(Geom_Circle) C = new Geom_Circle(Circ);
- Handle(Geom_TrimmedCurve) TheArc;
- if (!sense)
- TheArc= new Geom_TrimmedCurve(C,Alpha1,Alpha2,false);
- if (sense)
- TheArc= new Geom_TrimmedCurve(C,Alpha2,Alpha1,false);
- aShape = BRepBuilderAPI_MakeEdge(TheArc).Edge();
- }
+
+ Standard_Real aRad = aP1.Distance(aP2);
+ gp_Vec aV1 (aP1, aP2);
+ gp_Vec aV2 (aP1, aP3);
+ gp_Vec aN = aV1 ^ aV2;
+
+ if (sense)
+ aN = -aN;
+
+ GC_MakeCircle circ (aP1, aN, aRad);
+ Handle(Geom_Circle) aGeomCirc = circ.Value();
+
+ GC_MakeArcOfCircle arc (aGeomCirc->Circ(), aP2, aP3, Standard_True);
+ aShape = BRepBuilderAPI_MakeEdge(arc).Edge();
}
}
} else {
@@ -129,8 +135,7 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(TFunction_Logbook& log) const
aFunction->SetValue(aShape);
log.SetTouched(Label());
- MESSAGE("Out of building step ...");
- return 1;
+ return 1;
}
diff --git a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx
index 9e2d85745..2efdd7ca2 100644
--- a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx
@@ -34,7 +34,8 @@
#include
#include
-#include
+//#include
+#include
#include
#include "utilities.h"
@@ -470,14 +471,21 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
TopoDS_Shape aCompound = anArgs(1);
// Glue coincident faces and edges (with Partition algorithm).
- NMTAlgo_Splitter1 PS;
- PS.AddShape(aCompound);
- PS.Compute();
- PS.SetRemoveWebs(Standard_False);
-// PS.Build(aCompound.ShapeType());
- PS.Build(TopAbs_SOLID);
+ //NMTAlgo_Splitter1 PS;
+ //PS.AddShape(aCompound);
+ //PS.Compute();
+ //PS.SetRemoveWebs(Standard_False);
+ // PS.Build(aCompound.ShapeType());
+ //PS.Build(TopAbs_SOLID);
+ //aShape = PS.Shape();
+
+ GEOMAlgo_Gluer aGluer;
+ aGluer.SetShape(aCompound);
+ aGluer.SetCheckGeometry(Standard_True);
+ aGluer.Perform();
+ aShape = aGluer.Result();
+
- aShape = PS.Shape();
} else {
}
@@ -537,7 +545,7 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
}
// 5. Glue Faces
- aShape = GEOMImpl_GlueDriver::GlueFaces(aComp, Precision::Confusion());
+ aShape = GEOMImpl_GlueDriver::GlueFaces(aComp, Precision::Confusion(), Standard_False);
}
} else if (aType == BLOCK_MULTI_TRANSFORM_1D ||
@@ -643,7 +651,7 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const
}
// Glue faces of the multi-block
- aShape = GEOMImpl_GlueDriver::GlueFaces(aMulti, aTol);
+ aShape = GEOMImpl_GlueDriver::GlueFaces(aMulti, aTol, Standard_False);
} else { // unknown function type
return 0;
diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx
index 4bf020b61..c419cd6d5 100644
--- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx
@@ -153,6 +153,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const
}
if (isCompound) {
+ /*
TopTools_ListOfShape listShapeC;
AddSimpleShapes(C, listShapeC);
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
@@ -165,6 +166,14 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const
aShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion());
else
aShape = C;
+ */
+
+ // As GlueFaces has been improved to keep all kind of shapes
+ TopExp_Explorer anExp (C, TopAbs_VERTEX);
+ if (anExp.More())
+ aShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion(), Standard_True);
+ else
+ aShape = C;
}
}
@@ -215,6 +224,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const
}
if (isCompound) {
+ /*
TopTools_ListOfShape listShapeC;
AddSimpleShapes(C, listShapeC);
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
@@ -227,11 +237,20 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const
aShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion());
else
aShape = C;
+ */
+
+ // As GlueFaces has been improved to keep all kind of shapes
+ TopExp_Explorer anExp (C, TopAbs_VERTEX);
+ if (anExp.More())
+ aShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion(), Standard_True);
+ else
+ aShape = C;
}
}
// perform FUSE operation
else if (aType == BOOLEAN_FUSE) {
+ /* Fix for NPAL15379: refused
// Check arguments
TopTools_ListOfShape listShape1, listShape2;
AddSimpleShapes(aShape1, listShape1);
@@ -305,6 +324,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const
}
}
}
+ */
// Perform
BRepAlgoAPI_Fuse BO (aShape1, aShape2);
@@ -367,8 +387,16 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const
}
}
- if (isCompound)
- aShape = C;
+ if (isCompound) {
+ //aShape = C;
+
+ // As GlueFaces has been improved to keep all kind of shapes
+ TopExp_Explorer anExp (C, TopAbs_VERTEX);
+ if (anExp.More())
+ aShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion(), Standard_True);
+ else
+ aShape = C;
+ }
}
// UNKNOWN operation
diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx
index e2d0629e4..559908207 100644
--- a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx
@@ -113,7 +113,10 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const
int res = fp( aShape, aFileName, aFormatName );
// unload plugin library
- //UnLoadLib( anExportLib );
+ // commented by enk:
+ // the bug was occured: using ACIS Import/Export plugin
+ // UnLoadLib( anExportLib );
+
if ( res )
log.SetTouched(Label());
diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx
index e056bf7d8..ec18620ff 100644
--- a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx
@@ -73,6 +73,7 @@ const Standard_GUID& GEOMImpl_GlueDriver::GetID()
//=======================================================================
TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& theShape,
const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids,
TCollection_AsciiString& theWarning) const
{
Standard_Integer iErr, iWrn;
@@ -82,6 +83,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& the
aGluer.SetShape(theShape);
aGluer.SetTolerance(theTolerance);
aGluer.SetCheckGeometry(Standard_True);
+ aGluer.SetKeepNonSolids(doKeepNonSolids);
aGluer.Perform();
@@ -197,7 +199,8 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& the
//purpose :
//=======================================================================
TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape,
- const Standard_Real theTolerance)
+ const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids)
{
Standard_Integer iErr, iWrn;
TopoDS_Shape aRes;
@@ -206,6 +209,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape,
aGluer.SetShape(theShape);
aGluer.SetTolerance(theTolerance);
aGluer.SetCheckGeometry(Standard_True);
+ aGluer.SetKeepNonSolids(doKeepNonSolids);
aGluer.Perform();
@@ -261,6 +265,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape,
//=======================================================================
TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape,
const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids,
const TopTools_MapOfShape& aFaces)
{
TopoDS_Shape aRes;
@@ -272,6 +277,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape,
aGluer.SetShape(theShape);
aGluer.SetTolerance(theTolerance);
+ aGluer.SetKeepNonSolids(doKeepNonSolids);
aGluer.Perform();
Standard_Integer iErr = aGluer.ErrorStatus();
if (iErr) return aRes;
@@ -327,8 +333,10 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
Standard_Real tol3d = aCI.GetTolerance();
+ Standard_Boolean aKeepNonSolids = aCI.GetKeepNonSolids();
+
if (aType == GLUE_FACES) {
- aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aWrn);
+ aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aKeepNonSolids, aWrn);
}
else { // aType == GLUE_FACES_BY_LIST
Handle(TColStd_HSequenceOfTransient) SF = aCI.GetFaces();
@@ -347,7 +355,7 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
if(!aFaces.Contains(aFace))
aFaces.Add(aFace);
}
- aShape = GlueFacesByList(aShapeBase, tol3d, aFaces);
+ aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces);
}
if (aShape.IsNull()) return 0;
diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx
index eee00b868..e7c3befa8 100644
--- a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx
+++ b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx
@@ -150,14 +150,17 @@ Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_GlueDriver() {};
Standard_EXPORT static TopoDS_Shape GlueFaces (const TopoDS_Shape& theShape,
- const Standard_Real theTolerance);
+ const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids = Standard_True);
Standard_EXPORT TopoDS_Shape GlueFacesWithWarnings (const TopoDS_Shape& theShape,
const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids,
TCollection_AsciiString& theWarning) const;
Standard_EXPORT static TopoDS_Shape GlueFacesByList (const TopoDS_Shape& theShape,
const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids,
const TopTools_MapOfShape& aFaces);
diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx
index d2753622d..f5c4040a1 100644
--- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx
+++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx
@@ -148,7 +148,8 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
const Standard_Integer theLimit,
const Standard_Boolean theRemoveWebs,
const Handle(TColStd_HArray1OfInteger)& theMaterials,
- const Standard_Boolean thePerformSelfIntersections)
+ const Standard_Integer theKeepNonlimitShapes,
+ const Standard_Boolean thePerformSelfIntersections)
{
SetErrorCode(KO);
@@ -251,6 +252,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
// Limit
aCI.SetLimit(theLimit);
+ aCI.SetKeepNonlimitShapes(theKeepNonlimitShapes);
// Materials
if (theRemoveWebs) {
@@ -302,7 +304,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
pd << ", " << theMaterials->Value(i);
}
}
- pd << "])";
+ pd << "], " << theKeepNonlimitShapes <<")";
SetErrorCode(OK);
return aPartition;
diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx
index fd82587b2..6dc82d7be 100644
--- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx
+++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx
@@ -46,7 +46,8 @@ class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
const Standard_Integer theLimit,
const Standard_Boolean theRemoveWebs,
const Handle(TColStd_HArray1OfInteger)& theMaterials,
- const Standard_Boolean thePerformSelfIntersections);
+ const Standard_Integer theKeepNonlimitShapes,
+ const Standard_Boolean thePerformSelfIntersections);
Standard_EXPORT Handle(GEOM_Object) MakeHalfPartition (Handle(GEOM_Object) theShape,
Handle(GEOM_Object) thePlane);
diff --git a/src/GEOMImpl/GEOMImpl_IGlue.hxx b/src/GEOMImpl/GEOMImpl_IGlue.hxx
index 7670ed70a..e6e269221 100644
--- a/src/GEOMImpl/GEOMImpl_IGlue.hxx
+++ b/src/GEOMImpl/GEOMImpl_IGlue.hxx
@@ -27,6 +27,7 @@
#define GLUE_ARG_BASE 1
#define GLUE_ARG_TOLER 2
#define GLUE_ARG_FACES 3
+#define GLUE_ARG_KEEPALL 4
class GEOMImpl_IGlue
{
@@ -50,6 +51,9 @@ class GEOMImpl_IGlue
Handle(TColStd_HSequenceOfTransient) GetFaces()
{ return _func->GetReferenceList(GLUE_ARG_FACES); }
+ void SetKeepNonSolids (Standard_Boolean theFlag) { _func->SetInteger(GLUE_ARG_KEEPALL, theFlag ? 1 : 0); }
+ Standard_Boolean GetKeepNonSolids() { return (_func->GetInteger(GLUE_ARG_KEEPALL) != 0); }
+
private:
Handle(GEOM_Function) _func;
diff --git a/src/GEOMImpl/GEOMImpl_IPartition.hxx b/src/GEOMImpl/GEOMImpl_IPartition.hxx
index 1141f0f0c..bf1ff4d7c 100644
--- a/src/GEOMImpl/GEOMImpl_IPartition.hxx
+++ b/src/GEOMImpl/GEOMImpl_IPartition.hxx
@@ -36,6 +36,8 @@
#define PART_ARG_SHAPE 7
#define PART_ARG_PLANE 8
+#define PART_ARG_KEEP_NONLIMIT_SHAPES 9
+
class GEOMImpl_IPartition
{
public:
@@ -44,6 +46,9 @@ class GEOMImpl_IPartition
void SetLimit(int theLimit) { _func->SetInteger(PART_ARG_LIMIT, theLimit); }
+ void SetKeepNonlimitShapes(int theKeepNonlimitShapes)
+ { _func->SetInteger(PART_ARG_KEEP_NONLIMIT_SHAPES,theKeepNonlimitShapes ); }
+
void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes)
{ _func->SetReferenceList(PART_ARG_SHAPES, theShapes); }
@@ -62,6 +67,8 @@ class GEOMImpl_IPartition
int GetLimit() { return _func->GetInteger(PART_ARG_LIMIT); }
+ int GetKeepNonlimitShapes() { return _func->GetInteger(PART_ARG_KEEP_NONLIMIT_SHAPES); }
+
Handle(TColStd_HSequenceOfTransient) GetShapes() { return _func->GetReferenceList(PART_ARG_SHAPES); }
Handle(TColStd_HSequenceOfTransient) GetTools() { return _func->GetReferenceList(PART_ARG_TOOLS); }
Handle(TColStd_HSequenceOfTransient) GetKeepIns() { return _func->GetReferenceList(PART_ARG_KEEP_IN); }
diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
index 28cae6290..8f698def7 100644
--- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
+++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
@@ -17,6 +17,11 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File : GEOMImpl_IShapesOperations.cxx
+// Created :
+// Author : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
+// Project : SALOME
+// $Header$
#include
@@ -42,7 +47,6 @@
#include "GEOMAlgo_FinderShapeOnQuad.hxx"
#include "GEOMAlgo_FinderShapeOn2.hxx"
#include "GEOMAlgo_ClsfBox.hxx"
-//#include "GEOMAlgo_ClsfSurf.hxx"
#include "GEOMAlgo_Gluer1.hxx"
#include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
#include "GEOMAlgo_CoupleOfShapes.hxx"
@@ -62,6 +66,7 @@
#include
#include
+#include
#include
#include
#include
@@ -78,6 +83,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -110,6 +116,16 @@
#include
#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+// Includes added for GetInPlace algorithm improvement
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+
//=============================================================================
/*!
* constructor:
@@ -496,7 +512,8 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape
//=============================================================================
Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFaces
(Handle(GEOM_Object) theShape,
- const Standard_Real theTolerance)
+ const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids)
{
SetErrorCode(KO);
@@ -520,6 +537,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFaces
aCI.SetBase(aRefShape);
aCI.SetTolerance(theTolerance);
+ aCI.SetKeepNonSolids(doKeepNonSolids);
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
@@ -635,7 +653,8 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetGlueFaces
Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFacesByList
(Handle(GEOM_Object) theShape,
const Standard_Real theTolerance,
- list theFaces)
+ list theFaces,
+ const Standard_Boolean doKeepNonSolids)
{
SetErrorCode(KO);
@@ -659,6 +678,8 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFacesByList
aCI.SetBase(aRefShape);
aCI.SetTolerance(theTolerance);
+ aCI.SetKeepNonSolids(doKeepNonSolids);
+
Handle(TColStd_HSequenceOfTransient) aFaces = new TColStd_HSequenceOfTransient;
list::iterator it = theFaces.begin();
for (; it != theFaces.end(); it++) {
@@ -1420,6 +1441,12 @@ Handle(TColStd_HSequenceOfInteger)
TopoDS_Shape aBox = theBox->GetValue();
TopoDS_Shape aShape = theShape->GetValue();
+ // Check presence of triangulation, build if need
+ if (!CheckTriangulation(aShape)) {
+ SetErrorCode("Cannot build triangulation on the shape");
+ return aSeqOfIDs;
+ }
+
// Call algo
GEOMAlgo_FinderShapeOn2 aFinder;
Standard_Real aTol = 0.0001; // default value
@@ -1581,8 +1608,10 @@ Handle(TColStd_HSequenceOfInteger)
Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
// Check presence of triangulation, build if need
- if (!CheckTriangulation(theShape))
+ if (!CheckTriangulation(theShape)) {
+ SetErrorCode("Cannot build triangulation on the shape");
return aSeqOfIDs;
+ }
// Call algo
GEOMAlgo_FinderShapeOn1 aFinder;
@@ -2201,8 +2230,10 @@ Handle(TColStd_HSequenceOfInteger)
Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
// Check presence of triangulation, build if need
- if (!CheckTriangulation(aShape))
+ if (!CheckTriangulation(aShape)) {
+ SetErrorCode("Cannot build triangulation on the shape");
return aSeqOfIDs;
+ }
// Call algo
gp_Pnt aPntTL = BRep_Tool::Pnt(TopoDS::Vertex(aTL));
@@ -2392,7 +2423,7 @@ Handle(TColStd_HSequenceOfInteger)
//=============================================================================
/*!
- * GetInPlace
+ * GetInPlaceOfShape
*/
//=============================================================================
static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
@@ -2514,7 +2545,182 @@ static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
return isFound;
}
-Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace
+//=============================================================================
+/*!
+ * GetShapeProperties
+ */
+//=============================================================================
+
+void GEOMImpl_IShapesOperations::GetShapeProperties( const TopoDS_Shape aShape, Standard_Real tab[],
+ gp_Pnt & aVertex )
+{
+ GProp_GProps SProps, VProps;
+ gp_Pnt aCenterMass;
+ TopoDS_Shape aPntShape;
+ Standard_Real aShapeSize;
+
+ BRepGProp::VolumeProperties(aShape, VProps);
+ aCenterMass = VProps.CentreOfMass();
+ aShapeSize = VProps.Mass();
+ if (aShape.ShapeType() == TopAbs_FACE) {
+ BRepGProp::SurfaceProperties(aShape, SProps);
+ aCenterMass = SProps.CentreOfMass();
+ aShapeSize = SProps.Mass();
+ }
+
+ aPntShape = BRepBuilderAPI_MakeVertex(aCenterMass).Shape();
+ aVertex = BRep_Tool::Pnt( TopoDS::Vertex( aPntShape ) );
+ tab[0] = aVertex.X();
+ tab[1] = aVertex.Y();
+ tab[2] = aVertex.Z();
+ tab[3] = aShapeSize;
+ return;
+}
+
+//=============================================================================
+/*!
+ * GetInPlace
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) theShapeWhere,
+ Handle(GEOM_Object) theShapeWhat)
+{
+ SetErrorCode(KO);
+
+ if (theShapeWhere.IsNull() || theShapeWhat.IsNull()) return NULL;
+
+ TopoDS_Shape aWhere = theShapeWhere->GetValue();
+ TopoDS_Shape aWhat = theShapeWhat->GetValue();
+
+ if (aWhere.IsNull() || aWhat.IsNull()) {
+ SetErrorCode("Error: aWhere and aWhat TopoDS_Shape are Null.");
+ return NULL;
+ }
+
+ Handle(GEOM_Function) aWhereFunction = theShapeWhere->GetLastFunction();
+ if (aWhereFunction.IsNull()) {
+ SetErrorCode("Error: aWhereFunction is Null.");
+ return NULL;
+ }
+
+ TopTools_IndexedMapOfShape aWhereIndices;
+ TopExp::MapShapes(aWhere, aWhereIndices);
+
+ TColStd_ListOfInteger aModifiedList;
+ Standard_Integer aWhereIndex;
+ Handle(TColStd_HArray1OfInteger) aModifiedArray;
+ Handle(GEOM_Object) aResult;
+
+ bool isFound = false;
+ Standard_Integer iType = TopAbs_SOLID;
+ Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.;
+ Standard_Real tab_aWhat[4], tab_aWhere[4];
+ Standard_Real dl_l = 1e-3;
+ Standard_Real min_l, Tol_1D, Tol_2D, Tol_3D, Tol_Mass;
+ gp_Pnt aPnt, aPnt_aWhat;
+ GProp_GProps aProps;
+
+ // 2D or 3D shapes
+ if ( aWhat.ShapeType() == TopAbs_COMPOUND ||
+ aWhat.ShapeType() == TopAbs_SHELL ||
+ aWhat.ShapeType() == TopAbs_COMPSOLID ) {
+ TopExp_Explorer Exp( aWhat, TopAbs_ShapeEnum( iType ) );
+ if ( ! Exp.More() ) iType = TopAbs_FACE;
+ }
+ else if ( aWhat.ShapeType() == TopAbs_FACE )
+ iType = TopAbs_FACE;
+
+ TopExp_Explorer Exp_aWhat( aWhat, TopAbs_ShapeEnum( iType ) );
+ TopExp_Explorer Exp_aWhere( aWhere, TopAbs_ShapeEnum( iType ) );
+ TopExp_Explorer Exp_Edge( aWhere, TopAbs_EDGE );
+
+ // Find the shortest edge in theShapeWhere shape
+ for ( Standard_Integer nbEdge = 0; Exp_Edge.More(); Exp_Edge.Next(), nbEdge++ ) {
+ BRepGProp::LinearProperties(Exp_Edge.Current(), aProps);
+ if ( ! nbEdge ) min_l = aProps.Mass();
+ if ( aProps.Mass() < min_l ) min_l = aProps.Mass();
+ }
+
+ // Compute tolerances
+ Tol_1D = dl_l * min_l;
+ Tol_2D = dl_l * ( min_l * min_l) * ( 2. + dl_l);
+ Tol_3D = dl_l * ( min_l * min_l * min_l ) * ( 3. + (3 * dl_l) + (dl_l * dl_l) );
+
+ Tol_Mass = Tol_3D;
+ if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D;
+
+ // Compute the ShapeWhat Mass
+ for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) {
+ if ( iType == TopAbs_SOLID ) BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps);
+ else if ( iType == TopAbs_FACE ) BRepGProp::SurfaceProperties(Exp_aWhat.Current(), aProps);
+ aWhat_Mass += aProps.Mass();
+ }
+
+ // Finding the Sub-ShapeWhere
+ for ( Exp_aWhere.ReInit(); Exp_aWhere.More(); Exp_aWhere.Next() ) {
+ GetShapeProperties( Exp_aWhere.Current(), tab_aWhere, aPnt );
+ for ( Exp_aWhat.ReInit(); Exp_aWhat.More(); Exp_aWhat.Next() ) {
+ GetShapeProperties( Exp_aWhat.Current(), tab_aWhat, aPnt_aWhat );
+ if ( fabs(tab_aWhat[3] - tab_aWhere[3]) <= Tol_Mass && aPnt_aWhat.Distance(aPnt) <= Tol_1D )
+ isFound = true;
+ else if ( tab_aWhat[3] - ( tab_aWhere[3] > Tol_Mass) ) {
+ BRepClass3d_SolidClassifier SC_aWhere (Exp_aWhere.Current(), aPnt, Precision::Confusion());
+ BRepClass3d_SolidClassifier SC_aWhat (Exp_aWhat.Current(), aPnt, Precision::Confusion());
+ // Block construction 3D
+ if ( SC_aWhere.State() == TopAbs_IN && SC_aWhat.State() == TopAbs_IN ) isFound = true;
+ // Block construction 2D
+ else if ( SC_aWhere.State() == TopAbs_ON && SC_aWhat.State() == TopAbs_ON ) isFound = true;
+ }
+ if ( isFound ) {
+ aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current());
+ aModifiedList.Append(aWhereIndex);
+ aWhere_Mass += tab_aWhere[3];
+ isFound = false;
+ break;
+ }
+ }
+ if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass ) break;
+ }
+
+ aModifiedArray = new TColStd_HArray1OfInteger (1, aModifiedList.Extent());
+ TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList);
+ for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++)
+ aModifiedArray->SetValue(imod, anIterModif.Value());
+
+ //Add a new object
+ aResult = GetEngine()->AddSubShape(theShapeWhere, aModifiedArray);
+ if (aResult.IsNull()) {
+ SetErrorCode("Error in algorithm: result found, but cannot be returned.");
+ return NULL;
+ }
+
+ if (aModifiedArray->Length() > 1) {
+ //Set a GROUP type
+ aResult->SetType(GEOM_GROUP);
+
+ //Set a sub shape type
+ TopoDS_Shape aFirstFound = aWhereIndices.FindKey(aModifiedArray->Value(1));
+ TopAbs_ShapeEnum aShapeType = aFirstFound.ShapeType();
+
+ TDF_Label aFreeLabel = aResult->GetFreeLabel();
+ TDataStd_Integer::Set(aFreeLabel, (Standard_Integer)aShapeType);
+ }
+
+ //Make a Python command
+ Handle(GEOM_Function) aFunction = aResult->GetFunction(1);
+
+ GEOM::TPythonDump(aFunction) << aResult << " = geompy.GetInPlace("
+ << theShapeWhere << ", " << theShapeWhat << ")";
+
+ SetErrorCode(OK);
+ return aResult;
+}
+
+//=======================================================================
+//function : GetInPlaceByHistory
+//purpose :
+//=======================================================================
+Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlaceByHistory
(Handle(GEOM_Object) theShapeWhere,
Handle(GEOM_Object) theShapeWhat)
{
@@ -2645,22 +2851,65 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL)
SL.Append( aShapes( OrderInd(Index) ));
}
+//=======================================================================
+//function : CompsolidToCompound
+//purpose :
+//=======================================================================
+TopoDS_Shape GEOMImpl_IShapesOperations::CompsolidToCompound (const TopoDS_Shape& theCompsolid)
+{
+ if (theCompsolid.ShapeType() != TopAbs_COMPSOLID) {
+ return theCompsolid;
+ }
+
+ TopoDS_Compound aCompound;
+ BRep_Builder B;
+ B.MakeCompound(aCompound);
+
+ TopTools_MapOfShape mapShape;
+ TopoDS_Iterator It (theCompsolid, Standard_True, Standard_True);
+
+ for (; It.More(); It.Next()) {
+ TopoDS_Shape aShape_i = It.Value();
+ if (mapShape.Add(aShape_i)) {
+ B.Add(aCompound, aShape_i);
+ }
+ }
+
+ return aCompound;
+}
+
//=======================================================================
//function : CheckTriangulation
//purpose :
//=======================================================================
bool GEOMImpl_IShapesOperations::CheckTriangulation (const TopoDS_Shape& aShape)
{
+ bool isTriangulation = true;
+
TopExp_Explorer exp (aShape, TopAbs_FACE);
- if (!exp.More()) {
- SetErrorCode("Shape without faces given");
- return false;
+ if (exp.More())
+ {
+ TopLoc_Location aTopLoc;
+ Handle(Poly_Triangulation) aTRF;
+ aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc);
+ if (aTRF.IsNull()) {
+ isTriangulation = false;
+ }
+ }
+ else // no faces, try edges
+ {
+ TopExp_Explorer expe (aShape, TopAbs_EDGE);
+ if (!expe.More()) {
+ return false;
+ }
+ TopLoc_Location aLoc;
+ Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(TopoDS::Edge(expe.Current()), aLoc);
+ if (aPE.IsNull()) {
+ isTriangulation = false;
+ }
}
- TopLoc_Location aTopLoc;
- Handle(Poly_Triangulation) aTRF;
- aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc);
- if (aTRF.IsNull()) {
+ if (!isTriangulation) {
// calculate deflection
Standard_Real aDeviationCoefficient = 0.001;
@@ -2773,6 +3022,7 @@ static bool isSameFace(const TopoDS_Face& theFace1, const TopoDS_Face& theFace2)
if(P.Z() > zmaxB2) zmaxB2 = P.Z();
}
+
//Compare the bounding boxes of both faces
if(gp_Pnt(xminB1, yminB1, zminB1).Distance(gp_Pnt(xminB2, yminB2, zminB2)) > MAX_TOLERANCE)
return false;
@@ -2780,6 +3030,33 @@ static bool isSameFace(const TopoDS_Face& theFace1, const TopoDS_Face& theFace2)
if(gp_Pnt(xmaxB1, ymaxB1, zmaxB1).Distance(gp_Pnt(xmaxB2, ymaxB2, zmaxB2)) > MAX_TOLERANCE)
return false;
+ Handle(Geom_Surface) S1 = BRep_Tool::Surface(theFace1);
+ Handle(Geom_Surface) S2 = BRep_Tool::Surface(theFace2);
+
+ //Check if there a coincidence of two surfaces at least in two points
+ double U11, U12, V11, V12, U21, U22, V21, V22;
+ BRepTools::UVBounds(theFace1, U11, U12, V11, V12);
+ BRepTools::UVBounds(theFace2, U21, U22, V21, V22);
+
+ double rangeU = U12-U11;
+ double rangeV = V12-V11;
+ double U = U11 + rangeU/3.0;
+ double V = V11 + rangeV/3.0;
+ gp_Pnt P1 = S1->Value(U, V);
+ U = U11+rangeU*2.0/3.0;
+ V = V11+rangeV*2.0/3.0;
+ gp_Pnt P2 = S1->Value(U, V);
+
+ if(!GeomLib_Tool::Parameters(S2, P1, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22)
+ return false;
+
+ if(P1.Distance(S2->Value(U,V)) > MAX_TOLERANCE) return false;
+
+ if(!GeomLib_Tool::Parameters(S2, P2, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22)
+ return false;
+
+ if(P2.Distance(S2->Value(U, V)) > MAX_TOLERANCE) return false;
+
//Check that each edge of the Face1 has a counterpart in the Face2
TopTools_MapOfOrientedShape aMap;
TopTools_ListIteratorOfListOfShape LSI1(LS1);
@@ -2799,36 +3076,6 @@ static bool isSameFace(const TopoDS_Face& theFace1, const TopoDS_Face& theFace2)
if(!isFound) return false;
}
- Handle(Geom_Surface) S1 = BRep_Tool::Surface(theFace1);
- Handle(Geom_Surface) S2 = BRep_Tool::Surface(theFace2);
- if(S1->DynamicType() == S2->DynamicType()) {
- return true;
- }
- else { //Check if there a coincidence of two surfaces at least in two points
- double U11, U12, V11, V12, U21, U22, V21, V22;
- BRepTools::UVBounds(theFace1, U11, U12, V11, V12);
- BRepTools::UVBounds(theFace2, U21, U22, V21, V22);
-
- double rangeU = U12-U11;
- double rangeV = V12-V11;
- double U = U11 + rangeU/3.0;
- double V = V11 + rangeV/3.0;
- gp_Pnt P1 = S1->Value(U, V);
- U = U11+rangeU*2.0/3.0;
- V = V11+rangeV*2.0/3.0;
- gp_Pnt P2 = S1->Value(U, V);
-
- if(!GeomLib_Tool::Parameters(S2, P1, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22)
- return false;
-
- if(P1.Distance(S2->Value(U,V)) > MAX_TOLERANCE) return false;
-
- if(!GeomLib_Tool::Parameters(S2, P2, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22)
- return false;
-
- if(P2.Distance(S2->Value(U, V)) > MAX_TOLERANCE) return false;
- }
-
return true;
}
diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
index 42d2ed991..1e8cdc2c8 100644
--- a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
+++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
@@ -17,7 +17,14 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
+//=============================================================================
+// File : GEOMImpl_IShapesOperations.hxx
+// Created :
+// Author : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
#ifndef _GEOMImpl_IShapesOperations_HXX_
#define _GEOMImpl_IShapesOperations_HXX_
@@ -32,11 +39,14 @@
#include
#include
+#include
+
class GEOM_Engine;
class Handle(GEOM_Object);
class Handle(TColStd_HArray1OfInteger);
-class GEOMImpl_IShapesOperations : public GEOM_IOperations {
+class GEOMImpl_IShapesOperations : public GEOM_IOperations
+{
public:
Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT ~GEOMImpl_IShapesOperations();
@@ -60,22 +70,24 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations {
Standard_EXPORT Handle(GEOM_Object) MakeCompound (list theShapes);
Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (Handle(GEOM_Object) theShape,
- const Standard_Real theTolerance);
+ const Standard_Real theTolerance,
+ const Standard_Boolean doKeepNonSolids);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueFaces (Handle(GEOM_Object) theShape,
const Standard_Real theTolerance);
Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (Handle(GEOM_Object) theShape,
const Standard_Real theTolerance,
- list theFaces);
+ list theFaces,
+ const Standard_Boolean doKeepNonSolids);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode (Handle(GEOM_Object) theShape,
- const Standard_Integer theShapeType,
- const Standard_Boolean isSorted);
+ const Standard_Integer theShapeType,
+ const Standard_Boolean isSorted);
Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs (Handle(GEOM_Object) theShape,
- const Standard_Integer theShapeType,
- const Standard_Boolean isSorted);
+ const Standard_Integer theShapeType,
+ const Standard_Boolean isSorted);
Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object) theMainShape,
const Standard_Integer theID);
@@ -112,22 +124,25 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations {
const GEOMAlgo_State theState);
- Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
- const Standard_Integer theShapeType,
- const Handle(GEOM_Object)& theAxis,
- const Standard_Real theRadius,
- const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAxis,
+ const Standard_Real theRadius,
+ const GEOMAlgo_State theState);
- Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
- const Standard_Integer theShapeType,
- const Handle(GEOM_Object)& theCenter,
- const Standard_Real theRadius,
- const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theCenter,
+ const Standard_Real theRadius,
+ const GEOMAlgo_State theState);
- Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
- const Standard_Integer theShapeType,
- const Handle(GEOM_Object)& theAx1,
- const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
+ GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAx1,
+ const GEOMAlgo_State theState);
Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
@@ -136,17 +151,19 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations {
const Handle(GEOM_Object)& thePnt,
const GEOMAlgo_State theState);
- Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
- const Standard_Integer theShapeType,
- const Handle(GEOM_Object)& theAxis,
- const Standard_Real theRadius,
- const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
+ GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAxis,
+ const Standard_Real theRadius,
+ const GEOMAlgo_State theState);
- Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
- const Standard_Integer theShapeType,
- const Handle(GEOM_Object)& theCenter,
- const Standard_Real theRadius,
- const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
+ GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theCenter,
+ const Standard_Real theRadius,
+ const GEOMAlgo_State theState);
/*!
* \brief Find subshapes complying with given status about quadrangle
@@ -198,10 +215,13 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations {
Handle(GEOM_Object) theCenter,
const Standard_Real theRadius);
+ void GetShapeProperties(const TopoDS_Shape aShape, Standard_Real propertiesArray[], gp_Pnt & aPnt);
+
Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
Handle(GEOM_Object) theShapeWhat);
- Standard_EXPORT static void SortShapes (TopTools_ListOfShape& SL);
+ Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
+ Handle(GEOM_Object) theShapeWhat);
/*!
* \brief Searches a shape equal to theWhat in the context of theWhere
@@ -240,6 +260,30 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations {
const Standard_Integer theShapeType,
GEOMAlgo_State theState);
+ public:
+ /*!
+ * \brief Sort shapes in the list by their coordinates.
+ * \param SL The list of shapes to sort.
+ */
+ Standard_EXPORT static void SortShapes (TopTools_ListOfShape& SL);
+
+ /*!
+ * \brief Convert TopoDS_COMPSOLID to TopoDS_COMPOUND.
+ *
+ * If the argument shape is not of type TopoDS_COMPSOLID, this method returns it as is.
+ *
+ * \param theCompsolid The compsolid to be converted.
+ * \retval TopoDS_Shape Returns the resulting compound.
+ */
+ Standard_EXPORT static TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid);
+
+ /*!
+ * \brief Build a triangulation on \a theShape if it is absent.
+ * \param theShape The shape to check/build triangulation on.
+ * \retval bool Returns false if the shape has no faces, i.e. impossible to build triangulation.
+ */
+ Standard_EXPORT static bool CheckTriangulation (const TopoDS_Shape& theShape);
+
private:
Handle(GEOM_Object) MakeShape (list theShapes,
const Standard_Integer theObjectType,
@@ -247,11 +291,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations {
const TCollection_AsciiString& theMethodName);
// ----------------------------------------------------
- // methods common for all GetShapesOnXXX() functions
+// methods common for all GetShapesOnXXX() functions
// ----------------------------------------------------
- bool CheckTriangulation (const TopoDS_Shape& aShape);
-
/*!
* \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK
* \param theShapeType - the shape type to check
diff --git a/src/GEOMImpl/GEOMImpl_ImportDriver.cxx b/src/GEOMImpl/GEOMImpl_ImportDriver.cxx
index 90b01ace0..b2ff8fe6b 100644
--- a/src/GEOMImpl/GEOMImpl_ImportDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_ImportDriver.cxx
@@ -107,7 +107,9 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(TFunction_Logbook& log) const
TCollection_AsciiString anError;
TopoDS_Shape aShape = fp( aFileName, aFormatName, anError );
- // unload plugin library
+ // unload plugin library
+ // commented by enk:
+ // the bug was occured: using ACIS Import/Export plugin
//UnLoadLib( anImportLib ); //This is workaround of BUG OCC13051
if ( aShape.IsNull() ) {
diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx
index b079521e8..b68177098 100644
--- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx
@@ -206,6 +206,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
}
}
+ PS.SetLimitMode(aCI.GetKeepNonlimitShapes());
PS.SetLimit( (TopAbs_ShapeEnum)aCI.GetLimit() );
PS.Perform();
diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx
index b14de152b..320debb03 100644
--- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx
@@ -21,16 +21,30 @@
#include
#include
+
+#include
+#include
+#include
#include
#include
#include
+#include
+#include
+
#include
+#include
+#include
+#include
#include
#include
-#include
+#include
+#include
+#include
#include
+#include
+#include
#include
#include
#include
@@ -38,32 +52,26 @@
#include
#include
#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
#include
#include
#include
-#include "utilities.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-//#include
+#include "utilities.h"
+
+//#include "BRepTools.hxx"
//=======================================================================
@@ -345,7 +353,6 @@ static void FindNextPairOfFaces(const TopoDS_Shape& aCurFace,
}
FindNextPairOfFaces(F1other, aMapEdgeFaces1, aMapEdgeFaces2, FF, aCI);
-
}
}
@@ -423,6 +430,7 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
Standard_ConstructionError::Raise
("First location shapes is not coincided with first vertex of aWirePath");
}
+ VLocs.ChangeValue(1) = VF;
edge = TopoDS::Edge(Edges.Last());
tol = BRep_Tool::Tolerance(edge);
TopoDS_Vertex VL = sae.LastVertex(edge);
@@ -432,11 +440,12 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
Standard_ConstructionError::Raise
("Last location shapes is not coincided with last vertex of aWirePath");
}
+ VLocs.ChangeValue(nbLocs) = VL;
int jcurr = 2;
TopTools_SequenceOfShape tmpEdges;
for(i=1; i<=Edges.Length() && jcurrD0(fp,Pfp);
+ if(Pfp.Distance(P1)D0(fp,P1);
+ if( P1.Distance(PLoc) < tol ) {
+ C->D0(fp+(lp-fp)/100,P2);
+ }
+ else {
+ C->D0(lp,P1);
+ C->D0(lp+(fp-lp)/100,P2);
+ }
+ PathNorm = gp_Vec(P1,P2);
+ break;
+ }
+ else {
+ TopoDS_Vertex VL = sae.LastVertex(edge);
+ gp_Pnt PL = BRep_Tool::Pnt(VL);
+ if( PL.Distance(PLoc) < tol ) {
+ double fp,lp;
+ Handle(Geom_Curve) C = BRep_Tool::Curve(edge,fp,lp);
+ gp_Pnt P1,P2;
+ C->D0(fp,P1);
+ if( P1.Distance(PLoc) < tol ) {
+ C->D0(fp+(lp-fp)/100,P2);
+ }
+ else {
+ C->D0(lp,P1);
+ C->D0(lp+(fp-lp)/100,P2);
+ }
+ PathNorm = gp_Vec(P2,P1);
+ break;
+ }
+ }
+ }
+ cout<<"VN("<PI/2.) {
+ NeedReverse = true;
+ aShBase1.Reverse();
+ }
+ }
+ {
+ // second section
+ anExp.Init( aShBase2, TopAbs_FACE );
+ TopoDS_Shape aFace = anExp.Current();
+ TColgp_SequenceOfPnt aPnts;
+ double xc=0, yc=0, zc=0;
+ for ( anExp.Init( aFace, TopAbs_VERTEX ); anExp.More(); anExp.Next() ) {
+ TopoDS_Vertex V = TopoDS::Vertex(anExp.Current());
+ aPnts.Append(BRep_Tool::Pnt(V));
+ xc += aPnts.Last().X();
+ yc += aPnts.Last().Y();
+ zc += aPnts.Last().Z();
+ }
+ gp_Pnt PC( xc/aPnts.Length(), yc/aPnts.Length(), zc/aPnts.Length() );
+ gp_Vec V1(PC,aPnts.Value(1));
+ gp_Vec V2(PC,aPnts.Value(2));
+ gp_Vec VN = V1.Crossed(V2);
+ for(int ip=2; ipD0(fp,P1);
+ if( P1.Distance(PLoc) < tol ) {
+ C->D0(fp+(lp-fp)/100,P2);
+ }
+ else {
+ C->D0(lp,P1);
+ C->D0(lp+(fp-lp)/100,P2);
+ }
+ PathNorm = gp_Vec(P2,P1);
+ break;
+ }
+ else {
+ TopoDS_Vertex VL = sae.LastVertex(edge);
+ gp_Pnt PL = BRep_Tool::Pnt(VL);
+ if( PL.Distance(PLoc) < tol ) {
+ double fp,lp;
+ Handle(Geom_Curve) C = BRep_Tool::Curve(edge,fp,lp);
+ gp_Pnt P1,P2;
+ C->D0(fp,P1);
+ if( P1.Distance(PLoc) < tol ) {
+ C->D0(fp+(lp-fp)/100,P2);
+ }
+ else {
+ C->D0(lp,P1);
+ C->D0(lp+(fp-lp)/100,P2);
+ }
+ PathNorm = gp_Vec(P2,P1);
+ break;
+ }
+ }
+ }
+ //cout<<"VN("<PI/2.)
+ aShBase2.Reverse();
+ }
+ */
+
if(!CreateFewSolids) {
// we can create only one solid
TopoDS_Shape aWire1, aWire2;
@@ -661,6 +820,11 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
const TopoDS_Shape aSewShape = aSewing->SewedShape();
if( aSewShape.ShapeType() == TopAbs_SHELL ) {
aShell = TopoDS::Shell(aSewShape);
+ GProp_GProps aSystem;
+ BRepGProp::VolumeProperties(aShell, aSystem);
+ if(aSystem.Mass()<0) {
+ aShell.Reverse();
+ }
if(BRep_Tool::IsClosed(aShell)) {
TopoDS_Solid aSolid;
B.MakeSolid(aSolid);
@@ -679,10 +843,12 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
else {
// main block - creation few solids (for each pair of faces)
TopTools_MapOfShape aFaces1,aFaces2;
- for ( anExp.Init( aShBase1, TopAbs_FACE ); anExp.More(); anExp.Next() )
+ for ( anExp.Init( aShBase1, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
aFaces1.Add(anExp.Current());
- for ( anExp.Init( aShBase2, TopAbs_FACE ); anExp.More(); anExp.Next() )
+ }
+ for ( anExp.Init( aShBase2, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
aFaces2.Add(anExp.Current());
+ }
// creating map of edge faces
TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces1;
TopExp::MapShapesAndAncestors(aShBase1, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces1);
@@ -844,7 +1010,6 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
// make pipe for each pair of faces
- //BRepTools::Write(WPath,"/dn02/users_Linux/skl/work/Bugs/14857/wpath.brep");
for(j=1; j<=FF.Extent(); j++) {
TopoDS_Shape F1 = FF.FindKey(j);
if( F1.ShapeType() != TopAbs_FACE )
@@ -869,12 +1034,10 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
TopoDS_Shape aShape = aBuilder.Shape();
TopoDS_Shell aShell;
B.MakeShell(aShell);
- //int nbf=0;
for ( anExp.Init( aShape, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
- //nbf++;
- //cout<<"nbf="<SewedShape();
if( aSewShape.ShapeType() == TopAbs_SHELL ) {
aShell = TopoDS::Shell(aSewShape);
+ GProp_GProps aSystem;
+ BRepGProp::VolumeProperties(aShell, aSystem);
+ if(aSystem.Mass()<0) {
+ //cout<<"aSewShape is reversed"<(aCI);
- BRepOffsetAPI_MakePipeShell aBuilder(aWirePath);
+ //BRepOffsetAPI_MakePipeShell aBuilder(aWirePath);
Handle(TColStd_HSequenceOfTransient) aBasesObjs = aCIDS->GetBases ();
Handle(TColStd_HSequenceOfTransient) aLocObjs = aCIDS->GetLocations ();
Standard_Boolean aWithContact = (aCIDS->GetWithContactMode());
@@ -1069,6 +1239,116 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const
}
nbLocs = aSeqLocs.Length();
+
+ // skl 02.05.2007
+ if(nbLocs>0) {
+ // we have to check that each location shape is a vertex from
+ // path and update aSeqLocs if it is needed (and possible)
+ TColgp_SequenceOfPnt PLocs;
+ for(i=1; i<=nbLocs; i++) {
+ TopoDS_Vertex V = TopoDS::Vertex(aSeqLocs.Value(i));
+ PLocs.Append(BRep_Tool::Pnt(V));
+ }
+ TopTools_SequenceOfShape Edges;
+ TopExp_Explorer anExp;
+ for ( anExp.Init( aWirePath, TopAbs_EDGE ); anExp.More(); anExp.Next() ) {
+ Edges.Append(anExp.Current());
+ }
+ int nbEdges = Edges.Length();
+ ShapeAnalysis_Edge sae;
+ TopoDS_Edge edge = TopoDS::Edge(Edges.First());
+ double tol = BRep_Tool::Tolerance(edge);
+ TopoDS_Vertex VF = sae.FirstVertex(edge);
+ gp_Pnt PF = BRep_Tool::Pnt(VF);
+ //cout<<"PF("< tol ) {
+ if(aCI) delete aCI;
+ Standard_ConstructionError::Raise
+ ("First location shapes is not coincided with first vertex of aWirePath");
+ }
+ aSeqLocs.ChangeValue(1) = VF;
+ edge = TopoDS::Edge(Edges.Last());
+ tol = BRep_Tool::Tolerance(edge);
+ TopoDS_Vertex VL = sae.LastVertex(edge);
+ gp_Pnt PL = BRep_Tool::Pnt(VL);
+ if( PL.Distance(PLocs.Last()) > tol ) {
+ if(aCI) delete aCI;
+ Standard_ConstructionError::Raise
+ ("Last location shapes is not coincided with last vertex of aWirePath");
+ }
+ aSeqLocs.ChangeValue(nbLocs) = VL;
+ int jcurr = 2;
+ for(i=1; i<=Edges.Length() && jcurr0 &&
+ PLocs.Value(jcurr).Distance(PPC.Point(1)) < tol ) {
+ double param = PPC.Parameter(1);
+ gp_Pnt PC1;
+ C->D0(param,PC1);
+ // split current edge
+ Handle(Geom_TrimmedCurve) tc1 = new Geom_TrimmedCurve(C,fp,param);
+ Handle(Geom_TrimmedCurve) tc2 = new Geom_TrimmedCurve(C,param,lp);
+ TopoDS_Edge E1,E2;
+ BRep_Builder B;
+ gp_Pnt Pfp;
+ C->D0(fp,Pfp);
+ if(Pfp.Distance(P1) we have to update WirePath
+ BRep_Builder B;
+ TopoDS_Wire W;
+ B.MakeWire(W);
+ for(i=1; i<=Edges.Length(); i++) {
+ B.Add(W,TopoDS::Edge(Edges.Value(i)));
+ }
+ aWirePath = W;
+ }
+ }
+
+ BRepOffsetAPI_MakePipeShell aBuilder(aWirePath);
+
Standard_Integer nbShapes = aSeqBases.Length();
Standard_Integer step = nbShapes/nbBases;
@@ -1135,7 +1415,8 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const
Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
}
- aFunction->SetValue(aShape);
+ TopoDS_Shape aRes = GEOMImpl_IShapesOperations::CompsolidToCompound(aShape);
+ aFunction->SetValue(aRes);
log.SetTouched(Label());
if(aCI) delete aCI;
diff --git a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx
index 87157a5fc..8d049aa56 100644
--- a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx
@@ -21,6 +21,8 @@
#include
#include
+
+#include
#include
#include
#include
@@ -114,7 +116,8 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const
if (aShape.IsNull()) return 0;
- aFunction->SetValue(aShape);
+ TopoDS_Shape aRes = GEOMImpl_IShapesOperations::CompsolidToCompound(aShape);
+ aFunction->SetValue(aRes);
log.SetTouched(Label());
diff --git a/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx b/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx
index beec64f3c..2f790ca3e 100644
--- a/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx
+++ b/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx
@@ -21,6 +21,8 @@
#include
#include
+
+#include
#include
#include
#include
@@ -114,11 +116,13 @@ Standard_Integer GEOMImpl_RevolutionDriver::Execute(TFunction_Logbook& log) cons
}
if (aShape.IsNull()) return 0;
- aFunction->SetValue(aShape);
- log.SetTouched(Label());
+ TopoDS_Shape aRes = GEOMImpl_IShapesOperations::CompsolidToCompound(aShape);
+ aFunction->SetValue(aRes);
- return 1;
+ log.SetTouched(Label());
+
+ return 1;
}
diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am
index 6ffbd0ce8..8697b2e1c 100644
--- a/src/GEOMImpl/Makefile.am
+++ b/src/GEOMImpl/Makefile.am
@@ -112,7 +112,6 @@ libGEOMimpl_la_CPPFLAGS = \
$(KERNEL_CXXFLAGS) \
$(BOOST_CPPFLAGS) \
-I$(srcdir)/../ShHealOper \
- -I$(srcdir)/../NMTAlgo \
-I$(srcdir)/../NMTTools \
-I$(srcdir)/../GEOM \
-I$(srcdir)/../GEOMAlgo \
@@ -122,7 +121,6 @@ libGEOMimpl_la_CPPFLAGS = \
libGEOMimpl_la_LDFLAGS = \
../GEOM/libGEOMbasic.la \
- ../NMTAlgo/libNMTAlgo.la \
../GEOMAlgo/libGEOMAlgo.la \
../ShHealOper/libShHealOper.la \
../ARCHIMEDE/libGEOMArchimede.la \
diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx
index 4a3e34a71..2527b21cd 100644
--- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx
+++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx
@@ -78,9 +78,15 @@ static QString getFileName( QWidget* parent,
{
static QString lastUsedFilter;
QStringList filters;
- for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it )
+ QString aBrepFilter;
+ for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) {
filters.push_back( it.key() );
+ if (it.key().contains("BREP", false)) {
+ aBrepFilter = it.key();
+ }
+ }
+
SUIT_FileDlg* fd = new SUIT_FileDlg( parent, open, true, true );
if ( !caption.isEmpty() )
fd->setCaption( caption );
@@ -88,10 +94,15 @@ static QString getFileName( QWidget* parent,
if ( !initial.isEmpty() )
fd->setSelection( initial );
+ fd->setFilters( filters );
+
if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) )
fd->setSelectedFilter( lastUsedFilter );
-
- fd->setFilters( filters );
+ else {
+ if (!aBrepFilter.isEmpty()) {
+ fd->setSelectedFilter(aBrepFilter);
+ }
+ }
fd->exec();
QString filename = fd->selectedFile();
diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.cc b/src/GEOM_I/GEOM_IBooleanOperations_i.cc
index c7a594259..836451282 100644
--- a/src/GEOM_I/GEOM_IBooleanOperations_i.cc
+++ b/src/GEOM_I/GEOM_IBooleanOperations_i.cc
@@ -99,7 +99,8 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
const GEOM::ListOfGO& theRemoveIns,
CORBA::Short theLimit,
CORBA::Boolean theRemoveWebs,
- const GEOM::ListOfLong& theMaterials)
+ const GEOM::ListOfLong& theMaterials,
+ CORBA::Short theKeepNonlimitShapes)
{
GEOM::GEOM_Object_var aGEOMObject;
@@ -166,6 +167,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
Handle(GEOM_Object) anObject =
GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns,
theLimit, theRemoveWebs, aMaterials,
+ theKeepNonlimitShapes,
/*PerformSelfIntersections*/Standard_True);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
@@ -185,7 +187,8 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
const GEOM::ListOfGO& theRemoveIns,
CORBA::Short theLimit,
CORBA::Boolean theRemoveWebs,
- const GEOM::ListOfLong& theMaterials)
+ const GEOM::ListOfLong& theMaterials,
+ CORBA::Short theKeepNonlimitShapes)
{
GEOM::GEOM_Object_var aGEOMObject;
@@ -252,6 +255,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
Handle(GEOM_Object) anObject =
GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns,
theLimit, theRemoveWebs, aMaterials,
+ theKeepNonlimitShapes,
/*PerformSelfIntersections*/Standard_False);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.hh b/src/GEOM_I/GEOM_IBooleanOperations_i.hh
index 52e597ed4..7379d00b8 100644
--- a/src/GEOM_I/GEOM_IBooleanOperations_i.hh
+++ b/src/GEOM_I/GEOM_IBooleanOperations_i.hh
@@ -50,7 +50,8 @@ class GEOM_I_EXPORT GEOM_IBooleanOperations_i :
const GEOM::ListOfGO& theRemoveInside,
CORBA::Short theLimit,
CORBA::Boolean theRemoveWebs,
- const GEOM::ListOfLong& theMaterials);
+ const GEOM::ListOfLong& theMaterials,
+ CORBA::Short theKeepNonlimitShapes);
GEOM::GEOM_Object_ptr MakePartitionNonSelfIntersectedShape (const GEOM::ListOfGO& theShapes,
const GEOM::ListOfGO& theTools,
@@ -58,7 +59,8 @@ class GEOM_I_EXPORT GEOM_IBooleanOperations_i :
const GEOM::ListOfGO& theRemoveInside,
CORBA::Short theLimit,
CORBA::Boolean theRemoveWebs,
- const GEOM::ListOfLong& theMaterials);
+ const GEOM::ListOfLong& theMaterials,
+ CORBA::Short theKeepNonlimitShapes);
GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc
index b3edf98db..32dd0f023 100644
--- a/src/GEOM_I/GEOM_IShapesOperations_i.cc
+++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc
@@ -328,7 +328,8 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound
//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces
(GEOM::GEOM_Object_ptr theShape,
- const CORBA::Double theTolerance)
+ const CORBA::Double theTolerance,
+ const CORBA::Boolean doKeepNonSolids)
{
GEOM::GEOM_Object_var aGEOMObject;
@@ -345,7 +346,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces
//Perform the gluing
Handle(GEOM_Object) anObject =
- GetOperations()->MakeGlueFaces(aShape, theTolerance);
+ GetOperations()->MakeGlueFaces(aShape, theTolerance, doKeepNonSolids);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
if (anObject.IsNull())
@@ -401,7 +402,8 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetGlueFaces
GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
(GEOM::GEOM_Object_ptr theShape,
const CORBA::Double theTolerance,
- const GEOM::ListOfGO& theFaces)
+ const GEOM::ListOfGO& theFaces,
+ const CORBA::Boolean doKeepNonSolids)
{
GEOM::GEOM_Object_var aGEOMObject;
@@ -430,7 +432,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
//Perform the gluing
Handle(GEOM_Object) anObject =
- GetOperations()->MakeGlueFacesByList(aShape, theTolerance, aFaces);
+ GetOperations()->MakeGlueFacesByList(aShape, theTolerance, aFaces, doKeepNonSolids);
//if (!GetOperations()->IsDone() || anObject.IsNull())
// to allow warning
if (anObject.IsNull())
@@ -1323,6 +1325,41 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlace
return GetObject(anObject);
}
+//=============================================================================
+/*!
+ * GetInPlaceByHistory
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlaceByHistory
+ (GEOM::GEOM_Object_ptr theShapeWhere,
+ GEOM::GEOM_Object_ptr theShapeWhat)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if (theShapeWhere == NULL ||
+ theShapeWhat == NULL) return aGEOMObject._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
+ (theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
+ Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
+ (theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
+
+ if (aShapeWhere.IsNull() ||
+ aShapeWhat.IsNull()) return aGEOMObject._retn();
+
+ //Get Shapes in place of aShapeWhat
+ Handle(GEOM_Object) anObject =
+ GetOperations()->GetInPlaceByHistory(aShapeWhere, aShapeWhat);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
//=============================================================================
/*!
* GetSame
diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.hh b/src/GEOM_I/GEOM_IShapesOperations_i.hh
index 84575a15d..dc507db1c 100644
--- a/src/GEOM_I/GEOM_IShapesOperations_i.hh
+++ b/src/GEOM_I/GEOM_IShapesOperations_i.hh
@@ -61,14 +61,16 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
- CORBA::Double theTolerance);
+ CORBA::Double theTolerance,
+ const CORBA::Boolean doKeepNonSolids);
GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theTolerance);
GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theTolerance,
- const GEOM::ListOfGO& theFaces);
+ const GEOM::ListOfGO& theFaces,
+ const CORBA::Boolean doKeepNonSolids);
GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
@@ -175,6 +177,9 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
GEOM::GEOM_Object_ptr theShapeWhat);
+ GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
+ GEOM::GEOM_Object_ptr theShapeWhat);
+
GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
GEOM::GEOM_Object_ptr theShapeWhat);
diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc
index 299d9f550..fa0a64a0e 100644
--- a/src/GEOM_I_Superv/GEOM_Superv_i.cc
+++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc
@@ -1040,7 +1040,8 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theSha
GEOM::GEOM_List_ptr theRemoveInside,
CORBA::Short theLimit,
CORBA::Boolean theRemoveWebs,
- GEOM::GEOM_List_ptr theMaterials)
+ GEOM::GEOM_List_ptr theMaterials,
+ CORBA::Short theKeepNonlimitShapes)
{
beginService( " GEOM_Superv_i::MakePartition" );
MESSAGE("GEOM_Superv_i::MakePartition");
@@ -1056,9 +1057,11 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theSha
dynamic_cast*>(GetServant(theMaterials, myPOA).in());
if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) {
getBoolOp();
- GEOM::GEOM_Object_ptr anObj = myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
- aListImplKI->GetList(), aListImplRI->GetList(),
- theLimit, theRemoveWebs, aListImplM->GetList());
+ GEOM::GEOM_Object_ptr anObj =
+ myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
+ aListImplKI->GetList(), aListImplRI->GetList(),
+ theLimit, theRemoveWebs, aListImplM->GetList(),
+ theKeepNonlimitShapes);
endService( " GEOM_Superv_i::MakePartition" );
return anObj;
}
@@ -1678,12 +1681,14 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes
// MakeGlueFaces:
//=============================================================================
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
- CORBA::Double theTolerance)
+ CORBA::Double theTolerance,
+ CORBA::Boolean doKeepNonSolids)
{
beginService( " GEOM_Superv_i::MakeGlueFaces" );
MESSAGE("GEOM_Superv_i::MakeGlueFaces");
getShapesOp();
- GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeGlueFaces(theShape, theTolerance);
+ GEOM::GEOM_Object_ptr anObj =
+ myShapesOp->MakeGlueFaces(theShape, theTolerance, doKeepNonSolids);
endService( " GEOM_Superv_i::MakeGlueFaces" );
return anObj;
}
@@ -1709,12 +1714,14 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
//=============================================================================
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theTolerance,
- const GEOM::ListOfGO& theFaces)
+ const GEOM::ListOfGO& theFaces,
+ CORBA::Boolean doKeepNonSolids)
{
beginService( " GEOM_Superv_i::MakeGlueFacesByList" );
MESSAGE("GEOM_Superv_i::MakeGlueFacesByList");
getShapesOp();
- GEOM::GEOM_Object_ptr anObj = myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces);
+ GEOM::GEOM_Object_ptr anObj =
+ myShapesOp->MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids);
endService( " GEOM_Superv_i::MakeGlueFacesByList" );
return anObj;
}
diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh
index 298a01ede..84773c8c4 100644
--- a/src/GEOM_I_Superv/GEOM_Superv_i.hh
+++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh
@@ -258,7 +258,8 @@ public:
GEOM::GEOM_List_ptr theRemoveInside,
CORBA::Short theLimit,
CORBA::Boolean theRemoveWebs,
- GEOM::GEOM_List_ptr theMaterials);
+ GEOM::GEOM_List_ptr theMaterials,
+ CORBA::Short theKeepNonlimitShapes);
GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
GEOM::GEOM_Object_ptr thePlane);
@@ -378,12 +379,14 @@ public:
GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
- CORBA::Double theTolerance);
+ CORBA::Double theTolerance,
+ CORBA::Boolean doKeepNonSolids);
GEOM::GEOM_List_ptr GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theTolerance);
GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theTolerance,
- const GEOM::ListOfGO& theFaces);
+ const GEOM::ListOfGO& theFaces,
+ CORBA::Boolean doKeepNonSolids);
GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
CORBA::Boolean isSorted);
diff --git a/src/GEOM_SWIG/GEOM_TestOthers.py b/src/GEOM_SWIG/GEOM_TestOthers.py
index 81b0aa1e0..3bf25cf75 100644
--- a/src/GEOM_SWIG/GEOM_TestOthers.py
+++ b/src/GEOM_SWIG/GEOM_TestOthers.py
@@ -528,24 +528,72 @@ def TestOtherOperations (geompy, math):
geompy.UnionIDs(vertices_on_quad, vertices_on_quad_ids)
geompy.addToStudy(vertices_on_quad, "Group of vertices on Quadrangle F12")
- # GetInPlace(theShapeWhere, theShapeWhat)
+ # Prepare arguments for GetInPlace and GetInPlaceByHistory
box5 = geompy.MakeBoxDXDYDZ(100, 100, 100)
box6 = geompy.MakeTranslation(box5, 50, 50, 0)
+ geompy.addToStudy(box5, "Box 5")
+ geompy.addToStudy(box6, "Box 6")
+
part = geompy.MakePartition([box5], [box6])
geompy.addToStudy(part, "Partitioned")
+ box5_faces = geompy.SubShapeAll(box5, geompy.ShapeType["FACE"])
+ box6_faces = geompy.SubShapeAll(box6, geompy.ShapeType["FACE"])
+
+ ifa = 1
+ for aface in box5_faces:
+ geompy.addToStudyInFather(box5, aface, "Face" + `ifa`)
+ ifa = ifa + 1
+
+ ifa = 1
+ for aface in box6_faces:
+ geompy.addToStudyInFather(box6, aface, "Face" + `ifa`)
+ ifa = ifa + 1
+
+ # GetInPlace(theShapeWhere, theShapeWhat)
ibb = 5
- box_list = [box5, box6]
- for abox in box_list:
- geompy.addToStudy(abox, "Box " + `ibb`)
- box_faces = geompy.SubShapeAll(abox, geompy.ShapeType["FACE"])
+ faces_list = [box5_faces, box6_faces]
+ for afaces in faces_list:
ifa = 1
- for aface in box_faces:
- geompy.addToStudyInFather(abox, aface, "Face" + `ifa`)
- refl_box_face = geompy.GetInPlace(part, aface)
- if refl_box_face is not None:
+ for aface in afaces:
+ if ibb == 6 and (ifa == 2 or ifa == 4):
+ # use IDL interface directly to avoid error message appearence in Python console
+ refl_box_face = geompy.ShapesOp.GetInPlace(part, aface)
+ if refl_box_face is not None:
+ geompy.addToStudyInFather(part, refl_box_face,
+ "Reflection of face " + `ifa` + " of box " + `ibb`)
+ error = "Result of GetInPlace must be NULL for face " + `ifa` + " of box " + `ibb`
+ raise RuntimeError, error
+ else:
+ # use geompy interface
+ refl_box_face = geompy.GetInPlace(part, aface)
geompy.addToStudyInFather(part, refl_box_face,
- "Reflection of Face " + `ifa` + " of box " + `ibb`)
+ "Reflection of face " + `ifa` + " of box " + `ibb`)
+ ifa = ifa + 1
+ ibb = ibb + 1
+
+ # GetInPlaceByHistory(theShapeWhere, theShapeWhat)
+ part = geompy.MakePartition([box5], [box6])
+ geompy.addToStudy(part, "Partitioned")
+
+ ibb = 5
+ faces_list = [box5_faces, box6_faces]
+ for afaces in faces_list:
+ ifa = 1
+ for aface in afaces:
+ if ibb == 6 and (ifa == 2 or ifa == 4):
+ # use IDL interface directly to avoid error message appearence in Python console
+ refl_box_face = geompy.ShapesOp.GetInPlaceByHistory(part, aface)
+ if refl_box_face is not None:
+ geompy.addToStudyInFather(part, refl_box_face,
+ "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)")
+ error = "Result of GetInPlaceByHistory must be NULL for face " + `ifa` + " of box " + `ibb`
+ raise RuntimeError, error
+ else:
+ # use geompy interface
+ refl_box_face = geompy.GetInPlaceByHistory(part, aface)
+ geompy.addToStudyInFather(part, refl_box_face,
+ "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)")
ifa = ifa + 1
ibb = ibb + 1
diff --git a/src/GEOM_SWIG/GEOM_cyl2complementary.py b/src/GEOM_SWIG/GEOM_cyl2complementary.py
index 1190037ab..fd979913d 100755
--- a/src/GEOM_SWIG/GEOM_cyl2complementary.py
+++ b/src/GEOM_SWIG/GEOM_cyl2complementary.py
@@ -97,7 +97,7 @@ p_tools.append(geompy.MakePlane(geompy.MakeVertex(gx+g_rayonPetit, 0, 0), geompy
addToStudy(t_boite, "t_boite")
-p_element = geompy.MakePartition([t_boite], p_tools, [], [], 4, 0, [])
+p_element = geompy.MakePartition([t_boite], p_tools, [], [], 4, 0, [], 0)
# Compound
# --------
diff --git a/src/GEOM_SWIG/Makefile.am b/src/GEOM_SWIG/Makefile.am
index a4f68108d..ca9cc2ea7 100644
--- a/src/GEOM_SWIG/Makefile.am
+++ b/src/GEOM_SWIG/Makefile.am
@@ -17,7 +17,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
#
#
@@ -32,87 +32,10 @@
include $(top_srcdir)/adm_local/unix/make_common_starter.am
-# ===============================================================
-# Swig targets
-# ===============================================================
-# (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
-#
-# Step 1: build the wrapping source files with swig
-#
-# libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
-# libSALOME_Swig.py
-#
-# Step 2: build the dynamic library from cpp built source files and
-# dependant libraries.
-#
-# swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libSALOME_Swig.la
-# + |
-# dependant libs |
-#
-# The file libSALOME_Swigcmodule.py will be installed in
-# /lib/python/site-package/salome.
-# The library will be installed in the same place.
-#
-
-# this option puts it to dist
-#BUILT_SOURCES = swig_wrap.cpp
-
-SWIG_FLAGS = \
- @SWIG_FLAGS@ \
- -I$(srcdir) \
- -I$(srcdir)/../GEOMGUI
-
-SWIG_SOURCES = libGEOM_Swig.i
-
-# Libraries targets
-lib_LTLIBRARIES = libGEOM_Swigcmodule.la
-
-nodist_pkgpython_DATA = libGEOM_Swig.py
-libGEOM_Swig.py: swig_wrap.cpp
-
-libGEOM_Swigcmodule_la_SOURCES = \
- $(BUILT_SOURCES) \
- $(SWIG_SOURCES)
-
-nodist_libGEOM_Swigcmodule_la_SOURCES = swig_wrap.cpp
-
-#LIB_CLIENT_IDL = SALOMEDS.idl \
-# SALOMEDS_Attributes.idl \
-# SALOME_Exception.idl \
-# GEOM_Gen.idl \
-# SALOME_Component.idl \
-# SALOME_GenericObj.idl
EXPORT_SHAREDPYSCRIPTS=\
GEOM_shared_modules.py
-libGEOM_Swigcmodule_la_CPPFLAGS = \
- $(QT_INCLUDES) \
- $(PYTHON_INCLUDES) \
- $(CAS_CPPFLAGS) \
- $(VTK_INCLUDES) \
- $(OGL_INCLUDES) \
- $(KERNEL_CXXFLAGS) \
- $(GUI_CXXFLAGS) \
- $(CORBA_CXXFLAGS) \
- $(CORBA_INCLUDES) \
- -I$(srcdir)/../GEOMGUI \
- -I$(top_builddir)/idl \
- -I$(top_builddir)/salome_adm/unix
-
-libGEOM_Swigcmodule_la_LDFLAGS = \
- ../GEOMGUI/libGEOM.la
-
-
-libGEOM_Swigcmodule_la_LIBADD = \
- $(PYTHON_LIBS)
-
-swig_wrap.cpp : $(SWIG_SOURCES)
- $(SWIG) $(SWIG_FLAGS) -o $@ $<
-
-CLEANFILES = \
- swig_wrap.cpp
-
#
# ===============================================================
# Files to be installed
@@ -121,7 +44,6 @@ CLEANFILES = \
# Scripts to be installed.
dist_salomescript_DATA= \
- libGEOM_Swig.py \
geompy.py \
geompyDC.py \
batchmode_geompy.py \
@@ -157,9 +79,3 @@ dist_salomescript_DATA= \
sharedpkgpython_PYTHON = \
GEOM_shared_modules.py
-
-install-exec-hook:\
- $(libdir)/_libGEOM_Swig.so
-
-$(libdir)/_libGEOM_Swig.so:
- ( cd $(libdir); ln -sf libGEOM_Swigcmodule.so _libGEOM_Swig.so; )
diff --git a/src/GEOM_SWIG/batchmode_geompy.py b/src/GEOM_SWIG/batchmode_geompy.py
index 0f91c8c9d..42e9ec5c2 100644
--- a/src/GEOM_SWIG/batchmode_geompy.py
+++ b/src/GEOM_SWIG/batchmode_geompy.py
@@ -699,19 +699,23 @@ def MakeSection(s1, s2):
return MakeBoolean(s1, s2, 4)
def MakePartition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
- Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]):
+ Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[],
+ KeepNonlimitShapes=0):
anObj = BoolOp.MakePartition(ListShapes, ListTools,
ListKeepInside, ListRemoveInside,
- Limit, RemoveWebs, ListMaterials);
+ Limit, RemoveWebs, ListMaterials,
+ KeepNonlimitShapes);
if BoolOp.IsDone() == 0:
print "MakePartition : ", BoolOp.GetErrorCode()
return anObj
def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
- Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]):
+ Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[],
+ KeepNonlimitShapes=0):
anObj = MakePartition(ListShapes, ListTools,
ListKeepInside, ListRemoveInside,
- Limit, RemoveWebs, ListMaterials);
+ Limit, RemoveWebs, ListMaterials,
+ KeepNonlimitShapes);
return anObj
def MakeHalfPartition(theShape, thePlane):
diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py
index afff1b417..78bbae079 100644
--- a/src/GEOM_SWIG/geompyDC.py
+++ b/src/GEOM_SWIG/geompyDC.py
@@ -732,7 +732,9 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @param theSeqSubBases - list of corresponding subshapes of section shapes.
# @param theLocations - list of locations on the path corresponding
# specified list of the Bases shapes. Number of locations
- # should be equal to number of bases or list of locations can be empty.
+ # should be equal to number of bases. First and last
+ # locations must be coincided with first and last vertexes
+ # of path correspondingly.
# @param thePath - Path shape to extrude the base shape along it.
# @param theWithContact - the mode defining that the section is translated to be in
# contact with the spine.
@@ -1079,6 +1081,27 @@ class geompyDC(GEOM._objref_GEOM_Gen):
print "GetInPlace : ", self.ShapesOp.GetErrorCode()
return anObj
+ ## Get sub-shape(s) of \a theShapeWhere, which are
+ # coincident with \a theShapeWhat or could be a part of it.
+ #
+ # Implementation of this method is based on a saved history of an operation,
+ # produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
+ # arguments (an argument shape or a sub-shape of an argument shape).
+ # The operation could be the Partition or one of boolean operations,
+ # performed on simple shapes (not on compounds).
+ #
+ # @param theShapeWhere Shape to find sub-shapes of.
+ # @param theShapeWhat Shape, specifying what to find (must be in the
+ # building history of the ShapeWhere).
+ # @return Group of all found sub-shapes or a single found sub-shape.
+ #
+ # Example: see GEOM_TestOthers.py
+ def GetInPlaceByHistory(theShapeWhere, theShapeWhat):
+ anObj = ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
+ if ShapesOp.IsDone() == 0:
+ print "GetInPlace : ", ShapesOp.GetErrorCode()
+ return anObj
+
## Get sub-shape of theShapeWhere, which is
# equal to \a theShapeWhat.
# @param theShapeWhere Shape to find sub-shape of.
@@ -1365,11 +1388,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
## Replace coincident faces in theShape by one face.
# @param theShape Initial shape.
# @param theTolerance Maximum distance between faces, which can be considered as coincident.
+ # @param doKeepNonSolids If FALSE, only solids will present in the result,
+ # otherwise all initial shapes.
# @return New GEOM_Object, containing a copy of theShape without coincident faces.
#
# Example: see GEOM_Spanner.py
- def MakeGlueFaces(self,theShape, theTolerance):
- anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance)
+ def MakeGlueFaces(theShape, theTolerance, doKeepNonSolids=True):
+ anObj = ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
if self.ShapesOp.IsDone() == 0:
print "MakeGlueFaces : ", self.ShapesOp.GetErrorCode()
return anObj
@@ -1382,7 +1407,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @return ListOfGO.
#
# Example: see GEOM_Spanner.py
- def GetGlueFaces(self,theShape, theTolerance):
+ def GetGlueFaces(self, theShape, theTolerance):
anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
if self.ShapesOp.IsDone() == 0:
print "GetGlueFaces : ", self.ShapesOp.GetErrorCode()
@@ -1395,12 +1420,14 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @param theTolerance Maximum distance between faces,
# which can be considered as coincident.
# @param theFaces List of faces for gluing.
+ # @param doKeepNonSolids If FALSE, only solids will present in the result,
+ # otherwise all initial shapes.
# @return New GEOM_Object, containing a copy of theShape
# without some faces.
#
# Example: see GEOM_Spanner.py
- def MakeGlueFacesByList(self,theShape, theTolerance, theFaces):
- anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces)
+ def MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids=True):
+ anObj = ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids)
if self.ShapesOp.IsDone() == 0:
print "MakeGlueFacesByList : ", self.ShapesOp.GetErrorCode()
return anObj
@@ -1455,6 +1482,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# in order to avoid possible intersection between shapes from
# this compound.
# @param Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
+ # @param KeepNonlimitShapes: if this parameter == 0 - only shapes with
+ # type <= Limit are kept in the result,
+ # else - shapes with type > Limit are kept
+ # also (if they exist)
#
# After implementation new version of PartitionAlgo (October 2006)
# other parameters are ignored by current functionality. They are kept
@@ -1472,10 +1503,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
#
# Example: see GEOM_TestAll.py
def MakePartition(self,ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
- Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]):
+ Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[],
+ KeepNonlimitShapes=0):
anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
ListKeepInside, ListRemoveInside,
- Limit, RemoveWebs, ListMaterials);
+ Limit, RemoveWebs, ListMaterials,
+ KeepNonlimitShapes);
if self.BoolOp.IsDone() == 0:
print "MakePartition : ", self.BoolOp.GetErrorCode()
return anObj
@@ -1492,11 +1525,14 @@ class geompyDC(GEOM._objref_GEOM_Gen):
#
# @return New GEOM_Object, containing the result shapes.
#
- def MakePartitionNonSelfIntersectedShape(self,ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
- Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]):
+ def MakePartitionNonSelfIntersectedShape(ListShapes, ListTools=[],
+ ListKeepInside=[], ListRemoveInside=[],
+ Limit=ShapeType["SHAPE"], RemoveWebs=0,
+ ListMaterials=[], KeepNonlimitShapes=0):
anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
ListKeepInside, ListRemoveInside,
- Limit, RemoveWebs, ListMaterials);
+ Limit, RemoveWebs, ListMaterials,
+ KeepNonlimitShapes);
if self.BoolOp.IsDone() == 0:
print "MakePartitionNonSelfIntersectedShape : ", self.BoolOp.GetErrorCode()
return anObj
@@ -1505,10 +1541,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
#
# Example: see GEOM_TestOthers.py
def Partition(self,ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
- Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]):
+ Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[],
+ KeepNonlimitShapes=0):
anObj = self.MakePartition(ListShapes, ListTools,
ListKeepInside, ListRemoveInside,
- Limit, RemoveWebs, ListMaterials);
+ Limit, RemoveWebs, ListMaterials,
+ KeepNonlimitShapes);
return anObj
## Perform partition of the Shape with the Plane
diff --git a/src/GEOM_SWIG_WITHIHM/Makefile.am b/src/GEOM_SWIG_WITHIHM/Makefile.am
new file mode 100644
index 000000000..e71593115
--- /dev/null
+++ b/src/GEOM_SWIG_WITHIHM/Makefile.am
@@ -0,0 +1,127 @@
+# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
+#
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#
+#
+# File : Makefile.in
+# Author : Nicolas REJNERI, Paul RASCLE
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+# Module : GEOM
+# $Header$
+
+
+# Libraries targets
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# ===============================================================
+# Swig targets
+# ===============================================================
+# (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
+#
+# Step 1: build the wrapping source files with swig
+#
+# libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
+# libSALOME_Swig.py
+#
+# Step 2: build the dynamic library from cpp built source files and
+# dependant libraries.
+#
+# swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libSALOME_Swig.la
+# + |
+# dependant libs |
+#
+# The file libSALOME_Swigcmodule.py will be installed in
+# /lib/python/site-package/salome.
+# The library will be installed in the same place.
+#
+
+# this option puts it to dist
+#BUILT_SOURCES = swig_wrap.cpp
+
+SWIG_FLAGS = \
+ @SWIG_FLAGS@ \
+ -I$(srcdir) \
+ -I$(srcdir)/../GEOMGUI
+
+SWIG_SOURCES = libGEOM_Swig.i
+
+# Libraries targets
+lib_LTLIBRARIES = libGEOM_Swigcmodule.la
+
+nodist_pkgpython_DATA = libGEOM_Swig.py
+libGEOM_Swig.py: swig_wrap.cpp
+
+libGEOM_Swigcmodule_la_SOURCES = \
+ $(BUILT_SOURCES) \
+ $(SWIG_SOURCES)
+
+nodist_libGEOM_Swigcmodule_la_SOURCES = swig_wrap.cpp
+
+#LIB_CLIENT_IDL = SALOMEDS.idl \
+# SALOMEDS_Attributes.idl \
+# SALOME_Exception.idl \
+# GEOM_Gen.idl \
+# SALOME_Component.idl \
+# SALOME_GenericObj.idl
+
+libGEOM_Swigcmodule_la_CPPFLAGS = \
+ $(QT_INCLUDES) \
+ $(PYTHON_INCLUDES) \
+ $(CAS_CPPFLAGS) \
+ $(VTK_INCLUDES) \
+ $(OGL_INCLUDES) \
+ $(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS) \
+ $(CORBA_CXXFLAGS) \
+ $(CORBA_INCLUDES) \
+ -I$(srcdir)/../GEOMGUI \
+ -I$(top_builddir)/idl \
+ -I$(top_builddir)/salome_adm/unix
+
+libGEOM_Swigcmodule_la_LDFLAGS = \
+ ../GEOMGUI/libGEOM.la
+
+
+libGEOM_Swigcmodule_la_LIBADD = \
+ $(PYTHON_LIBS)
+
+swig_wrap.cpp : $(SWIG_SOURCES)
+ $(SWIG) $(SWIG_FLAGS) -o $@ $<
+
+CLEANFILES = \
+ swig_wrap.cpp
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+
+# Scripts to be installed.
+dist_salomescript_DATA= \
+ libGEOM_Swig.py
+
+install-exec-hook:\
+ $(libdir)/_libGEOM_Swig.so
+
+$(libdir)/_libGEOM_Swig.so:
+ ( cd $(libdir); ln -sf libGEOM_Swigcmodule.so _libGEOM_Swig.so; )
diff --git a/src/GEOM_SWIG/libGEOM_Swig.i b/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.i
similarity index 100%
rename from src/GEOM_SWIG/libGEOM_Swig.i
rename to src/GEOM_SWIG_WITHIHM/libGEOM_Swig.i
diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx
index 54e4ad76b..c1b1ffe5a 100644
--- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx
+++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx
@@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@@ -33,31 +33,29 @@
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include