From d34e7eebf2ebe0735e28b5dd5b48b5ee1ae91b44 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 27 Feb 2015 15:07:51 +0300 Subject: [PATCH] 0022857: EDF GEOM 7167: MakeHalfPartition documentation --- idl/GEOM_Gen.idl | 11 +++++++ src/GEOM_SWIG/geomBuilder.py | 29 +++++++++++++++++++ .../OperationGUI_PartitionDlg.cxx | 2 ++ 3 files changed, 42 insertions(+) diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 7eb91e9eb..4b54e4ddd 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -3208,6 +3208,17 @@ module GEOM * \param theShape Shape to be intersected. * \param thePlane Tool shape, to intersect theShape. * \return New GEOM_Object, containing the result shape. + * + * \note This operation is a shortcut to the more general \ref MakePartition + * operation, where \a theShape specifies single "object" (shape being partitioned) + * and \a thePlane specifies single "tool" (intersector shape). Other parameters of + * \ref MakePartition operation have default values: + * - \a theLimit: GEOM::SHAPE (shape limit corresponds to the type of \a theShape) + * - \a theKeepNonlimitShapes: 0 + * - \a theKeepInside, \a theRemoveInside, \a theRemoveWebs, + * \a theMaterials (obsolete parameters): empty + * + * \sa MakePartition, MakePartitionNonSelfIntersectedShape */ GEOM_Object MakeHalfPartition (in GEOM_Object theShape, in GEOM_Object thePlane); diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index d6786131a..9479be3b8 100755 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -7925,6 +7925,23 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): # # @return New GEOM.GEOM_Object, containing the result shape. # + # @note This operation is a shortcut to the more general @ref MakePartition + # operation, where @a theShape specifies single "object" (shape being partitioned) + # and @a thePlane specifies single "tool" (intersector shape). Other parameters of + # @ref MakePartition operation have default values: + # - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape) + # - @a KeepNonlimitShapes: 0 + # - @a KeepInside, @a RemoveInside, @a RemoveWebs, + # @a Materials (obsolete parameters): empty + # + # @note I.e. the following two operations are equivalent: + # @code + # Result = geompy.MakeHalfPartition(Object, Plane) + # Result = geompy.MakePartition([Object], [Plane]) + # @endcode + # + # @sa MakePartition, MakePartitionNonSelfIntersectedShape + # # @ref tui_partition "Example" @ManageTransactions("BoolOp") def MakeHalfPartition(self, theShape, thePlane, theName=None): @@ -7940,6 +7957,18 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): Returns: New GEOM.GEOM_Object, containing the result shape. + + Note: This operation is a shortcut to the more general MakePartition + operation, where theShape specifies single "object" (shape being partitioned) + and thePlane specifies single "tool" (intersector shape). Other parameters of + MakePartition operation have default values: + - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape) + - KeepNonlimitShapes: 0 + - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty + + I.e. the following two operations are equivalent: + Result = geompy.MakeHalfPartition(Object, Plane) + Result = geompy.MakePartition([Object], [Plane]) """ # Example: see GEOM_TestAll.py anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane) diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index 0aa67c826..1ffd9570d 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -67,6 +67,8 @@ OperationGUI_PartitionDlg::OperationGUI_PartitionDlg( GeometryGUI* theGeometryGU mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PARTITION" ) ); mainFrame()->RadioButton1->setIcon( image0 ); mainFrame()->RadioButton2->setIcon( image1 ); + mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton2->close(); mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); mainFrame()->RadioButton3->close(); -- 2.39.2