0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape

This commit is contained in:
vsr 2010-03-10 08:08:20 +00:00
parent a5c99dd56d
commit ece47f8e46
25 changed files with 587 additions and 23 deletions

View File

@ -392,6 +392,7 @@ AC_OUTPUT([ \
doc/salome/tui/Makefile \
doc/salome/tui/doxyfile \
src/Makefile \
src/AdvancedGUI/Makefile \
src/ARCHIMEDE/Makefile \
src/BREPExport/Makefile \
src/BREPImport/Makefile \

View File

@ -14,4 +14,10 @@ entities:
<li>\subpage create_compound_page</li>
</ul>
*/
<b>New Entity -> Advanced </b> submenu allows to create additional complex topological objects.
<ul>
<!--@@ insert new functions before this line @@-->
</ul>
*/

View File

@ -218,4 +218,5 @@ id_compound = geompy.addToStudy(compound,"Compound")
gg.createAndDisplayGO(id_compound)
\endcode
*/
<!--@@ insert new functions before this line @@-->
*/

View File

@ -3127,6 +3127,14 @@ module GEOM
};
/*!
* GEOM_IAdvancedOperations: Interface for advanced modeling functions.
*/
interface GEOM_IAdvancedOperations : GEOM_IOperations
{
/*@@ insert new functions before this line @@*/
};
/*!
* GEOM_Gen: Interface to access other GEOM interfaces.
* Also contains some methods to access and manage GEOM objects.
@ -3206,6 +3214,7 @@ module GEOM
GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_IAdvancedOperations GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
/*!
* Objects Management

View File

@ -228,5 +228,10 @@ remove_extra_edges.png \
coordsys.png \
translation.png
ADVANCED_RESOURCES =
##@@ insert new functions before this line @@##
dist_salomeres_DATA += $(ADVANCED_RESOURCES)
# VSR: little trick to avoid putting if GEOMCatalog.xml to the distribution archive
nodist_salomeres_SCRIPTS = GEOMCatalog.xml

View File

@ -0,0 +1,92 @@
// Copyright (C) 2007-2008 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
//
// File : AdvancedGUI.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include "AdvancedGUI.h"
#include "GeometryGUI.h"
#include "GeometryGUI_Operations.h"
#include <SUIT_Desktop.h>
#include <SalomeApp_Application.h>
//@@ insert new functions before this line @@//
#include <QDialog>
//=======================================================================
// function : AdvancedGUI()
// purpose : Constructor
//=======================================================================
AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMGUI( parent )
{
}
//=======================================================================
// function : ~AdvancedGUI
// purpose : Destructor
//=======================================================================
AdvancedGUI::~AdvancedGUI()
{
}
//=======================================================================
// function : OnGUIEvent()
// purpose :
//=======================================================================
bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
{
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return false;
getGeometryGUI()->EmitSignalDeactivateDialog();
QDialog* aDlg = NULL;
switch ( theCommandID ) {
//@@ insert new functions before this line @@//
default:
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
break;
}
if ( aDlg != NULL )
aDlg->show();
return true;
}
//=====================================================================================
// EXPORTED METHODS
//=====================================================================================
extern "C"
{
#ifdef WIN32
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new AdvancedGUI( parent );
}
}

View File

@ -0,0 +1,44 @@
// Copyright (C) 2007-2008 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
//
// File : AdvancedGUI.h
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#ifndef ADVANCEDGUI_H
#define ADVANCEDGUI_H
#include "GEOMGUI.h"
//=================================================================================
// class : AdvancedGUI
// purpose :
//=================================================================================
class AdvancedGUI : public GEOMGUI
{
public:
AdvancedGUI( GeometryGUI* );
~AdvancedGUI();
bool OnGUIEvent( int, SUIT_Desktop* );
};
#endif // ADVANCEDGUI_H

View File

@ -0,0 +1,83 @@
# Copyright (C) 2007-2008 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
#
# File : Makefile.am
# Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
salomeinclude_HEADERS = \
AdvancedGUI.h
ADVANCED_INCLUDES =
##@@ insert new functions before this line @@##
salomeinclude_HEADERS += $(ADVANCED_INCLUDES)
# Libraries targets
lib_LTLIBRARIES = libAdvancedGUI.la
dist_libAdvancedGUI_la_SOURCES = \
AdvancedGUI.h \
AdvancedGUI.cxx
ADVANCED_SOURCES =
##@@ insert new functions before this line @@##
dist_libAdvancedGUI_la_SOURCES += $(ADVANCED_SOURCES)
MOC_FILES =
ADVANCED_MOC_FILES =
##@@ insert new functions before this line @@##
MOC_FILES += $(ADVANCED_MOC_FILES)
nodist_libAdvancedGUI_la_SOURCES = \
$(MOC_FILES)
# additional information to compile and link file
libAdvancedGUI_la_CPPFLAGS = \
$(QT_INCLUDES) \
$(VTK_INCLUDES) \
$(CAS_CPPFLAGS) \
$(PYTHON_INCLUDES) \
$(BOOST_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
$(GUI_CXXFLAGS) \
$(CORBA_CXXFLAGS) \
$(CORBA_INCLUDES) \
-I$(srcdir)/../GEOMGUI \
-I$(srcdir)/../DlgRef \
-I$(srcdir)/../GEOMBase \
-I$(srcdir)/../OBJECT \
-I$(srcdir)/../GEOMClient \
-I$(srcdir)/../GEOMImpl \
-I$(srcdir)/../GEOMFiltersSelection \
-I$(top_builddir)/src/DlgRef \
-I$(top_builddir)/idl
libAdvancedGUI_la_LDFLAGS = \
../GEOMFiltersSelection/libGEOMFiltersSelection.la \
../GEOMBase/libGEOMBase.la

View File

@ -1077,5 +1077,6 @@
<source>ICON_DLG_SCALE_ALONG_AXES</source>
<translation>scale_along_axes.png</translation>
</message>
<!-- @@ insert new functions before this line @@ -->
</context>
</TS>

View File

@ -2423,6 +2423,10 @@ Please, select face, shell or solid and try again</translation>
<source>MEN_PRIMITIVES</source>
<translation>Primitives</translation>
</message>
<message>
<source>MEN_ADVANCED</source>
<translation>Advanced</translation>
</message>
<message>
<source>MEN_PROPAGATE</source>
<translation>Propagate</translation>
@ -4419,4 +4423,5 @@ Would you like to continue?</translation>
<translation>Load Texture</translation>
</message>
</context>
<!-- @@ insert new functions before this line @@ -->
</TS>

View File

@ -499,6 +499,10 @@ void GeometryGUI::OnGUIEvent( int id )
case GEOMOp::OpExplodeBlock: // MENU BLOCKS - EXPLODE ON BLOCKS
libName = "BlocksGUI";
break;
case GEOMOp::OpAdvancedNoOp: // NO OPERATION (advanced operations base)
//@@ insert new functions before this line @@//
libName = "AdvancedGUI";
break;
default:
break;
}
@ -723,6 +727,8 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( GEOMOp::OpShowChildren, "POP_SHOW_CHILDREN" );
createGeomAction( GEOMOp::OpHideChildren, "POP_HIDE_CHILDREN" );
createGeomAction( GEOMOp::OpPointMarker, "POP_POINT_MARKER" );
//@@ insert new functions before this line @@//
// ---- create menus --------------------------
@ -764,6 +770,9 @@ void GeometryGUI::initialize( CAM_Application* app )
createMenu( GEOMOp::OpFilling, genId, -1 );
createMenu( GEOMOp::OpPipe, genId, -1 );
int advId = createMenu( tr( "MEN_ADVANCED" ), newEntId, -1 );
//@@ insert new functions before this line @@//
createMenu( separator(), newEntId, -1 );
int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 );

View File

@ -28,7 +28,7 @@
namespace GEOMOp {
enum {
// ToolsGUI
// ToolsGUI ------------------//--------------------------------
OpImport = 1000, // MENU FILE - IMPORT
OpExport = 1001, // MENU FILE - EXPORT
OpDelete = 1020, // MENU EDIT - DELETE
@ -51,7 +51,7 @@ namespace GEOMOp {
OpShowChildren = 1250, // POPUP MENU - SHOW CHILDREN
OpHideChildren = 1251, // POPUP MENU - HIDE CHILDREN
OpRename = 1252, // POPUP MENU - RENAME
// DisplayGUI
// DisplayGUI ----------------//--------------------------------
OpDisplayMode = 2000, // MENU VIEW - DISPLAY MODE - WIREFRAME/SHADING
OpSwitchVectors = 2001, // MENU VIEW - DISPLAY MODE - SHOW/HIDE EDGE DIRECTION
OpShowAll = 2002, // MENU VIEW - SHOW ALL
@ -62,7 +62,7 @@ namespace GEOMOp {
OpWireframe = 2200, // POPUP MENU - DISPLAY MODE - WIREFRAME
OpShading = 2201, // POPUP MENU - DISPLAY MODE - SHADING
OpVectors = 2202, // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
// BasicGUI
// BasicGUI ------------------//--------------------------------
OpPoint = 3000, // MENU NEW ENTITY - BASIC - POINT
OpLine = 3001, // MENU NEW ENTITY - BASIC - LINE
OpCircle = 3002, // MENU NEW ENTITY - BASIC - CIRCLE
@ -72,7 +72,7 @@ namespace GEOMOp {
OpPlane = 3006, // MENU NEW ENTITY - BASIC - PLANE
OpCurve = 3007, // MENU NEW ENTITY - BASIC - CURVE
OpLCS = 3008, // MENU NEW ENTITY - BASIC - LOCAL COORDINATE SYSTEM
// PrimitiveGUI
// PrimitiveGUI --------------//--------------------------------
OpBox = 3100, // MENU NEW ENTITY - PRIMITIVES - BOX
OpCylinder = 3101, // MENU NEW ENTITY - PRIMITIVES - CYLINDER
OpSphere = 3102, // MENU NEW ENTITY - PRIMITIVES - SPHERE
@ -80,28 +80,28 @@ namespace GEOMOp {
OpCone = 3104, // MENU NEW ENTITY - PRIMITIVES - CONE
OpRectangle = 3105, // MENU NEW ENTITY - PRIMITIVES - FACE
OpDisk = 3106, // MENU NEW ENTITY - PRIMITIVES - DISK
// GenerationGUI
// GenerationGUI -------------//--------------------------------
OpPrism = 3200, // MENU NEW ENTITY - GENERATION - EXTRUSION
OpRevolution = 3201, // MENU NEW ENTITY - GENERATION - REVOLUTION
OpFilling = 3202, // MENU NEW ENTITY - GENERATION - FILLING
OpPipe = 3203, // MENU NEW ENTITY - GENERATION - EXTRUSION ALONG PATH
// EntityGUI
// EntityGUI -----------------//--------------------------------
Op2dSketcher = 3300, // MENU NEW ENTITY - SKETCHER
Op3dSketcher = 3301, // MENU NEW ENTITY - 3D SKETCHER
OpExplode = 3302, // MENU NEW ENTITY - EXPLODE
// BuildGUI
// BuildGUI ------------------//--------------------------------
OpEdge = 3400, // MENU NEW ENTITY - BUILD - EDGE
OpWire = 3401, // MENU NEW ENTITY - BUILD - WIRE
OpFace = 3402, // MENU NEW ENTITY - BUILD - FACE
OpShell = 3403, // MENU NEW ENTITY - BUILD - SHELL
OpSolid = 3404, // MENU NEW ENTITY - BUILD - SOLID
OpCompound = 3405, // MENU NEW ENTITY - BUILD - COMPOUND
// BooleanGUI
// BooleanGUI ----------------//--------------------------------
OpFuse = 3500, // MENU OPERATIONS - BOOLEAN - FUSE
OpCommon = 3501, // MENU OPERATIONS - BOOLEAN - COMMON
OpCut = 3502, // MENU OPERATIONS - BOOLEAN - CUT
OpSection = 3503, // MENU OPERATIONS - BOOLEAN - SECTION
// TransformationGUI
// TransformationGUI ---------//--------------------------------
OpTranslate = 3600, // MENU OPERATIONS - TRANSFORMATION - TRANSLATION
OpRotate = 3601, // MENU OPERATIONS - TRANSFORMATION - ROTATION
OpChangeLoc = 3602, // MENU OPERATIONS - TRANSFORMATION - LOCATION
@ -120,7 +120,7 @@ namespace GEOMOp {
OpFillet2d = 3705, // MENU OPERATION - FILLET 2D
OpFillet1d = 3706, // MENU OPERATION - FILLET 1D
OpClipping = 3707, // MENU OPERATION - CLIPPING RANGE
// RepairGUI
// RepairGUI -----------------//--------------------------------
OpSewing = 4000, // MENU REPAIR - SEWING
OpSuppressFaces = 4001, // MENU REPAIR - SUPPRESS FACES
OpSuppressHoles = 4002, // MENU REPAIR - SUPPRESS HOLES
@ -133,7 +133,7 @@ namespace GEOMOp {
OpOrientation = 4009, // MENU REPAIR - CHANGE ORIENTATION
OpGlueFaces = 4010, // MENU REPAIR - GLUE FACES
OpRemoveExtraEdges = 4011, // MENU REPAIR - REMOVE EXTRA EDGES
// MeasureGUI
// MeasureGUI ----------------//--------------------------------
OpProperties = 5000, // MENU MEASURES - PROPERTIES
OpCenterMass = 5001, // MENU MEASURES - CENTRE OF MASS
OpInertia = 5002, // MENU MEASURES - INERTIA
@ -146,16 +146,19 @@ namespace GEOMOp {
OpCheckShape = 5009, // MENU MEASURES - CHECK
OpCheckCompound = 5010, // MENU MEASURES - CHECK COMPOUND OF BLOCKS
OpPointCoordinates = 5011, // MENU MEASURES - POINT COORDINATES
// GroupGUI
// GroupGUI ------------------//--------------------------------
OpGroupCreate = 6000, // MENU GROUP - CREATE
OpGroupEdit = 6001, // MENU GROUP - EDIT
OpGroupCreatePopup = 6002, // POPUP MENU - CREATE GROUP
// BlocksGUI
// BlocksGUI -----------------//--------------------------------
OpHexaSolid = 6100, // MENU BLOCKS - HEXAHEDRAL SOLID
OpMultiTransform = 6101, // MENU BLOCKS - MULTI-TRANSFORMATION
OpQuadFace = 6102, // MENU BLOCKS - QUADRANGLE FACE
OpPropagate = 6103, // MENU BLOCKS - PROPAGATE
OpExplodeBlock = 6104, // MENU BLOCKS - EXPLODE ON BLOCKS
// AdvancedGUI ---------------//--------------------------------
OpAdvancedNoOp = 10000, // NO OPERATION (advanced operations base)
//@@ insert new functions before this line @@//
};
}

View File

@ -79,6 +79,8 @@
#include <GEOMImpl_FillingDriver.hxx>
#include <GEOMImpl_GlueDriver.hxx>
#include <GEOMImpl_MeasureDriver.hxx>
// Advanced operations
/*@@ insert new functions before this line @@*/
//=============================================================================
/*!
@ -158,6 +160,9 @@ GEOMImpl_Gen::GEOMImpl_Gen()
// Measurements
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MeasureDriver::GetID(), new GEOMImpl_MeasureDriver());
// Advanced operations
/*@@ insert new functions before this line @@*/
SetEngine(this);
}
@ -387,3 +392,18 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
return _mapOfGroupOperations[theDocID];
}
//=============================================================================
/*!
* GetIAdvancedOperations
*/
//=============================================================================
GEOMImpl_IAdvancedOperations* GEOMImpl_Gen::GetIAdvancedOperations(int theDocID)
{
if(_mapOfAdvancedOperations.find(theDocID) == _mapOfAdvancedOperations.end()) {
_mapOfAdvancedOperations[theDocID] = new GEOMImpl_IAdvancedOperations(this, theDocID);
}
return _mapOfAdvancedOperations[theDocID];
}

View File

@ -38,6 +38,7 @@
#include "GEOMImpl_IInsertOperations.hxx"
#include "GEOMImpl_IMeasureOperations.hxx"
#include "GEOMImpl_IGroupOperations.hxx"
#include "GEOMImpl_IAdvancedOperations.hxx"
#include "GEOM_Engine.hxx"
class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
@ -70,6 +71,8 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID);
GEOMImpl_IAdvancedOperations* GetIAdvancedOperations(int theDocID);
private:
std::map <int, GEOMImpl_IBasicOperations*> _mapOfBasicOperations;
@ -83,7 +86,8 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
std::map <int, GEOMImpl_ILocalOperations*> _mapOfLocalOperations;
std::map <int, GEOMImpl_IInsertOperations*> _mapOfInsertOperations;
std::map <int, GEOMImpl_IMeasureOperations*> _mapOfMeasureOperations;
std::map <int, GEOMImpl_IGroupOperations*> _mapOfGroupOperations;
std::map <int, GEOMImpl_IGroupOperations*> _mapOfGroupOperations;
std::map <int, GEOMImpl_IAdvancedOperations*> _mapOfAdvancedOperations;
};
#endif

View File

@ -0,0 +1,68 @@
// Copyright (C) 2007-2008 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
//
// File : GEOMImpl_IAdvancedOperations.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include <Standard_Stream.hxx>
#include "GEOMImpl_IAdvancedOperations.hxx"
#include "GEOMImpl_Types.hxx"
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include "GEOM_Function.hxx"
#include "GEOM_PythonDump.hxx"
/*@@ insert new functions before this line @@*/
#include <TFunction_DriverTable.hxx>
#include <TFunction_Driver.hxx>
#include <TFunction_Logbook.hxx>
#include <TDF_Tool.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=============================================================================
/*!
* Constructor
*/
//=============================================================================
GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
{
MESSAGE("GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations");
}
//=============================================================================
/*!
* Destructor
*/
//=============================================================================
GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations()
{
MESSAGE("GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations");
}
/*@@ insert new functions before this line @@*/

View File

@ -0,0 +1,43 @@
// Copyright (C) 2007-2008 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
//
// File : GEOMImpl_IAdvancedOperations.hxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#ifndef _GEOMImpl_IAdvancedOperations_HXX_
#define _GEOMImpl_IAdvancedOperations_HXX_
#include <Utils_SALOME_Exception.hxx>
#include "GEOM_IOperations.hxx"
#include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx"
class GEOMImpl_IAdvancedOperations : public GEOM_IOperations
{
public:
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
/*@@ insert new functions before this line @@*/
};
#endif

View File

@ -299,3 +299,10 @@
#define MARKER_CS 1
#define MARKER_SHAPE 2
#define MARKER_PNT2VEC 3
// Advanced functions (base = 200)
#define ADVANCED_BASE 200 // NO OPERATION (advanced operations base)
/*@@ insert new functions before this line @@*/
// Advanced functions sub-operations codes
/*@@ insert new functions before this line @@*/

View File

@ -47,6 +47,7 @@ salomeinclude_HEADERS = \
GEOMImpl_IInsertOperations.hxx \
GEOMImpl_IMeasureOperations.hxx \
GEOMImpl_IGroupOperations.hxx \
GEOMImpl_IAdvancedOperations.hxx \
GEOMImpl_IGlue.hxx \
GEOMImpl_PointDriver.hxx \
GEOMImpl_IPoint.hxx \
@ -145,6 +146,11 @@ salomeinclude_HEADERS = \
GEOMImpl_Types.hxx \
GEOM_GEOMImpl.hxx
ADVANCED_INCLUDES =
##@@ insert new functions before this line @@##
salomeinclude_HEADERS += $(ADVANCED_INCLUDES)
dist_libGEOMimpl_la_SOURCES = \
GEOMImpl_IBasicOperations.cxx \
GEOMImpl_ITransformOperations.cxx \
@ -158,6 +164,7 @@ dist_libGEOMimpl_la_SOURCES = \
GEOMImpl_IInsertOperations.cxx \
GEOMImpl_IMeasureOperations.cxx \
GEOMImpl_IGroupOperations.cxx \
GEOMImpl_IAdvancedOperations.cxx \
GEOMImpl_Gen.cxx \
GEOMImpl_PointDriver.cxx \
GEOMImpl_VectorDriver.cxx \
@ -207,6 +214,11 @@ dist_libGEOMimpl_la_SOURCES = \
GEOMImpl_FillingDriver.cxx \
GEOMImpl_GlueDriver.cxx
ADVANCED_SOURCES =
##@@ insert new functions before this line @@##
dist_libGEOMimpl_la_SOURCES += $(ADVANCED_SOURCES)
# additional information to compile and link file
libGEOMimpl_la_CPPFLAGS = \

View File

@ -1554,6 +1554,26 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
return operations._retn();
}
//============================================================================
// function : GetIAdvancedOperations
// purpose :
//============================================================================
GEOM::GEOM_IAdvancedOperations_ptr GEOM_Gen_i::GetIAdvancedOperations(CORBA::Long theStudyID)
throw ( SALOME::SALOME_Exception )
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "GEOM_Gen_i::GetIAdvancedOperations" );
GEOM::GEOM_Gen_ptr engine = _this();
GEOM_IAdvancedOperations_i* aServant =
new GEOM_IAdvancedOperations_i(_poa, engine, _impl->GetIAdvancedOperations(theStudyID));
// activate the CORBA servant
GEOM::GEOM_IAdvancedOperations_var operations = aServant->_this();
return operations._retn();
}
//=============================================================================
/*!
* AddSubShape

View File

@ -49,6 +49,7 @@
#include "GEOM_IInsertOperations_i.hh"
#include "GEOM_IMeasureOperations_i.hh"
#include "GEOM_IGroupOperations_i.hh"
#include "GEOM_IAdvancedOperations_i.hh"
#include <TopTools_IndexedMapOfShape.hxx>
@ -220,6 +221,10 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID)
throw (SALOME::SALOME_Exception);
//Returns a pointer to AdvancedOperations interface
virtual GEOM::GEOM_IAdvancedOperations_ptr GetIAdvancedOperations (CORBA::Long theStudyID)
throw (SALOME::SALOME_Exception);
//Adds a new sub shape
virtual GEOM::GEOM_Object_ptr AddSubShape (GEOM::GEOM_Object_ptr theMainShape,
const GEOM::ListOfLong& theIndices);

View File

@ -0,0 +1,58 @@
// Copyright (C) 2007-2008 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
//
// File : GEOM_IAdvancedOperations.cc
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include <Standard_Stream.hxx>
#include "GEOM_IAdvancedOperations_i.hh"
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx"
//=============================================================================
/*!
* constructor:
*/
//=============================================================================
GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_IAdvancedOperations* theImpl)
:GEOM_IOperations_i(thePOA, theEngine, theImpl)
{
MESSAGE("GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i");
}
//=============================================================================
/*!
* destructor
*/
//=============================================================================
GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
{
MESSAGE("GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i");
}
/*@@ insert new functions before this line @@*/

View File

@ -0,0 +1,54 @@
// Copyright (C) 2007-2008 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
//
// File : GEOM_IAdvancedOperations.hh
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#ifndef _GEOM_IAdvancedOperations_i_HeaderFile
#define _GEOM_IAdvancedOperations_i_HeaderFile
#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(GEOM_Gen)
#include "GEOM_IOperations_i.hh"
#include "GEOM_Object_i.hh"
#include "GEOMImpl_IAdvancedOperations.hxx"
class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
public virtual POA_GEOM::GEOM_IAdvancedOperations,
public virtual GEOM_IOperations_i
{
public:
GEOM_IAdvancedOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_IAdvancedOperations* theImpl);
~GEOM_IAdvancedOperations_i();
/*@@ insert new functions before this line @@*/
::GEOMImpl_IAdvancedOperations* GetOperations()
{ return (::GEOMImpl_IAdvancedOperations*)GetImpl(); }
};
#endif

View File

@ -47,6 +47,7 @@ salomeinclude_HEADERS = \
GEOM_ITransformOperations_i.hh \
GEOM_IMeasureOperations_i.hh \
GEOM_IGroupOperations_i.hh \
GEOM_IAdvancedOperations_i.hh \
GEOM_Gen_i.hh \
GEOM_GEOM_I.hxx
@ -65,6 +66,7 @@ dist_libGEOMEngine_la_SOURCES = \
GEOM_ITransformOperations_i.cc \
GEOM_IMeasureOperations_i.cc \
GEOM_IGroupOperations_i.cc \
GEOM_IAdvancedOperations_i.cc \
GEOM_Gen_i.cc \
GEOM_DumpPython.cc

View File

@ -56,6 +56,7 @@
## @defgroup l4_decompose Decompose objects
## @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
## @}
@ -98,7 +99,7 @@ def RaiseIfFailed (Method_name, Operation):
## @ingroup l1_geompy_auxiliary
def ParseParameters(*parameters):
Result = []
StringResult = ""
StringResult = []
for parameter in parameters:
if isinstance(parameter,str):
if notebook.isVariable(parameter):
@ -109,11 +110,12 @@ def ParseParameters(*parameters):
Result.append(parameter)
pass
StringResult = StringResult + str(parameter)
StringResult = StringResult + ":"
StringResult.append(str(parameter))
pass
StringResult = StringResult[:len(StringResult)-1]
Result.append(StringResult)
if Result:
Result.append(":".join(StringResult))
else:
Result = ":".join(StringResult)
return Result
## Return list of variables value from salome notebook
@ -281,6 +283,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
self.MeasuOp = None
self.BlocksOp = None
self.GroupOp = None
self.AdvOp = None
pass
## @addtogroup l1_geompy_auxiliary
@ -312,6 +315,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
self.MeasuOp = self.GetIMeasureOperations (self.myStudyId)
self.BlocksOp = self.GetIBlocksOperations (self.myStudyId)
self.GroupOp = self.GetIGroupOperations (self.myStudyId)
self.AdvOp = self.GetIAdvancedOperations (self.myStudyId)
pass
## Get name for sub-shape aSubObj of shape aMainObj
@ -4108,6 +4112,14 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# end of l3_groups
## @}
## @addtogroup l4_advanced
## @{
#@@ insert new functions before this line @@#
# end of l4_advanced
## @}
## Create a copy of the given object
# @ingroup l1_geompy_auxiliary
#

View File

@ -32,7 +32,7 @@ if GEOM_ENABLE_GUI
SUBDIRS += OBJECT DlgRef GEOMFiltersSelection GEOMGUI GEOMBase GEOMToolsGUI \
DisplayGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI \
BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI \
GroupGUI BlocksGUI GEOM_SWIG_WITHIHM
GroupGUI BlocksGUI AdvancedGUI GEOM_SWIG_WITHIHM
endif
DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo SKETCHER GEOM BREPExport \
@ -41,4 +41,4 @@ DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo SKETCHER GEOM BREPExport \
OBJECT DlgRef GEOMFiltersSelection GEOMGUI GEOMBase GEOMToolsGUI \
DisplayGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI \
BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI \
MeasureGUI GroupGUI BlocksGUI GEOM_SWIG_WITHIHM
MeasureGUI GroupGUI BlocksGUI AdvancedGUI GEOM_SWIG_WITHIHM