aCoordsArray[i+2] = z;
}
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->Make3DSketcher( aCoordsArray );
+ GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->Make3DSketcher( aCoordsArray );
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
WPlane[7] = myWPlane.XDirection().Y();
WPlane[8] = myWPlane.XDirection().Z();
- GEOM::GEOM_Object_var anObj =
- GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.toLatin1(), WPlane );
+ GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->MakeSketcher( cmd.toLatin1().constData(), WPlane );
if ( !anObj->_is_nil() )
{
if( !IsPreview() ) {
QStringList aCurrentParameters = myParameters;
aCurrentParameters << aParameters;
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aCurrentParameters));
+ anObj->SetParameters(aCurrentParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
//=================================================================================
bool EntityGUI_SubShapeDlg::execute (ObjectList& objects)
{
- GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow(getOperation())->
- MakeExplode(myObject, shapeType(), true);
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation());
+ GEOM::ListOfGO_var aList = anOper->MakeExplode(myObject, shapeType(), true);
if (!aList->length())
return false;
//=================================================================================
bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects )
{
- GEOM::GEOM_Object_var anObj;
-
double aWeight = GroupPoints->SpinBox_DX->value();
double aWaterDensity = GroupPoints->SpinBox_DY->value();
double aMeshDeflection = GroupPoints->SpinBox_DZ->value();
- anObj = GEOM::GEOM_ILocalOperations::_narrow(
- getOperation() )->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
+ GEOM::GEOM_ILocalOperations_var anOper = GEOM::GEOM_ILocalOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
if ( !anObj->_is_nil() )
{
aParameters << GroupPoints->SpinBox_DX->text();
aParameters << GroupPoints->SpinBox_DY->text();
aParameters << GroupPoints->SpinBox_DZ->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}
myRadioButton[ RadioButton41 ]->isChecked());
int anId = getConstructorId();
+
+ GEOM::GEOM_ILocalOperations_var anOper = GEOM::GEOM_ILocalOperations::_narrow(getOperation());
+
if (anId == 0) {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferAll(myShape, mySpinBox[ SpinBox1 ]->value());
+ anObj = anOper->MakeChamferAll(myShape, mySpinBox[ SpinBox1 ]->value());
if (!anObj->_is_nil())
aParameters << mySpinBox[ SpinBox1 ]->text();
}
else if (anId == 1) {
if (flag) {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferEdge(myShape,
- mySpinBox[ SpinBox21 ]->value(),
- mySpinBox[ SpinBox22 ]->value(),
- myFace[ Face1 ],
- myFace[ Face2 ]);
+ anObj = anOper->MakeChamferEdge(myShape,
+ mySpinBox[ SpinBox21 ]->value(),
+ mySpinBox[ SpinBox22 ]->value(),
+ myFace[ Face1 ],
+ myFace[ Face2 ]);
if (!anObj->_is_nil())
{
aParameters << mySpinBox[ SpinBox21 ]->text();
}
}
else {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferEdgeAD(myShape,
- mySpinBox[ SpinBox23 ]->value(),
- mySpinBox[ SpinBox24 ]->value() * PI180,
- myFace[ Face1 ],
- myFace[ Face2 ]);
+ anObj = anOper->MakeChamferEdgeAD(myShape,
+ mySpinBox[ SpinBox23 ]->value(),
+ mySpinBox[ SpinBox24 ]->value() * PI180,
+ myFace[ Face1 ],
+ myFace[ Face2 ]);
if (!anObj->_is_nil())
{
aParameters << mySpinBox[ SpinBox23 ]->text();
anArray[ i - 1 ] = myFaces(i);
if (flag) {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferFaces(myShape,
- mySpinBox[ SpinBox31 ]->value(),
- mySpinBox[ SpinBox32 ]->value(),
- anArray);
+ anObj = anOper->MakeChamferFaces(myShape,
+ mySpinBox[ SpinBox31 ]->value(),
+ mySpinBox[ SpinBox32 ]->value(),
+ anArray);
if (!anObj->_is_nil())
{
aParameters << mySpinBox[ SpinBox31 ]->text();
}
}
else {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferFacesAD(myShape,
- mySpinBox[ SpinBox33 ]->value(),
- mySpinBox[ SpinBox34 ]->value() * PI180,
- anArray);
+ anObj = anOper->MakeChamferFacesAD(myShape,
+ mySpinBox[ SpinBox33 ]->value(),
+ mySpinBox[ SpinBox34 ]->value() * PI180,
+ anArray);
if (!anObj->_is_nil())
{
aParameters << mySpinBox[ SpinBox33 ]->text();
for (int i = 1, n = myEdges.Extent(); i <= n; i++)
anArray[ i - 1 ] = myEdges(i);
if (flag) {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferEdges(myShape,
- mySpinBox[ SpinBox41 ]->value(),
- mySpinBox[ SpinBox42 ]->value(),
- anArray);
+ anObj = anOper->MakeChamferEdges(myShape,
+ mySpinBox[ SpinBox41 ]->value(),
+ mySpinBox[ SpinBox42 ]->value(),
+ anArray);
if (!anObj->_is_nil())
{
aParameters << mySpinBox[ SpinBox41 ]->text();
}
}
else {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeChamferEdgesAD(myShape,
- mySpinBox[ SpinBox43 ]->value(),
- mySpinBox[ SpinBox44 ]->value() * PI180,
- anArray);
+ anObj = anOper->MakeChamferEdgesAD(myShape,
+ mySpinBox[ SpinBox43 ]->value(),
+ mySpinBox[ SpinBox44 ]->value() * PI180,
+ anArray);
if (!anObj->_is_nil())
{
aParameters << mySpinBox[ SpinBox43 ]->text();
if (!anObj->_is_nil())
{
if (!IsPreview())
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
objects.push_back(anObj._retn());
}
//=================================================================================
bool OperationGUI_Fillet1d2dDlg::execute (ObjectList& objects)
{
- GEOM::GEOM_Object_var anObj;
-
GEOM::ListOfLong_var aListOfIndexes = new GEOM::ListOfLong;
aListOfIndexes->length(myVertexes.Extent());
for (int i = 1, n = myVertexes.Extent(); i <= n; i++)
aListOfIndexes[ i - 1 ] = myVertexes(i);
- GEOM::GEOM_ILocalOperations_ptr op =
- GEOM::GEOM_ILocalOperations::_narrow(getOperation());
- anObj = (myIs1D ? op->MakeFillet1D(myShape, getRadius(), aListOfIndexes)
- : op->MakeFillet2D(myShape, getRadius(), aListOfIndexes));
+ GEOM::GEOM_ILocalOperations_var anOper = GEOM::GEOM_ILocalOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = myIs1D ?
+ anOper->MakeFillet1D(myShape, getRadius(), aListOfIndexes) :
+ anOper->MakeFillet2D(myShape, getRadius(), aListOfIndexes);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
GEOM::GEOM_Object_var anObj;
int anId = getConstructorId();
+
+ GEOM::GEOM_ILocalOperations_var anOper = GEOM::GEOM_ILocalOperations::_narrow(getOperation());
+
if (anId == 0) {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeFilletAll(myShape, getRadius());
+ anObj = anOper->MakeFilletAll(myShape, getRadius());
if (!anObj->_is_nil())
aParameters << Group1->SpinBox_DX->text();
}
if (Group2->RadioButton1->isChecked())
{
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeFilletEdges(myShape, getRadius(), aList);
+ anObj = anOper->MakeFilletEdges(myShape, getRadius(), aList);
if (!anObj->_is_nil())
aParameters << Group2->SpinBox_DX->text();
}
else
{
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeFilletEdgesR1R2(myShape,
- Group2->SpinBox_DY->value(),
- Group2->SpinBox_DZ->value(),
- aList);
+ anObj = anOper->MakeFilletEdgesR1R2(myShape,
+ Group2->SpinBox_DY->value(),
+ Group2->SpinBox_DZ->value(),
+ aList);
if (!anObj->_is_nil())
{
aParameters << Group2->SpinBox_DY->text();
aList[ i - 1 ] = myFaces(i);
if (Group3->RadioButton1->isChecked()) {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeFilletFaces(myShape, getRadius(), aList);
+ anObj = anOper->MakeFilletFaces(myShape, getRadius(), aList);
if (!anObj->_is_nil())
aParameters << Group3->SpinBox_DX->text();
}
else {
- anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
- MakeFilletFacesR1R2(myShape,
- Group3->SpinBox_DY->value(),
- Group3->SpinBox_DZ->value(), aList);
+ anObj = anOper->MakeFilletFacesR1R2(myShape,
+ Group3->SpinBox_DY->value(),
+ Group3->SpinBox_DZ->value(), aList);
if (!anObj->_is_nil())
{
aParameters << Group3->SpinBox_DY->text();
if (!anObj->_is_nil())
{
if (!IsPreview())
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
objects.push_back(anObj._retn());
}
default: break;
}
- GEOM::GEOM_Object_var anObj =
- GEOM::GEOM_IShapesOperations::_narrow(getOperation())->
- GetShapesOnShapeAsCompound(myObject2, myObject1,
- (CORBA::Short) aLimit,
- aState);
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->GetShapesOnShapeAsCompound(myObject2, myObject1,
+ (CORBA::Short) aLimit,
+ aState);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
}
if ( isValid( msg ) ) {
- anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->
- MakePartition( myListShapes, myListTools,
- myListKeepInside, myListRemoveInside,
- aLimit, false, myListMaterials, aKeepNonlimitShapes );
+ GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
+ anObj = anOper->MakePartition( myListShapes, myListTools,
+ myListKeepInside, myListRemoveInside,
+ aLimit, false, myListMaterials, aKeepNonlimitShapes );
res = true;
}