<li><em>geompy.SubShapeAllIDs(Shape, Type)</em> explodes a Shape on
subshapes of a given Type and returns a List of IDs of
sub-shapes.</li>
-<li><em>geompy.SubShapeAllSorted(Shape, Type)</em> xplodes a shape on
-subshapes of a given type and sorts them by coordinates of their
-gravity centers, returning a list of sub-shapes.</li>
-<li><em>geompy.SubShapeAllSortedIDs(Shape, Type)</em> explodes a shape
-on subshapes of a given type and sorts them by coordinates of their
-gravity centers, returning a List of IDs of sub-shapes.</li>
+<li><em>geompy.SubShapeAllSortedCentres(Shape, Type)</em> explodes a
+shape on subshapes of a given type and sorts them by coordinates of
+their gravity centers, returning a list of sub-shapes.</li>
+<li><em>geompy.SubShapeAllSortedCentresIDs(Shape, Type)</em> explodes
+a shape on subshapes of a given type and sorts them by coordinates of
+their gravity centers, returning a List of IDs of sub-shapes.</li>
<li><em>geompy.SubShape(Shape, Type, ListOfInd)</em> allows to obtain
a compound of sub-shapes of the Shape, selected by they indices in a
list of all sub-shapes of the given Type. Each index is in the range
[1, Nb_Sub-Shapes_Of_Given_Type].</li>
-<li><em>geompy.SubShapeSorted(Shape, Type, ListOfInd)</em> allows to
-obtain a compound of sub-shapes of the Shape, selected by they indices
-in sorted list of all sub-shapes of the given Type. Each index is in
-the range [1, Nb_Sub-Shapes_Of_Given_Type]</li>
+<li><em>geompy.SubShapeSortedCentres(Shape, Type, ListOfInd)</em>
+allows to obtain a compound of sub-shapes of the Shape, selected by
+they indices in sorted list of all sub-shapes of the given Type. Each
+index is in the range [1, Nb_Sub-Shapes_Of_Given_Type]</li>
</ul>
\n <b>Arguments: </b>1 SHAPE + 1 type of SubShape.
into water.</li>
<li>\subpage shapesonshape_page "Get shapes on shape" operation, a
special case of \b Explode operation. </li>
+<li>\subpage shared_shapes_page "Get shared shapes" operation, a
+special case of \b Explode operation. </li>
<li>Operations with \subpage blocks_operations_page "Blocks".</li>
prism = geompy.MakePrism(face, p0, pxyz)
# explode the prism into faces
-prism_faces = geompy.SubShapeAllSorted(prism, geompy.ShapeType["FACE"])
+prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
# create a shell from a set of faces
shell = geompy.MakeShell([prism_faces[0], prism_faces[2], prism_faces[3],
prism = geompy.MakePrism(face, p0, pz)
# explode the prism into faces
-prism_faces = geompy.SubShapeAllSorted(prism, geompy.ShapeType["FACE"])
+prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
# create a shell from a set of faces
shell = geompy.MakeShell([prism_faces[0], prism_faces[1],
faces.append(f4)
shell = geompy.MakeSewing(faces,1.e-6)
shells.append(shell)
-faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
subbases.append(faces[0])
# 2 section
faces.append(f4)
shell = geompy.MakeSewing(faces,1.e-6)
shells.append(shell)
-faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
subbases.append(faces[0])
# 3 section
faces.append(f4)
shell = geompy.MakeSewing(faces,1.e-6)
shells.append(shell)
-faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
subbases.append(faces[2])
# 4 section
ff = geompy.MakePlane(vp,vec,40)
fs.append(ff)
aPartition = geompy.MakePartition(shellsph,fs)
-fs = geompy.SubShapeAllSorted(aPartition, geompy.ShapeType["FACE"])
+fs = geompy.SubShapeAllSortedCentres(aPartition, geompy.ShapeType["FACE"])
faces.append(fs[0])
faces.append(fs[1])
faces.append(fs[3])
shell = geompy.MakeSewing(faces,1.e-6)
shells.append(shell)
-faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
#===========================================================
# 1 section
shell = MakeComplexSect(vs[0], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
shells.append(shell)
-vs1 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"])
+vs1 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
locs.append(vs1[17])
# 2 section
shell = MakeComplexSect(vs[1], geompy.MakeVectorDXDYDZ(1,0,0), 80, 30, 16)
shells.append(shell)
-vs2 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"])
+vs2 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
locs.append(vs2[17])
# 3 section
shell = MakeComplexSect(vs[2], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
shells.append(shell)
-vs3 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"])
+vs3 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
locs.append(vs3[17])
# 4 section
shell = MakeComplexSect(vs[3], geompy.MakeVectorDXDYDZ(0,1,0), 40, 35, 16)
shells.append(shell)
-vs4 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"])
+vs4 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
locs.append(vs4[17])
ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep")
# get a face
-faces = geompy.SubShapeAllSorted(ImportFromBREP, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(ImportFromBREP, geompy.ShapeType["FACE"])
# get the free boundary for face 32
Res = geompy.GetFreeBoundary(faces[32])
# get faces as sub-shapes
faces = []
-faces = geompy.SubShapeAllSorted(cut, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
f_2 = geompy.GetSubShapeID(cut, faces[0])
# remove one face from the shape
print "A number of free faces is ", len(result)
# add objects in the study
-all_faces = geompy.SubShapeAllSorted(cut_without_f_2, geompy.ShapeType["FACE"])
+all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])
for face in all_faces :
sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face)
if result.count(sub_shape_id) > 0 :
# The list of IDs (IDList) for suppress faces
sup_faces = []
-sup_faces = geompy.SubShapeAllSorted(box, geompy.ShapeType["FACE"])
+sup_faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
# get indices of the sub-shape
f1_id = geompy.GetSubShapeID(box, sup_faces[3])
# get faces as sub-shapes
faces = []
-faces = geompy.SubShapeAllSorted(cut, geompy.ShapeType["FACE"])
+faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
f_2 = geompy.GetSubShapeID(cut, faces[2])
# remove one face from the shape
# get wires as sub-shapes
wires = []
-wires = geompy.SubShapeAllSorted(cut_without_f_2, geompy.ShapeType["WIRE"])
+wires = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["WIRE"])
w_0 = geompy.GetSubShapeID(cut_without_f_2, wires[0])
# suppress the selected wire
# add objects in the study
id_edge = geompy.addToStudy(edge, "Edge")
-edge_points = geompy.SubShapeAllSorted(edge, geompy.ShapeType["VERTEX"])
+edge_points = geompy.SubShapeAllSortedCentres(edge, geompy.ShapeType["VERTEX"])
for point in edge_points:
geompy.addToStudyInFather(edge, point, "Edge's point")
id_divide = geompy.addToStudy(divide, "Divided edge")
-edge_points = geompy.SubShapeAllSorted(divide, geompy.ShapeType["VERTEX"])
+edge_points = geompy.SubShapeAllSortedCentres(divide, geompy.ShapeType["VERTEX"])
for point in edge_points:
geompy.addToStudyInFather(divide, point, "Edge's point after divide")
\until "freeFacesWithoutExtra"
\anchor swig_GetSharedShapes
-\until "sharedFace"
+\until "sharedEdge_"
\anchor swig_CheckAndImprove
\until "blocksComp"
# create box
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
# take box edges to create custom complex wire
-[Edge_1,Edge_2,Edge_3,Edge_4,Edge_5,Edge_6,Edge_7,Edge_8,Edge_9,Edge_10,Edge_11,Edge_12] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["EDGE"])
+[Edge_1,Edge_2,Edge_3,Edge_4,Edge_5,Edge_6,Edge_7,Edge_8,Edge_9,Edge_10,Edge_11,Edge_12] = geompy.SubShapeAllSortedCentres(Box_1, geompy.ShapeType["EDGE"])
# create wire
Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
# make fillet at given wire vertices with giver radius
prism = geompy.MakePrismVecH(face, vz, 100.0)
# get the list of IDs (IDList) for the fillet
-prism_edges = geompy.SubShapeAllSorted(prism, ShapeTypeEdge)
+prism_edges = geompy.SubShapeAllSortedCentres(prism, ShapeTypeEdge)
IDlist_e = []
IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
prism = geompy.MakePrismVecH(face, vz, 100.0)
# get the list of IDs (IDList) for the chamfer
-prism_faces = geompy.SubShapeAllSorted(prism, ShapeTypeFace)
+prism_faces = geompy.SubShapeAllSortedCentres(prism, ShapeTypeFace)
f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
IDlist_f = [f_ind_1, f_ind_2]
group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
# add objects to the group
-SubFaceList = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
for i in [0, 3, 5] :
FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
geompy.AddObject(group, FaceID)
group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
# add objects to the group
-SubFaceList = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
for i in [0, 3, 5] :
FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
geompy.AddObject(group, FaceID)
group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
# add objects to the group
-SubFaceList = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
for i in [0, 3, 5] :
FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
geompy.AddObject(group, FaceID)
salome.sg.updateObjBrowser(1)
\endcode
-*/
\ No newline at end of file
+*/
GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
in ListOfGO theFaces, in boolean doKeepNonSolids);
+ /*!
+ * Deprecated method. Use MakeAllSubShapes() instead.
+ */
+ ListOfGO MakeExplode (in GEOM_Object theShape,
+ in long theShapeType,
+ in boolean isSorted);
+
/*!
* Explode a shape on subshapes of a given type.
* \param theShape Shape to be exploded.
* sorted by coordinates of their gravity centers.
* \return List of sub-shapes of type theShapeType, contained in theShape.
*/
- ListOfGO MakeExplode (in GEOM_Object theShape,
- in long theShapeType,
- in boolean isSorted);
+ ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
+ in long theShapeType,
+ in boolean isSorted);
+
+ /*!
+ * Deprecated method. Use GetAllSubShapesIDs() instead.
+ */
+ ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in boolean isSorted);
/*!
* Explode a shape on subshapes of a given type.
- * Does the same, as the above method, but returns IDs of sub-shapes,
- * not GEOM_Objects. It works faster.
+ * Does the same, as MakeAllSubShapes, but returns IDs of
+ * sub-shapes, not GEOM_Objects. It works faster.
* \param theShape Shape to be exploded.
* \param theShapeType Type of sub-shapes to be retrieved.
* \param isSorted If this parameter is TRUE, sub-shapes will be
* sorted by coordinates of their gravity centers.
* \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
*/
- ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
- in long theShapeType,
- in boolean isSorted);
+ ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in boolean isSorted);
/*!
* Get a sub shape defined by its unique ID inside \a theMainShape
in GEOM_Object theShape2,
in long theShapeType);
+ /*!
+ * Get all sub-shapes, shared by all shapes in the list \a theShapes.
+ * \param theShapes Shapes to find common sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \return List of objects, that are sub-shapes of all given shapes.
+ */
+ ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
+ in long theShapeType);
+
/*!
* Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
* the specified plane by the certain way, defined through \a theState parameter.
sewing.png \
shading.png \
shapesonshape.png \
+shared_shapes.png \
sketch.png \
sphere.png \
spheredxyz.png \
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// GEOM GEOMGUI : GUI for Geometry component
// File : EntityGUI_SubShapeDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-//
+
#include "EntityGUI_SubShapeDlg.h"
#include <DlgRef.h>
bool EntityGUI_SubShapeDlg::execute (ObjectList& objects)
{
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation());
- GEOM::ListOfGO_var aList = anOper->MakeExplode(myObject, shapeType(), true);
+ GEOM::ListOfGO_var aList = anOper->MakeAllSubShapes(myObject, shapeType(), true);
if (!aList->length())
return false;
<translation>planeWorking.png</translation>
</message>
<message>
- <source>ICO_GET_SHAPES_ON_SHAPES</source>
+ <source>ICO_GET_SHAPES_ON_SHAPE</source>
<translation>shapesonshape.png</translation>
</message>
+ <message>
+ <source>ICO_GET_SHARED_SHAPES</source>
+ <translation>shared_shapes.png</translation>
+ </message>
<message>
<source>ICON_DLG_POINT_FACE</source>
<translation>pointonface.png</translation>
<source>ICON_DLG_SHAPES_ON_SHAPE</source>
<translation>shapesonshape.png</translation>
</message>
+ <message>
+ <source>ICON_DLG_SHARED_SHAPES</source>
+ <translation>shared_shapes.png</translation>
+ </message>
<message>
<source>ICON_DLG_SCALE_ALONG_AXES</source>
<translation>scale_along_axes.png</translation>
</message>
<message>
<source>GEOM_SUBSHAPE_TYPE</source>
- <translation>Sub Shapes Type :</translation>
+ <translation>Sub Shapes Type</translation>
</message>
<message>
<source>GEOM_SUB_SHAPE</source>
<translation>INOUT</translation>
</message>
<message>
- <source>TOP_GET_SHAPES_ON_SHAPES</source>
+ <source>TOP_GET_SHAPES_ON_SHAPE</source>
<translation>Get shapes on shape</translation>
</message>
<message>
- <source>MEN_GET_SHAPES_ON_SHAPES</source>
+ <source>MEN_GET_SHAPES_ON_SHAPE</source>
<translation>Get Shapes on Shape</translation>
</message>
<message>
- <source>STB_GET_SHAPES_ON_SHAPES</source>
+ <source>STB_GET_SHAPES_ON_SHAPE</source>
<translation>Get shapes on shape</translation>
</message>
+ <message>
+ <source>TOP_GET_SHARED_SHAPES</source>
+ <translation>Get shared shapes</translation>
+ </message>
+ <message>
+ <source>MEN_GET_SHARED_SHAPES</source>
+ <translation>Get Shared Shapes</translation>
+ </message>
+ <message>
+ <source>STB_GET_SHARED_SHAPES</source>
+ <translation>Get shared shapes</translation>
+ </message>
<message>
<source>GEOM_PUBLISH_RESULT_GRP</source>
<translation>Advanced options</translation>
<translation>Load Texture</translation>
</message>
</context>
+ <context>
+ <name>OperationGUI_GetSharedShapesDlg</name>
+ <message>
+ <source>GEOM_SHARED_SHAPES_TITLE</source>
+ <translation>Get Shared Shapes</translation>
+ </message>
+ <message>
+ <source>GEOM_GET_SHARED_SHAPES</source>
+ <translation>Shared shapes</translation>
+ </message>
+ <message>
+ <source>GEOM_SHARED_SHAPES_INPUT</source>
+ <translation>Input data</translation>
+ </message>
+ <message>
+ <source>MSG_SHARED_SHAPES_TOO_FEW_SHAPES</source>
+ <translation>To few shapes selected.</translation>
+ </message>
+ <message>
+ <source>GEOM_SHARED_SHAPE</source>
+ <translation>Shared_%1</translation>
+ </message>
+ </context>
<context>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// GEOM GEOMGUI : GUI for Geometry component
// File : GeometryGUI.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
+
#include <Standard_math.hxx> // E.A. must be included before Python.h to fix compilation on windows
#include "Python.h"
#include "GeometryGUI.h"
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
QList<int> NotViewerDependentCommands;
NotViewerDependentCommands << GEOMOp::OpRename
- << GEOMOp::OpDelete
- << GEOMOp::OpShow
- << GEOMOp::OpShowOnly
- << GEOMOp::OpShowChildren
- << GEOMOp::OpHideChildren
- << GEOMOp::OpPointMarker;
+ << GEOMOp::OpDelete
+ << GEOMOp::OpShow
+ << GEOMOp::OpShowOnly
+ << GEOMOp::OpShowChildren
+ << GEOMOp::OpHideChildren
+ << GEOMOp::OpPointMarker;
if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommands.contains( id ) )
return;
case GEOMOp::OpShapesOnShape: // MENU OPERATION - GET SHAPES ON SHAPE
case GEOMOp::OpFillet2d: // MENU OPERATION - FILLET 2D
case GEOMOp::OpFillet1d: // MENU OPERATION - FILLET 1D
+ case GEOMOp::OpSharedShapes: // MENU OPERATION - GET SHARED SHAPES
libName = "OperationGUI";
break;
case GEOMOp::OpSewing: // MENU REPAIR - SEWING
QPixmap icon = icolabel.isEmpty() ? resMgr->loadPixmap( "GEOM", tr( (QString( "ICO_" )+label).toLatin1().constData() ), false )
: resMgr->loadPixmap( "GEOM", tr( icolabel.toLatin1().constData() ) );
createAction( id,
- tr( QString( "TOP_%1" ).arg( label ).toLatin1().constData() ),
- icon,
- tr( QString( "MEN_%1" ).arg( label ).toLatin1().constData() ),
- tr( QString( "STB_%1" ).arg( label ).toLatin1().constData() ),
- accel,
- application()->desktop(),
- toggle,
- this, SLOT( OnGUIEvent() ) );
+ tr( QString( "TOP_%1" ).arg( label ).toLatin1().constData() ),
+ icon,
+ tr( QString( "MEN_%1" ).arg( label ).toLatin1().constData() ),
+ tr( QString( "STB_%1" ).arg( label ).toLatin1().constData() ),
+ accel,
+ application()->desktop(),
+ toggle,
+ this, SLOT( OnGUIEvent() ) );
}
createGeomAction( GEOMOp::OpFillet3d, "FILLET" );
createGeomAction( GEOMOp::OpChamfer, "CHAMFER" );
//createGeomAction( GEOMOp::OpClipping, "CLIPPING" );
- createGeomAction( GEOMOp::OpShapesOnShape, "GET_SHAPES_ON_SHAPES" );
+ createGeomAction( GEOMOp::OpShapesOnShape, "GET_SHAPES_ON_SHAPE" );
+ createGeomAction( GEOMOp::OpSharedShapes, "GET_SHARED_SHAPES" );
createGeomAction( GEOMOp::OpFillet1d, "FILLET_1D" );
createGeomAction( GEOMOp::OpFillet2d, "FILLET_2D" );
createGeomAction( GEOMOp::OpShowChildren, "POP_SHOW_CHILDREN" );
createGeomAction( GEOMOp::OpHideChildren, "POP_HIDE_CHILDREN" );
createGeomAction( GEOMOp::OpPointMarker, "POP_POINT_MARKER" );
-
+
createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
// createGeomAction( GEOMOp::OpPipeTShapeGroups, "PIPETSHAPEGROUPS" );
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
createMenu( GEOMOp::OpPartition, operId, -1 );
createMenu( GEOMOp::OpArchimede, operId, -1 );
createMenu( GEOMOp::OpShapesOnShape, operId, -1 );
+ createMenu( GEOMOp::OpSharedShapes, operId, -1 );
createMenu( separator(), operId, -1 );
createTool( GEOMOp::OpPartition, operTbId );
createTool( GEOMOp::OpArchimede, operTbId );
createTool( GEOMOp::OpShapesOnShape, operTbId );
+ createTool( GEOMOp::OpSharedShapes, operTbId );
createTool( separator(), operTbId );
createTool( GEOMOp::OpFillet1d, operTbId );
createTool( GEOMOp::OpFillet2d, operTbId );
SALOME_ListIO selected;
sm->selectedObjects( selected );
sm->clearSelected();
-
+
// disable OCC selectors
getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() );
QListIterator<GEOMGUI_OCCSelector*> itOCCSel( myOCCSelectors );
setPreferenceProperty( genGroup, "columns", 2 );
int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), genGroup,
- LightApp_Preferences::Selector,
+ LightApp_Preferences::Selector,
"Geometry", "display_mode" );
addPreference( tr( "PREF_SHADING_COLOR" ), genGroup,
int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
-
+
// Quantities with individual precision settings
int precGroup = addPreference( tr( "GEOM_PREF_GROUP_PRECISION" ), tabId );
setPreferenceProperty( precGroup, "columns", 2 );
-
+
const int nbQuantities = 8;
int prec[nbQuantities], ii = 0;
prec[ii++] = addPreference( tr( "GEOM_PREF_length_precision" ), precGroup,
- LightApp_Preferences::IntSpin, "Geometry", "length_precision" );
+ LightApp_Preferences::IntSpin, "Geometry", "length_precision" );
prec[ii++] = addPreference( tr( "GEOM_PREF_angle_precision" ), precGroup,
LightApp_Preferences::IntSpin, "Geometry", "angle_precision" );
prec[ii++] = addPreference( tr( "GEOM_PREF_len_tol_precision" ), precGroup,
LightApp_Preferences::IntSpin, "Geometry", "len_tol_precision" );
prec[ii++] = addPreference( tr( "GEOM_PREF_ang_tol_precision" ), precGroup,
- LightApp_Preferences::IntSpin, "Geometry", "ang_tol_precision" );
+ LightApp_Preferences::IntSpin, "Geometry", "ang_tol_precision" );
prec[ii++] = addPreference( tr( "GEOM_PREF_weight_precision" ), precGroup,
- LightApp_Preferences::IntSpin, "Geometry", "weight_precision" );
+ LightApp_Preferences::IntSpin, "Geometry", "weight_precision" );
prec[ii++] = addPreference( tr( "GEOM_PREF_density_precision" ), precGroup,
- LightApp_Preferences::IntSpin, "Geometry", "density_precision" );
+ LightApp_Preferences::IntSpin, "Geometry", "density_precision" );
prec[ii++] = addPreference( tr( "GEOM_PREF_parametric_precision" ), precGroup,
LightApp_Preferences::IntSpin, "Geometry", "parametric_precision" );
prec[ii ] = addPreference( tr( "GEOM_PREF_param_tol_precision" ), precGroup,
- LightApp_Preferences::IntSpin, "Geometry", "param_tol_precision" );
-
+ LightApp_Preferences::IntSpin, "Geometry", "param_tol_precision" );
+
// Set property for precision value for spinboxes
for ( ii = 0; ii < nbQuantities; ii++ ){
setPreferenceProperty( prec[ii], "min", -14 );
setPreferenceProperty( prec[ii], "max", 14 );
setPreferenceProperty( prec[ii], "precision", 2 );
- }
+ }
int VertexGroup = addPreference( tr( "PREF_GROUP_VERTEX" ), tabId );
setPreferenceProperty( VertexGroup, "columns", 2 );
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File : GeometryGUI_Operations.h
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
+
#ifndef GEOMETRYGUI_OPERATIONS_H
#define GEOMETRYGUI_OPERATIONS_H
OpFillet2d = 3705, // MENU OPERATION - FILLET 2D
OpFillet1d = 3706, // MENU OPERATION - FILLET 1D
OpClipping = 3707, // MENU OPERATION - CLIPPING RANGE
+ OpSharedShapes = 3708, // MENU OPERATION - GET SHARED SHAPES
// RepairGUI -----------------//--------------------------------
OpSewing = 4000, // MENU REPAIR - SEWING
OpSuppressFaces = 4001, // MENU REPAIR - SUPPRESS FACES
//
// 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 <Standard_Stream.hxx>
#include "GEOMImpl_IShapesOperations.hxx"
Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
(Handle(GEOM_Object) theShape,
const Standard_Integer theShapeType,
- const Standard_Boolean isSorted)
+ const Standard_Boolean isSorted,
+ const Standard_Boolean isOldSorting)
{
SetErrorCode(KO);
}
if (isSorted)
- SortShapes(listShape);
+ SortShapes(listShape, isOldSorting);
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(aShape, anIndices);
GEOM::TPythonDump pd (aMainShape, /*append=*/true);
pd << "[" << anAsciiList.ToCString();
- pd << "] = geompy.SubShapeAll" << (isSorted ? "Sorted(" : "(");
+ if (isSorted)
+ pd << "] = geompy.SubShapeAllSorted" << (isOldSorting ? "(" : "Centres(");
+ else
+ pd << "] = geompy.SubShapeAll(";
pd << theShape << ", " << TopAbs_ShapeEnum(theShapeType) << ")";
SetErrorCode(OK);
Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs
(Handle(GEOM_Object) theShape,
const Standard_Integer theShapeType,
- const Standard_Boolean isSorted)
+ const Standard_Boolean isSorted,
+ const Standard_Boolean isOldSorting)
{
SetErrorCode(KO);
}
if (isSorted)
- SortShapes(listShape);
+ SortShapes(listShape, isOldSorting);
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(aShape, anIndices);
//Make a Python command
GEOM::TPythonDump pd (aFunction, /*append=*/true);
pd << "listSubShapeIDs = geompy.SubShapeAll";
- pd << (isSorted ? "SortedIDs(" : "IDs(");
+ if (isSorted)
+ pd << "Sorted" << (isOldSorting ? "IDs(" : "CentresIDs(");
+ else
+ pd << "IDs(";
pd << theShape << ", " << TopAbs_ShapeEnum(theShapeType) << ")";
SetErrorCode(OK);
return aSeq;
}
+//=======================================================================
+//function : GetSharedShapes
+//purpose :
+//=======================================================================
+Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes
+ (std::list<Handle(GEOM_Object)> theShapes,
+ const Standard_Integer theShapeType)
+{
+ SetErrorCode(KO);
+
+ int aLen = theShapes.size();
+ if (aLen < 1) return NULL;
+
+ int ind = 1;
+ std::list<Handle(GEOM_Object)>::iterator it = theShapes.begin();
+
+ Handle(GEOM_Object) aMainObj = (*it++);
+ Handle(GEOM_Function) aMainShape = aMainObj->GetLastFunction();
+ if (aMainShape.IsNull()) {
+ SetErrorCode("NULL shape for GetSharedShapes");
+ return NULL;
+ }
+
+ TopoDS_Shape aShape1 = aMainShape->GetValue();
+ if (aShape1.IsNull()) return NULL;
+
+ TopTools_IndexedMapOfShape anIndices;
+ TopExp::MapShapes(aShape1, anIndices);
+
+ TopTools_IndexedMapOfShape mapSelected;
+ TopExp::MapShapes(aShape1, TopAbs_ShapeEnum(theShapeType), mapSelected);
+
+ // Find shared shapes
+ BRep_Builder B;
+ TopoDS_Compound aCurrSelection;
+
+ for (; it != theShapes.end(); it++, ind++) {
+ Handle(GEOM_Function) aRefShape = (*it)->GetLastFunction();
+ if (aRefShape.IsNull()) {
+ SetErrorCode("NULL shape for GetSharedShapes");
+ return NULL;
+ }
+
+ TopoDS_Compound aCompound;
+ B.MakeCompound(aCompound);
+
+ TopoDS_Shape aShape2 = aRefShape->GetValue();
+ if (aShape2.IsNull()) return NULL;
+
+ TopTools_MapOfShape mapShape2;
+ TopExp_Explorer exp (aShape2, TopAbs_ShapeEnum(theShapeType));
+ for (; exp.More(); exp.Next()) {
+ TopoDS_Shape aSS = exp.Current();
+ if (mapShape2.Add(aSS) && mapSelected.Contains(aSS)) {
+ B.Add(aCompound, aSS);
+ }
+ }
+
+ mapSelected.Clear();
+ TopExp::MapShapes(aCompound, TopAbs_ShapeEnum(theShapeType), mapSelected);
+ aCurrSelection = aCompound;
+ }
+
+ // Create GEOM_Object for each found shared shape (collected in aCurrSelection)
+ Handle(GEOM_Object) anObj;
+ Handle(TColStd_HArray1OfInteger) anArray;
+ Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+ TCollection_AsciiString anAsciiList, anEntry;
+
+ TopoDS_Iterator itSel (aCurrSelection, Standard_True, Standard_True);
+ for (; itSel.More(); itSel.Next()) {
+ anArray = new TColStd_HArray1OfInteger(1,1);
+ anArray->SetValue(1, anIndices.FindIndex(itSel.Value()));
+ anObj = GetEngine()->AddSubShape(aMainObj, anArray);
+ aSeq->Append(anObj);
+
+ // for python command
+ TDF_Tool::Entry(anObj->GetEntry(), anEntry);
+ anAsciiList += anEntry;
+ anAsciiList += ",";
+ }
+
+ if (aSeq->IsEmpty()) {
+ SetErrorCode("The given shapes have no shared sub-shapes of the requested type");
+ return aSeq;
+ }
+
+ // Make a Python command
+ anAsciiList.Trunc(anAsciiList.Length() - 1);
+
+ GEOM::TPythonDump pd (aMainShape, /*append=*/true);
+ pd << "[" << anAsciiList.ToCString()
+ << "] = geompy.GetSharedShapesMulti([";
+
+ it = theShapes.begin();
+ pd << (*it++);
+ while (it != theShapes.end()) {
+ pd << ", " << (*it++);
+ }
+
+ pd << "], " << TopAbs_ShapeEnum(theShapeType) << ")";
+
+ SetErrorCode(OK);
+ return aSeq;
+}
+
//=============================================================================
/*!
*
aSeq = getShapesOnSurfaceIDs( aCylinder, aShape, aShapeType, theState );
// The GetShapesOnCylinder() doesn't change object so no new function is required.
- Handle(GEOM_Function) aFunction =
+ Handle(GEOM_Function) aFunction =
GEOM::GetCreatedLast(theShape, GEOM::GetCreatedLast(thePnt,theAxis))->GetLastFunction();
// Make a Python command
//function : SortShapes
//purpose :
//=======================================================================
-void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL)
+void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL,
+ const Standard_Boolean isOldSorting)
{
Standard_Integer MaxShapes = SL.Extent();
TopTools_Array1OfShape aShapes (1,MaxShapes);
SL.Remove( it ); // == it.Next()
aShapes(Index) = S;
OrderInd.SetValue (Index, Index);
- if (S.ShapeType() == TopAbs_VERTEX)
- {
+ if (S.ShapeType() == TopAbs_VERTEX) {
GPoint = BRep_Tool::Pnt( TopoDS::Vertex( S ));
Length.SetValue( Index, (Standard_Real) S.Orientation());
}
- else
- {
- BRepGProp::LinearProperties (S, GPr);
+ else {
+ // BEGIN: fix for Mantis issue 0020842
+ if (isOldSorting) {
+ BRepGProp::LinearProperties (S, GPr);
+ }
+ else {
+ if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
+ BRepGProp::LinearProperties (S, GPr);
+ }
+ else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
+ BRepGProp::SurfaceProperties(S, GPr);
+ }
+ else {
+ BRepGProp::VolumeProperties(S, GPr);
+ }
+ }
+ // END: fix for Mantis issue 0020842
GPoint = GPr.CentreOfMass();
- Length.SetValue( Index, GPr.Mass() );
+ Length.SetValue(Index, GPr.Mass());
}
MidXYZ.SetValue(Index,
GPoint.X()*999 + GPoint.Y()*99 + GPoint.Z()*0.9);
// 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 : GEOMImpl_IShapesOperations.hxx
-// Created :
+// Created :
// Author : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
// Project : SALOME
// $Header$
//=============================================================================
-//
+
#ifndef _GEOMImpl_IShapesOperations_HXX_
#define _GEOMImpl_IShapesOperations_HXX_
Standard_EXPORT ~GEOMImpl_IShapesOperations();
Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
- Handle(GEOM_Object) thePoint2);
+ Handle(GEOM_Object) thePoint2);
Standard_EXPORT Handle(GEOM_Object) MakeWire (std::list<Handle(GEOM_Object)> theEdgesAndWires,
const Standard_Real theTolerance);
Standard_EXPORT Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, const bool isPlanarWanted);
Standard_EXPORT Handle(GEOM_Object) MakeFaceWires (std::list<Handle(GEOM_Object)> theWires,
- const bool isPlanarWanted);
+ const bool isPlanarWanted);
Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
std::list<Handle(GEOM_Object)> theFaces,
const Standard_Boolean doKeepNonSolids);
- Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode (Handle(GEOM_Object) theShape,
- const Standard_Integer theShapeType,
- const Standard_Boolean isSorted);
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode
+ (Handle(GEOM_Object) theShape,
+ const Standard_Integer theShapeType,
+ const Standard_Boolean isSorted,
+ const Standard_Boolean isOldSorting = Standard_False);
- Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs (Handle(GEOM_Object) theShape,
- 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_Boolean isOldSorting = Standard_False);
Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object) theMainShape,
const Standard_Integer theID);
Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
- Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetSharedShapes (Handle(GEOM_Object) theShape1,
- Handle(GEOM_Object) theShape2,
- const Standard_Integer theShapeType);
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetSharedShapes (Handle(GEOM_Object) theShape1,
+ Handle(GEOM_Object) theShape2,
+ const Standard_Integer theShapeType);
+
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetSharedShapes (std::list<Handle(GEOM_Object)> theShapes,
+ const Standard_Integer theShapeType);
- Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
- const Standard_Integer theShapeType,
- const Handle(GEOM_Object)& theAx1,
- const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAx1,
+ const GEOMAlgo_State theState);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
const GEOMAlgo_State theState);
Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape,
- const Standard_Integer theShapeType,
- Handle(GEOM_Object) theAxis,
- const Standard_Real theRadius);
+ const Standard_Integer theShapeType,
+ Handle(GEOM_Object) theAxis,
+ const Standard_Real theRadius);
Standard_EXPORT Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object) theShape,
- const Standard_Integer theShapeType,
- Handle(GEOM_Object) theCenter,
- const Standard_Real theRadius);
+ const Standard_Integer theShapeType,
+ Handle(GEOM_Object) theCenter,
+ const Standard_Real theRadius);
void GetShapeProperties(const TopoDS_Shape aShape, Standard_Real propertiesArray[], gp_Pnt & aPnt);
* \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);
+ Standard_EXPORT static void SortShapes (TopTools_ListOfShape& SL,
+ const Standard_Boolean isOldSorting = Standard_True);
/*!
* \brief Convert TopoDS_COMPSOLID to TopoDS_COMPOUND.
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
return GetObject(anObject);
}
-
//=============================================================================
/*!
* MakeExplode
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfTransient) aHSeq =
- GetOperations()->MakeExplode(aShape, theShapeType, isSorted);
+ GetOperations()->MakeExplode(aShape, theShapeType, isSorted, Standard_True);
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+ return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ * MakeAllSubShapes
+ */
+//=============================================================================
+GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
+ const CORBA::Long theShapeType,
+ const CORBA::Boolean isSorted)
+{
+ GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+ Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ if (aShape.IsNull()) return aSeq._retn();
+
+ Handle(TColStd_HSequenceOfTransient) aHSeq =
+ GetOperations()->MakeExplode(aShape, theShapeType, isSorted, Standard_False);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
if (aShape.IsNull()) return aSeq._retn();
Handle(TColStd_HSequenceOfInteger) aHSeq =
- GetOperations()->SubShapeAllIDs(aShape, theShapeType, isSorted);
+ GetOperations()->SubShapeAllIDs(aShape, theShapeType, isSorted, Standard_True);
+ if (!GetOperations()->IsDone() || aHSeq.IsNull()) return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = aHSeq->Value(i);
+
+ return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ * GetAllSubShapesIDs
+ */
+//=============================================================================
+GEOM::ListOfLong* GEOM_IShapesOperations_i::GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
+ const CORBA::Long theShapeType,
+ const CORBA::Boolean isSorted)
+{
+ GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
+
+ Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+ if (aShape.IsNull()) return aSeq._retn();
+
+ Handle(TColStd_HSequenceOfInteger) aHSeq =
+ GetOperations()->SubShapeAllIDs(aShape, theShapeType, isSorted, Standard_False);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
return aSeq._retn();
}
+//=============================================================================
+/*!
+ * GetSharedShapesMulti
+ */
+//=============================================================================
+GEOM::ListOfGO* GEOM_IShapesOperations_i::GetSharedShapesMulti
+ (const GEOM::ListOfGO& theShapes,
+ const CORBA::Long theShapeType)
+{
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+ //Get the shapes
+ std::list<Handle(GEOM_Object)> aShapes;
+ int aLen = theShapes.length();
+ for (int ind = 0; ind < aLen; ind++) {
+ Handle(GEOM_Object) aSh = GetObjectImpl(theShapes[ind]);
+ if (aSh.IsNull()) return aSeq._retn();
+ aShapes.push_back(aSh);
+ }
+
+ Handle(TColStd_HSequenceOfTransient) aHSeq =
+ GetOperations()->GetSharedShapes(aShapes, theShapeType);
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+ return aSeq._retn();
+}
+
static GEOMAlgo_State ShapeState (const GEOM::shape_state theState)
{
GEOMAlgo_State aState = GEOMAlgo_ST_UNKNOWN;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOM_IShapesOperations_i_HeaderFile
#define _GEOM_IShapesOperations_i_HeaderFile
{
public:
GEOM_IShapesOperations_i (PortableServer::POA_ptr thePOA,
- GEOM::GEOM_Gen_ptr theEngine,
- ::GEOMImpl_IShapesOperations* theImpl);
+ GEOM::GEOM_Gen_ptr theEngine,
+ ::GEOMImpl_IShapesOperations* theImpl);
~GEOM_IShapesOperations_i();
GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
- GEOM::GEOM_Object_ptr thePnt2);
+ GEOM::GEOM_Object_ptr thePnt2);
GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
const CORBA::Double theTolerance);
GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
- CORBA::Boolean isPlanarWanted);
+ CORBA::Boolean isPlanarWanted);
GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
- CORBA::Boolean isPlanarWanted);
+ CORBA::Boolean isPlanarWanted);
GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
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,
CORBA::Boolean doKeepNonSolids);
GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
- CORBA::Double theTolerance);
+ CORBA::Double theTolerance);
GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
- CORBA::Double theTolerance,
- const GEOM::ListOfGO& theFaces,
- CORBA::Boolean doKeepNonSolids);
+ CORBA::Double theTolerance,
+ const GEOM::ListOfGO& theFaces,
+ CORBA::Boolean doKeepNonSolids);
+ // For old SubShapeAll()
+ // Deprecated, use MakeAllSubShapes() instead
GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- CORBA::Boolean isSorted);
+ CORBA::Long theShapeType,
+ CORBA::Boolean isSorted);
+
+ GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ CORBA::Boolean isSorted);
+ // Deprecated, use GetAllSubShapesIDs() instead
GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- CORBA::Boolean isSorted);
+ CORBA::Long theShapeType,
+ CORBA::Boolean isSorted);
+
+ GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ CORBA::Boolean isSorted);
GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
- CORBA::Long theID);
+ CORBA::Long theID);
CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
- GEOM::GEOM_Object_ptr theSubShape);
+ GEOM::GEOM_Object_ptr theSubShape);
CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
- GEOM::GEOM_Object_ptr theSubShape);
+ GEOM::GEOM_Object_ptr theSubShape);
char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
- GEOM::GEOM_Object_ptr theShape2,
- CORBA::Long theShapeType);
+ GEOM::GEOM_Object_ptr theShape2,
+ CORBA::Long theShapeType);
+
+ GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
+ CORBA::Long theShapeType);
GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theAx1,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theAx1,
- GEOM::GEOM_Object_ptr thePnt,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::GEOM_Object_ptr thePnt,
+ GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theAxis,
- CORBA::Double theRadius,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAxis,
+ CORBA::Double theRadius,
+ GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theCenter,
- CORBA::Double theRadius,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theCenter,
+ CORBA::Double theRadius,
+ GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theAx1,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theAx1,
- GEOM::GEOM_Object_ptr thePnt,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::GEOM_Object_ptr thePnt,
+ GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theAxis,
- CORBA::Double theRadius,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAxis,
+ CORBA::Double theRadius,
+ GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::GEOM_Object_ptr theCenter,
- CORBA::Double theRadius,
- GEOM::shape_state theState);
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theCenter,
+ CORBA::Double theRadius,
+ GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
- GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::shape_state theState);
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
- GEOM::GEOM_Object_ptr theShape,
- CORBA::Long theShapeType,
- GEOM::shape_state theState);
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::shape_state theState);
GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
- GEOM::GEOM_Object_ptr theShape,
- CORBA::Short theShapeType,
- GEOM::shape_state theState);
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Short theShapeType,
+ GEOM::shape_state theState);
GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
(GEOM::GEOM_Object_ptr theSheckShape,
- GEOM::GEOM_Object_ptr theShape,
- CORBA::Short theShapeType,
- GEOM::shape_state theState);
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Short theShapeType,
+ GEOM::shape_state theState);
GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
- GEOM::GEOM_Object_ptr theShape,
- CORBA::Short theShapeType,
- GEOM::shape_state theState);
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Short theShapeType,
+ GEOM::shape_state theState);
GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
- GEOM::GEOM_Object_ptr theShapeWhat);
+ GEOM::GEOM_Object_ptr theShapeWhat);
GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
- GEOM::GEOM_Object_ptr theShapeWhat);
+ GEOM::GEOM_Object_ptr theShapeWhat);
GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
- GEOM::GEOM_Object_ptr theShapeWhat);
+ GEOM::GEOM_Object_ptr theShapeWhat);
::GEOMImpl_IShapesOperations* GetOperations()
{ return (::GEOMImpl_IShapesOperations*)GetImpl(); }
else:
print "Prism 1 is not a hexahedral solid"
- Prism1_faces = geompy.SubShapeAllSorted(Prism1, geompy.ShapeType["FACE"])
+ Prism1_faces = geompy.SubShapeAllSortedCentres(Prism1, geompy.ShapeType["FACE"])
ii = 1
for aFace in Prism1_faces:
name = geompy.SubShapeName(aFace, Prism1)
# ---- add long edges of the top face in study
- FaceTop_edges = geompy.SubShapeAllSorted(FaceTop, geompy.ShapeType["EDGE"])
+ FaceTop_edges = geompy.SubShapeAllSortedCentres(FaceTop, geompy.ShapeType["EDGE"])
Edge1 = FaceTop_edges[0]
Edge2 = FaceTop_edges[3]
Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1")
Shell = geompy.MakeShell([Face, Face1]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr
Prism1 = geompy.MakePrism(Face2, p0, pxyz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
- prism1_faces = geompy.SubShapeAllSorted(Prism1, ShapeTypeFace)
+ prism1_faces = geompy.SubShapeAllSortedCentres(Prism1, ShapeTypeFace)
Shell1 = geompy.MakeShell([prism1_faces[0], prism1_faces[1],
prism1_faces[3], prism1_faces[4],
prism1_faces[5], prism1_faces[2]])
Orientation = geompy.ChangeOrientation(Box)
#IDList for Fillet/Chamfer
- prism_edges = geompy.SubShapeAllSorted(Prism, ShapeTypeEdge)
+ prism_edges = geompy.SubShapeAllSortedCentres(Prism, ShapeTypeEdge)
for anEdge in prism_edges:
eid = geompy.GetSubShapeID(Prism, anEdge)
IDlist_e.append(geompy.GetSubShapeID(Prism, prism_edges[1]))
IDlist_e.append(geompy.GetSubShapeID(Prism, prism_edges[2]))
- prism_faces = geompy.SubShapeAllSorted(Prism, ShapeTypeFace)
+ prism_faces = geompy.SubShapeAllSortedCentres(Prism, ShapeTypeFace)
f_ind_1 = geompy.GetSubShapeID(Prism, prism_faces[0])
f_ind_2 = geompy.GetSubShapeID(Prism, prism_faces[1])
name = geompy.SubShapeName(SubFace, Box)
id_SubFace = geompy.addToStudyInFather(Box, SubFace, name)
- # SubShapeSorted
- SubFaceS = geompy.SubShapeSorted(Box, geompy.ShapeType["FACE"], [5])
+ # SubShapeSortedCentres
+ SubFaceS = geompy.SubShapeSortedCentres(Box, geompy.ShapeType["FACE"], [5])
nameS = geompy.SubShapeName(SubFaceS, Box)
id_SubFace = geompy.addToStudyInFather(Box, SubFaceS, nameS)
geompy.UnionIDs(group, SubEdgeIDsList)
geompy.addToStudyInFather(SubFace, group, "Group of all edges")
- # SubShapeAllSortedIDs
- SubEdgeIDsList = geompy.SubShapeAllSortedIDs(SubFace, geompy.ShapeType["EDGE"])
+ # SubShapeAllSortedCentresIDs
+ SubEdgeIDsList = geompy.SubShapeAllSortedCentresIDs(SubFace, geompy.ShapeType["EDGE"])
print "IDs of edges of SubFace:", SubEdgeIDsList, "(sorted)"
# GetSubShape and GetSubShapeID
#IDList for SuppHole
faces = []
- faces = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+ faces = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
f_glob_id = geompy.GetSubShapeID(Box, faces[5])
#IDList for SuppressFaces
faces = []
- faces = geompy.SubShapeAllSorted(Cut, geompy.ShapeType["FACE"])
+ faces = geompy.SubShapeAllSortedCentres(Cut, geompy.ShapeType["FACE"])
ind = 0
for face in faces:
f_name = "FACE %d"%(ind)
f_glob_id_0 = geompy.GetSubShapeID(Cut, faces[0])
cut_without_f_0 = geompy.SuppressFaces(Cut, [f_glob_id_0])
+ geompy.addToStudy(cut_without_f_0, "Cut without face 0")
faces1 = []
- faces1 = geompy.SubShapeAllSorted(cut_without_f_0, geompy.ShapeType["FACE"])
+ faces1 = geompy.SubShapeAllSortedCentres(cut_without_f_0, geompy.ShapeType["FACE"])
ind = 0
for face in faces1:
f_name = "FACE %d"%(ind)
print "face ", ind, " global index = ", f_glob_id
ind = ind + 1
- f_glob_id_5 = geompy.GetSubShapeID(cut_without_f_0, faces1[5])
- cut_without_f_0_5 = geompy.SuppressFaces(cut_without_f_0, [f_glob_id_5])
- cut_without_f_0_5_id = geompy.addToStudy(cut_without_f_0_5, "Cut without faces 0 and 5")
+ f_glob_id_3 = geompy.GetSubShapeID(cut_without_f_0, faces1[3])
+ cut_without_f_0_3 = geompy.SuppressFaces(cut_without_f_0, [f_glob_id_3])
+ cut_without_f_0_3_id = geompy.addToStudy(cut_without_f_0_3, "Cut without faces 0 and 3")
#IDList for SuppHole
wires = []
- wires = geompy.SubShapeAllSorted(cut_without_f_0_5, geompy.ShapeType["WIRE"])
+ wires = geompy.SubShapeAllSortedCentres(cut_without_f_0_3, geompy.ShapeType["WIRE"])
ind = 0
for wire in wires:
w_name = "WIRE %d"%(ind)
- w_id = geompy.addToStudyInFather(cut_without_f_0_5, wire, w_name)
+ w_id = geompy.addToStudyInFather(cut_without_f_0_3, wire, w_name)
- w_glob_id = geompy.GetSubShapeID(cut_without_f_0_5, wire)
+ w_glob_id = geompy.GetSubShapeID(cut_without_f_0_3, wire)
print "wire ", ind, " global index = ", w_glob_id
ind = ind + 1
- w_3 = geompy.GetSubShapeID(cut_without_f_0_5, wires[3])
+ w_3 = geompy.GetSubShapeID(cut_without_f_0_3, wires[3])
- SuppHole3 = geompy.SuppressHoles(cut_without_f_0_5, [w_3])
+ SuppHole3 = geompy.SuppressHoles(cut_without_f_0_3, [w_3])
SuppHole3_id = geompy.addToStudy(SuppHole3, "Supp Hole 3")
def TestMakeSewing (geompy, math):
Box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
#Divide Edge
- box_edges = geompy.SubShapeAllSorted(Box, geompy.ShapeType["EDGE"])
+ box_edges = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["EDGE"])
edge_ind = geompy.GetSubShapeID(Box, box_edges[1])
Divide = geompy.DivideEdge(Box, edge_ind, 0.5, 1) # Obj, ind, param, is_curve_param
####### GetNormal #######
- faces = geompy.SubShapeAllSorted(box, geompy.ShapeType["FACE"])
+ faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
face0 = faces[0]
vnorm = geompy.GetNormal(face0)
if vnorm is None:
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-
# GEOM GEOM_SWIG : binding of C++ implementaion with Python
# File : GEOM_TestOthers.py
# Author : Julia DOROVSKIKH
# Module : GEOM
# $Header$
+#
# ! Please, if you edit this example file, update also
# ! GEOM_SRC/doc/salome/gui/GEOM/input/tui_test_others.doc
# ! as some sequences of symbols from this example are used during
# ! documentation generation to identify certain places of this file
-#
+
import os
def TestExportImport (geompy, shape):
# MakeFilletAll
radius_fillet = 10.
- face5 = geompy.SubShapeSorted(Box, geompy.ShapeType["FACE"], [5])
+ face5 = geompy.SubShapeSortedCentres(Box, geompy.ShapeType["FACE"], [5])
f_glob_id = geompy.GetSubShapeID(Box, face5)
SuppFace = geompy.SuppressFaces(Box, [f_glob_id])
# MakeChamfer
d1 = 13.
d2 = 7.
- box_faces = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+ box_faces = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
f_ind_1 = geompy.GetSubShapeID(Box, box_faces[0])
f_ind_2 = geompy.GetSubShapeID(Box, box_faces[1])
f_ind_3 = geompy.GetSubShapeID(Box, box_faces[2])
Partition_1 = geompy.MakePartition([Sphere], tools, [], [], geompy.ShapeType["SOLID"], 0, [])
geompy.addToStudy(Partition_1, "Partition_1")
- faces = geompy.SubShapeAllSorted(Partition_1, geompy.ShapeType["FACE"])
+ faces = geompy.SubShapeAllSortedCentres(Partition_1, geompy.ShapeType["FACE"])
Face_1 = faces[0]
Face_2 = faces[39]
# GetSharedShapes
sharedFaces = geompy.GetSharedShapes(part, freeFacesWithoutExtra,
geompy.ShapeType["FACE"])
-
+ ind = 1
for shFace in sharedFaces:
- geompy.addToStudy(shFace, "sharedFace")
+ geompy.addToStudy(shFace, "sharedFace_" + `ind`)
+ ind = ind + 1
+ pass
+
+ sharedEdges = geompy.GetSharedShapesMulti([part, freeFacesWithoutExtra],
+ geompy.ShapeType["EDGE"])
+ ind = 1
+ for shEdge in sharedEdges:
+ geompy.addToStudy(shEdge, "sharedEdge_" + `ind`)
+ ind = ind + 1
+ pass
# CheckAndImprove
blocksComp = geompy.CheckAndImprove(part)
## @defgroup l3_advanced Creating Advanced Geometrical Objects
## @{
## @defgroup l4_decompose Decompose objects
+## @defgroup l4_decompose_d Decompose objects deprecated methods
## @defgroup l4_access Access to sub-shapes by their unique IDs inside the main shape
## @defgroup l4_obtain Access to subshapes by a criteria
## @defgroup l4_advanced Advanced objects creation functions
RaiseIfFailed("GetSharedShapes", self.ShapesOp)
return aList
+ ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
+ # @param theShapes Shapes to find common sub-shapes of.
+ # @param theShapeType Type of sub-shapes to be retrieved.
+ # @return List of objects, that are sub-shapes of all given shapes.
+ #
+ # @ref swig_GetSharedShapes "Example"
+ def GetSharedShapesMulti(self, theShapes, theShapeType):
+ # Example: see GEOM_TestOthers.py
+ aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
+ RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
+ return aList
+
## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
# situated relatively the specified plane by the certain way,
# defined through <VAR>theState</VAR> parameter.
# @ref swig_all_decompose "Example"
def SubShapeAll(self, aShape, aType):
# Example: see GEOM_TestAll.py
- ListObj = self.ShapesOp.MakeExplode(aShape,aType,0)
- RaiseIfFailed("MakeExplode", self.ShapesOp)
+ ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False)
+ RaiseIfFailed("SubShapeAll", self.ShapesOp)
return ListObj
## Explode a shape on subshapes of a given type.
#
# @ref swig_all_decompose "Example"
def SubShapeAllIDs(self, aShape, aType):
- ListObj = self.ShapesOp.SubShapeAllIDs(aShape,aType,0)
+ ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False)
RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
return ListObj
+ ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
+ # selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
+ # Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
+ #
+ # @ref swig_all_decompose "Example"
+ def SubShape(self, aShape, aType, ListOfInd):
+ # Example: see GEOM_TestAll.py
+ ListOfIDs = []
+ AllShapeIDsList = self.SubShapeAllIDs(aShape, aType)
+ for ind in ListOfInd:
+ ListOfIDs.append(AllShapeIDsList[ind - 1])
+ anObj = self.GetSubShape(aShape, ListOfIDs)
+ return anObj
+
## Explode a shape on subshapes of a given type.
# Sub-shapes will be sorted by coordinates of their gravity centers.
# @param aShape Shape to be exploded.
# @return List of sub-shapes of type theShapeType, contained in theShape.
#
# @ref swig_SubShapeAllSorted "Example"
- def SubShapeAllSorted(self, aShape, aType):
+ def SubShapeAllSortedCentres(self, aShape, aType):
# Example: see GEOM_TestAll.py
- ListObj = self.ShapesOp.MakeExplode(aShape,aType,1)
- RaiseIfFailed("MakeExplode", self.ShapesOp)
+ ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True)
+ RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
return ListObj
## Explode a shape on subshapes of a given type.
# @return List of IDs of sub-shapes.
#
# @ref swig_all_decompose "Example"
- def SubShapeAllSortedIDs(self, aShape, aType):
- ListIDs = self.ShapesOp.SubShapeAllIDs(aShape,aType,1)
+ def SubShapeAllSortedCentresIDs(self, aShape, aType):
+ ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True)
RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
return ListIDs
## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
- # selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
+ # selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
# Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
#
# @ref swig_all_decompose "Example"
- def SubShape(self, aShape, aType, ListOfInd):
+ def SubShapeSortedCentres(self, aShape, aType, ListOfInd):
# Example: see GEOM_TestAll.py
ListOfIDs = []
- AllShapeList = self.SubShapeAll(aShape, aType)
+ AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType)
for ind in ListOfInd:
- ListOfIDs.append(self.GetSubShapeID(aShape, AllShapeList[ind - 1]))
+ ListOfIDs.append(AllShapeIDsList[ind - 1])
anObj = self.GetSubShape(aShape, ListOfIDs)
return anObj
- ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
- # selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
- # Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
- #
- # @ref swig_all_decompose "Example"
- def SubShapeSorted(self,aShape, aType, ListOfInd):
- # Example: see GEOM_TestAll.py
+ # end of l4_decompose
+ ## @}
+
+ ## @addtogroup l4_decompose_d
+ ## @{
+
+ ## Deprecated method
+ # It works like SubShapeAllSortedCentres, but wrongly
+ # defines centres of faces, shells and solids.
+ def SubShapeAllSorted(self, aShape, aType):
+ ListObj = self.ShapesOp.MakeExplode(aShape, aType, True)
+ RaiseIfFailed("MakeExplode", self.ShapesOp)
+ return ListObj
+
+ ## Deprecated method
+ # It works like SubShapeAllSortedCentresIDs, but wrongly
+ # defines centres of faces, shells and solids.
+ def SubShapeAllSortedIDs(self, aShape, aType):
+ ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True)
+ RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
+ return ListIDs
+
+ ## Deprecated method
+ # It works like SubShapeSortedCentres, but has a bug
+ # (wrongly defines centres of faces, shells and solids).
+ def SubShapeSorted(self, aShape, aType, ListOfInd):
ListOfIDs = []
- AllShapeList = self.SubShapeAllSorted(aShape, aType)
+ AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType)
for ind in ListOfInd:
- ListOfIDs.append(self.GetSubShapeID(aShape, AllShapeList[ind - 1]))
+ ListOfIDs.append(AllShapeIDsList[ind - 1])
anObj = self.GetSubShape(aShape, ListOfIDs)
return anObj
- # end of l4_decompose
+ # end of l4_decompose_d
## @}
## @addtogroup l3_healing
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-
# GEOM OPERATIONGUI :
# File : Makefile.am
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
# Package : OperationGUI
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
OperationGUI_Fillet1d2dDlg.h \
OperationGUI_ChamferDlg.h \
OperationGUI_GetShapesOnShapeDlg.h \
+ OperationGUI_GetSharedShapesDlg.h \
OperationGUI_ClippingDlg.h
# Libraries targets
OperationGUI_ArchimedeDlg.cxx \
OperationGUI_PartitionDlg.cxx \
OperationGUI_GetShapesOnShapeDlg.cxx \
+ OperationGUI_GetSharedShapesDlg.cxx \
OperationGUI_FilletDlg.cxx \
OperationGUI_Fillet1d2dDlg.cxx \
OperationGUI_ChamferDlg.cxx \
OperationGUI_ArchimedeDlg_moc.cxx \
OperationGUI_PartitionDlg_moc.cxx \
OperationGUI_GetShapesOnShapeDlg_moc.cxx\
+ OperationGUI_GetSharedShapesDlg_moc.cxx \
OperationGUI_FilletDlg_moc.cxx \
OperationGUI_Fillet1d2dDlg_moc.cxx \
OperationGUI_ChamferDlg_moc.cxx \
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// GEOM GEOMGUI : GUI for Geometry component
+// File : OperationGUI.cxx
+// Author : Damien COQUERET, Open CASCADE S.A.S.
-// GEOM GEOMGUI : GUI for Geometry component
-// File : OperationGUI.cxx
-// Author : Damien COQUERET, Open CASCADE S.A.S.
-//
#include "OperationGUI.h"
#include <GeometryGUI.h>
#include "OperationGUI_ChamferDlg.h" // Method CHAMFER
#include "OperationGUI_ClippingDlg.h" // Clipping dialog box
#include "OperationGUI_GetShapesOnShapeDlg.h"
+#include "OperationGUI_GetSharedShapesDlg.h"
//=======================================================================
// function : OperationGUI()
// function : OnGUIEvent()
// purpose :
//=======================================================================
-bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+bool OperationGUI::OnGUIEvent (int theCommandID, SUIT_Desktop* parent)
{
SalomeApp_Application* app = getGeometryGUI()->getApp();
- if ( !app ) return false;
+ if (!app) return false;
getGeometryGUI()->EmitSignalDeactivateDialog();
- switch ( theCommandID ) {
- case GEOMOp::OpPartition: ( new OperationGUI_PartitionDlg ( getGeometryGUI(), parent ) )->show(); break;
- case GEOMOp::OpArchimede: ( new OperationGUI_ArchimedeDlg ( getGeometryGUI(), parent ) )->show(); break;
- case GEOMOp::OpFillet3d: ( new OperationGUI_FilletDlg ( getGeometryGUI(), parent ) )->show(); break;
- case GEOMOp::OpChamfer: ( new OperationGUI_ChamferDlg ( getGeometryGUI(), parent ) )->show(); break;
- case GEOMOp::OpClipping: ( new OperationGUI_ClippingDlg ( getGeometryGUI(), parent ) )->show(); break;
- case GEOMOp::OpShapesOnShape: ( new OperationGUI_GetShapesOnShapeDlg( getGeometryGUI(), parent ) )->show(); break;
- case GEOMOp::OpFillet1d: ( new OperationGUI_Fillet1d2dDlg ( getGeometryGUI(), parent, true ) )->show(); break;
- case GEOMOp::OpFillet2d: ( new OperationGUI_Fillet1d2dDlg ( getGeometryGUI(), parent, false ) )->show(); break;
+ switch (theCommandID) {
+ case GEOMOp::OpPartition: (new OperationGUI_PartitionDlg (getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpArchimede: (new OperationGUI_ArchimedeDlg (getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpFillet3d: (new OperationGUI_FilletDlg (getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpChamfer: (new OperationGUI_ChamferDlg (getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpClipping: (new OperationGUI_ClippingDlg (getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpShapesOnShape: (new OperationGUI_GetShapesOnShapeDlg(getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpSharedShapes: (new OperationGUI_GetSharedShapesDlg (getGeometryGUI(), parent))->show(); break;
+ case GEOMOp::OpFillet1d: (new OperationGUI_Fillet1d2dDlg (getGeometryGUI(), parent, true))->show(); break;
+ case GEOMOp::OpFillet2d: (new OperationGUI_Fillet1d2dDlg (getGeometryGUI(), parent, false))->show(); break;
default:
- app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
+ app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
}
return true;
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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
+//
+// GEOM GEOMGUI : GUI for Geometry component
+// File : OperationGUI_GetSharedShapesDlg.cxx
+// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
+
+#include "OperationGUI_GetSharedShapesDlg.h"
+
+#include <DlgRef.h>
+#include <GeometryGUI.h>
+#include <GEOMBase.h>
+
+#include <GEOMImpl_Types.hxx>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_MessageBox.h>
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+
+#include <TopoDS_Iterator.hxx>
+#include <TopoDS_Shape.hxx>
+
+//=================================================================================
+// class : OperationGUI_GetSharedShapesDlg()
+// purpose : Constructs a OperationGUI_GetSharedShapesDlg which is a child of 'parent', with the
+// name 'name' and widget flags set to 'f'.
+// The dialog will by default be modeless, unless you set 'modal' to
+// TRUE to construct a modal dialog.
+//=================================================================================
+OperationGUI_GetSharedShapesDlg::OperationGUI_GetSharedShapesDlg
+(GeometryGUI* theGeometryGUI, QWidget* parent)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, false)
+{
+ SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
+ QPixmap image0(aResMgr->loadPixmap("GEOM", tr("ICON_DLG_SHARED_SHAPES")));
+ QPixmap image2(aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
+
+ setWindowTitle(tr("GEOM_SHARED_SHAPES_TITLE"));
+
+ /***************************************************************/
+ mainFrame()->GroupConstructors->setTitle(tr("GEOM_GET_SHARED_SHAPES"));
+ mainFrame()->RadioButton1->setIcon(image0);
+ mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
+ mainFrame()->RadioButton2->close();
+ mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+ mainFrame()->RadioButton3->close();
+
+ GroupPoints = new DlgRef_2Sel1List1Check(centralWidget());
+ GroupPoints->GroupBox1->setTitle(tr("GEOM_SHARED_SHAPES_INPUT"));
+ GroupPoints->TextLabel1->setText(tr("GEOM_SHAPES"));
+ GroupPoints->TextLabel2->hide();
+ GroupPoints->TextLabel3->setText(tr("GEOM_SUBSHAPE_TYPE"));
+ GroupPoints->PushButton1->setIcon(image2);
+ GroupPoints->PushButton2->hide();
+ GroupPoints->LineEdit1->setReadOnly(true);
+ GroupPoints->LineEdit2->hide();
+ GroupPoints->LineEdit1->setEnabled(true);
+ GroupPoints->CheckButton1->hide();
+
+ QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+ layout->setMargin(0); layout->setSpacing(6);
+ layout->addWidget(GroupPoints);
+
+ /***************************************************************/
+
+ setHelpFileName("shared_shapes_page.html");
+
+ Init();
+}
+
+//=================================================================================
+// function : ~OperationGUI_GetSharedShapesDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+OperationGUI_GetSharedShapesDlg::~OperationGUI_GetSharedShapesDlg()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::Init()
+{
+ /* type for sub shape selection */
+ GroupPoints->ComboBox1->addItem(tr("GEOM_SOLID"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_SHELL"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_FACE"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_WIRE"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_EDGE"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_VERTEX"));
+
+ GroupPoints->ComboBox1->setCurrentIndex(0);
+
+ /* signals and slots connections */
+ connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
+
+ connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+ connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+ connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
+
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ initName(getNewObjectName());
+
+ ConstructorsClicked(0);
+ GroupPoints->PushButton1->click();
+}
+
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose : Radio button management
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::ConstructorsClicked (int constructorId)
+{
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+ globalSelection();
+
+ myListShapes.length(0);
+
+ GroupPoints->ComboBox1->setCurrentIndex(0);
+ GroupPoints->PushButton1->setDown(true);
+
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ GroupPoints->LineEdit1->clear();
+
+ qApp->processEvents();
+ updateGeometry();
+ resize(minimumSizeHint());
+
+ myEditCurrentArgument->setFocus();
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::ClickOnOk()
+{
+ if (ClickOnApply())
+ ClickOnCancel();
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+bool OperationGUI_GetSharedShapesDlg::ClickOnApply()
+{
+ if (!onAccept())
+ return false;
+
+ initName(getNewObjectName());
+
+ return true;
+}
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection as changed or other case
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::SelectionIntoArgument()
+{
+ myEditCurrentArgument->setText("");
+ QString aString = "";
+
+ LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
+ SALOME_ListIO aSelList;
+ aSelMgr->selectedObjects(aSelList);
+
+ int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
+
+ if (nbSel < 1) {
+ myListShapes.length(0);
+ }
+
+ GEOMBase::ConvertListOfIOInListOfGO(aSelList, myListShapes, true);
+ if (!myListShapes.length())
+ return;
+
+ myEditCurrentArgument->setText(aString);
+}
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose :
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::SetEditCurrentArgument()
+{
+ QPushButton* send = (QPushButton*)sender();
+
+ if (send == GroupPoints->PushButton1) {
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ GroupPoints->LineEdit1->setEnabled(true);
+ }
+
+ globalSelection(GEOM_ALLSHAPES);
+
+ myEditCurrentArgument->setFocus();
+ SelectionIntoArgument();
+ send->setDown(true);
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose :
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::ActivateThisDialog()
+{
+ GEOMBase_Skeleton::ActivateThisDialog();
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ ConstructorsClicked(getConstructorId());
+}
+
+//=================================================================================
+// function : enterEvent()
+// purpose :
+//=================================================================================
+void OperationGUI_GetSharedShapesDlg::enterEvent(QEvent*)
+{
+ if (!mainFrame()->GroupConstructors->isEnabled())
+ this->ActivateThisDialog();
+}
+
+//=======================================================================
+//function : ComboTextChanged
+//purpose :
+//=======================================================================
+void OperationGUI_GetSharedShapesDlg::ComboTextChanged()
+{
+ initName(getNewObjectName());
+}
+
+//=================================================================================
+// function : GetType()
+// purpose :
+//=================================================================================
+int OperationGUI_GetSharedShapesDlg::GetType() const
+{
+ int aLimit = GroupPoints->ComboBox1->currentIndex();
+
+ switch (aLimit) {
+ case 0: aLimit = GEOM::SOLID ; break;
+ case 1: aLimit = GEOM::SHELL ; break;
+ case 2: aLimit = GEOM::FACE ; break;
+ case 3: aLimit = GEOM::WIRE ; break;
+ case 4: aLimit = GEOM::EDGE ; break;
+ case 5: aLimit = GEOM::VERTEX; break;
+ default: aLimit = GEOM::SHAPE ;
+ }
+
+ return aLimit;
+}
+
+//=================================================================================
+// function : createOperation
+// purpose :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr OperationGUI_GetSharedShapesDlg::createOperation()
+{
+ return getGeomEngine()->GetIShapesOperations(getStudyId());
+}
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool OperationGUI_GetSharedShapesDlg::isValid (QString& msg)
+{
+ if (myListShapes.length() < 2) {
+ //msg = "Too few shapes selected";
+ msg = "MSG_SHARED_SHAPES_TOO_FEW_SHAPES";
+ return false;
+ }
+ return true;
+}
+
+//=================================================================================
+// function : execute
+// purpose :
+//=================================================================================
+bool OperationGUI_GetSharedShapesDlg::execute (ObjectList& objects)
+{
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation());
+ GEOM::ListOfGO_var aList = anOper->GetSharedShapesMulti(myListShapes, GetType());
+
+ if (!aList->length())
+ return false;
+
+ for (int i = 0, n = aList->length(); i < n; i++)
+ objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
+
+ return objects.size();
+}
+
+//================================================================
+// Function : getFather
+// Purpose : Get father object for object to be added in study
+// ( called with addInStudy method )
+//================================================================
+GEOM::GEOM_Object_ptr OperationGUI_GetSharedShapesDlg::getFather (GEOM::GEOM_Object_ptr)
+{
+ if (myListShapes.length() > 0)
+ //return myListShapes[0]._retn();
+ return myListShapes[0];
+ return NULL;
+}
+
+//================================================================
+// Function : getNewObjectName
+// Purpose :
+//================================================================
+QString OperationGUI_GetSharedShapesDlg::getNewObjectName() const
+{
+ int aLimit = GroupPoints->ComboBox1->currentIndex();
+ //QString aName = tr("GEOM_SHARED_SHAPE");
+ QString aName;
+
+ switch (aLimit) {
+ case 0: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_SOLID")) ; break;
+ case 1: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_SHELL")) ; break;
+ case 2: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_FACE")) ; break;
+ case 3: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_WIRE")) ; break;
+ case 4: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_EDGE")) ; break;
+ case 5: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_VERTEX")); break;
+ default: aName = tr("GEOM_SHARED_SHAPE").arg(tr("GEOM_SHAPE")) ;
+ }
+
+ return aName;
+}
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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
+//
+// GEOM GEOMGUI : GUI for Geometry component
+// File : OperationGUI_GetSharedShapesDlg.h
+// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
+
+#ifndef OPERATIONGUI_GETSHAREDSHAPESDLG_H
+#define OPERATIONGUI_GETSHAREDSHAPESDLG_H
+
+#include <GEOMBase_Skeleton.h>
+
+class DlgRef_2Sel1List1Check;
+
+//=================================================================================
+// class : OperationGUI_GetSharedShapesDlg
+// purpose :
+//=================================================================================
+class OperationGUI_GetSharedShapesDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ OperationGUI_GetSharedShapesDlg (GeometryGUI*, QWidget* = 0);
+ ~OperationGUI_GetSharedShapesDlg();
+
+protected:
+ // redefined from GEOMBase_Helper
+ virtual GEOM::GEOM_IOperations_ptr createOperation();
+ virtual bool isValid (QString&);
+ virtual bool execute (ObjectList&);
+ virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
+ virtual QString getNewObjectName() const;
+
+private:
+ void Init();
+ void enterEvent (QEvent*);
+ int GetType() const;
+
+private:
+ GEOM::ListOfGO myListShapes;
+
+ DlgRef_2Sel1List1Check* GroupPoints;
+
+private slots:
+ void ClickOnOk();
+ bool ClickOnApply();
+ void ActivateThisDialog();
+ void SelectionIntoArgument();
+ void SetEditCurrentArgument();
+ void ConstructorsClicked (int);
+ void ComboTextChanged();
+};
+
+#endif // OPERATIONGUI_GETSHAREDSHAPESDLG_H
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// GEOM GEOMGUI : GUI for Geometry component
+// File : OperationGUI_PartitionDlg.cxx
+// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-// GEOM GEOMGUI : GUI for Geometry component
-// File : OperationGUI_PartitionDlg.cxx
-// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-//
#include "OperationGUI_PartitionDlg.h"
#include <DlgRef.h>
//=================================================================================
// class : OperationGUI_PartitionDlg()
-// purpose : Constructs a OperationGUI_PartitionDlg which is a child of 'parent', with the
+// purpose : Constructs a OperationGUI_PartitionDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
-OperationGUI_PartitionDlg::OperationGUI_PartitionDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
- : GEOMBase_Skeleton( theGeometryGUI, parent, false )
+OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(GeometryGUI* theGeometryGUI, QWidget* parent)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, false)
{
SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
- QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_PARTITION" ) ) );
- QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_PARTITION_PLANE" ) ) );
- QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
+ QPixmap image0(aResMgr->loadPixmap("GEOM", tr("ICON_DLG_PARTITION")));
+ QPixmap image1(aResMgr->loadPixmap("GEOM", tr("ICON_DLG_PARTITION_PLANE")));
+ QPixmap image2(aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
- setWindowTitle( tr( "GEOM_PARTITION_TITLE" ) );
+ setWindowTitle(tr("GEOM_PARTITION_TITLE"));
/***************************************************************/
- mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PARTITION" ) );
- mainFrame()->RadioButton1->setIcon( image0 );
- mainFrame()->RadioButton2->setIcon( image1 );
- mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ mainFrame()->GroupConstructors->setTitle(tr("GEOM_PARTITION"));
+ mainFrame()->RadioButton1->setIcon(image0);
+ mainFrame()->RadioButton2->setIcon(image1);
+ mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
mainFrame()->RadioButton3->close();
// Full partition (contains half-space partition)
- GroupPoints = new DlgRef_2Sel1List1Check( centralWidget() );
- GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
- GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
- GroupPoints->TextLabel2->setText( tr( "GEOM_TOOL_OBJECTS" ) );
- GroupPoints->TextLabel3->setText( tr( "GEOM_RECONSTRUCTION_LIMIT" ) );
- GroupPoints->PushButton1->setIcon( image2 );
- GroupPoints->PushButton2->setIcon( image2 );
- GroupPoints->LineEdit1->setReadOnly( true );
- GroupPoints->LineEdit2->setReadOnly( true );
+ GroupPoints = new DlgRef_2Sel1List1Check(centralWidget());
+ GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
+ GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
+ GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECTS"));
+ GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT"));
+ GroupPoints->PushButton1->setIcon(image2);
+ GroupPoints->PushButton2->setIcon(image2);
+ GroupPoints->LineEdit1->setReadOnly(true);
+ GroupPoints->LineEdit2->setReadOnly(true);
GroupPoints->LineEdit1->setEnabled(true);
GroupPoints->LineEdit2->setEnabled(false);
- GroupPoints->CheckButton1->setText( tr( "GEOM_KEEP_NONLIMIT_SHAPES" ) );
+ GroupPoints->CheckButton1->setText(tr("GEOM_KEEP_NONLIMIT_SHAPES"));
- QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
- layout->setMargin( 0 ); layout->setSpacing( 6 );
- layout->addWidget( GroupPoints );
+ QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+ layout->setMargin(0); layout->setSpacing(6);
+ layout->addWidget(GroupPoints);
/***************************************************************/
- setHelpFileName( "partition_page.html" );
-
+ setHelpFileName("partition_page.html");
+
Init();
}
// no need to delete child widgets, Qt does it all for us
}
-void OperationGUI_PartitionDlg::SetListMaterials( GEOM::ListOfLong ListMaterials )
+void OperationGUI_PartitionDlg::SetListMaterials(GEOM::ListOfLong ListMaterials)
{
- myListMaterials = ListMaterials;
+ myListMaterials = ListMaterials;
}
-
+
GEOM::ListOfLong OperationGUI_PartitionDlg::GetListMaterials()
-{
- return myListMaterials;
+{
+ return myListMaterials;
}
//=================================================================================
void OperationGUI_PartitionDlg::Init()
{
/* type for sub shape selection */
- GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_SOLID" ) );
- GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_SHELL" ) );
- GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_FACE" ) );
- GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_WIRE" ) );
- GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_EDGE" ) );
- GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_VERTEX" ) );
- GroupPoints->CheckButton1->setChecked( false );
-
+ GroupPoints->ComboBox1->addItem(tr("GEOM_RECONSTRUCTION_LIMIT_SOLID"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_RECONSTRUCTION_LIMIT_SHELL"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_RECONSTRUCTION_LIMIT_FACE"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_RECONSTRUCTION_LIMIT_WIRE"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_RECONSTRUCTION_LIMIT_EDGE"));
+ GroupPoints->ComboBox1->addItem(tr("GEOM_RECONSTRUCTION_LIMIT_VERTEX"));
+ GroupPoints->CheckButton1->setChecked(false);
+
mainFrame()->GroupBoxPublish->show();
/* signals and slots connections */
- connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
- connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
-
- connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
-
- connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
- connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
-
- connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
- connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
-
- connect( GroupPoints->ComboBox1, SIGNAL( activated( int ) ), this, SLOT( ComboTextChanged() ) );
-
- connect( myGeomGUI->getApp()->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
-
- initName( tr( "GEOM_PARTITION" ) );
-
- ConstructorsClicked( 0 );
+ connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
+
+ connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+ connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+ connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
+
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ initName(tr("GEOM_PARTITION"));
+
+ ConstructorsClicked(0);
GroupPoints->PushButton1->click();
}
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
-void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
+void OperationGUI_PartitionDlg::ConstructorsClicked(int constructorId)
{
- disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
globalSelection();
-
- myListShapes.length( 0 );
- myListTools.length( 0 );
- myListKeepInside.length( 0 );
- myListRemoveInside.length( 0 );
- myListMaterials.length( 0 );
-
- switch ( constructorId ) {
+
+ myListShapes.length(0);
+ myListTools.length(0);
+ myListKeepInside.length(0);
+ myListRemoveInside.length(0);
+ myListMaterials.length(0);
+
+ switch (constructorId) {
case 0: /*Full partition */
- GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
- GroupPoints->TextLabel2->setText( tr( "GEOM_TOOL_OBJECTS" ) );
+ GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
+ GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECTS"));
GroupPoints->TextLabel3->show();
GroupPoints->ComboBox1->show();
- GroupPoints->ComboBox1->setCurrentIndex( 0 );
+ GroupPoints->ComboBox1->setCurrentIndex(0);
GroupPoints->CheckButton1->show();
- GroupPoints->PushButton1->setDown( true );
- GroupPoints->PushButton2->setDown( false );
+ GroupPoints->PushButton1->setDown(true);
+ GroupPoints->PushButton2->setDown(false);
GroupPoints->LineEdit1->setEnabled(true);
GroupPoints->LineEdit2->setEnabled(false);
break;
case 1: /*Half-space partition */
- GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION_HALFSPACE" ) );
+ GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION_HALFSPACE"));
GroupPoints->TextLabel3->hide();
GroupPoints->ComboBox1->hide();
- GroupPoints->TextLabel2->setText( tr( "GEOM_PLANE" ) );
+ GroupPoints->TextLabel2->setText(tr("GEOM_PLANE"));
GroupPoints->CheckButton1->hide();
- GroupPoints->PushButton1->setDown( true );
+ GroupPoints->PushButton1->setDown(true);
GroupPoints->LineEdit1->setEnabled(true);
break;
- }
+ }
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->clear();
qApp->processEvents();
updateGeometry();
- resize( minimumSizeHint() );
+ resize(minimumSizeHint());
myEditCurrentArgument->setFocus();
- connect( myGeomGUI->getApp()->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
SelectionIntoArgument();
}
//=================================================================================
void OperationGUI_PartitionDlg::ClickOnOk()
{
- if ( ClickOnApply() )
+ if (ClickOnApply())
ClickOnCancel();
}
//=================================================================================
bool OperationGUI_PartitionDlg::ClickOnApply()
{
- if ( !onAccept() )
+ if (!onAccept())
return false;
-
initName();
- // 0020854: EDF 1398 GEOM: Ergonomy of Partition GUI window
- // ConstructorsClicked( getConstructorId() );
+ // 0020854: EDF 1398 GEOM: Ergonomy of Partition GUI window
+ // ConstructorsClicked(getConstructorId());
return true;
}
//=================================================================================
void OperationGUI_PartitionDlg::SelectionIntoArgument()
{
- myEditCurrentArgument->setText( "" );
+ myEditCurrentArgument->setText("");
QString aString = "";
-
+
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
-
- if ( nbSel < 1 ) {
- if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
- myListShapes.length( 0 );
- myListMaterials.length( 0 );
+
+ if (nbSel < 1) {
+ if (myEditCurrentArgument == GroupPoints->LineEdit1) {
+ myListShapes.length(0);
+ myListMaterials.length(0);
}
- else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
- myListTools.length( 0 );
+ else if (myEditCurrentArgument == GroupPoints->LineEdit2)
+ myListTools.length(0);
}
-
+
// One and only one plane can be selected
-
- if ( getConstructorId() == 1 &&
- myEditCurrentArgument == GroupPoints->LineEdit2 &&
- nbSel != 1 ) {
- myListTools.length( 0 );
+
+ if (getConstructorId() == 1 &&
+ myEditCurrentArgument == GroupPoints->LineEdit2 &&
+ nbSel != 1) {
+ myListTools.length(0);
return;
}
-
- if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
+
+ if (myEditCurrentArgument == GroupPoints->LineEdit1) {
GEOMBase::ConvertListOfIOInListOfGO(aSelList, myListShapes, true);
- myListMaterials.length( 0 );
- if ( !myListShapes.length() )
+ myListMaterials.length(0);
+ if (!myListShapes.length())
return;
}
- else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
+ else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
GEOMBase::ConvertListOfIOInListOfGO(aSelList, myListTools, true);
- if ( !myListTools.length() )
+ if (!myListTools.length())
return;
}
-
- myEditCurrentArgument->setText( aString );
+
+ myEditCurrentArgument->setText(aString);
}
void OperationGUI_PartitionDlg::SetEditCurrentArgument()
{
QPushButton* send = (QPushButton*)sender();
-
- if ( send == GroupPoints->PushButton1 ) {
+
+ if (send == GroupPoints->PushButton1) {
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->PushButton2->setDown(false);
GroupPoints->LineEdit1->setEnabled(true);
GroupPoints->LineEdit2->setEnabled(false);
}
- else if ( send == GroupPoints->PushButton2 ) {
+ else if (send == GroupPoints->PushButton2) {
myGeomGUI->getApp()->selectionMgr()->clearSelected(); //clear prewious selection
myEditCurrentArgument = GroupPoints->LineEdit2;
GroupPoints->PushButton1->setDown(false);
GroupPoints->LineEdit1->setEnabled(false);
GroupPoints->LineEdit2->setEnabled(true);
- if ( getConstructorId() == 1 )
- globalSelection( GEOM_PLANE );
+ if (getConstructorId() == 1)
+ globalSelection(GEOM_PLANE);
}
-
- globalSelection( GEOM_ALLSHAPES );
-
+
+ globalSelection(GEOM_ALLSHAPES);
+
myEditCurrentArgument->setFocus();
SelectionIntoArgument();
send->setDown(true);
{
QLineEdit* send = (QLineEdit*)sender();
- if ( send == GroupPoints->LineEdit1 ||
- send == GroupPoints->LineEdit2 ) {
+ if (send == GroupPoints->LineEdit1 ||
+ send == GroupPoints->LineEdit2) {
myEditCurrentArgument = send;
GEOMBase_Skeleton::LineEditReturnPressed();
}
void OperationGUI_PartitionDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect( myGeomGUI->getApp()->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- ConstructorsClicked( getConstructorId() );
+ ConstructorsClicked(getConstructorId());
}
// function : enterEvent()
// purpose :
//=================================================================================
-void OperationGUI_PartitionDlg::enterEvent( QEvent* )
+void OperationGUI_PartitionDlg::enterEvent(QEvent*)
{
- if ( !mainFrame()->GroupConstructors->isEnabled() )
+ if (!mainFrame()->GroupConstructors->isEnabled())
this->ActivateThisDialog();
}
//=================================================================================
GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
{
- return getGeomEngine()->GetIBooleanOperations( getStudyId() );
+ return getGeomEngine()->GetIBooleanOperations(getStudyId());
}
// function : isValid
// purpose :
//=================================================================================
-bool OperationGUI_PartitionDlg::isValid( QString& )
+bool OperationGUI_PartitionDlg::isValid(QString&)
{
- return ( myListShapes.length() || myListTools.length() ||
- myListKeepInside.length() || myListRemoveInside.length() );
+ return (myListShapes.length() || myListTools.length() ||
+ myListKeepInside.length() || myListRemoveInside.length());
}
// function : execute
// purpose :
//=================================================================================
-bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
+bool OperationGUI_PartitionDlg::execute(ObjectList& objects)
{
bool res = false;
int aConstructorId = getConstructorId();
int aKeepNonlimitShapes = 0;
- if ( aConstructorId == 1 ) {
+ if (aConstructorId == 1) {
aLimit = GEOM::SHAPE;
}
else {
- if ( GroupPoints->CheckButton1->isChecked() ) {
+ if (GroupPoints->CheckButton1->isChecked()) {
aKeepNonlimitShapes = 1;
}
else {
}
}
- if ( isValid( msg ) ) {
+ if (isValid(msg)) {
GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
- anObj = anOper->MakePartition( myListShapes, myListTools,
- myListKeepInside, myListRemoveInside,
- aLimit, false, myListMaterials, aKeepNonlimitShapes );
+ anObj = anOper->MakePartition(myListShapes, myListTools,
+ myListKeepInside, myListRemoveInside,
+ aLimit, false, myListMaterials, aKeepNonlimitShapes);
res = true;
}
- if ( !anObj->_is_nil() ) {
+ if (!anObj->_is_nil()) {
TopoDS_Shape aShape;
GEOMBase::GetShape(anObj, aShape, TopAbs_SHAPE);
TopoDS_Iterator It (aShape, Standard_True, Standard_True);
nbSubshapes++;
if (nbSubshapes)
- objects.push_back( anObj._retn() );
+ objects.push_back(anObj._retn());
else
SUIT_MessageBox::warning(this,
QObject::tr("GEOM_ERROR"),
// function : restoreSubShapes
// purpose :
//=================================================================================
-void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theSObject )
+void OperationGUI_PartitionDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject)
{
- if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
+ if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
- /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
- /*theInheritFirstArg=*/myListShapes.length() == 1,
- mainFrame()->CheckBoxAddPrefix->isChecked() ); // ? false
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
+ /*theInheritFirstArg=*/myListShapes.length() == 1,
+ mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false
}
}
//=======================================================================
//function : ComboTextChanged
-//purpose :
+//purpose :
//=======================================================================
void OperationGUI_PartitionDlg::ComboTextChanged()
{
//=================================================================================
// function : GetLimit()
-// purpose :
+// purpose :
//=================================================================================
int OperationGUI_PartitionDlg::GetLimit() const
{
int aLimit = GroupPoints->ComboBox1->currentIndex();
- switch ( aLimit ) {
+ switch (aLimit) {
case 0: aLimit = GEOM::SOLID ; break;
case 1: aLimit = GEOM::SHELL ; break;
case 2: aLimit = GEOM::FACE ; break;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// GEOM GEOMGUI : GUI for Geometry component
+// File : OperationGUI_PartitionDlg.h
+// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-// GEOM GEOMGUI : GUI for Geometry component
-// File : OperationGUI_PartitionDlg.h
-// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-//
#ifndef OPERATIONGUI_PARTITIONDLG_H
#define OPERATIONGUI_PARTITIONDLG_H
// purpose :
//=================================================================================
class OperationGUI_PartitionDlg : public GEOMBase_Skeleton
-{
+{
Q_OBJECT
public:
OperationGUI_PartitionDlg( GeometryGUI*, QWidget* = 0 );
~OperationGUI_PartitionDlg();
-
+
void SetListMaterials( GEOM::ListOfLong );
GEOM::ListOfLong GetListMaterials();