diff --git a/doc/salome/gui/GEOM/input/creating_dividedcylinder.doc b/doc/salome/gui/GEOM/input/creating_dividedcylinder.doc
new file mode 100644
index 000000000..e0d7f0845
--- /dev/null
+++ b/doc/salome/gui/GEOM/input/creating_dividedcylinder.doc
@@ -0,0 +1,27 @@
+/*!
+
+\page create_dividedcylinder_page DividedCylinder
+
+To create a \b DividedCylinder in the Main Menu select New Entity - >
+Advanced - > DividedCylinder
+
+Specify the parameters of the DividedCylinder object creation in the opened dialog
+box and press "Apply" or "Apply & Close" button.
+Result of each operation will be a GEOM_Object.
+
+TUI Command:geompy.MakeDividedCylinder(R, H)
+
+Arguments:
+- \b R - Radius of the cylinder
+- \b H - Height of the cylinder
+
+\image html dividedcylinder_dlg.png
+
+Example:
+
+\image html dividedcylinder.png
+
+Our TUI Scripts provide you with useful examples of creation of
+\ref tui_creation_dividedcylinder "Advanced objects".
+
+*/
diff --git a/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
index 655234d87..4b9047f34 100644
--- a/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
+++ b/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
@@ -98,5 +98,23 @@ id_divideddisk = geompy.addToStudy(divideddisk,"DividedDisk")
gg.createAndDisplayGO(id_divideddisk)
\endcode
+\anchor tui_creation_dividedcylinder
+
Creation of DividedCylinder
+
+\code
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create DividedCylinder object
+dividedcylinder = geompy.MakeDividedCylinder(100, 300)
+
+# add object in the study
+id_dividedcylinder = geompy.addToStudy(dividedcylinder,"DividedCylinder")
+
+# display dividedcylinder
+gg.createAndDisplayGO(id_dividedcylinder)
+\endcode
+
*/
diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl
index cf3d1bc68..370e035a8 100644
--- a/idl/GEOM_Gen.idl
+++ b/idl/GEOM_Gen.idl
@@ -3767,6 +3767,14 @@ module GEOM
*/
GEOM_Object MakeDividedDisk (in double theR, in double theRatio, in short theOrientation);
+ /*!
+ * Builds a cylinder prepared for hexa meshes
+ * \param theR Radius of the cylinder
+ * \param theH Height of the cylinder
+ * \return New GEOM_Object, containing the created shape.
+ */
+ GEOM_Object MakeDividedCylinder (in double theR, in double theH);
+
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl
index 5f1295a4d..177342d0a 100644
--- a/idl/GEOM_Superv.idl
+++ b/idl/GEOM_Superv.idl
@@ -619,6 +619,8 @@ module GEOM
GEOM_Object MakeDividedDisk (in double theR, in double theRatio, in short theOrientation);
+ GEOM_Object MakeDividedCylinder (in double theR, in double theH);
+
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
};
diff --git a/resources/GEOMCatalog.xml.in b/resources/GEOMCatalog.xml.in
index 28e7dc147..e4c33f0de 100644
--- a/resources/GEOMCatalog.xml.in
+++ b/resources/GEOMCatalog.xml.in
@@ -5252,6 +5252,33 @@
+
+ MakeDividedCylinder
+
+
+ unknown
+ 0
+
+
+ theR
+ double
+ Radius of the cylinder
+
+
+ theH
+ double
+ Height of the cylinder
+
+
+
+
+ return
+ GEOM_Object
+ Result object
+
+
+
+
diff --git a/resources/Makefile.am b/resources/Makefile.am
index c3d21181f..dec2cb32f 100644
--- a/resources/Makefile.am
+++ b/resources/Makefile.am
@@ -252,6 +252,7 @@ ADVANCED_RESOURCES += dlg_pipetshapefilletl1.png dlg_pipetshapefilletr1.png dlg_
ADVANCED_RESOURCES += dlg_pipetshapefilletl2.png dlg_pipetshapefilletr2.png dlg_pipetshapefilletw2.png
ADVANCED_RESOURCES += dlg_pipetshapefilletrf.png
#ADVANCED_RESOURCES += divideddisk.png divideddisk_r_ratio.png tree_divideddisk.png
+#ADVANCED_RESOURCES += dividedcylinder.png dividedcylinder_r_h.png tree_dividedcylinder.png
##@@ insert new functions before this line @@ do not remove this line @@##
dist_salomeres_DATA += $(ADVANCED_RESOURCES)
diff --git a/src/AdvancedGUI/AdvancedGUI.cxx b/src/AdvancedGUI/AdvancedGUI.cxx
index 03b3d97bc..2c478e469 100644
--- a/src/AdvancedGUI/AdvancedGUI.cxx
+++ b/src/AdvancedGUI/AdvancedGUI.cxx
@@ -30,6 +30,7 @@
#include "AdvancedGUI_PipeTShapeDlg.h"
#include "AdvancedGUI_DividedDiskDlg.h"
+#include "AdvancedGUI_DividedCylinderDlg.h"
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
#include
@@ -73,6 +74,9 @@ bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
case GEOMOp::OpDividedDisk:
aDlg = new AdvancedGUI_DividedDiskDlg( getGeometryGUI(), parent );
break;
+ case GEOMOp::OpDividedCylinder:
+ aDlg = new AdvancedGUI_DividedCylinderDlg( getGeometryGUI(), parent );
+ break;
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
default:
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
diff --git a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx
new file mode 100644
index 000000000..b48e350e9
--- /dev/null
+++ b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx
@@ -0,0 +1,231 @@
+// 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
+
+#include "AdvancedGUI_DividedCylinderDlg.h"
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+// OCCT Includes
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+//=================================================================================
+// Constructor
+//=================================================================================
+AdvancedGUI_DividedCylinderDlg::AdvancedGUI_DividedCylinderDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, false)
+{
+ QPixmap imageOp (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_DIVIDEDCYLINDER_R_H")));
+ QPixmap imageSel (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
+
+ setWindowTitle(tr("GEOM_DIVIDEDCYLINDER_TITLE"));
+
+ /***************************************************************/
+ mainFrame()->GroupConstructors->setTitle(tr("GEOM_DIVIDEDCYLINDER"));
+ mainFrame()->RadioButton1->setIcon(imageOp);
+ mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
+ mainFrame()->RadioButton2->close();
+ mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+ mainFrame()->RadioButton3->close();
+
+ GroupParams = new DlgRef_2Spin(centralWidget());
+
+ QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+ layout->setMargin(0); layout->setSpacing(6);
+ layout->addWidget(GroupParams);
+ /***************************************************************/
+
+ setHelpFileName("create_dividedcylinder_page.html");
+
+ Init();
+}
+
+//=================================================================================
+// Destructor
+//=================================================================================
+AdvancedGUI_DividedCylinderDlg::~AdvancedGUI_DividedCylinderDlg()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::Init()
+{
+ // Get setting of step value from file configuration
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
+
+ // min, max, step and decimals for spin boxes & initial values
+ initSpinBox(GroupParams->SpinBox_DX, 0.00001, COORD_MAX, step, "length_precision" );
+ initSpinBox(GroupParams->SpinBox_DY, 0.00001, COORD_MAX, step, "length_precision" );
+
+ // init variables
+ double aRadius = 100;
+ double aHeight = 300;
+ GroupParams->SpinBox_DX->setValue(aRadius);
+ GroupParams->SpinBox_DY->setValue(aHeight);
+
+ // Signal/slot connections
+ connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
+ this, SLOT(SetDoubleSpinBoxStep(double)));
+
+ connect(GroupParams->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
+ connect(GroupParams->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
+
+ initName(tr("GEOM_DIVIDEDCYLINDER"));
+ displayPreview(true);
+}
+
+//=================================================================================
+// function : SetDoubleSpinBoxStep()
+// purpose : Double spin box management
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::SetDoubleSpinBoxStep (double step)
+{
+ //@@ set double spin box step for all spin boxes here @@//
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::ClickOnOk()
+{
+ if (ClickOnApply())
+ ClickOnCancel();
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+bool AdvancedGUI_DividedCylinderDlg::ClickOnApply()
+{
+ if (!onAccept())
+ return false;
+
+ initName();
+
+ return true;
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose :
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::ActivateThisDialog()
+{
+ GEOMBase_Skeleton::ActivateThisDialog();
+ displayPreview(true);
+}
+
+//=================================================================================
+// function : enterEvent [REDEFINED]
+// purpose :
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::enterEvent (QEvent*)
+{
+ if (!mainFrame()->GroupConstructors->isEnabled())
+ ActivateThisDialog();
+}
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
+{
+ //@@ connect custom spin boxes or other widget to this slot in the Init() method for automatic preview update @@//
+ displayPreview(true);
+}
+
+//=================================================================================
+// function : createOperation
+// purpose :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
+{
+ return getGeomEngine()->GetIAdvancedOperations(getStudyId());
+}
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool AdvancedGUI_DividedCylinderDlg::isValid (QString& msg)
+{
+ bool ok = true;
+
+ //@@ add custom validation actions here @@//
+
+ return ok;
+}
+
+//=================================================================================
+// function : execute
+// purpose :
+//=================================================================================
+bool AdvancedGUI_DividedCylinderDlg::execute (ObjectList& objects)
+{
+ bool res = false;
+
+ GEOM::GEOM_Object_var anObj;
+
+ GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
+
+ //@@ retrieve input values from the widgets here @@//
+ CORBA::Double theR = GroupParams->SpinBox_DX->value();
+ CORBA::Double theH = GroupParams->SpinBox_DY->value();
+
+ // call engine function
+ anObj = anOper->MakeDividedCylinder(theR, theH);
+ res = !anObj->_is_nil();
+ if (res && !IsPreview())
+ {
+ QStringList aParameters;
+ //@@ put stringified input parameters to the string list here to store in the data model for notebook @@//
+// aParameters << @@ stringified parameter value @@; // R parameter
+// aParameters << @@ stringified parameter value @@; // H parameter
+// if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); // TODO set parameters here
+ }
+
+ if (res)
+ objects.push_back(anObj._retn());
+
+ return res;
+}
diff --git a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h
new file mode 100644
index 000000000..60624d2ef
--- /dev/null
+++ b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h
@@ -0,0 +1,62 @@
+// 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
+
+#ifndef ADVANCEDGUI_DIVIDEDCYLINDERDLG_H
+#define ADVANCEDGUI_DIVIDEDCYLINDERDLG_H
+
+#include
+
+class DlgRef_2Spin;
+
+//=================================================================================
+// class : AdvancedGUI_DividedCylinderDlg
+// purpose :
+//=================================================================================
+class AdvancedGUI_DividedCylinderDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ AdvancedGUI_DividedCylinderDlg( GeometryGUI*, QWidget* = 0 );
+ ~AdvancedGUI_DividedCylinderDlg();
+
+protected:
+ // redefined from GEOMBase_Helper
+ virtual GEOM::GEOM_IOperations_ptr createOperation();
+ virtual bool isValid( QString& );
+ virtual bool execute( ObjectList& );
+
+private:
+ void Init();
+ void enterEvent( QEvent* );
+
+private:
+ DlgRef_2Spin* GroupParams;
+
+private slots:
+ void ClickOnOk();
+ bool ClickOnApply();
+ void ActivateThisDialog();
+ void ValueChangedInSpinBox();
+ void SetDoubleSpinBoxStep( double );
+};
+
+#endif // ADVANCEDGUI_DIVIDEDCYLINDERDLG_H
diff --git a/src/AdvancedGUI/Makefile.am b/src/AdvancedGUI/Makefile.am
index f2fa4d4db..9301bd4ca 100644
--- a/src/AdvancedGUI/Makefile.am
+++ b/src/AdvancedGUI/Makefile.am
@@ -29,6 +29,7 @@ salomeinclude_HEADERS = \
ADVANCED_INCLUDES =
ADVANCED_INCLUDES += AdvancedGUI_PipeTShapeDlg.h
ADVANCED_INCLUDES += AdvancedGUI_DividedDiskDlg.h
+ADVANCED_INCLUDES += AdvancedGUI_DividedCylinderDlg.h
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@##
salomeinclude_HEADERS += $(ADVANCED_INCLUDES)
@@ -43,6 +44,7 @@ dist_libAdvancedGUI_la_SOURCES = \
ADVANCED_SOURCES =
ADVANCED_SOURCES += AdvancedGUI_PipeTShapeDlg.h AdvancedGUI_PipeTShapeDlg.cxx
ADVANCED_SOURCES += AdvancedGUI_DividedDiskDlg.h AdvancedGUI_DividedDiskDlg.cxx
+ADVANCED_SOURCES += AdvancedGUI_DividedCylinderDlg.h AdvancedGUI_DividedCylinderDlg.cxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@##
dist_libAdvancedGUI_la_SOURCES += $(ADVANCED_SOURCES)
@@ -52,6 +54,7 @@ MOC_FILES =
ADVANCED_MOC_FILES =
ADVANCED_MOC_FILES += AdvancedGUI_PipeTShapeDlg_moc.cxx
ADVANCED_MOC_FILES += AdvancedGUI_DividedDiskDlg_moc.cxx
+ADVANCED_MOC_FILES += AdvancedGUI_DividedCylinderDlg_moc.cxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@##
MOC_FILES += $(ADVANCED_MOC_FILES)
diff --git a/src/GEOMGUI/GEOM_images.ts b/src/GEOMGUI/GEOM_images.ts
index da9fb9db0..7168f7a96 100644
--- a/src/GEOMGUI/GEOM_images.ts
+++ b/src/GEOMGUI/GEOM_images.ts
@@ -1288,6 +1288,18 @@
tree_divideddisk.png
+
+
+ dividedcylinder_r_h.png
+
+
+
+ dividedcylinder.png
+
+
+
+ tree_dividedcylinder.png
+
diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx
index 1cc5d4a26..72221cce8 100644
--- a/src/GEOMGUI/GeometryGUI.cxx
+++ b/src/GEOMGUI/GeometryGUI.cxx
@@ -568,6 +568,7 @@ void GeometryGUI::OnGUIEvent( int id )
case GEOMOp::OpPipeTShape: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
// case GEOMOp::OpPipeTShapeGroups: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
case GEOMOp::OpDividedDisk: // MENU NEW ENTITY - ADVANCED - DIVIDEDDISK
+ case GEOMOp::OpDividedCylinder: // MENU NEW ENTITY - ADVANCED - DIVIDEDCYLINDER
//@@ 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 @@//
libName = "AdvancedGUI";
break;
@@ -890,6 +891,7 @@ void GeometryGUI::initialize( CAM_Application* app )
// createGeomAction( GEOMOp::OpPipeTShapeGroups, "PIPETSHAPEGROUPS" );
createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
+ createGeomAction( GEOMOp::OpDividedCylinder, "DIVIDEDCYLINDER" );
//@@ 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 @@//
// ---- create menus --------------------------
@@ -940,6 +942,7 @@ void GeometryGUI::initialize( CAM_Application* app )
// createMenu( GEOMOp::OpPipeTShape, advId, -1 );
// createMenu( GEOMOp::OpPipeTShapeGroups, advId, -1 );
createMenu( GEOMOp::OpDividedDisk, advId, -1 );
+ createMenu( GEOMOp::OpDividedCylinder, advId, -1 );
//@@ 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( separator(), newEntId, -1 );
@@ -1197,6 +1200,7 @@ void GeometryGUI::initialize( CAM_Application* app )
int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) );
createTool( GEOMOp::OpDividedDisk, advancedTbId );
+ createTool( GEOMOp::OpDividedCylinder, advancedTbId );
//@@ 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 @@//
// ---- create popup menus --------------------------
diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h
index e15c9695a..77e51f1c3 100644
--- a/src/GEOMGUI/GeometryGUI_Operations.h
+++ b/src/GEOMGUI/GeometryGUI_Operations.h
@@ -186,6 +186,7 @@ namespace GEOMOp {
OpPipeTShape = 10001, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
// OpPipeTShapeGroups = 10002, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
OpDividedDisk = 10003, // MENU NEW ENTITY - ADVANCED - DIVIDEDDISK
+ OpDividedCylinder = 10004, // MENU NEW ENTITY - ADVANCED - DIVIDEDCYLINDER
//@@ insert new functions before this line @@ do not remove this line @@//
};
}
diff --git a/src/GEOMImpl/GEOMImpl_Gen.cxx b/src/GEOMImpl/GEOMImpl_Gen.cxx
index 982a6faa7..884da5cb1 100644
--- a/src/GEOMImpl/GEOMImpl_Gen.cxx
+++ b/src/GEOMImpl/GEOMImpl_Gen.cxx
@@ -84,6 +84,7 @@
// Advanced operations
#include
#include
+// #include
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
//=============================================================================
@@ -168,6 +169,7 @@ GEOMImpl_Gen::GEOMImpl_Gen()
// Advanced operations
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeTShapeDriver::GetID(), new GEOMImpl_PipeTShapeDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedDiskDriver::GetID(), new GEOMImpl_DividedDiskDriver());
+// TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedCylinderDriver::GetID(), new GEOMImpl_DividedCylinderDriver());
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
SetEngine(this);
diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx
index 97b56f1c4..914bf6621 100644
--- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx
+++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx
@@ -47,6 +47,8 @@
#include "GEOMImpl_IPipeTShape.hxx"
#include
#include
+// #include
+#include
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
#include
@@ -2287,4 +2289,23 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR,
return aShape;
}
+//=============================================================================
+/*!
+ * Builds a cylinder prepared for hexa meshes
+ * \param theR Radius of the cylinder
+ * \param theH Height of the cylinder
+ * \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double theR, double theH)
+{
+ SetErrorCode(KO);
+
+ Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 50.0, 1);
+ Handle(GEOM_Object) aShape = my3DPrimOperations->MakePrismDXDYDZ(aBaseShape,0.0,0.0,theH, -1.0);
+
+ SetErrorCode(OK);
+
+ return aShape;
+}
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx
index 488301b4e..a687f35b7 100644
--- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx
+++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx
@@ -110,6 +110,7 @@ public:
Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0);
Standard_EXPORT Handle(GEOM_Object) MakeDividedDisk (double theR, double theRatio, int theOrientation);
+ Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR, double theH);
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
#endif
diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx
index 250092f52..7d79d0f26 100755
--- a/src/GEOMImpl/GEOMImpl_Types.hxx
+++ b/src/GEOMImpl/GEOMImpl_Types.hxx
@@ -330,10 +330,12 @@
#define ADVANCED_BASE 200 // NO OPERATION (advanced operations base)
#define GEOM_TSHAPE 201
#define GEOM_DIVIDEDDISK 202
+#define GEOM_DIVIDEDCYLINDER 203
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
// Advanced functions sub-operations codes
#define TSHAPE_BASIC 1
#define TSHAPE_CHAMFER 2
#define TSHAPE_FILLET 3
#define DIVIDEDDISK_R_RATIO 1
+#define DIVIDEDCYLINDER_R_H 1
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am
index be7f4743a..69cda82da 100644
--- a/src/GEOMImpl/Makefile.am
+++ b/src/GEOMImpl/Makefile.am
@@ -145,6 +145,7 @@ salomeinclude_HEADERS = \
ADVANCED_INCLUDES =
ADVANCED_INCLUDES += GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx
ADVANCED_INCLUDES += GEOMImpl_IDividedDisk.hxx GEOMImpl_DividedDiskDriver.hxx
+##ADVANCED_INCLUDES += GEOMImpl_IDividedCylinder.hxx GEOMImpl_DividedCylinderDriver.hxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
salomeinclude_HEADERS += $(ADVANCED_INCLUDES)
@@ -216,6 +217,7 @@ dist_libGEOMimpl_la_SOURCES = \
ADVANCED_SOURCES =
ADVANCED_SOURCES += GEOMImpl_PipeTShapeDriver.cxx
ADVANCED_SOURCES += GEOMImpl_DividedDiskDriver.cxx
+##ADVANCED_SOURCES += GEOMImpl_DividedCylinderDriver.cxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
dist_libGEOMimpl_la_SOURCES += $(ADVANCED_SOURCES)
diff --git a/src/GEOM_I/GEOM_IAdvancedOperations_i.cc b/src/GEOM_I/GEOM_IAdvancedOperations_i.cc
index 1bd4fc05a..e007eefc4 100644
--- a/src/GEOM_I/GEOM_IAdvancedOperations_i.cc
+++ b/src/GEOM_I/GEOM_IAdvancedOperations_i.cc
@@ -345,4 +345,27 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double
return GetObject(anObject);
}
+//=============================================================================
+/*!
+ * Builds a cylinder prepared for hexa meshes
+ * \param theR Radius of the cylinder
+ * \param theH Height of the cylinder
+ * \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ //Create the DividedCylinder
+ Handle(GEOM_Object) anObject = GetOperations()->MakeDividedCylinder(theR, theH);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
/*@@ insert new functions before this line @@ do not remove this line @@*/
diff --git a/src/GEOM_I/GEOM_IAdvancedOperations_i.hh b/src/GEOM_I/GEOM_IAdvancedOperations_i.hh
index acf0e205f..ec09a18f5 100644
--- a/src/GEOM_I/GEOM_IAdvancedOperations_i.hh
+++ b/src/GEOM_I/GEOM_IAdvancedOperations_i.hh
@@ -64,6 +64,7 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
CORBA::Double theRF, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio, CORBA::Short theOrientation);
+ GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH);
/*@@ insert new functions before this line @@ do not remove this line @@*/
::GEOMImpl_IAdvancedOperations* GetOperations()
diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc
index 817b79ded..c7efde26d 100644
--- a/src/GEOM_I_Superv/GEOM_Superv_i.cc
+++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc
@@ -3415,6 +3415,19 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedDisk (CORBA::Double theR, CORBA:
return anObj;
}
+//=============================================================================
+// MakeDividedCylinder
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH)
+{
+ beginService( " GEOM_Superv_i::MakeDividedCylinder" );
+ MESSAGE("GEOM_Superv_i::MakeDividedCylinder");
+ getAdvancedOp();
+ GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeDividedCylinder(theR, theH);
+ endService( " GEOM_Superv_i::MakeDividedCylinder" );
+ return anObj;
+}
+
/*@@ insert new functions before this line @@ do not remove this line @@*/
//=====================================================================================
diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh
index 0278160a6..cbc62d646 100644
--- a/src/GEOM_I_Superv/GEOM_Superv_i.hh
+++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh
@@ -707,6 +707,7 @@ public:
CORBA::Double theRF, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio,CORBA::Short theOrientation );
+ GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH);
/*@@ insert new functions before this line @@ do not remove this line @@*/
private:
diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py
index 3f830aa7f..1f48e8d2c 100644
--- a/src/GEOM_SWIG/geompyDC.py
+++ b/src/GEOM_SWIG/geompyDC.py
@@ -8562,6 +8562,19 @@ class geompyDC(GEOM._objref_GEOM_Gen):
if Parameters: anObj.SetParameters(Parameters)
return anObj
+ ## Builds a cylinder prepared for hexa meshes
+ # @param theR Radius of the cylinder
+ # @param theH Height of the cylinder
+ # @return New GEOM_Object, containing the created shape.
+ #
+ # @ref tui_creation_dividedcylinder "Example"
+ def MakeDividedCylinder(self, theR, theH):
+ theR, theH, Parameters = ParseParameters(theR, theH)
+ anObj = self.AdvOp.MakeDividedCylinder(theR, theH)
+ RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
+ if Parameters: anObj.SetParameters(Parameters)
+ return anObj
+
#@@ insert new functions before this line @@ do not remove this line @@#
# end of l4_advanced