* \param theH Height of the cylinder
* \return New GEOM_Object, containing the created shape.
*/
- GEOM_Object MakeDividedCylinder (in double theR, in double theH);
+ GEOM_Object MakeDividedCylinder (in double theR,
+ in double theH,
+ in pattern thePattern );
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
GEOM_Object MakeDividedDisk (in double theR, in double theRatio, in short theOrientation,
in pattern thePattern);
- GEOM_Object MakeDividedCylinder (in double theR, in double theH);
+ GEOM_Object MakeDividedCylinder (in double theR, in double theH,
+ in pattern thePattern);
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
GroupParams->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
GroupParams->TextLabel1->setText(tr("GEOM_RADIUS"));
GroupParams->TextLabel2->setText(tr("GEOM_HEIGHT"));
+
+ GroupPattern = new DlgRef_3Radio(centralWidget());
+ GroupPattern->GroupBox1->setTitle(tr("GEOM_PATTERN"));
+ GroupPattern->RadioButton1->setText(tr("GEOM_SQUARE"));
+ GroupPattern->RadioButton2->setText(tr("GEOM_HEXAGON"));
+ GroupPattern->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+ GroupPattern->RadioButton3->close();
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6);
layout->addWidget(GroupParams);
+ layout->addWidget(GroupPattern);
/***************************************************************/
setHelpFileName("create_dividedcylinder_page.html");
double aHeight = 300;
GroupParams->SpinBox_DX->setValue(aRadius);
GroupParams->SpinBox_DY->setValue(aHeight);
+
+ GroupPattern->RadioButton1->setChecked(true);
+ myPattern = GEOM::SQUARE;
// Signal/slot connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(GroupParams->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
connect(GroupParams->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
+
+ connect(GroupPattern->RadioButton1, SIGNAL(clicked()), this, SLOT(RadioButtonClicked()));
+ connect(GroupPattern->RadioButton2, SIGNAL(clicked()), this, SLOT(RadioButtonClicked()));
initName(tr("GEOM_DIVIDEDCYLINDER"));
//@@ set double spin box step for all spin boxes here @@//
}
+//=================================================================================
+// function : RadioButtonClicked()
+// purpose : Radio button management
+//=================================================================================
+void AdvancedGUI_DividedCylinderDlg::RadioButtonClicked()
+{
+ QRadioButton* send = (QRadioButton*)sender();
+
+ // Division pattern
+ if (send == GroupPattern->RadioButton1)
+ myPattern = GEOM::SQUARE;
+ else if (send == GroupPattern->RadioButton2)
+ myPattern = GEOM::HEXAGON;
+
+ displayPreview(true);
+}
+
//=================================================================================
// function : ClickOnOk()
// purpose :
CORBA::Double theH = GroupParams->SpinBox_DY->value();
// call engine function
- anObj = anOper->MakeDividedCylinder(theR, theH);
+ anObj = anOper->MakeDividedCylinder(theR, theH, myPattern);
res = !anObj->_is_nil();
if (res && !IsPreview())
{
#include <GEOMBase_Skeleton.h>
class DlgRef_2Spin;
+class DlgRef_3Radio;
//=================================================================================
// class : AdvancedGUI_DividedCylinderDlg
private:
DlgRef_2Spin* GroupParams;
+ DlgRef_3Radio* GroupPattern;
+ GEOM::pattern myPattern;
private slots:
void ClickOnOk();
void ActivateThisDialog();
void ValueChangedInSpinBox();
void SetDoubleSpinBoxStep( double );
+ void RadioButtonClicked();
};
#endif // ADVANCEDGUI_DIVIDEDCYLINDERDLG_H
GroupPattern = new DlgRef_3Radio(centralWidget());
GroupPattern->GroupBox1->setTitle(tr("GEOM_PATTERN"));
+ GroupPattern->RadioButton1->setText(tr("GEOM_SQUARE"));
+ GroupPattern->RadioButton2->setText(tr("GEOM_HEXAGON"));
GroupPattern->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
GroupPattern->RadioButton3->close();
-
GroupPntVecR = new DlgRef_2Sel1Spin(centralWidget());
GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
GroupPntVecR->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
<source>GEOM_HEIGHT</source>
<translation>Height :</translation>
</message>
+ <message>
+ <source>GEOM_HEXAGON</source>
+ <translation>Hexagon</translation>
+ </message>
<message>
<source>GEOM_HOLES</source>
<translation>Holes</translation>
<source>GEOM_OFFSET_TITLE</source>
<translation>Offset Surface</translation>
</message>
+ <message>
+ <source>GEOM_PATTERN</source>
+ <translation>Division pattern</translation>
+ </message>
<message>
<source>GEOM_PROJECTION</source>
<translation>Projection</translation>
<source>GEOM_SPLINE_TITLE</source>
<translation>Spline Construction</translation>
</message>
+ <message>
+ <source>GEOM_SQUARE</source>
+ <translation>Square</translation>
+ </message>
<message>
<source>GEOM_START_LCS</source>
<translation>Start LCS</translation>
<source>GEOM_HEIGHT</source>
<translation>Hauteur:</translation>
</message>
+ <message>
+ <source>GEOM_HEXAGON</source>
+ <translation>Héxagone</translation>
+ </message>
<message>
<source>GEOM_HOLES</source>
<translation>Trous</translation>
<source>GEOM_OFFSET_TITLE</source>
<translation>Décaler une surface</translation>
</message>
+ <message>
+ <source>GEOM_PATTERN</source>
+ <translation>Schema de découpe</translation>
+ </message>
<message>
<source>GEOM_PROJECTION</source>
<translation>Projection</translation>
<source>GEOM_SPLINE_TITLE</source>
<translation>Construction d'un spline</translation>
</message>
+ <message>
+ <source>GEOM_SQUARE</source>
+ <translation>Carré</translation>
+ </message>
<message>
<source>GEOM_START_LCS</source>
<translation>SCL du Début</translation>
* \return New GEOM_Object, containing the created shape.
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double theR, double theH)
+Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double theR,
+ double theH,
+ int thePattern)
{
SetErrorCode(KO);
//Add a new object
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
- Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 50.0, 1, 0);
+ Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
aBaseShape->GetLastFunction()->SetDescription(""); // Erase dump of MakeDividedDisk
aShape = my3DPrimOperations->MakePrismDXDYDZ(aBaseShape,0.0,0.0,theH, -1.0);
double theRatio,
int thePattern);
- Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR, double theH);
+ Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR,
+ double theH,
+ int thePattern);
+
/*@@ insert new functions before this line @@ do not remove this line @@*/
};
#endif
* \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_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR,
+ CORBA::Double theH,
+ GEOM::pattern thePattern)
{
GEOM::GEOM_Object_var aGEOMObject;
GetOperations()->SetNotDone();
//Create the DividedCylinder
- Handle(GEOM_Object) anObject = GetOperations()->MakeDividedCylinder(theR, theH);
+ Handle(GEOM_Object) anObject = GetOperations()->MakeDividedCylinder(theR, theH, thePattern);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
CORBA::Double theRatio,
GEOM::pattern thePattern);
- GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH);
+ GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
+ CORBA::Double theH,
+ GEOM::pattern thePattern);
/*@@ insert new functions before this line @@ do not remove this line @@*/
::GEOMImpl_IAdvancedOperations* GetOperations()
//=============================================================================
// MakeDividedCylinder
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH)
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedCylinder (CORBA::Double theR,
+ CORBA::Double theH,
+ GEOM::pattern thePattern)
{
beginService( " GEOM_Superv_i::MakeDividedCylinder" );
MESSAGE("GEOM_Superv_i::MakeDividedCylinder");
getAdvancedOp();
- GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeDividedCylinder(theR, theH);
+ GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeDividedCylinder(theR, theH, thePattern);
endService( " GEOM_Superv_i::MakeDividedCylinder" );
return anObj;
}
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::pattern thePattern);
- GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR, CORBA::Double theH);
+ GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
+ CORBA::Double theH,
+ GEOM::pattern thePattern);
/*@@ insert new functions before this line @@ do not remove this line @@*/
private: