<ul>
<li>\subpage create_pipetshape_page</li>
<li>\subpage create_divideddisk_page</li>
+<li>\subpage create_dividedcylinder_page</li>
<!--@@ insert new functions before this line @@ do not remove this line @@-->
</ul>
--- /dev/null
+/*!
+
+\page create_dividedcylinder_page DividedCylinder
+
+To create a \b DividedCylinder in the <b>Main Menu</b> select <b>New Entity - >
+Advanced - > DividedCylinder </b>
+
+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.
+
+<b>TUI Command:</b> <em>geompy.MakeDividedCylinder(R, H)</em>
+
+<b>Arguments:</b>
+- \b R - Radius of the cylinder
+- \b H - Height of the cylinder
+
+\image html dividedcylinder_dlg.png
+
+Example:
+
+\image html dividedcylinder.png
+
+Our <b>TUI Scripts</b> provide you with useful examples of creation of
+\ref tui_creation_dividedcylinder "Advanced objects".
+
+*/
gg.createAndDisplayGO(id_divideddisk)
\endcode
+\anchor tui_creation_dividedcylinder
+<br><h2>Creation of DividedCylinder</h2>
+
+\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
+
<!--@@ insert new functions before this line @@ do not remove this line @@-->
*/
*/
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 @@*/
};
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 @@*/
};
};
</outParameter-list>
<DataStream-list></DataStream-list>
</component-service>
+ <component-service>
+ <service-name>MakeDividedCylinder</service-name>
+ <service-author></service-author>
+ <service-version></service-version>
+ <service-comment>unknown</service-comment>
+ <service-by-default>0</service-by-default>
+ <inParameter-list>
+ <inParameter>
+ <inParameter-name>theR</inParameter-name>
+ <inParameter-type>double</inParameter-type>
+ <inParameter-comment>Radius of the cylinder</inParameter-comment>
+ </inParameter>
+ <inParameter>
+ <inParameter-name>theH</inParameter-name>
+ <inParameter-type>double</inParameter-type>
+ <inParameter-comment>Height of the cylinder</inParameter-comment>
+ </inParameter>
+ </inParameter-list>
+ <outParameter-list>
+ <outParameter>
+ <outParameter-name>return</outParameter-name>
+ <outParameter-type>GEOM_Object</outParameter-type>
+ <outParameter-comment>Result object</outParameter-comment>
+ </outParameter>
+ </outParameter-list>
+ <DataStream-list></DataStream-list>
+ </component-service>
<!-- @@ insert new functions before this line @@ do not remove this line @@ -->
</component-service-list>
</component-interface-list>
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)
#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 <QDialog>
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 ) );
--- /dev/null
+// 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 <DlgRef.h>
+#include <GeometryGUI.h>
+#include <GEOMBase.h>
+
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+
+// OCCT Includes
+#include <TopoDS_Shape.hxx>
+#include <TopoDS.hxx>
+#include <TopExp.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+
+#include <GEOMImpl_Types.hxx>
+
+//=================================================================================
+// 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;
+}
--- /dev/null
+// 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 <GEOMBase_Skeleton.h>
+
+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
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)
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)
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)
<source>ICON_OBJBROWSER_ADVANCED_202</source>
<translation>tree_divideddisk.png</translation>
</message>
+ <message>
+ <source>ICON_DLG_DIVIDEDCYLINDER_R_H</source>
+ <translation>dividedcylinder_r_h.png</translation>
+ </message>
+ <message>
+ <source>ICO_DIVIDEDCYLINDER</source>
+ <translation>dividedcylinder.png</translation>
+ </message>
+ <message>
+ <source>ICON_OBJBROWSER_ADVANCED_203</source>
+ <translation>tree_dividedcylinder.png</translation>
+ </message>
<!-- @@ insert new functions before this line @@ do not remove this line @@ -->
</context>
</TS>
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;
// 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 --------------------------
// 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 );
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 --------------------------
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 @@//
};
}
// Advanced operations
#include <GEOMImpl_PipeTShapeDriver.hxx>
#include <GEOMImpl_DividedDiskDriver.hxx>
+// #include <GEOMImpl_DividedCylinderDriver.hxx>
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
//=============================================================================
// 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);
#include "GEOMImpl_IPipeTShape.hxx"
#include <GEOMImpl_DividedDiskDriver.hxx>
#include <GEOMImpl_IDividedDisk.hxx>
+// #include <GEOMImpl_DividedCylinderDriver.hxx>
+#include <GEOMImpl_IDividedCylinder.hxx>
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
#include <TopExp.hxx>
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 @@*/
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
#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 @@*/
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)
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)
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 @@*/
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()
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 @@*/
//=====================================================================================
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:
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