- mySimulationTopoDs = BRepPrimAPI_MakeCylinder(anAxis, this->myRadius, fabs(myHeight)).Shape();
- myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
- }
- catch(Standard_Failure) {
- MESSAGE("Exception catched in MakeCylinderSimulationAndDisplay");
+
+//=================================================================================
+// function : getRadius()
+// purpose :
+//=================================================================================
+double PrimitiveGUI_CylinderDlg::getRadius() const
+{
+ int aConstructorId = getConstructorId();
+ if (aConstructorId == 0)
+ return GroupPoints->SpinBox_DX->GetValue();
+ else if (aConstructorId == 1)
+ return GroupDimensions->SpinBox_DX->GetValue();
+ return 0;
+}
+
+//=================================================================================
+// function : getHeight()
+// purpose :
+//=================================================================================
+double PrimitiveGUI_CylinderDlg::getHeight() const
+{
+ int aConstructorId = getConstructorId();
+ if (aConstructorId == 0)
+ return GroupPoints->SpinBox_DY->GetValue();
+ else if (aConstructorId == 1)
+ return GroupDimensions->SpinBox_DY->GetValue();
+ return 0;
+}
+
+//=================================================================================
+// function : addSubshapeToStudy
+// purpose : virtual method to add new SubObjects if local selection
+//=================================================================================
+void PrimitiveGUI_CylinderDlg::addSubshapesToStudy()
+{
+ QMap<QString, GEOM::GEOM_Object_var> objMap;
+
+switch (getConstructorId())
+ {
+ case 0:
+ objMap[GroupPoints->LineEdit1->text()] = myPoint;
+ objMap[GroupPoints->LineEdit2->text()] = myDir;
+ break;
+ case 1:
+ return;