\n To generate an \b Extrusion on an object in the <b>Main Menu</b>
select <b>New Entity - > Generation - > Extrusion</b>
-\n There are 2 algorithms for creation of an \b Extrusion (Prism).
+\n There are 3 algorithms for creation of an \b Extrusion (Prism).
\n The \b Result of the operation will be a GEOM_Object (edge, face, shell
solid or compsolid).
\n Firstly, you can define the <b>Base Shape</b> (a basis of the
extrusion), the \b Vector (a direction of the extrusion) and the \b
-Height of extrusion.
+Height of extrusion.<br>
+It is possible to select in GUI several Base Shapes to make several extrusions (using Shift button).
\n The \b Result of the operation will be a GEOM_Object (edge, face,
shell, solid or compsolid).
\n <b> Both Directions </b> checkbox allows extruiding the source
\image html extrusion1.png
-\n Secondly, you can define the \b Extrusion by the <b>Base Shape</b>
+\n Secondly, you can define the \b Extrusion by the <b>Base Shape(s)</b>
and the \b Start and <b>End Point</b> of the \b Vector (in this way
you don't need to create it in advance).
\n <b> Both Directions </b> checkbox allows extruiding the source
\image html extrusion2.png
-\n Finally, you can define the \b Extrusion by the <b>Base Shape</b>
+\n Finally, you can define the \b Extrusion by the <b>Base Shape(s)</b>
and the <b>DX, DY, DZ</b> Vector\n
<b>Both Directions</b> checkbox allows extruding the
source objects both forward and backward.
\n Firstly, to create an extruded \b Pipe shape, you can define the <b>Base
Object</b> (vertex, edge, planar wire, face or shell), which will be extruded
and the <b>Path Object</b> (edge or wire) along which the <b>Base
-Object</b> will be extruded.
+Object</b> will be extruded.<br>
+It is possible to select in GUI several Base Objects to make several pipes (using Shift button).
\n In this mode the default pipe generation algorithm is used. The pipe
is created so that the <b>angle between the normal vector</b> to
the base shape <b>and the tangent to the path</b> wire remains constant at any point of the
\n To create an extruded shape by \b Revolution you need to define the
source \b Object to rotate, the \b Axis of revolution and the \b Angle by which
-the \b Shape has to be rotated around the \b Axis (in degrees).
+the \b Shape has to be rotated around the \b Axis (in degrees).<br>
+It is possible to select in GUI several objects to make several revolutions (using Shift button).
\n <b> Both Directions </b> checkbox allows extruding the source
object both forward and backward.
\n The \b Result of the operation will be a GEOM_Object (edge, face, shell,
GroupPoints->LineEdit1->setText("");
GroupPoints->LineEdit2->setText("");
GroupPoints->LineEdit3->setText("");
- myBase = myPath = myVec = GEOM::GEOM_Object::_nil();
+ myPath = myVec = GEOM::GEOM_Object::_nil();
myOkBase = myOkPath = myOkVec = false;
GroupPoints->CheckButton1->setEnabled(false);
break;
}
}
+ qApp->processEvents();
+ updateGeometry();
+ resize(100,100);
displayPreview();
}
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
- if (aSelList.Extent() != 1)
+ if (aSelList.Extent() < 1)
return;
- // nbSel == 1
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ QString aName = GEOMBase::GetName(aSelectedObject);
if (!testResult || aSelectedObject->_is_nil())
return;
return;
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
- if (S.ShapeType() == TopAbs_COMPSOLID ||
- S.ShapeType() == TopAbs_COMPOUND ||
- S.ShapeType() == TopAbs_SOLID ||
- S.ShapeType() == TopAbs_SHAPE)
- return;
- if ( getConstructorId() == 1 &&
- (S.ShapeType() == TopAbs_SHELL ||
- S.ShapeType() == TopAbs_VERTEX))
- return;
-
- myBase = aSelectedObject;
- myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
+ myOkBase = false;
+ GEOMBase::ConvertListOfIOInListOfGO(aSelList, myBaseObjects, true);
+ if (aSelList.Extent() > 1)
+ aName = QString( "%1_objects").arg( aSelList.Extent() );
+
+ if ( aSelList.Extent() > 0 ) {
+ // check base shapes
+ for (int i=0; i < myBaseObjects.length(); i++) {
+ GEOMBase::GetShape(myBaseObjects[i], S);
+ if (S.ShapeType() == TopAbs_COMPSOLID ||
+ S.ShapeType() == TopAbs_COMPOUND ||
+ S.ShapeType() == TopAbs_SOLID ||
+ S.ShapeType() == TopAbs_SHAPE)
+ return;
+ if ( getConstructorId() == 1 &&
+ (S.ShapeType() == TopAbs_SHELL ||
+ S.ShapeType() == TopAbs_VERTEX))
+ return;
+ }
+ }
+
+ myEditCurrentArgument->setText(aName);
myOkBase = true;
- if (!myOkPath)
- GroupPoints->PushButton2->click();
- else if (!myOkVec)
- GroupPoints->PushButton3->click();
- }
- else if (myEditCurrentArgument == GroupPoints->LineEdit2 ||
+ } else if (myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupPoints->LineEdit3) {
myEditCurrentArgument == GroupPoints->LineEdit2 ? myOkPath = false : myOkVec = false;
bool myOk = false;
- QString aName = GEOMBase::GetName(aSelectedObject);
if (myEditCurrentArgument == GroupPoints->LineEdit2 && !GroupPoints->CheckButton1->isChecked() ){
myPath = aSelectedObject;
myOkPath = true;
myEditCurrentArgument->setText(aName);
- }
- else
- {
- if (aSelectedObject != myBase) {
- TColStd_IndexedMapOfInteger aMap;
- aSelMgr->GetIndexes(aSelList.First(), aMap);
- if (aMap.Extent() == 1) {
- int anIndex = aMap(1);
- aName.append(":edge_" + QString::number(anIndex));
-
- //Find SubShape Object in Father
- GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
-
- if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
- GEOM::GEOM_IShapesOperations_var aShapesOp =
- getGeomEngine()->GetIShapesOperations(getStudyId());
- aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
- myOk = true;
- }
- else { // get Object from study
- aSelectedObject = aFindedObject;
- myOk = true;
- }
- }
- else {
- myOk = true;
- if (S.ShapeType() != TopAbs_EDGE) {
- aSelectedObject = GEOM::GEOM_Object::_nil();
- aName = "";
- myOk = false;
- }
- }
- if (myEditCurrentArgument == GroupPoints->LineEdit2) {
- myPath = aSelectedObject;
- myOkPath = myOk;
- }
- else if (myEditCurrentArgument == GroupPoints->LineEdit3) {
- myVec = aSelectedObject;
- myOkVec = myOk;
- }
+ } else {
+ TColStd_IndexedMapOfInteger aMap;
+ aSelMgr->GetIndexes(aSelList.First(), aMap);
+ if (aMap.Extent() == 1) {
+ int anIndex = aMap(1);
+ aName.append(":edge_" + QString::number(anIndex));
+
+ //Find SubShape Object in Father
+ GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
+
+ if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
+ GEOM::GEOM_IShapesOperations_var aShapesOp =
+ getGeomEngine()->GetIShapesOperations(getStudyId());
+ aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
+ myOk = true;
+ } else { // get Object from study
+ aSelectedObject = aFindedObject;
+ myOk = true;
}
- myEditCurrentArgument->setText(aName);
-
- if (myOkPath) {
- if (!myOkBase)
- GroupPoints->PushButton1->click();
- else if (!myOkVec)
- GroupPoints->PushButton3->click();
- }
- else if (myOkVec) {
- if (!myOkBase)
- GroupPoints->PushButton1->click();
- else if (!myOkPath)
- GroupPoints->PushButton2->click();
+ } else {
+ myOk = true;
+ if (S.ShapeType() != TopAbs_EDGE) {
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ aName = "";
+ myOk = false;
}
}
+ if (myEditCurrentArgument == GroupPoints->LineEdit2) {
+ myPath = aSelectedObject;
+ myOkPath = myOk;
+ } else if (myEditCurrentArgument == GroupPoints->LineEdit3) {
+ myVec = aSelectedObject;
+ myOkVec = myOk;
+ }
+ myEditCurrentArgument->setText(aName);
+
+ if (myOkPath) {
+ if (!myOkBase)
+ GroupPoints->PushButton1->click();
+ else if (!myOkVec)
+ GroupPoints->PushButton3->click();
+ } else if (myOkVec) {
+ if (!myOkBase)
+ GroupPoints->PushButton1->click();
+ else if (!myOkPath)
+ GroupPoints->PushButton2->click();
+ }
+ }
}
-
- // clear selection
- disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
- myGeomGUI->getApp()->selectionMgr()->clearSelected();
- connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
-
displayPreview();
}
//=================================================================================
bool GenerationGUI_PipeDlg::execute (ObjectList& objects)
{
- GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_Object_var anObj, aBase;
GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
- switch ( getConstructorId() ) {
- case 0 :
- anObj = anOper->MakePipe(myBase, myPath);
- break;
- case 1 :
- anObj = anOper->MakePipeBiNormalAlongVector(myBase, myPath, myVec);
- break;
+ for (int i=0; i < myBaseObjects.length(); i++) {
+ aBase = myBaseObjects[i];
+ switch ( getConstructorId() ) {
+ case 0 :
+ anObj = anOper->MakePipe(aBase, myPath);
+ break;
+ case 1 :
+ anObj = anOper->MakePipeBiNormalAlongVector(aBase, myPath, myVec);
+ break;
+ }
+
+ if (!anObj->_is_nil())
+ objects.push_back(anObj._retn());
}
-
- if (!anObj->_is_nil())
- objects.push_back(anObj._retn());
-
return true;
}
void enterEvent( QEvent* );
private:
- GEOM::GEOM_Object_var myBase; /* Base shape */
+ GEOM::ListOfGO myBaseObjects; /* Base shapes */
GEOM::GEOM_Object_var myPath; /* Shape, defining the path */
GEOM::GEOM_Object_var myVec; /* Vector, defining the constant binormal direction */
bool myOkBase;
GroupPoints3->LineEdit1->setText("");
- myPoint1 = myPoint2 = myBase = myVec = GEOM::GEOM_Object::_nil();
+ myPoint1 = myPoint2 = myVec = GEOM::GEOM_Object::_nil();
myOkBase = myOkVec = myOkPnt1 = myOkPnt2 = false;
// signals and slots connections
updateGeometry();
resize(minimumSizeHint());
- if (myInitial) {
- myInitial = false;
- SelectionIntoArgument();
- }
- else {
- displayPreview();
- }
+ SelectionIntoArgument();
+ displayPreview();
}
//=================================================================================
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
+ QString aBaseName = ""; /* name of base object selection */
+ int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aBaseName, true);
+
+ if (nbSel > 1)
+ aBaseName = QString( "%1_objects").arg( nbSel );
+
+ // Base Object(s) selected
+ if (myEditCurrentArgument == GroupPoints->LineEdit1 ||
+ myEditCurrentArgument == GroupPoints2->LineEdit1 ||
+ getConstructorId() == 2 ) {
+ myOkBase = false;
+ if ( nbSel > 0 ) {
+ GEOMBase::ConvertListOfIOInListOfGO(aSelList, myBaseObjects, true);
+ myEditCurrentArgument->setText( aBaseName );
+ myOkBase = true;
+ }
+ displayPreview();
+ return;
+ }
+
if (getConstructorId() == 0)
{
- if (aSelList.Extent() != 1) {
- if (myEditCurrentArgument == GroupPoints->LineEdit1)
- myOkBase = false;
- else if (myEditCurrentArgument == GroupPoints->LineEdit2)
+ if (aSelList.Extent() < 1) {
+ if (myEditCurrentArgument == GroupPoints->LineEdit2)
myOkVec = false;
return;
}
- // nbSel == 1
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
}
}
- myEditCurrentArgument->setText(aName);
-
- if (myEditCurrentArgument == GroupPoints->LineEdit1) {
- myBase = aSelectedObject;
- myOkBase = true;
- if (!myOkVec)
- GroupPoints->PushButton2->click();
- }
- else if (myEditCurrentArgument == GroupPoints->LineEdit2 && myOk) {
+ if (myEditCurrentArgument == GroupPoints->LineEdit2 && myOk) {
+ myEditCurrentArgument->setText(aName);
myOkVec = true;
myVec = aSelectedObject;
- if (!myOkBase)
- GroupPoints->PushButton1->click();
}
}
else if (getConstructorId() == 1) { // getConstructorId()==1 - extrusion using 2 points
if (aSelList.Extent() != 1) {
- if (myEditCurrentArgument == GroupPoints2->LineEdit1)
- myOkBase = false;
- else if (myEditCurrentArgument == GroupPoints2->LineEdit2) {
+ if (myEditCurrentArgument == GroupPoints2->LineEdit2) {
myPoint1 = GEOM::GEOM_Object::_nil();
myOkPnt1 = false;
}
return;
}
- // nbSel == 1
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject =
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
myEditCurrentArgument->setText(aName);
- if (myEditCurrentArgument == GroupPoints2->LineEdit1) {
- myOkBase = true;
- myBase = aSelectedObject;
- if (!myOkPnt1)
- GroupPoints2->PushButton2->click();
- }
- else if (myEditCurrentArgument == GroupPoints2->LineEdit2 && myOk) {
+ if (myEditCurrentArgument == GroupPoints2->LineEdit2 && myOk) {
myOkPnt1 = true;
myPoint1 = aSelectedObject;
if (!myOkPnt2)
GroupPoints2->PushButton1->click();
}
}
- else if (getConstructorId() == 2) { // extrusion using dx dy dz
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject =
- GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
-
- if (!testResult || CORBA::is_nil(aSelectedObject))
- return;
-
- QString aName = GEOMBase::GetName(aSelectedObject);
- myBase = aSelectedObject;
- myOkBase = true;
- myEditCurrentArgument->setText(aName);
- }
-
- // clear selection
- disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
- myGeomGUI->getApp()->selectionMgr()->clearSelected();
- connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
displayPreview();
}
bool GenerationGUI_PrismDlg::execute (ObjectList& objects)
{
QStringList aParameters;
- GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_Object_var anObj, aBaseObj;
GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
- switch (getConstructorId()) {
- case 0:
- if (!myBothway) {
- anObj = anOper->MakePrismVecH(myBase, myVec, getHeight());
- }
- else {
- anObj = anOper->MakePrismVecH2Ways(myBase, myVec, getHeight());
- }
-
- if (!anObj->_is_nil() && !IsPreview())
- {
- aParameters << GroupPoints->SpinBox_DX->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
- }
-
- break;
- case 1:
- if (!myBothway2) {
- anObj = anOper->MakePrismTwoPnt(myBase, myPoint1, myPoint2);
- }
- else {
- anObj = anOper->MakePrismTwoPnt2Ways(myBase, myPoint1, myPoint2);
- }
- break;
- case 2:
- double dx = GroupPoints3->SpinBox_DX->value();
- double dy = GroupPoints3->SpinBox_DY->value();
- double dz = GroupPoints3->SpinBox_DZ->value();
-
- if (!myBothway3) {
- anObj = anOper->MakePrismDXDYDZ(myBase, dx, dy, dz);
- }
- else {
- anObj = anOper->MakePrismDXDYDZ2Ways(myBase, dx, dy, dz);
- }
-
- if (!anObj->_is_nil() && !IsPreview())
- {
- aParameters << GroupPoints3->SpinBox_DX->text();
- aParameters << GroupPoints3->SpinBox_DY->text();
- aParameters << GroupPoints3->SpinBox_DZ->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ for (int i=0; i < myBaseObjects.length(); i++) {
+ aBaseObj = myBaseObjects[i];
+
+ switch (getConstructorId()) {
+ case 0:
+ if (!myBothway)
+ anObj = anOper->MakePrismVecH(aBaseObj, myVec, getHeight());
+ else
+ anObj = anOper->MakePrismVecH2Ways(aBaseObj, myVec, getHeight());
+
+ if (!anObj->_is_nil() && !IsPreview()) {
+ aParameters << GroupPoints->SpinBox_DX->text();
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ }
+ break;
+ case 1:
+ if (!myBothway2)
+ anObj = anOper->MakePrismTwoPnt(aBaseObj, myPoint1, myPoint2);
+ else
+ anObj = anOper->MakePrismTwoPnt2Ways(aBaseObj, myPoint1, myPoint2);
+ break;
+ case 2:
+ double dx = GroupPoints3->SpinBox_DX->value();
+ double dy = GroupPoints3->SpinBox_DY->value();
+ double dz = GroupPoints3->SpinBox_DZ->value();
+
+ if (!myBothway3)
+ anObj = anOper->MakePrismDXDYDZ(aBaseObj, dx, dy, dz);
+ else
+ anObj = anOper->MakePrismDXDYDZ2Ways(aBaseObj, dx, dy, dz);
+
+ if (!anObj->_is_nil() && !IsPreview()) {
+ aParameters << GroupPoints3->SpinBox_DX->text();
+ aParameters << GroupPoints3->SpinBox_DY->text();
+ aParameters << GroupPoints3->SpinBox_DZ->text();
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ }
+ break;
}
-
- break;
+
+ if (!anObj->_is_nil())
+ objects.push_back(anObj._retn());
}
-
- if (!anObj->_is_nil())
- objects.push_back(anObj._retn());
-
+
return true;
}
double getHeight() const;
private:
- GEOM::GEOM_Object_var myBase; /* Base shape */
+ GEOM::ListOfGO myBaseObjects; /* Base shapes */
GEOM::GEOM_Object_var myVec; /* Vector, defining the direction */
GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points for extrusion */
GroupPoints = new DlgRef_2Sel1Spin2Check(centralWidget());
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
- GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT"));
+ GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE"));
GroupPoints->PushButton1->setIcon(image1);
GroupPoints->LineEdit1->setText("");
GroupPoints->LineEdit2->setText("");
- myBase = myAxis = GEOM::GEOM_Object::_nil();
+ myAxis = GEOM::GEOM_Object::_nil();
myOkBase = myOkAxis = false;
// signals and slots connections
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
- if (aSelList.Extent() != 1)
+ if (aSelList.Extent() < 1)
return;
- // nbSel == 1
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ QString aName = GEOMBase::GetName(aSelectedObject);
if (!testResult || aSelectedObject->_is_nil())
return;
if (!GEOMBase::GetShape(aSelectedObject, S) || S.IsNull())
return;
- QString aName = GEOMBase::GetName(aSelectedObject);
-
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
- if (!isAcceptableBase(S))
- return;
-
- myBase = aSelectedObject;
- myOkBase = true;
- myEditCurrentArgument->setText(aName);
- if (!myOkAxis)
- GroupPoints->PushButton2->click();
+ myOkBase = false;
+ if (aSelList.Extent() > 1)
+ aName = QString( "%1_objects").arg( aSelList.Extent() );
+
+ if ( aSelList.Extent() > 0 ) {
+ GEOMBase::ConvertListOfIOInListOfGO(aSelList, myBaseObjects, true);
+ // check base shapes
+ for (int i=0; i < myBaseObjects.length(); i++) {
+ GEOMBase::GetShape(myBaseObjects[i], S);
+ if (!isAcceptableBase(S))
+ return;
+ }
+ myEditCurrentArgument->setText( aName );
+ myOkBase = true;
+ }
}
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
TColStd_IndexedMapOfInteger aMap;
getGeomEngine()->GetIShapesOperations(getStudyId());
myAxis = aShapesOp->GetSubShape(aSelectedObject, anIndex);
myOkAxis = true;
- }
- else {
+ } else {
myAxis = aFindedObject;
myOkAxis = true;
}
- }
- else {
+ } else {
myOkAxis = true;
if (S.ShapeType() != TopAbs_EDGE) {
aSelectedObject = GEOM::GEOM_Object::_nil();
GroupPoints->PushButton1->click();
}
- // clear selection
- disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
- myGeomGUI->getApp()->selectionMgr()->clearSelected();
- connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
-
displayPreview();
}
//=================================================================================
bool GenerationGUI_RevolDlg::execute (ObjectList& objects)
{
- GEOM::GEOM_Object_var anObj;
-
+ GEOM::GEOM_Object_var anObj, aBase;
GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
- if (!myBothway) {
- anObj = anOper->MakeRevolutionAxisAngle(myBase, myAxis, getAngle() * PI180);
- }
- else {
- anObj = anOper->MakeRevolutionAxisAngle2Ways(myBase, myAxis, getAngle() * PI180);
- }
-
- if (!anObj->_is_nil())
- {
- if (!IsPreview())
- {
- QStringList aParameters;
- aParameters << GroupPoints->SpinBox_DX->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ for (int i=0; i < myBaseObjects.length(); i++) {
+ aBase = myBaseObjects[i];
+
+ if (!myBothway)
+ anObj = anOper->MakeRevolutionAxisAngle(aBase, myAxis, getAngle() * PI180);
+ else
+ anObj = anOper->MakeRevolutionAxisAngle2Ways(aBase, myAxis, getAngle() * PI180);
+
+ if (!anObj->_is_nil()) {
+ if (!IsPreview()) {
+ QStringList aParameters;
+ aParameters << GroupPoints->SpinBox_DX->text();
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ }
+ objects.push_back(anObj._retn());
}
- objects.push_back(anObj._retn());
}
return true;
double getAngle() const;
private:
- GEOM::GEOM_Object_var myBase; /* Base shape */
+ GEOM::ListOfGO myBaseObjects; /* Base shapes */
GEOM::GEOM_Object_var myAxis; /* Axis of the revolution */
bool myOkBase;
bool myOkAxis;