//=================================================================================
bool GenerationGUI_FillingDlg::execute( ObjectList& objects )
{
- GEOM::GEOM_Object_var anObj;
-
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakeFilling(
- myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter, myIsApprox );
+ GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->MakeFilling( myCompound, myMinDeg, myMaxDeg,
+ myTol2D, myTol3D, myNbIter, myIsApprox );
if ( !anObj->_is_nil() )
{
if ( !IsPreview() )
aParameters << GroupPoints->SpinBox3->text();
aParameters << GroupPoints->SpinBox4->text();
aParameters << GroupPoints->SpinBox5->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}
{
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+
switch ( getConstructorId() ) {
case 0 :
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->MakePipe(myBase, myPath);
+ anObj = anOper->MakePipe(myBase, myPath);
break;
case 1 :
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePipeBiNormalAlongVector(myBase, myPath, myVec);
+ anObj = anOper->MakePipeBiNormalAlongVector(myBase, myPath, myVec);
break;
}
QStringList aParameters;
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+
switch (getConstructorId()) {
case 0:
if (!myBothway) {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePrismVecH(myBase, myVec, getHeight());
+ anObj = anOper->MakePrismVecH(myBase, myVec, getHeight());
}
else {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePrismVecH2Ways(myBase, myVec, getHeight());
+ anObj = anOper->MakePrismVecH2Ways(myBase, myVec, getHeight());
}
if (!anObj->_is_nil() && !IsPreview())
{
aParameters << GroupPoints->SpinBox_DX->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
break;
case 1:
if (!myBothway2) {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePrismTwoPnt(myBase, myPoint1, myPoint2);
+ anObj = anOper->MakePrismTwoPnt(myBase, myPoint1, myPoint2);
}
else {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePrismTwoPnt2Ways(myBase, myPoint1, myPoint2);
+ anObj = anOper->MakePrismTwoPnt2Ways(myBase, myPoint1, myPoint2);
}
break;
case 2:
double dz = GroupPoints3->SpinBox_DZ->value();
if (!myBothway3) {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePrismDXDYDZ(myBase, dx, dy, dz);
+ anObj = anOper->MakePrismDXDYDZ(myBase, dx, dy, dz);
}
else {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakePrismDXDYDZ2Ways(myBase, dx, dy, dz);
+ 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(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
break;
{
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+
if (!myBothway) {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakeRevolutionAxisAngle(myBase, myAxis, getAngle() * PI180);
+ anObj = anOper->MakeRevolutionAxisAngle(myBase, myAxis, getAngle() * PI180);
}
else {
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
- MakeRevolutionAxisAngle2Ways(myBase, myAxis, getAngle() * PI180);
+ anObj = anOper->MakeRevolutionAxisAngle2Ways(myBase, myAxis, getAngle() * PI180);
}
if (!anObj->_is_nil())
{
QStringList aParameters;
aParameters << GroupPoints->SpinBox_DX->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back(anObj._retn());
}
bool toCreateCopy = GroupPoints->CheckButton1->isChecked();
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
if ( toCreateCopy ) {
- anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->ChangeOrientationCopy( myObject );
+ anObj = anOper->ChangeOrientationCopy( myObject );
}
else {
- anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->ChangeOrientation( myObject );
+ anObj = anOper->ChangeOrientation( myObject );
}
if ( !anObj->_is_nil() )
//=================================================================================
bool RepairGUI_CloseContourDlg::execute (ObjectList& objects)
{
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow(getOperation())->
- CloseContour(myObject, myWiresInd, getIsByVertex());
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->CloseContour(myObject, myWiresInd, getIsByVertex());
bool aResult = !anObj->_is_nil();
if (aResult)
//=================================================================================
bool RepairGUI_DivideEdgeDlg::execute( ObjectList& objects )
{
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->DivideEdge
- ( myObject, myIndex, myValEdt->value(), getIsByParameter() );
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
+ GEOM::GEOM_Object_var anObj = anOper->DivideEdge( myObject, myIndex, myValEdt->value(), getIsByParameter() );
bool aResult = !anObj->_is_nil();
if ( aResult )
{
aParameters << "";
aParameters << myValEdt->text();
aParameters << "";
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}
GEOM::ListOfGO_var aClosed, anOpen;
- bool result = GEOM::GEOM_IHealingOperations::_narrow(
- getOperation() )->GetFreeBoundary( myObj, aClosed, anOpen );
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
+ bool result = anOper->GetFreeBoundary( myObj, aClosed, anOpen );
if ( result ) {
myNbClosed = aClosed->length();
bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects )
{
bool aResult = false;
- GEOM::ListOfLong_var aFaceLst =
- GEOM::GEOM_IShapesOperations::_narrow( getOperation() )->GetFreeFacesIDs( myObj );
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
+ GEOM::ListOfLong_var aFaceLst = anOper->GetFreeFacesIDs( myObj );
TopoDS_Shape aSelShape;
TopoDS_Shape aFace;
TopTools_IndexedMapOfShape anIndices;
bool aResult = false;
objects.clear();
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
switch ( getConstructorId() ) {
case 0:
{
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow
- ( getOperation() )->MakeGlueFaces( myObject, myTolEdt->value(), true );
+ GEOM::GEOM_Object_var anObj = anOper->MakeGlueFaces( myObject, myTolEdt->value(), true );
aResult = !anObj->_is_nil();
if ( aResult && !IsPreview() )
{
QStringList aParameters;
aParameters << myTolEdt->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
objects.push_back( anObj._retn() );
}
ObjectList::iterator anIter3 = toGlue.begin();
for ( int i = 0; anIter3 != toGlue.end(); ++anIter3, ++i )
aListForGlue[ i ] = *anIter3;
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow
- ( getOperation() )->MakeGlueFacesByList( myObject, myTolEdt2->value(), aListForGlue, true );
+ GEOM::GEOM_Object_var anObj = anOper->MakeGlueFacesByList( myObject, myTolEdt2->value(), aListForGlue, true );
aResult = !anObj->_is_nil();
{
QStringList aParameters;
aParameters << myTolEdt2->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}
}
// JFA 28.12.2004 BEGIN // To enable warnings
- if ( !getOperation()->_is_nil() ) {
- if ( !getOperation()->IsDone() ) {
- wc.suspend();
- QString msgw = QObject::tr( getOperation()->GetErrorCode() );
- SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), msgw, tr( "BUT_OK" ) );
- }
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
+ if ( !CORBA::is_nil(anOper) && !anOper->IsDone() ) {
+ wc.suspend();
+ QString msgw = QObject::tr( anOper->GetErrorCode() );
+ SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), msgw, tr( "BUT_OK" ) );
}
// JFA 28.12.2004 END
}
buttonApply()->setEnabled( false );
globalSelection( GEOM_ALLSHAPES );
- GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow
- ( getOperation() )->GetGlueFaces( myObject, myTolEdt2->value() );
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
+ GEOM::ListOfGO_var aList = anOper->GetGlueFaces( myObject, myTolEdt2->value() );
for ( int i = 0, n = aList->length(); i < n; i++ )
myTmpObjs.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
int nbFacesOptimum = -1; // -1 means do not union faces
if (GroupPoints->CheckButton1->isChecked())
nbFacesOptimum = 0; // 0 means union all faces, that possible
- anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->RemoveExtraEdges
- (myObject, nbFacesOptimum);
+ GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
+ anObj = anOper->RemoveExtraEdges(myObject, nbFacesOptimum);
if (!anObj->_is_nil())
objects.push_back(anObj._retn());
// highlight them (add to objects), display message dialog
GEOM::ListOfGO_var aClosed, anOpen;
- aResult = GEOM::GEOM_IHealingOperations::_narrow(getOperation())->
- GetFreeBoundary(myObject, aClosed, anOpen);
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow(getOperation());
+ aResult = anOper->GetFreeBoundary(myObject, aClosed, anOpen);
if (aResult) {
myClosed = aClosed->length();
myClosed = -1;
}
else {
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow(getOperation())->
- FillHoles(myObject, myWiresInd);
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->FillHoles(myObject, myWiresInd);
aResult = !anObj->_is_nil();
if (aResult)
objects.push_back(anObj._retn());
//=================================================================================
bool RepairGUI_RemoveIntWiresDlg::execute (ObjectList& objects)
{
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow(getOperation())->
- RemoveIntWires(myObject, myWiresInd);
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->RemoveIntWires(myObject, myWiresInd);
bool aResult = !anObj->_is_nil();
if (aResult)
bool RepairGUI_SewingDlg::execute( ObjectList& objects )
{
bool aResult = false;
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
+
if ( IsPreview() ) { // called from onDetect(): detect free boundary edges, highlight them (add to objects), display message dialog
GEOM::ListOfGO_var aClosed, anOpen;
- aResult = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->GetFreeBoundary( myObject, aClosed, anOpen );
+ aResult = anOper->GetFreeBoundary( myObject, aClosed, anOpen );
if ( aResult ) {
myClosed = aClosed->length();
myClosed = -1;
}
else {
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->Sew( myObject, myTolEdt->value() );
+ GEOM::GEOM_Object_var anObj = anOper->Sew( myObject, myTolEdt->value() );
aResult = !anObj->_is_nil();
if ( aResult )
{
{
QStringList aParameters;
aParameters << myTolEdt->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}
QStringList anErrorObjNames;
for ( int i = 0; i < myObjects->length(); i++ ) {
GEOM::GEOM_Object_var obj = myObjects[i];
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->
- ProcessShape( obj, anOperators, aParams, aValues );
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
+ GEOM::GEOM_Object_var anObj = anOper->ProcessShape( obj, anOperators, aParams, aValues );
if ( anObj->_is_nil() )
anErrorObjNames << GEOMBase::GetName( obj );
else
aParameters << QString( aParams[i] );
aParameters << getTexts( aParams );
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}
GEOM::GEOM_Object_var obj = myObjects[i];
GEOM::short_array faces = myFaces[i];
//MESSAGE(">>>> Dlg, passing faces.. len = " << faces.length());
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->SuppressFaces( obj, faces );
+ GEOM::GEOM_IHealingOperations_var anOper = GEOM::GEOM_IHealingOperations::_narrow( getOperation() );
+ GEOM::GEOM_Object_var anObj = anOper->SuppressFaces( obj, faces );
if ( anObj->_is_nil() )
anErrorObjNames << GEOMBase::GetName( obj );
else