NPAL: 16557, 16558, 16578, 16549, 16561
@ -1792,7 +1792,15 @@ module GEOM
|
|||||||
GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
|
GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
|
||||||
in GEOM_Object thePnt2,
|
in GEOM_Object thePnt2,
|
||||||
in GEOM_Object thePnt3);
|
in GEOM_Object thePnt3);
|
||||||
|
/*!
|
||||||
|
* Create a circle with given center, with a radius equals the distance from center to Point1
|
||||||
|
* and on a plane defined by all of three points.
|
||||||
|
* \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
|
||||||
|
* \return New GEOM_Object, containing the created circle.
|
||||||
|
*/
|
||||||
|
GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
|
||||||
|
in GEOM_Object thePnt2,
|
||||||
|
in GEOM_Object thePnt3);
|
||||||
/*!
|
/*!
|
||||||
* Create an ellipse with given center, normal vector and radiuses.
|
* Create an ellipse with given center, normal vector and radiuses.
|
||||||
* \param thePnt Ellipse center.
|
* \param thePnt Ellipse center.
|
||||||
@ -1926,7 +1934,10 @@ module GEOM
|
|||||||
GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
|
GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
|
||||||
in double theR,
|
in double theR,
|
||||||
in ListOfLong theEdges);
|
in ListOfLong theEdges);
|
||||||
|
GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
|
||||||
|
in double theR1,
|
||||||
|
in double theR2,
|
||||||
|
in ListOfLong theEdges);
|
||||||
/*!
|
/*!
|
||||||
* Perform a fillet on all edges of the specified faces of the given shape.
|
* Perform a fillet on all edges of the specified faces of the given shape.
|
||||||
* \param theShape Shape, to perform fillet on.
|
* \param theShape Shape, to perform fillet on.
|
||||||
@ -1939,7 +1950,10 @@ module GEOM
|
|||||||
GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
|
GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
|
||||||
in double theR,
|
in double theR,
|
||||||
in ListOfLong theFaces);
|
in ListOfLong theFaces);
|
||||||
|
GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
|
||||||
|
in double theR1,
|
||||||
|
in double theR2,
|
||||||
|
in ListOfLong theFaces);
|
||||||
/*!
|
/*!
|
||||||
* Perform a symmetric chamfer on all edges of the given shape.
|
* Perform a symmetric chamfer on all edges of the given shape.
|
||||||
* \param theShape Shape, to perform chamfer on.
|
* \param theShape Shape, to perform chamfer on.
|
||||||
@ -1963,7 +1977,13 @@ module GEOM
|
|||||||
GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
|
GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
|
||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in long theFace1, in long theFace2);
|
in long theFace1, in long theFace2);
|
||||||
|
/*!
|
||||||
|
* The Same but with params theD = Chamfer Lenght
|
||||||
|
* and theAngle = Chamfer Angle (Angle in radians)
|
||||||
|
*/
|
||||||
|
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
|
||||||
|
in double theD, in double theAngle,
|
||||||
|
in long theFace1, in long theFace2);
|
||||||
/*!
|
/*!
|
||||||
* Perform a chamfer on all edges of the specified faces.
|
* Perform a chamfer on all edges of the specified faces.
|
||||||
* with distance D1 on the first specified face (if several for one edge)
|
* with distance D1 on the first specified face (if several for one edge)
|
||||||
@ -1980,7 +2000,32 @@ module GEOM
|
|||||||
GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
|
GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
|
||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in ListOfLong theFaces);
|
in ListOfLong theFaces);
|
||||||
|
/*!
|
||||||
|
* The Same but with params theD = Chamfer Lenght
|
||||||
|
* and theAngle = Chamfer Angle (Angle in radians)
|
||||||
|
*/
|
||||||
|
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
|
||||||
|
in double theD, in double theAngle,
|
||||||
|
in ListOfLong theFaces);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Perform a chamfer on edges,
|
||||||
|
* with distance D1 on the first specified face (if several for one edge)
|
||||||
|
* \param theShape Shape, to perform chamfer on.
|
||||||
|
* \param theD1 theD2 Chamfer size
|
||||||
|
* \param theEdges Sequence of edges of \a theShape.
|
||||||
|
* \return New GEOM_Object, containing the result shape.
|
||||||
|
*/
|
||||||
|
GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
|
||||||
|
in double theD1, in double theD2,
|
||||||
|
in ListOfLong theEdges);
|
||||||
|
/*!
|
||||||
|
* The Same but with params theD = Chamfer Lenght
|
||||||
|
* and theAngle = Chamfer Angle (Angle in radians)
|
||||||
|
*/
|
||||||
|
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
|
||||||
|
in double theD, in double theAngle,
|
||||||
|
in ListOfLong theEdges);
|
||||||
/*!
|
/*!
|
||||||
* Perform an Archimde operation on the given shape with given parameters.
|
* Perform an Archimde operation on the given shape with given parameters.
|
||||||
* The object presenting the resulting face is returned
|
* The object presenting the resulting face is returned
|
||||||
|
@ -411,6 +411,9 @@ module GEOM
|
|||||||
GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
|
GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
|
||||||
in GEOM_Object thePnt2,
|
in GEOM_Object thePnt2,
|
||||||
in GEOM_Object thePnt3) ;
|
in GEOM_Object thePnt3) ;
|
||||||
|
GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
|
||||||
|
in GEOM_Object thePnt2,
|
||||||
|
in GEOM_Object thePnt3) ;
|
||||||
GEOM_Object MakeEllipse (in GEOM_Object thePnt,
|
GEOM_Object MakeEllipse (in GEOM_Object thePnt,
|
||||||
in GEOM_Object theVec,
|
in GEOM_Object theVec,
|
||||||
in double theRMajor,
|
in double theRMajor,
|
||||||
@ -436,17 +439,37 @@ module GEOM
|
|||||||
GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
|
GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
|
||||||
in double theR,
|
in double theR,
|
||||||
in GEOM_List theEdges) ;
|
in GEOM_List theEdges) ;
|
||||||
|
GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
|
||||||
|
in double theR1,
|
||||||
|
in double theR2,
|
||||||
|
in GEOM_List theEdges) ;
|
||||||
GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
|
GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
|
||||||
in double theR,
|
in double theR,
|
||||||
in GEOM_List theFaces) ;
|
in GEOM_List theFaces) ;
|
||||||
|
GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
|
||||||
|
in double theR1,
|
||||||
|
in double theR2,
|
||||||
|
in GEOM_List theFaces) ;
|
||||||
GEOM_Object MakeChamferAll (in GEOM_Object theShape,
|
GEOM_Object MakeChamferAll (in GEOM_Object theShape,
|
||||||
in double theD) ;
|
in double theD) ;
|
||||||
GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
|
GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
|
||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in long theFace1, in long theFace2) ;
|
in long theFace1, in long theFace2) ;
|
||||||
|
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
|
||||||
|
in double theD, in double theAngle,
|
||||||
|
in long theFace1, in long theFace2) ;
|
||||||
GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
|
GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
|
||||||
in double theD1, in double theD2,
|
in double theD1, in double theD2,
|
||||||
in GEOM_List theFaces) ;
|
in GEOM_List theFaces) ;
|
||||||
|
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
|
||||||
|
in double theD, in double theAngle,
|
||||||
|
in GEOM_List theFaces) ;
|
||||||
|
GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
|
||||||
|
in double theD1, in double theD2,
|
||||||
|
in GEOM_List theEdges) ;
|
||||||
|
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
|
||||||
|
in double theD, in double theAngle,
|
||||||
|
in GEOM_List theEdges) ;
|
||||||
GEOM_Object MakeArchimede (in GEOM_Object theShape,
|
GEOM_Object MakeArchimede (in GEOM_Object theShape,
|
||||||
in double theWeight,
|
in double theWeight,
|
||||||
in double theWaterDensity,
|
in double theWaterDensity,
|
||||||
|
@ -55,11 +55,13 @@ chamfer.png \
|
|||||||
chamferall.png \
|
chamferall.png \
|
||||||
chamferedge.png \
|
chamferedge.png \
|
||||||
chamferface.png \
|
chamferface.png \
|
||||||
|
chamferedgefromface.png \
|
||||||
change_orientation.png \
|
change_orientation.png \
|
||||||
check.png \
|
check.png \
|
||||||
circle.png \
|
circle.png \
|
||||||
circlepointvector.png \
|
circlepointvector.png \
|
||||||
circle3points.png \
|
circle3points.png \
|
||||||
|
circlecenter2pnts.png \
|
||||||
common.png \
|
common.png \
|
||||||
cone.png \
|
cone.png \
|
||||||
conedxyz.png \
|
conedxyz.png \
|
||||||
|
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 480 B |
BIN
resources/chamferedgefromface.png
Executable file
After Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 495 B |
BIN
resources/circlecenter2pnts.png
Executable file
After Width: | Height: | Size: 711 B |
@ -36,7 +36,6 @@
|
|||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include "GEOMImpl_Types.hxx"
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -53,6 +52,7 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
{
|
{
|
||||||
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PV")));
|
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PV")));
|
||||||
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PNTS")));
|
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PNTS")));
|
||||||
|
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_C2P")));
|
||||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
||||||
|
|
||||||
setCaption(tr("GEOM_CIRCLE_TITLE"));
|
setCaption(tr("GEOM_CIRCLE_TITLE"));
|
||||||
@ -61,7 +61,7 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
GroupConstructors->setTitle(tr("GEOM_CIRCLE"));
|
GroupConstructors->setTitle(tr("GEOM_CIRCLE"));
|
||||||
RadioButton1->setPixmap(image0);
|
RadioButton1->setPixmap(image0);
|
||||||
RadioButton2->setPixmap(image2);
|
RadioButton2->setPixmap(image2);
|
||||||
RadioButton3->close(TRUE);
|
RadioButton3->setPixmap(image3);
|
||||||
|
|
||||||
GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR");
|
GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR");
|
||||||
GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
|
GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
|
||||||
@ -88,8 +88,22 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
|
|||||||
Group3Pnts->LineEdit2->setReadOnly( true );
|
Group3Pnts->LineEdit2->setReadOnly( true );
|
||||||
Group3Pnts->LineEdit3->setReadOnly( true );
|
Group3Pnts->LineEdit3->setReadOnly( true );
|
||||||
|
|
||||||
|
GroupCenter2Pnts = new DlgRef_3Sel_QTD(this, "GroupCenter2Pnts");
|
||||||
|
GroupCenter2Pnts->GroupBox1->setTitle(tr("GEOM_CENTER_2POINTS"));
|
||||||
|
GroupCenter2Pnts->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
|
||||||
|
GroupCenter2Pnts->TextLabel2->setText(tr("GEOM_POINT1"));
|
||||||
|
GroupCenter2Pnts->TextLabel3->setText(tr("GEOM_POINT2"));
|
||||||
|
GroupCenter2Pnts->PushButton1->setPixmap(image1);
|
||||||
|
GroupCenter2Pnts->PushButton2->setPixmap(image1);
|
||||||
|
GroupCenter2Pnts->PushButton3->setPixmap(image1);
|
||||||
|
|
||||||
|
GroupCenter2Pnts->LineEdit1->setReadOnly( true );
|
||||||
|
GroupCenter2Pnts->LineEdit2->setReadOnly( true );
|
||||||
|
GroupCenter2Pnts->LineEdit3->setReadOnly( true );
|
||||||
|
|
||||||
Layout1->addWidget( GroupPntVecR, 2, 0 );
|
Layout1->addWidget( GroupPntVecR, 2, 0 );
|
||||||
Layout1->addWidget( Group3Pnts, 2, 0 );
|
Layout1->addWidget( Group3Pnts, 2, 0 );
|
||||||
|
Layout1->addWidget( GroupCenter2Pnts, 2, 0 );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName("circle.htm");
|
setHelpFileName("circle.htm");
|
||||||
@ -143,6 +157,10 @@ void BasicGUI_CircleDlg::Init()
|
|||||||
connect(Group3Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect(Group3Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||||
connect(Group3Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect(Group3Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||||
|
|
||||||
|
connect(GroupCenter2Pnts->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||||
|
connect(GroupCenter2Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||||
|
connect(GroupCenter2Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||||
|
|
||||||
connect(GroupPntVecR->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect(GroupPntVecR->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||||
connect(GroupPntVecR->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect(GroupPntVecR->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||||
|
|
||||||
@ -155,6 +173,7 @@ void BasicGUI_CircleDlg::Init()
|
|||||||
initName( tr( "GEOM_CIRCLE" ) );
|
initName( tr( "GEOM_CIRCLE" ) );
|
||||||
|
|
||||||
Group3Pnts->hide();
|
Group3Pnts->hide();
|
||||||
|
GroupCenter2Pnts->hide();
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,6 +191,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
Group3Pnts->hide();
|
Group3Pnts->hide();
|
||||||
|
GroupCenter2Pnts->hide();
|
||||||
resize(0, 0);
|
resize(0, 0);
|
||||||
GroupPntVecR->show();
|
GroupPntVecR->show();
|
||||||
|
|
||||||
@ -183,6 +203,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
GroupPntVecR->hide();
|
GroupPntVecR->hide();
|
||||||
|
GroupCenter2Pnts->hide();
|
||||||
resize( 0, 0 );
|
resize( 0, 0 );
|
||||||
Group3Pnts->show();
|
Group3Pnts->show();
|
||||||
|
|
||||||
@ -192,6 +213,19 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
Group3Pnts->LineEdit3->setText("");
|
Group3Pnts->LineEdit3->setText("");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
GroupPntVecR->hide();
|
||||||
|
Group3Pnts->hide();
|
||||||
|
resize( 0, 0 );
|
||||||
|
GroupCenter2Pnts->show();
|
||||||
|
|
||||||
|
myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
|
||||||
|
GroupCenter2Pnts->LineEdit1->setText("");
|
||||||
|
GroupCenter2Pnts->LineEdit2->setText("");
|
||||||
|
GroupCenter2Pnts->LineEdit3->setText("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
@ -248,6 +282,9 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
|||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil();
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil();
|
||||||
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4 = GEOM::GEOM_Object::_nil();
|
||||||
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5 = GEOM::GEOM_Object::_nil();
|
||||||
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6 = GEOM::GEOM_Object::_nil();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,15 +292,18 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
|||||||
Standard_Boolean aRes = Standard_False;
|
Standard_Boolean aRes = Standard_False;
|
||||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||||
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
if ( !CORBA::is_nil( aSelectedObject ) && aRes )
|
||||||
{
|
{
|
||||||
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = aSelectedObject;
|
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = aSelectedObject;
|
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject;
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject;
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject;
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject;
|
||||||
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) myPoint4 = aSelectedObject;
|
||||||
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) myPoint5 = aSelectedObject;
|
||||||
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) myPoint6 = aSelectedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,6 +321,9 @@ void BasicGUI_CircleDlg::SetEditCurrentArgument()
|
|||||||
else if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1;
|
else if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||||
else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2;
|
else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2;
|
||||||
else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3;
|
else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3;
|
||||||
|
else if ( send == GroupCenter2Pnts->PushButton1 ) myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
|
||||||
|
else if ( send == GroupCenter2Pnts->PushButton2 ) myEditCurrentArgument = GroupCenter2Pnts->LineEdit2;
|
||||||
|
else if ( send == GroupCenter2Pnts->PushButton3 ) myEditCurrentArgument = GroupCenter2Pnts->LineEdit3;
|
||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
|
|
||||||
@ -302,7 +345,10 @@ void BasicGUI_CircleDlg::LineEditReturnPressed()
|
|||||||
send == GroupPntVecR->LineEdit2 ||
|
send == GroupPntVecR->LineEdit2 ||
|
||||||
send == Group3Pnts->LineEdit1 ||
|
send == Group3Pnts->LineEdit1 ||
|
||||||
send == Group3Pnts->LineEdit2 ||
|
send == Group3Pnts->LineEdit2 ||
|
||||||
send == Group3Pnts->LineEdit3 )
|
send == Group3Pnts->LineEdit3 ||
|
||||||
|
send == GroupCenter2Pnts->LineEdit1 ||
|
||||||
|
send == GroupCenter2Pnts->LineEdit2 ||
|
||||||
|
send == GroupCenter2Pnts->LineEdit3 )
|
||||||
{
|
{
|
||||||
myEditCurrentArgument = send;
|
myEditCurrentArgument = send;
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
@ -362,7 +408,11 @@ void BasicGUI_CircleDlg::ValueChangedInSpinBox()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
double BasicGUI_CircleDlg::getRadius() const
|
double BasicGUI_CircleDlg::getRadius() const
|
||||||
{
|
{
|
||||||
return GroupPntVecR->SpinBox_DX->GetValue();
|
switch ( getConstructorId() )
|
||||||
|
{
|
||||||
|
case 0 :
|
||||||
|
return GroupPntVecR->SpinBox_DX->GetValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -395,6 +445,9 @@ bool BasicGUI_CircleDlg::isValid( QString& msg )
|
|||||||
else if ( id == 1 )
|
else if ( id == 1 )
|
||||||
return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() &&
|
return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() &&
|
||||||
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
|
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
|
||||||
|
else if ( id == 2 )
|
||||||
|
return !myPoint4->_is_nil() && !myPoint5->_is_nil() && !myPoint6->_is_nil() &&
|
||||||
|
!isEqual( myPoint4, myPoint5 ) && !isEqual( myPoint5, myPoint6 ) && !isEqual( myPoint4, myPoint6 );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,6 +463,7 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
switch ( getConstructorId() )
|
switch ( getConstructorId() )
|
||||||
{
|
{
|
||||||
|
cout << "constructior ID = " << getConstructorId() << endl;
|
||||||
case 0 :
|
case 0 :
|
||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
|
||||||
res = true;
|
res = true;
|
||||||
@ -418,10 +472,15 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects )
|
|||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleThreePnt( myPoint1, myPoint2, myPoint3 );
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleThreePnt( myPoint1, myPoint2, myPoint3 );
|
||||||
res = true;
|
res = true;
|
||||||
break;
|
break;
|
||||||
|
case 2 :
|
||||||
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleCenter2Pnt( myPoint4, myPoint5, myPoint6 );
|
||||||
|
res = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() )
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
|
else cout << "Execute Object is NULL!" << endl;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -62,11 +62,12 @@ private:
|
|||||||
void enterEvent(QEvent* e);
|
void enterEvent(QEvent* e);
|
||||||
double getRadius() const;
|
double getRadius() const;
|
||||||
|
|
||||||
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
|
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3, myPoint4, myPoint5, myPoint6;
|
||||||
|
CORBA::Double myRadius;
|
||||||
|
|
||||||
DlgRef_2Sel1Spin* GroupPntVecR;
|
DlgRef_2Sel1Spin* GroupPntVecR;
|
||||||
DlgRef_3Sel_QTD* Group3Pnts;
|
DlgRef_3Sel_QTD* Group3Pnts;
|
||||||
|
DlgRef_3Sel_QTD* GroupCenter2Pnts;
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
void ClickOnCancel();
|
void ClickOnCancel();
|
||||||
|
41
src/DlgRef/DlgRef_2Sel3Spin2Rb.cxx
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
// File : DlgRef_2Sel2Spin.cxx
|
||||||
|
// Author : Dmitry MATVEITCHEV
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#include "DlgRef_2Sel3Spin2Rb.h"
|
||||||
|
#include <iostream.h>
|
||||||
|
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qspinbox.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
#include <qradiobutton.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructs a DlgRef_2Sel3Spin2Rb which is a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'
|
||||||
|
*/
|
||||||
|
DlgRef_2Sel3Spin2Rb::DlgRef_2Sel3Spin2Rb(QWidget* parent, const char* name, WFlags fl)
|
||||||
|
:DlgRef_2Sel3Spin2Rb_QTD(parent, name, fl)
|
||||||
|
{
|
||||||
|
SpinBox1->close(TRUE);
|
||||||
|
SpinBox2->close(TRUE);
|
||||||
|
SpinBox3->close(TRUE);
|
||||||
|
RadioButton1->setChecked(true);
|
||||||
|
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||||
|
Layout2->addMultiCellWidget(SpinBox_DX, 0, 0, 2, 4);
|
||||||
|
SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
|
||||||
|
Layout2->addWidget(SpinBox_DY, 1, 2);
|
||||||
|
SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ");
|
||||||
|
Layout2->addWidget(SpinBox_DZ, 1, 4);
|
||||||
|
SpinBox_DY->setEnabled(false);
|
||||||
|
SpinBox_DZ->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
DlgRef_2Sel3Spin2Rb::~DlgRef_2Sel3Spin2Rb()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
34
src/DlgRef/DlgRef_2Sel3Spin2Rb.h
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
// File : DlgRef_2Sel3Spin2Rb.h
|
||||||
|
// Author : Dmitry MATVEITCHEV
|
||||||
|
// Module : GEOM
|
||||||
|
// $Header:
|
||||||
|
|
||||||
|
#ifndef DLGREF_2SEL3SPIN2RB_H
|
||||||
|
#define DLGREF_2SEL3SPIN2RB_H
|
||||||
|
|
||||||
|
#include "DlgRef_2Sel3Spin2Rb_QTD.h"
|
||||||
|
#include "DlgRef_SpinBox.h"
|
||||||
|
//#if defined WNT
|
||||||
|
//#include <SALOME_WNT.hxx>
|
||||||
|
//#else
|
||||||
|
//#define SALOME_WNT_EXPORT
|
||||||
|
//#endif
|
||||||
|
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
|
||||||
|
#define DLGREF_WNT_EXPORT __declspec( dllexport )
|
||||||
|
#else
|
||||||
|
#define DLGREF_WNT_EXPORT
|
||||||
|
#endif
|
||||||
|
class DLGREF_WNT_EXPORT DlgRef_2Sel3Spin2Rb : public DlgRef_2Sel3Spin2Rb_QTD
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
DlgRef_2Sel3Spin2Rb(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
|
||||||
|
~DlgRef_2Sel3Spin2Rb();
|
||||||
|
|
||||||
|
DlgRef_SpinBox* SpinBox_DX;
|
||||||
|
DlgRef_SpinBox* SpinBox_DY;
|
||||||
|
DlgRef_SpinBox* SpinBox_DZ;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DLGREF_2SEL3SPIN2RB_H
|
129
src/DlgRef/DlgRef_2Sel3Spin2Rb_QTD.cxx
Executable file
@ -0,0 +1,129 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form implementation generated from reading ui file 'DlgRef_2Sel3Spin2Rb_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: Tue Oct 9 15:16:54 2007
|
||||||
|
** by: The User Interface Compiler ($Id$)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "DlgRef_2Sel3Spin2Rb_QTD.h"
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qpushbutton.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
#include <qlineedit.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
#include <qradiobutton.h>
|
||||||
|
#include <qspinbox.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qtooltip.h>
|
||||||
|
#include <qwhatsthis.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constructs a DlgRef_2Sel3Spin2Rb_QTD as a child of 'parent', with the
|
||||||
|
* name 'name' and widget flags set to 'f'.
|
||||||
|
*/
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTD::DlgRef_2Sel3Spin2Rb_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||||
|
: QWidget( parent, name, fl )
|
||||||
|
{
|
||||||
|
if ( !name )
|
||||||
|
setName( "DlgRef_2Sel3Spin2Rb_QTD" );
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel3Spin2Rb_QTDLayout");
|
||||||
|
|
||||||
|
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||||
|
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||||
|
GroupBox1->layout()->setSpacing( 6 );
|
||||||
|
GroupBox1->layout()->setMargin( 11 );
|
||||||
|
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||||
|
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||||
|
|
||||||
|
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||||
|
|
||||||
|
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
|
||||||
|
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout1->addWidget( PushButton1, 0, 1 );
|
||||||
|
|
||||||
|
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
|
||||||
|
|
||||||
|
Layout1->addWidget( LineEdit1, 0, 2 );
|
||||||
|
|
||||||
|
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
|
||||||
|
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout1->addWidget( TextLabel2, 1, 0 );
|
||||||
|
|
||||||
|
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||||
|
|
||||||
|
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
|
||||||
|
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout2->addWidget( TextLabel5, 1, 3 );
|
||||||
|
|
||||||
|
RadioButton2 = new QRadioButton( GroupBox1, "RadioButton2" );
|
||||||
|
|
||||||
|
Layout2->addWidget( RadioButton2, 1, 0 );
|
||||||
|
|
||||||
|
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
|
||||||
|
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout2->addWidget( TextLabel3, 0, 1 );
|
||||||
|
|
||||||
|
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||||
|
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout2->addMultiCellWidget( SpinBox1, 0, 0, 2, 4 );
|
||||||
|
|
||||||
|
RadioButton1 = new QRadioButton( GroupBox1, "RadioButton1" );
|
||||||
|
|
||||||
|
Layout2->addWidget( RadioButton1, 0, 0 );
|
||||||
|
|
||||||
|
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
|
||||||
|
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout2->addWidget( SpinBox3, 1, 4 );
|
||||||
|
|
||||||
|
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
|
||||||
|
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout2->addWidget( SpinBox2, 1, 2 );
|
||||||
|
|
||||||
|
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
|
||||||
|
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout2->addWidget( TextLabel4, 1, 1 );
|
||||||
|
|
||||||
|
Layout1->addMultiCellLayout( Layout2, 2, 2, 0, 2 );
|
||||||
|
|
||||||
|
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
|
||||||
|
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout1->addWidget( PushButton2, 1, 1 );
|
||||||
|
Spacer5 = new QSpacerItem( 0, 207, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||||
|
Layout1->addItem( Spacer5, 3, 2 );
|
||||||
|
|
||||||
|
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
|
||||||
|
|
||||||
|
Layout1->addWidget( LineEdit2, 1, 2 );
|
||||||
|
|
||||||
|
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
|
||||||
|
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
|
||||||
|
|
||||||
|
Layout1->addWidget( TextLabel1, 0, 0 );
|
||||||
|
|
||||||
|
GroupBox1Layout->addLayout( Layout1, 0, 0 );
|
||||||
|
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||||
|
resize( QSize(439, 340).expandedTo(minimumSizeHint()) );
|
||||||
|
clearWState( WState_Polished );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroys the object and frees any allocated resources
|
||||||
|
*/
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTD::~DlgRef_2Sel3Spin2Rb_QTD()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
|
60
src/DlgRef/DlgRef_2Sel3Spin2Rb_QTD.h
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Form interface generated from reading ui file 'DlgRef_2Sel3Spin2Rb_QTD.ui'
|
||||||
|
**
|
||||||
|
** Created: Tue Oct 9 15:16:54 2007
|
||||||
|
** by: The User Interface Compiler ($Id$)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef DLGREF_2SEL3SPIN2RB_QTD_H
|
||||||
|
#define DLGREF_2SEL3SPIN2RB_QTD_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QGridLayout;
|
||||||
|
class QSpacerItem;
|
||||||
|
class QGroupBox;
|
||||||
|
class QPushButton;
|
||||||
|
class QLineEdit;
|
||||||
|
class QLabel;
|
||||||
|
class QRadioButton;
|
||||||
|
class QSpinBox;
|
||||||
|
|
||||||
|
class DlgRef_2Sel3Spin2Rb_QTD : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||||
|
~DlgRef_2Sel3Spin2Rb_QTD();
|
||||||
|
|
||||||
|
QGroupBox* GroupBox1;
|
||||||
|
QPushButton* PushButton1;
|
||||||
|
QLineEdit* LineEdit1;
|
||||||
|
QLabel* TextLabel2;
|
||||||
|
QLabel* TextLabel5;
|
||||||
|
QRadioButton* RadioButton2;
|
||||||
|
QLabel* TextLabel3;
|
||||||
|
QSpinBox* SpinBox1;
|
||||||
|
QRadioButton* RadioButton1;
|
||||||
|
QSpinBox* SpinBox3;
|
||||||
|
QSpinBox* SpinBox2;
|
||||||
|
QLabel* TextLabel4;
|
||||||
|
QPushButton* PushButton2;
|
||||||
|
QLineEdit* LineEdit2;
|
||||||
|
QLabel* TextLabel1;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QGridLayout* DlgRef_2Sel3Spin2Rb_QTDLayout;
|
||||||
|
QGridLayout* GroupBox1Layout;
|
||||||
|
QGridLayout* Layout1;
|
||||||
|
QSpacerItem* Spacer5;
|
||||||
|
QGridLayout* Layout2;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DLGREF_2SEL3SPIN2RB_QTD_H
|
@ -54,6 +54,8 @@ dist_libDlgRef_la_SOURCES = \
|
|||||||
DlgRef_2Sel2Spin1Check_QTD.cxx \
|
DlgRef_2Sel2Spin1Check_QTD.cxx \
|
||||||
DlgRef_2Sel4Spin1Check_QTD.cxx \
|
DlgRef_2Sel4Spin1Check_QTD.cxx \
|
||||||
DlgRef_3Sel4Spin2Check_QTD.cxx \
|
DlgRef_3Sel4Spin2Check_QTD.cxx \
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTD.cxx \
|
||||||
|
DlgRef_2Sel3Spin2Rb.cxx \
|
||||||
DlgRef_4Sel1List_QTD.cxx \
|
DlgRef_4Sel1List_QTD.cxx \
|
||||||
DlgRef_2Sel1List_QTD.cxx \
|
DlgRef_2Sel1List_QTD.cxx \
|
||||||
DlgRef_2Sel1List1Check_QTD.cxx \
|
DlgRef_2Sel1List1Check_QTD.cxx \
|
||||||
@ -106,6 +108,8 @@ MOC_FILES = \
|
|||||||
DlgRef_2Sel1Spin_QTD_moc.cxx \
|
DlgRef_2Sel1Spin_QTD_moc.cxx \
|
||||||
DlgRef_2Sel2Spin_QTD_moc.cxx \
|
DlgRef_2Sel2Spin_QTD_moc.cxx \
|
||||||
DlgRef_2Sel3Spin_QTD_moc.cxx \
|
DlgRef_2Sel3Spin_QTD_moc.cxx \
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTD_moc.cxx \
|
||||||
|
DlgRef_2Sel3Spin2Rb_moc.cxx \
|
||||||
DlgRef_1Sel1Spin1Check_QTD_moc.cxx \
|
DlgRef_1Sel1Spin1Check_QTD_moc.cxx \
|
||||||
DlgRef_2Sel1Spin2Check_QTD_moc.cxx \
|
DlgRef_2Sel1Spin2Check_QTD_moc.cxx \
|
||||||
DlgRef_2Sel2Spin1Check_QTD_moc.cxx \
|
DlgRef_2Sel2Spin1Check_QTD_moc.cxx \
|
||||||
@ -170,6 +174,8 @@ salomeinclude_HEADERS = \
|
|||||||
DlgRef_2Sel2Spin1Check_QTD.h \
|
DlgRef_2Sel2Spin1Check_QTD.h \
|
||||||
DlgRef_2Sel4Spin1Check_QTD.h \
|
DlgRef_2Sel4Spin1Check_QTD.h \
|
||||||
DlgRef_3Sel4Spin2Check_QTD.h \
|
DlgRef_3Sel4Spin2Check_QTD.h \
|
||||||
|
DlgRef_2Sel3Spin2Rb_QTD.h \
|
||||||
|
DlgRef_2Sel3Spin2Rb.h \
|
||||||
DlgRef_4Sel1List_QTD.h \
|
DlgRef_4Sel1List_QTD.h \
|
||||||
DlgRef_2Sel1List_QTD.h \
|
DlgRef_2Sel1List_QTD.h \
|
||||||
DlgRef_2Sel1List1Check_QTD.h \
|
DlgRef_2Sel1List1Check_QTD.h \
|
||||||
|
279
src/DlgRef/UIFiles/DlgRef_2Sel3Spin2Rb_QTD.ui
Normal file
@ -0,0 +1,279 @@
|
|||||||
|
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
|
||||||
|
<class>DlgRef_2Sel3Spin2Rb_QTD</class>
|
||||||
|
<widget class="QWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>DlgRef_2Sel3Spin2Rb_QTD</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>439</width>
|
||||||
|
<height>340</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="caption">
|
||||||
|
<string>DlgRef_2Sel3Spin2Rb_QTD</string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QGroupBox" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>GroupBox1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QLayoutWidget" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>Layout1</cstring>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" row="0" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>PushButton1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" row="0" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>LineEdit1</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="1" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TextLabel2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TL2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>Layout2</cstring>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" row="1" column="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TextLabel5</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TL5</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" row="1" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>RadioButton2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="0" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TextLabel3</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TL3</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSpinBox" row="0" column="2" rowspan="1" colspan="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>SpinBox1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>7</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>RadioButton1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSpinBox" row="1" column="4">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>SpinBox3</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>7</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSpinBox" row="1" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>SpinBox2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>7</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="1" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TextLabel4</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TL4</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" row="1" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>PushButton2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<spacer row="3" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>Spacer5</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>207</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
<widget class="QLineEdit" row="1" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>LineEdit2</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="0" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TextLabel1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>0</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TL1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<slots>
|
||||||
|
<slot>RadioButton_Clicked()</slot>
|
||||||
|
</slots>
|
||||||
|
<layoutdefaults spacing="6" margin="11"/>
|
||||||
|
</UI>
|
@ -104,3 +104,4 @@
|
|||||||
|
|
||||||
uic -o DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui
|
uic -o DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui
|
||||||
uic -o DlgRef_4Sel1Spin2Check_QTD.cxx -impl DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui
|
uic -o DlgRef_4Sel1Spin2Check_QTD.cxx -impl DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui
|
||||||
|
|
||||||
|
@ -129,6 +129,11 @@ msgstr "linepointvector.png"
|
|||||||
msgid "ICON_DLG_CIRCLE_PV"
|
msgid "ICON_DLG_CIRCLE_PV"
|
||||||
msgstr "circlepointvector.png"
|
msgstr "circlepointvector.png"
|
||||||
|
|
||||||
|
#CircleDlg
|
||||||
|
msgid "ICON_DLG_CIRCLE_C2P"
|
||||||
|
msgstr "circlecenter2pnts.png"
|
||||||
|
|
||||||
|
|
||||||
#VectorDlg
|
#VectorDlg
|
||||||
msgid "ICON_DLG_VECTOR_2P"
|
msgid "ICON_DLG_VECTOR_2P"
|
||||||
msgstr "vector2points.png"
|
msgstr "vector2points.png"
|
||||||
|
@ -322,6 +322,18 @@ msgstr "Center"
|
|||||||
msgid "GEOM_RADIUS"
|
msgid "GEOM_RADIUS"
|
||||||
msgstr "Radius :"
|
msgstr "Radius :"
|
||||||
|
|
||||||
|
#Radius
|
||||||
|
msgid "GEOM_CONSTANT_RADIUS"
|
||||||
|
msgstr "Radius :"
|
||||||
|
|
||||||
|
#Radius
|
||||||
|
msgid "GEOM_R1"
|
||||||
|
msgstr "R1 :"
|
||||||
|
|
||||||
|
#Radius
|
||||||
|
msgid "GEOM_R2"
|
||||||
|
msgstr "R2 :"
|
||||||
|
|
||||||
#Radius i
|
#Radius i
|
||||||
msgid "GEOM_RADIUS_I"
|
msgid "GEOM_RADIUS_I"
|
||||||
msgstr "Radius %1 :"
|
msgstr "Radius %1 :"
|
||||||
|
@ -133,6 +133,10 @@ msgstr "linepointvector.png"
|
|||||||
msgid "ICON_DLG_CIRCLE_PV"
|
msgid "ICON_DLG_CIRCLE_PV"
|
||||||
msgstr "circlepointvector.png"
|
msgstr "circlepointvector.png"
|
||||||
|
|
||||||
|
#CircleDlg
|
||||||
|
msgid "ICON_DLG_CIRCLE_C2P"
|
||||||
|
msgstr "circlecenter2pnts.png"
|
||||||
|
|
||||||
#VectorDlg
|
#VectorDlg
|
||||||
msgid "ICON_DLG_VECTOR_2P"
|
msgid "ICON_DLG_VECTOR_2P"
|
||||||
msgstr "vector2points.png"
|
msgstr "vector2points.png"
|
||||||
@ -370,6 +374,11 @@ msgstr "filletedge.png"
|
|||||||
msgid "ICON_DLG_CHAMFER_EDGE"
|
msgid "ICON_DLG_CHAMFER_EDGE"
|
||||||
msgstr "chamferedge.png"
|
msgstr "chamferedge.png"
|
||||||
|
|
||||||
|
#ChamferDlg
|
||||||
|
msgid "ICON_DLG_CHAMFER_EDGE_FROM_FACE"
|
||||||
|
msgstr "chamferedgefromface.png"
|
||||||
|
|
||||||
|
|
||||||
#FilletDlg
|
#FilletDlg
|
||||||
msgid "ICON_DLG_FILLET_FACE"
|
msgid "ICON_DLG_FILLET_FACE"
|
||||||
msgstr "filletface.png"
|
msgstr "filletface.png"
|
||||||
|
@ -313,6 +313,18 @@ msgstr "Center"
|
|||||||
msgid "GEOM_RADIUS"
|
msgid "GEOM_RADIUS"
|
||||||
msgstr "Radius :"
|
msgstr "Radius :"
|
||||||
|
|
||||||
|
#Radius
|
||||||
|
msgid "GEOM_CONSTANT_RADIUS"
|
||||||
|
msgstr "Radius :"
|
||||||
|
|
||||||
|
#Radius
|
||||||
|
msgid "GEOM_R1"
|
||||||
|
msgstr "R1 :"
|
||||||
|
|
||||||
|
#Radius
|
||||||
|
msgid "GEOM_R2"
|
||||||
|
msgstr "R2 :"
|
||||||
|
|
||||||
#Radius i
|
#Radius i
|
||||||
msgid "GEOM_RADIUS_I"
|
msgid "GEOM_RADIUS_I"
|
||||||
msgstr "Radius %1 :"
|
msgstr "Radius %1 :"
|
||||||
@ -782,6 +794,10 @@ msgstr "D1 :"
|
|||||||
msgid "GEOM_D2"
|
msgid "GEOM_D2"
|
||||||
msgstr "D2 :"
|
msgstr "D2 :"
|
||||||
|
|
||||||
|
#D
|
||||||
|
msgid "GEOM_D"
|
||||||
|
msgstr "D :"
|
||||||
|
|
||||||
#
|
#
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
#
|
#
|
||||||
@ -826,6 +842,14 @@ msgstr "Chamfer On Whole Shape"
|
|||||||
msgid "GEOM_CHAMFER_EDGES"
|
msgid "GEOM_CHAMFER_EDGES"
|
||||||
msgstr "Chamfer On Edges From Shape"
|
msgstr "Chamfer On Edges From Shape"
|
||||||
|
|
||||||
|
#: GeometryGUI_ChamferDlg.cxx:58
|
||||||
|
msgid "GEOM_CHAMFER_EDGE"
|
||||||
|
msgstr "Chamfer On Selected Edges"
|
||||||
|
|
||||||
|
#: GeometryGUI_ChamferDlg.cxx:58
|
||||||
|
msgid "SELECTED_EDGE"
|
||||||
|
msgstr "Selected Edges"
|
||||||
|
|
||||||
#: GeometryGUI_ChamferDlg.cxx:58
|
#: GeometryGUI_ChamferDlg.cxx:58
|
||||||
msgid "GEOM_CHAMFER_FACES"
|
msgid "GEOM_CHAMFER_FACES"
|
||||||
msgstr "Chamfer On Faces From Shape"
|
msgstr "Chamfer On Faces From Shape"
|
||||||
@ -1485,6 +1509,9 @@ msgstr "Chamfer can't be computed with %1 and %2"
|
|||||||
msgid "GEOM_3_POINTS"
|
msgid "GEOM_3_POINTS"
|
||||||
msgstr "3 points"
|
msgstr "3 points"
|
||||||
|
|
||||||
|
msgid "GEOM_CENTER_2POINTS"
|
||||||
|
msgstr "Center and two points"
|
||||||
|
|
||||||
msgid "GEOM_POINT1"
|
msgid "GEOM_POINT1"
|
||||||
msgstr "Point 1"
|
msgstr "Point 1"
|
||||||
|
|
||||||
@ -2857,13 +2884,13 @@ msgid "STB_ERASE_ALL"
|
|||||||
msgstr "Erase all"
|
msgstr "Erase all"
|
||||||
|
|
||||||
msgid "TOP_DISPLAY"
|
msgid "TOP_DISPLAY"
|
||||||
msgstr "Display"
|
msgstr "Show"
|
||||||
|
|
||||||
msgid "MEN_DISPLAY"
|
msgid "MEN_DISPLAY"
|
||||||
msgstr "Display"
|
msgstr "Show"
|
||||||
|
|
||||||
msgid "STB_DISPLAY"
|
msgid "STB_DISPLAY"
|
||||||
msgstr "Display"
|
msgstr "Show object(s)"
|
||||||
|
|
||||||
msgid "TOP_DISPLAY_ONLY"
|
msgid "TOP_DISPLAY_ONLY"
|
||||||
msgstr "Display only"
|
msgstr "Display only"
|
||||||
@ -2875,13 +2902,13 @@ msgid "STB_DISPLAY_ONLY"
|
|||||||
msgstr "Display only"
|
msgstr "Display only"
|
||||||
|
|
||||||
msgid "TOP_ERASE"
|
msgid "TOP_ERASE"
|
||||||
msgstr "Erase"
|
msgstr "Hide"
|
||||||
|
|
||||||
msgid "MEN_ERASE"
|
msgid "MEN_ERASE"
|
||||||
msgstr "Erase"
|
msgstr "Hide"
|
||||||
|
|
||||||
msgid "STB_ERASE"
|
msgid "STB_ERASE"
|
||||||
msgstr "Erase"
|
msgstr "Hide object(s)"
|
||||||
|
|
||||||
msgid "TOP_POP_RENAME"
|
msgid "TOP_POP_RENAME"
|
||||||
msgstr "Rename"
|
msgstr "Rename"
|
||||||
|
@ -132,37 +132,50 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const
|
|||||||
M.FindFromIndex(i).Extent() == 2)
|
M.FindFromIndex(i).Extent() == 2)
|
||||||
fill.Add(aD, E, F);
|
fill.Add(aD, E, F);
|
||||||
}
|
}
|
||||||
} else if (aType == CHAMFER_SHAPE_EDGE) {
|
}else if (aType == CHAMFER_SHAPE_EDGE || aType == CHAMFER_SHAPE_EDGE_AD) {
|
||||||
// chamfer on edges, common to two faces, with D1 on the first face
|
// chamfer on edges, common to two faces, with D1 on the first face
|
||||||
double aD1 = aCI.GetD1();
|
|
||||||
double aD2 = aCI.GetD2();
|
|
||||||
TopoDS_Shape aFace1, aFace2;
|
TopoDS_Shape aFace1, aFace2;
|
||||||
if (GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace1(), aFace1) &&
|
if (GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace1(), aFace1) &&
|
||||||
GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace2(), aFace2)) {
|
GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace2(), aFace2))
|
||||||
TopoDS_Face F = TopoDS::Face(aFace1);
|
{
|
||||||
|
TopoDS_Face F = TopoDS::Face(aFace1);
|
||||||
|
|
||||||
// fill map of edges of the second face
|
// fill map of edges of the second face
|
||||||
TopTools_MapOfShape aMap;
|
TopTools_MapOfShape aMap;
|
||||||
TopExp_Explorer Exp2 (aFace2, TopAbs_EDGE);
|
TopExp_Explorer Exp2 (aFace2, TopAbs_EDGE);
|
||||||
for (; Exp2.More(); Exp2.Next()) {
|
for (; Exp2.More(); Exp2.Next()) {
|
||||||
aMap.Add(Exp2.Current());
|
aMap.Add(Exp2.Current());
|
||||||
|
}
|
||||||
|
|
||||||
|
// find edges of the first face, common with the second face
|
||||||
|
TopExp_Explorer Exp (aFace1, TopAbs_EDGE);
|
||||||
|
for (; Exp.More(); Exp.Next()) {
|
||||||
|
if (aMap.Contains(Exp.Current())) {
|
||||||
|
TopoDS_Edge E = TopoDS::Edge(Exp.Current());
|
||||||
|
if (!BRepTools::IsReallyClosed(E, F) && !BRep_Tool::Degenerated(E))
|
||||||
|
{
|
||||||
|
if ( aType == CHAMFER_SHAPE_EDGE )
|
||||||
|
{
|
||||||
|
double aD1 = aCI.GetD1();
|
||||||
|
double aD2 = aCI.GetD2();
|
||||||
|
fill.Add(aD1, aD2, E, F);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double aD = aCI.GetD();
|
||||||
|
double anAngle = aCI.GetAngle();
|
||||||
|
fill.AddDA(aD, anAngle, E, F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// find edges of the first face, common with the second face
|
else if (aType == CHAMFER_SHAPE_FACES || aType == CHAMFER_SHAPE_FACES_AD) {
|
||||||
TopExp_Explorer Exp (aFace1, TopAbs_EDGE);
|
|
||||||
for (; Exp.More(); Exp.Next()) {
|
|
||||||
if (aMap.Contains(Exp.Current())) {
|
|
||||||
TopoDS_Edge E = TopoDS::Edge(Exp.Current());
|
|
||||||
if (!BRepTools::IsReallyClosed(E, F) && !BRep_Tool::Degenerated(E))
|
|
||||||
fill.Add(aD1, aD2, E, F);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (aType == CHAMFER_SHAPE_FACES) {
|
|
||||||
// chamfer on all edges of the selected faces, with D1 on the selected face
|
// chamfer on all edges of the selected faces, with D1 on the selected face
|
||||||
// (on first selected face, if the edge belongs to two selected faces)
|
// (on first selected face, if the edge belongs to two selected faces)
|
||||||
double aD1 = aCI.GetD1();
|
|
||||||
double aD2 = aCI.GetD2();
|
|
||||||
int aLen = aCI.GetLength();
|
int aLen = aCI.GetLength();
|
||||||
int ind = 1;
|
int ind = 1;
|
||||||
TopTools_MapOfShape aMap;
|
TopTools_MapOfShape aMap;
|
||||||
@ -171,22 +184,67 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const
|
|||||||
for (; ind <= aLen; ind++)
|
for (; ind <= aLen; ind++)
|
||||||
{
|
{
|
||||||
TopoDS_Shape aShapeFace;
|
TopoDS_Shape aShapeFace;
|
||||||
if (GEOMImpl_ILocalOperations::GetSubShape
|
if (GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace(ind), aShapeFace))
|
||||||
(aShapeBase, aCI.GetFace(ind), aShapeFace)) {
|
{
|
||||||
TopoDS_Face F = TopoDS::Face(aShapeFace);
|
TopoDS_Face F = TopoDS::Face(aShapeFace);
|
||||||
TopExp_Explorer Exp (F, TopAbs_EDGE);
|
TopExp_Explorer Exp (F, TopAbs_EDGE);
|
||||||
for (; Exp.More(); Exp.Next()) {
|
for (; Exp.More(); Exp.Next()) {
|
||||||
if (!aMap.Contains(Exp.Current())) {
|
if (!aMap.Contains(Exp.Current()))
|
||||||
TopoDS_Edge E = TopoDS::Edge(Exp.Current());
|
{
|
||||||
if (!BRepTools::IsReallyClosed(E, F) &&
|
TopoDS_Edge E = TopoDS::Edge(Exp.Current());
|
||||||
!BRep_Tool::Degenerated(E) &&
|
if (!BRepTools::IsReallyClosed(E, F) &&
|
||||||
M.FindFromKey(E).Extent() == 2)
|
!BRep_Tool::Degenerated(E) &&
|
||||||
fill.Add(aD1, aD2, E, F);
|
M.FindFromKey(E).Extent() == 2)
|
||||||
}
|
if (aType == CHAMFER_SHAPE_FACES)
|
||||||
}
|
{
|
||||||
}
|
double aD1 = aCI.GetD1();
|
||||||
|
double aD2 = aCI.GetD2();
|
||||||
|
fill.Add(aD1, aD2, E, F);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double aD = aCI.GetD();
|
||||||
|
double anAngle = aCI.GetAngle();
|
||||||
|
fill.AddDA(aD, anAngle, E, F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else if (aType == CHAMFER_SHAPE_EDGES || aType == CHAMFER_SHAPE_EDGES_AD)
|
||||||
|
{
|
||||||
|
// chamfer on selected edges with lenght param D1 & D2.
|
||||||
|
|
||||||
|
int aLen = aCI.GetLength();
|
||||||
|
int ind = 1;
|
||||||
|
TopTools_MapOfShape aMap;
|
||||||
|
TopTools_IndexedDataMapOfShapeListOfShape M;
|
||||||
|
GEOMImpl_Block6Explorer::MapShapesAndAncestors(aShapeBase, TopAbs_EDGE, TopAbs_FACE, M);
|
||||||
|
for (; ind <= aLen; ind++)
|
||||||
|
{
|
||||||
|
TopoDS_Shape aShapeEdge;
|
||||||
|
if (GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetEdge(ind), aShapeEdge))
|
||||||
|
{
|
||||||
|
TopoDS_Edge E = TopoDS::Edge(aShapeEdge);
|
||||||
|
const TopTools_ListOfShape& aFacesList = M.FindFromKey(E);
|
||||||
|
TopoDS_Face F = TopoDS::Face( aFacesList.First() );
|
||||||
|
if (aType == CHAMFER_SHAPE_EDGES)
|
||||||
|
{
|
||||||
|
double aD1 = aCI.GetD1();
|
||||||
|
double aD2 = aCI.GetD2();
|
||||||
|
fill.Add(aD1, aD2, E, F);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double aD = aCI.GetD();
|
||||||
|
double anAngle = aCI.GetAngle();
|
||||||
|
fill.AddDA(aD, anAngle, E, F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
}
|
}
|
||||||
|
|
||||||
fill.Build();
|
fill.Build();
|
||||||
|
@ -95,6 +95,48 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(TFunction_Logbook& log) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (aType == CIRCLE_CENTER_TWO_PNT) {
|
||||||
|
Handle(GEOM_Function) aRefPoint1 = aCI.GetPoint1();
|
||||||
|
Handle(GEOM_Function) aRefPoint2 = aCI.GetPoint2();
|
||||||
|
Handle(GEOM_Function) aRefPoint3 = aCI.GetPoint3();
|
||||||
|
TopoDS_Shape aShapePnt1 = aRefPoint1->GetValue();
|
||||||
|
TopoDS_Shape aShapePnt2 = aRefPoint2->GetValue();
|
||||||
|
TopoDS_Shape aShapePnt3 = aRefPoint3->GetValue();
|
||||||
|
if (aShapePnt1.ShapeType() == TopAbs_VERTEX && aShapePnt2.ShapeType() == TopAbs_VERTEX &&
|
||||||
|
aShapePnt3.ShapeType() == TopAbs_VERTEX)
|
||||||
|
{
|
||||||
|
gp_Pnt aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt1));
|
||||||
|
gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt2));
|
||||||
|
gp_Pnt aP3 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt3));
|
||||||
|
|
||||||
|
if (aP1.Distance(aP2) < gp::Resolution() ||
|
||||||
|
aP1.Distance(aP3) < gp::Resolution() ||
|
||||||
|
aP2.Distance(aP3) < gp::Resolution())
|
||||||
|
Standard_ConstructionError::Raise("Circle creation aborted: coincident points given");
|
||||||
|
if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
|
||||||
|
Standard_ConstructionError::Raise("Circle creation aborted: points lay on one line");
|
||||||
|
double x, y, z, x1, y1, z1, x2, y2, z2, dx, dy, dz, dx2, dy2, dz2, dx3, dy3, dz3, aRadius;
|
||||||
|
//Calculations for Radius
|
||||||
|
x = aP1.X(); y = aP1.Y(); z = aP1.Z();
|
||||||
|
x1 = aP2.X(); y1 = aP2.Y(); z1 = aP2.Z();
|
||||||
|
dx = x1 - x;
|
||||||
|
dy = y1 - y;
|
||||||
|
dz = z1 - z;
|
||||||
|
aRadius = sqrt(dx*dx + dy*dy + dz*dz);
|
||||||
|
//Calculations for Plane Vector
|
||||||
|
x2 = aP3.X(); y2 = aP3.Y(); z2 = aP3.Z();
|
||||||
|
dx2 = x2 - x; dy2 = y2 - y; dz2 = z2 - z;
|
||||||
|
dx3 = ((dy*dz2) - (dy2*dz))/100;
|
||||||
|
dy3 = ((dx2*dz) - (dx*dz2))/100;
|
||||||
|
dz3 = ((dx*dy2) - (dx2*dy))/100;
|
||||||
|
//Make Plane Vector
|
||||||
|
gp_Dir aDir ( dx3, dy3, dz3 );
|
||||||
|
//Make Circle
|
||||||
|
gp_Ax2 anAxes (aP1, aDir);
|
||||||
|
gp_Circ aCirc (anAxes, aRadius);
|
||||||
|
aShape = BRepBuilderAPI_MakeEdge(aCirc).Edge();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (aType == CIRCLE_THREE_PNT) {
|
else if (aType == CIRCLE_THREE_PNT) {
|
||||||
Handle(GEOM_Function) aRefPoint1 = aCI.GetPoint1();
|
Handle(GEOM_Function) aRefPoint1 = aCI.GetPoint1();
|
||||||
Handle(GEOM_Function) aRefPoint2 = aCI.GetPoint2();
|
Handle(GEOM_Function) aRefPoint2 = aCI.GetPoint2();
|
||||||
@ -116,9 +158,9 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(TFunction_Logbook& log) const
|
|||||||
Standard_ConstructionError::Raise("Circle creation aborted: points lay on one line");
|
Standard_ConstructionError::Raise("Circle creation aborted: points lay on one line");
|
||||||
Handle(Geom_Circle) aCirc = GC_MakeCircle(aP1, aP2, aP3).Value();
|
Handle(Geom_Circle) aCirc = GC_MakeCircle(aP1, aP2, aP3).Value();
|
||||||
aShape = BRepBuilderAPI_MakeEdge(aCirc).Edge();
|
aShape = BRepBuilderAPI_MakeEdge(aCirc).Edge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aShape.IsNull()) return 0;
|
if (aShape.IsNull()) return 0;
|
||||||
|
@ -83,17 +83,17 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const
|
|||||||
TopoDS_Edge E = TopoDS::Edge(Exp.Current());
|
TopoDS_Edge E = TopoDS::Edge(Exp.Current());
|
||||||
fill.Add(E);
|
fill.Add(E);
|
||||||
}
|
}
|
||||||
} else if (aType == FILLET_SHAPE_EDGES) {
|
} else if (aType == FILLET_SHAPE_EDGES || aType == FILLET_SHAPE_EDGES_2R) {
|
||||||
int aLen = aCI.GetLength();
|
int aLen = aCI.GetLength();
|
||||||
int ind = 1;
|
int ind = 1;
|
||||||
for (; ind <= aLen; ind++) {
|
for (; ind <= aLen; ind++) {
|
||||||
TopoDS_Shape aShapeEdge;
|
TopoDS_Shape aShapeEdge;
|
||||||
if (GEOMImpl_ILocalOperations::GetSubShape
|
if (GEOMImpl_ILocalOperations::GetSubShape
|
||||||
(aShapeBase, aCI.GetEdge(ind), aShapeEdge)) {
|
(aShapeBase, aCI.GetEdge(ind), aShapeEdge)) {
|
||||||
fill.Add(TopoDS::Edge(aShapeEdge));
|
fill.Add(TopoDS::Edge(aShapeEdge));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (aType == FILLET_SHAPE_FACES) {
|
} else if (aType == FILLET_SHAPE_FACES || aType == FILLET_SHAPE_FACES_2R) {
|
||||||
int aLen = aCI.GetLength();
|
int aLen = aCI.GetLength();
|
||||||
int ind = 1;
|
int ind = 1;
|
||||||
for (; ind <= aLen; ind++) {
|
for (; ind <= aLen; ind++) {
|
||||||
@ -108,10 +108,15 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
if (aType == FILLET_SHAPE_FACES || aType == FILLET_SHAPE_EDGES || aType == FILLET_SHAPE_ALL)
|
||||||
|
for (int i = 1; i <= fill.NbContours(); i++)
|
||||||
|
fill.SetRadius(aCI.GetR(), i, 1);
|
||||||
|
else if (aType == FILLET_SHAPE_FACES_2R || aType == FILLET_SHAPE_EDGES_2R)
|
||||||
|
for (int i = 1; i <= fill.NbContours(); i++)
|
||||||
|
{
|
||||||
|
fill.SetRadius(aCI.GetR1(), aCI.GetR2(), i, 1);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 1; i <= fill.NbContours(); i++) {
|
|
||||||
fill.SetRadius(aCI.GetR(), i, 1);
|
|
||||||
}
|
|
||||||
fill.Build();
|
fill.Build();
|
||||||
if (!fill.IsDone()) {
|
if (!fill.IsDone()) {
|
||||||
StdFail_NotDone::Raise("Fillet can't be computed on the given shape with the given radius");
|
StdFail_NotDone::Raise("Fillet can't be computed on the given shape with the given radius");
|
||||||
|
@ -22,11 +22,12 @@
|
|||||||
|
|
||||||
#include "GEOM_Function.hxx"
|
#include "GEOM_Function.hxx"
|
||||||
|
|
||||||
#define CHAM_ARG_SH 1
|
#define CHAM_ARG_SH 1
|
||||||
#define CHAM_ARG_D1 2
|
#define CHAM_ARG_D1 2
|
||||||
#define CHAM_ARG_D2 3
|
#define CHAM_ARG_D2 3
|
||||||
#define CHAM_ARG_LENG 4
|
#define CHAM_ARG_ANGLE 3
|
||||||
#define CHAM_ARG_LAST 4
|
#define CHAM_ARG_LENG 4
|
||||||
|
#define CHAM_ARG_LAST 4
|
||||||
|
|
||||||
class GEOMImpl_IChamfer
|
class GEOMImpl_IChamfer
|
||||||
{
|
{
|
||||||
@ -41,10 +42,12 @@ class GEOMImpl_IChamfer
|
|||||||
void SetD (double theD) { _func->SetReal(CHAM_ARG_D1, theD); }
|
void SetD (double theD) { _func->SetReal(CHAM_ARG_D1, theD); }
|
||||||
void SetD1(double theD) { _func->SetReal(CHAM_ARG_D1, theD); }
|
void SetD1(double theD) { _func->SetReal(CHAM_ARG_D1, theD); }
|
||||||
void SetD2(double theD) { _func->SetReal(CHAM_ARG_D2, theD); }
|
void SetD2(double theD) { _func->SetReal(CHAM_ARG_D2, theD); }
|
||||||
|
void SetAngle(double theAngle) { _func->SetReal(CHAM_ARG_ANGLE, theAngle); }
|
||||||
|
|
||||||
double GetD () { return _func->GetReal(CHAM_ARG_D1); }
|
double GetD () { return _func->GetReal(CHAM_ARG_D1); }
|
||||||
double GetD1() { return _func->GetReal(CHAM_ARG_D1); }
|
double GetD1() { return _func->GetReal(CHAM_ARG_D1); }
|
||||||
double GetD2() { return _func->GetReal(CHAM_ARG_D2); }
|
double GetD2() { return _func->GetReal(CHAM_ARG_D2); }
|
||||||
|
double GetAngle() { return _func->GetReal(CHAM_ARG_ANGLE); }
|
||||||
|
|
||||||
void SetLength(int theLen) { _func->SetInteger(CHAM_ARG_LENG, theLen); }
|
void SetLength(int theLen) { _func->SetInteger(CHAM_ARG_LENG, theLen); }
|
||||||
|
|
||||||
@ -56,10 +59,13 @@ class GEOMImpl_IChamfer
|
|||||||
{ _func->SetInteger(CHAM_ARG_LAST + 1, theFace); }
|
{ _func->SetInteger(CHAM_ARG_LAST + 1, theFace); }
|
||||||
void SetFace2(int theFace)
|
void SetFace2(int theFace)
|
||||||
{ _func->SetInteger(CHAM_ARG_LAST + 2, theFace); }
|
{ _func->SetInteger(CHAM_ARG_LAST + 2, theFace); }
|
||||||
|
void SetEdge(int theInd, int theEdge)
|
||||||
|
{ _func->SetInteger(CHAM_ARG_LAST + theInd, theEdge); }
|
||||||
|
|
||||||
int GetFace(int theInd) { return _func->GetInteger(CHAM_ARG_LAST + theInd); }
|
int GetFace(int theInd) { return _func->GetInteger(CHAM_ARG_LAST + theInd); }
|
||||||
int GetFace1() { return _func->GetInteger(CHAM_ARG_LAST + 1); }
|
int GetFace1() { return _func->GetInteger(CHAM_ARG_LAST + 1); }
|
||||||
int GetFace2() { return _func->GetInteger(CHAM_ARG_LAST + 2); }
|
int GetFace2() { return _func->GetInteger(CHAM_ARG_LAST + 2); }
|
||||||
|
int GetEdge(int theInd) { return _func->GetInteger(CHAM_ARG_LAST + theInd); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -196,6 +196,67 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_
|
|||||||
return aCircle;
|
return aCircle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeCircleCenter2Pnt
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleCenter2Pnt (Handle(GEOM_Object) thePnt1,
|
||||||
|
Handle(GEOM_Object) thePnt2,
|
||||||
|
Handle(GEOM_Object) thePnt3)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
|
//Add a new Circle object
|
||||||
|
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
|
||||||
|
|
||||||
|
//Add a new Circle function for creation a circle relatively to center and 2 points
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aCircle->AddFunction(GEOMImpl_CircleDriver::GetID(), CIRCLE_CENTER_TWO_PNT);
|
||||||
|
if (aFunction.IsNull()) return NULL;
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_CircleDriver::GetID()) return NULL;
|
||||||
|
|
||||||
|
GEOMImpl_ICircle aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefPnt1 = thePnt1->GetLastFunction();
|
||||||
|
Handle(GEOM_Function) aRefPnt2 = thePnt2->GetLastFunction();
|
||||||
|
Handle(GEOM_Function) aRefPnt3 = thePnt3->GetLastFunction();
|
||||||
|
|
||||||
|
if (aRefPnt1.IsNull() || aRefPnt2.IsNull() || aRefPnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
|
aCI.SetPoint1(aRefPnt1);
|
||||||
|
aCI.SetPoint2(aRefPnt2);
|
||||||
|
aCI.SetPoint3(aRefPnt3);
|
||||||
|
|
||||||
|
//Compute the Circle value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Circle driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump(aFunction) << aCircle << " = geompy.MakeCircleCenter2Pnt("
|
||||||
|
<< thePnt1 << ", " << thePnt2 << ", " << thePnt3 << ")";
|
||||||
|
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aCircle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeCirclePntVecR
|
* MakeCirclePntVecR
|
||||||
|
@ -41,6 +41,9 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations {
|
|||||||
Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,
|
Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,
|
||||||
Handle(GEOM_Object) thePnt2,
|
Handle(GEOM_Object) thePnt2,
|
||||||
Handle(GEOM_Object) thePnt3);
|
Handle(GEOM_Object) thePnt3);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeCircleCenter2Pnt (Handle(GEOM_Object) thePnt1,
|
||||||
|
Handle(GEOM_Object) thePnt2,
|
||||||
|
Handle(GEOM_Object) thePnt3);
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeCirclePntVecR (Handle(GEOM_Object) thePnt,
|
Standard_EXPORT Handle(GEOM_Object) MakeCirclePntVecR (Handle(GEOM_Object) thePnt,
|
||||||
Handle(GEOM_Object) theVec, double theR);
|
Handle(GEOM_Object) theVec, double theR);
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#define FILLET_ARG_SH 1
|
#define FILLET_ARG_SH 1
|
||||||
#define FILLET_ARG_R 2
|
#define FILLET_ARG_R 2
|
||||||
|
#define FILLET_ARG_R1 4
|
||||||
|
#define FILLET_ARG_R2 5
|
||||||
#define FILLET_ARG_LENG 3
|
#define FILLET_ARG_LENG 3
|
||||||
#define FILLET_ARG_LAST 3
|
#define FILLET_ARG_LAST 3
|
||||||
|
|
||||||
@ -38,8 +40,12 @@ class GEOMImpl_IFillet
|
|||||||
Handle(GEOM_Function) GetShape() { return _func->GetReference(FILLET_ARG_SH); }
|
Handle(GEOM_Function) GetShape() { return _func->GetReference(FILLET_ARG_SH); }
|
||||||
|
|
||||||
void SetR(double theR) { _func->SetReal(FILLET_ARG_R, theR); }
|
void SetR(double theR) { _func->SetReal(FILLET_ARG_R, theR); }
|
||||||
|
void SetR1(double theR1) { _func->SetReal(FILLET_ARG_R1, theR1); }
|
||||||
|
void SetR2(double theR2) { _func->SetReal(FILLET_ARG_R2, theR2); }
|
||||||
|
|
||||||
double GetR() { return _func->GetReal(FILLET_ARG_R); }
|
double GetR() { return _func->GetReal(FILLET_ARG_R); }
|
||||||
|
double GetR1() { return _func->GetReal(FILLET_ARG_R1); }
|
||||||
|
double GetR2() { return _func->GetReal(FILLET_ARG_R2); }
|
||||||
|
|
||||||
void SetLength(int theLen) { _func->SetInteger(FILLET_ARG_LENG, theLen); }
|
void SetLength(int theLen) { _func->SetInteger(FILLET_ARG_LENG, theLen); }
|
||||||
|
|
||||||
|
@ -198,6 +198,77 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
|
|||||||
return aFillet;
|
return aFillet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeFilletEdges R1 R2
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
|
||||||
|
(Handle(GEOM_Object) theShape, double theR1, double theR2, list<int> theEdges)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
//Add a new Fillet object
|
||||||
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
||||||
|
|
||||||
|
//Add a new Fillet function
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aFillet->AddFunction(GEOMImpl_FilletDriver::GetID(), FILLET_SHAPE_EDGES_2R);
|
||||||
|
if (aFunction.IsNull()) return NULL;
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_FilletDriver::GetID()) return NULL;
|
||||||
|
|
||||||
|
GEOMImpl_IFillet aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
|
||||||
|
if (aRefShape.IsNull()) return NULL;
|
||||||
|
|
||||||
|
aCI.SetShape(aRefShape);
|
||||||
|
aCI.SetR1(theR1);
|
||||||
|
aCI.SetR2(theR2);
|
||||||
|
int aLen = theEdges.size();
|
||||||
|
aCI.SetLength(aLen);
|
||||||
|
|
||||||
|
int ind = 1;
|
||||||
|
list<int>::iterator it = theEdges.begin();
|
||||||
|
for (; it != theEdges.end(); it++, ind++) {
|
||||||
|
aCI.SetEdge(ind, (*it));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Compute the Fillet value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Fillet driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump pd (aFunction);
|
||||||
|
pd << aFillet << " = geompy.MakeFilletR1R2(" << theShape
|
||||||
|
<< ", " << theR1 << ", " <<theR2 << ", geompy.ShapeType[\"EDGE\"], [";
|
||||||
|
|
||||||
|
it = theEdges.begin();
|
||||||
|
pd << (*it++);
|
||||||
|
while (it != theEdges.end()) {
|
||||||
|
pd << ", " << (*it++);
|
||||||
|
}
|
||||||
|
pd << "])";
|
||||||
|
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aFillet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeFilletFaces
|
* MakeFilletFaces
|
||||||
@ -267,6 +338,76 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
|
|||||||
return aFillet;
|
return aFillet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeFilletFaces R1 R2
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
|
||||||
|
(Handle(GEOM_Object) theShape, double theR1, double theR2, list<int> theFaces)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
//Add a new Fillet object
|
||||||
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
||||||
|
|
||||||
|
//Add a new Fillet function
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aFillet->AddFunction(GEOMImpl_FilletDriver::GetID(), FILLET_SHAPE_FACES_2R);
|
||||||
|
if (aFunction.IsNull()) return NULL;
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_FilletDriver::GetID()) return NULL;
|
||||||
|
|
||||||
|
GEOMImpl_IFillet aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
|
||||||
|
if (aRefShape.IsNull()) return NULL;
|
||||||
|
|
||||||
|
aCI.SetShape(aRefShape);
|
||||||
|
aCI.SetR1(theR1);
|
||||||
|
aCI.SetR2(theR2);
|
||||||
|
int aLen = theFaces.size();
|
||||||
|
aCI.SetLength(aLen);
|
||||||
|
|
||||||
|
int ind = 1;
|
||||||
|
list<int>::iterator it = theFaces.begin();
|
||||||
|
for (; it != theFaces.end(); it++, ind++) {
|
||||||
|
aCI.SetFace(ind, (*it));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Compute the Fillet value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Fillet driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump pd (aFunction);
|
||||||
|
pd << aFillet << " = geompy.MakeFilletR1R2(" << theShape
|
||||||
|
<< ", " << theR1 << ", " << theR2 << ", geompy.ShapeType[\"FACE\"], [";
|
||||||
|
|
||||||
|
it = theFaces.begin();
|
||||||
|
pd << (*it++);
|
||||||
|
while (it != theFaces.end()) {
|
||||||
|
pd << ", " << (*it++);
|
||||||
|
}
|
||||||
|
pd << "])";
|
||||||
|
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aFillet;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeChamferAll
|
* MakeChamferAll
|
||||||
@ -377,6 +518,64 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge
|
|||||||
return aChamfer;
|
return aChamfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferEdgeAD
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgeAD
|
||||||
|
(Handle(GEOM_Object) theShape, double theD, double theAngle,
|
||||||
|
int theFace1, int theFace2)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
//Add a new Chamfer object
|
||||||
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
||||||
|
|
||||||
|
//Add a new Chamfer function
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGE_AD);
|
||||||
|
if (aFunction.IsNull()) return NULL;
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) return NULL;
|
||||||
|
|
||||||
|
GEOMImpl_IChamfer aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
|
||||||
|
if (aRefShape.IsNull()) return NULL;
|
||||||
|
|
||||||
|
aCI.SetShape(aRefShape);
|
||||||
|
aCI.SetD(theD);
|
||||||
|
aCI.SetAngle(theAngle);
|
||||||
|
aCI.SetFace1(theFace1);
|
||||||
|
aCI.SetFace2(theFace2);
|
||||||
|
|
||||||
|
//Compute the Chamfer value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Chamfer driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump(aFunction) << aChamfer
|
||||||
|
<< " = geompy.MakeChamferEdgeAD(" << theShape << ", " << theD
|
||||||
|
<< ", " << theAngle << ", " << theFace1 << ", " << theFace2 << ")";
|
||||||
|
cout << "ANGLE = " << theAngle << endl;
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aChamfer;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeChamferFaces
|
* MakeChamferFaces
|
||||||
@ -448,6 +647,221 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
|
|||||||
return aChamfer;
|
return aChamfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferFacesAD
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
|
||||||
|
(Handle(GEOM_Object) theShape, double theD, double theAngle,
|
||||||
|
list<int> theFaces)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
//Add a new Chamfer object
|
||||||
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
||||||
|
|
||||||
|
//Add a new Chamfer function
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_FACES_AD);
|
||||||
|
if (aFunction.IsNull()) return NULL;
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) return NULL;
|
||||||
|
|
||||||
|
GEOMImpl_IChamfer aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
|
||||||
|
if (aRefShape.IsNull()) return NULL;
|
||||||
|
|
||||||
|
aCI.SetShape(aRefShape);
|
||||||
|
aCI.SetD(theD);
|
||||||
|
aCI.SetAngle(theAngle);
|
||||||
|
int aLen = theFaces.size();
|
||||||
|
aCI.SetLength(aLen);
|
||||||
|
|
||||||
|
int ind = 1;
|
||||||
|
list<int>::iterator it = theFaces.begin();
|
||||||
|
for (; it != theFaces.end(); it++, ind++) {
|
||||||
|
aCI.SetFace(ind, (*it));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Compute the Chamfer value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Chamfer driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump pd (aFunction);
|
||||||
|
pd << aChamfer << " = geompy.MakeChamferFacesAD(" << theShape
|
||||||
|
<< ", " << theD << ", " << theAngle << ", [";
|
||||||
|
|
||||||
|
it = theFaces.begin();
|
||||||
|
pd << (*it++);
|
||||||
|
while (it != theFaces.end()) {
|
||||||
|
pd << ", " << (*it++);
|
||||||
|
}
|
||||||
|
pd << "])";
|
||||||
|
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aChamfer;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferEdges
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
|
||||||
|
(Handle(GEOM_Object) theShape, double theD1, double theD2,
|
||||||
|
list<int> theEdges)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
//Add a new Chamfer object
|
||||||
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
||||||
|
|
||||||
|
//Add a new Chamfer function
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES);
|
||||||
|
if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; }
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID())
|
||||||
|
{ return NULL; cout << "Chamfer Driver is NULL!!!" << endl; }
|
||||||
|
|
||||||
|
GEOMImpl_IChamfer aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
|
||||||
|
if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; }
|
||||||
|
|
||||||
|
aCI.SetShape(aRefShape);
|
||||||
|
aCI.SetD1(theD1);
|
||||||
|
aCI.SetD2(theD2);
|
||||||
|
int aLen = theEdges.size();
|
||||||
|
aCI.SetLength(aLen);
|
||||||
|
|
||||||
|
int ind = 1;
|
||||||
|
list<int>::iterator it = theEdges.begin();
|
||||||
|
for (; it != theEdges.end(); it++, ind++) {
|
||||||
|
aCI.SetEdge(ind, (*it));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Compute the Chamfer value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Chamfer driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump pd (aFunction);
|
||||||
|
pd << aChamfer << " = geompy.MakeChamferEdges(" << theShape
|
||||||
|
<< ", " << theD1 << ", " << theD2 << ", [";
|
||||||
|
|
||||||
|
it = theEdges.begin();
|
||||||
|
pd << (*it++);
|
||||||
|
while (it != theEdges.end()) {
|
||||||
|
pd << ", " << (*it++);
|
||||||
|
}
|
||||||
|
pd << "])";
|
||||||
|
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aChamfer;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferEdgesAD
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
|
||||||
|
(Handle(GEOM_Object) theShape, double theD, double theAngle,
|
||||||
|
list<int> theEdges)
|
||||||
|
{
|
||||||
|
SetErrorCode(KO);
|
||||||
|
|
||||||
|
//Add a new Chamfer object
|
||||||
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
||||||
|
|
||||||
|
//Add a new Chamfer function
|
||||||
|
Handle(GEOM_Function) aFunction =
|
||||||
|
aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES_AD);
|
||||||
|
if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; }
|
||||||
|
|
||||||
|
//Check if the function is set correctly
|
||||||
|
if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID())
|
||||||
|
{ return NULL; cout << "Chamfer Driver is NULL!!!" << endl; }
|
||||||
|
|
||||||
|
GEOMImpl_IChamfer aCI (aFunction);
|
||||||
|
|
||||||
|
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
|
||||||
|
if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; }
|
||||||
|
|
||||||
|
aCI.SetShape(aRefShape);
|
||||||
|
aCI.SetD(theD);
|
||||||
|
aCI.SetAngle(theAngle);
|
||||||
|
int aLen = theEdges.size();
|
||||||
|
aCI.SetLength(aLen);
|
||||||
|
|
||||||
|
int ind = 1;
|
||||||
|
list<int>::iterator it = theEdges.begin();
|
||||||
|
for (; it != theEdges.end(); it++, ind++) {
|
||||||
|
aCI.SetEdge(ind, (*it));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Compute the Chamfer value
|
||||||
|
try {
|
||||||
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
|
OCC_CATCH_SIGNALS;
|
||||||
|
#endif
|
||||||
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
|
SetErrorCode("Chamfer driver failed");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a Python command
|
||||||
|
GEOM::TPythonDump pd (aFunction);
|
||||||
|
pd << aChamfer << " = geompy.MakeChamferEdgesAD(" << theShape
|
||||||
|
<< ", " << theD << ", " << theAngle << ", [";
|
||||||
|
|
||||||
|
it = theEdges.begin();
|
||||||
|
pd << (*it++);
|
||||||
|
while (it != theEdges.end()) {
|
||||||
|
pd << ", " << (*it++);
|
||||||
|
}
|
||||||
|
pd << "])";
|
||||||
|
|
||||||
|
SetErrorCode(OK);
|
||||||
|
return aChamfer;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Archimede
|
* Archimede
|
||||||
|
@ -37,17 +37,34 @@ class GEOMImpl_ILocalOperations : public GEOM_IOperations {
|
|||||||
Standard_EXPORT Handle(GEOM_Object) MakeFilletAll (Handle(GEOM_Object) theShape, double theR);
|
Standard_EXPORT Handle(GEOM_Object) MakeFilletAll (Handle(GEOM_Object) theShape, double theR);
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeFilletEdges (Handle(GEOM_Object) theShape, double theR,
|
Standard_EXPORT Handle(GEOM_Object) MakeFilletEdges (Handle(GEOM_Object) theShape, double theR,
|
||||||
list<int> theEdges);
|
list<int> theEdges);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeFilletEdgesR1R2 (Handle(GEOM_Object) theShape,
|
||||||
|
double theR1, double theR2,
|
||||||
|
list<int> theEdges);
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeFilletFaces (Handle(GEOM_Object) theShape, double theR,
|
Standard_EXPORT Handle(GEOM_Object) MakeFilletFaces (Handle(GEOM_Object) theShape, double theR,
|
||||||
list<int> theFaces);
|
list<int> theFaces);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeFilletFacesR1R2 (Handle(GEOM_Object) theShape,
|
||||||
|
double theR1, double theR2,
|
||||||
|
list<int> theFaces);
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeChamferAll (Handle(GEOM_Object) theShape, double theD);
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferAll (Handle(GEOM_Object) theShape, double theD);
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeChamferEdge (Handle(GEOM_Object) theShape,
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferEdge (Handle(GEOM_Object) theShape,
|
||||||
double theD1, double theD2,
|
double theD1, double theD2,
|
||||||
int theFace1, int theFace2);
|
int theFace1, int theFace2);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferEdgeAD (Handle(GEOM_Object) theShape,
|
||||||
|
double theD, double theAngle,
|
||||||
|
int theFace1, int theFace2);
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeChamferFaces (Handle(GEOM_Object) theShape,
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferFaces (Handle(GEOM_Object) theShape,
|
||||||
double theD1, double theD2,
|
double theD1, double theD2,
|
||||||
list<int> theFaces);
|
list<int> theFaces);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferFacesAD (Handle(GEOM_Object) theShape,
|
||||||
|
double theD, double theAngle,
|
||||||
|
list<int> theFaces);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferEdges (Handle(GEOM_Object) theShape,
|
||||||
|
double theD1, double theD2,
|
||||||
|
list<int> theEdges);
|
||||||
|
Standard_EXPORT Handle(GEOM_Object) MakeChamferEdgesAD (Handle(GEOM_Object) theShape,
|
||||||
|
double theD, double theAngle,
|
||||||
|
list<int> theEdges);
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeArchimede (Handle(GEOM_Object) theShape,
|
Standard_EXPORT Handle(GEOM_Object) MakeArchimede (Handle(GEOM_Object) theShape,
|
||||||
double theWeight, double theWaterDensity,
|
double theWeight, double theWaterDensity,
|
||||||
double theMeshingDeflection);
|
double theMeshingDeflection);
|
||||||
|
@ -163,6 +163,7 @@
|
|||||||
#define PIPE_BASE_PATH 1
|
#define PIPE_BASE_PATH 1
|
||||||
#define PIPE_DIFFERENT_SECTIONS 2
|
#define PIPE_DIFFERENT_SECTIONS 2
|
||||||
#define PIPE_SHELL_SECTIONS 3
|
#define PIPE_SHELL_SECTIONS 3
|
||||||
|
#define PIPE_SHELLS_WITHOUT_PATH 4
|
||||||
|
|
||||||
#define THRUSECTIONS_RULED 1
|
#define THRUSECTIONS_RULED 1
|
||||||
#define THRUSECTIONS_SMOOTHED 2
|
#define THRUSECTIONS_SMOOTHED 2
|
||||||
@ -180,6 +181,7 @@
|
|||||||
|
|
||||||
#define CIRCLE_THREE_PNT 1
|
#define CIRCLE_THREE_PNT 1
|
||||||
#define CIRCLE_PNT_VEC_R 2
|
#define CIRCLE_PNT_VEC_R 2
|
||||||
|
#define CIRCLE_CENTER_TWO_PNT 3
|
||||||
|
|
||||||
#define SPLINE_BEZIER 1
|
#define SPLINE_BEZIER 1
|
||||||
#define SPLINE_INTERPOLATION 2
|
#define SPLINE_INTERPOLATION 2
|
||||||
@ -189,13 +191,19 @@
|
|||||||
#define CIRC_ARC_THREE_PNT 1
|
#define CIRC_ARC_THREE_PNT 1
|
||||||
#define CIRC_ARC_CENTER 2
|
#define CIRC_ARC_CENTER 2
|
||||||
|
|
||||||
#define FILLET_SHAPE_ALL 1
|
#define FILLET_SHAPE_ALL 1
|
||||||
#define FILLET_SHAPE_EDGES 2
|
#define FILLET_SHAPE_EDGES 2
|
||||||
#define FILLET_SHAPE_FACES 3
|
#define FILLET_SHAPE_FACES 3
|
||||||
|
#define FILLET_SHAPE_EDGES_2R 4
|
||||||
|
#define FILLET_SHAPE_FACES_2R 5
|
||||||
|
|
||||||
#define CHAMFER_SHAPE_ALL 1
|
#define CHAMFER_SHAPE_ALL 1
|
||||||
#define CHAMFER_SHAPE_EDGE 2
|
#define CHAMFER_SHAPE_EDGE 2
|
||||||
#define CHAMFER_SHAPE_FACES 3
|
#define CHAMFER_SHAPE_FACES 3
|
||||||
|
#define CHAMFER_SHAPE_EDGES 4
|
||||||
|
#define CHAMFER_SHAPE_EDGE_AD 5
|
||||||
|
#define CHAMFER_SHAPE_FACES_AD 6
|
||||||
|
#define CHAMFER_SHAPE_EDGES_AD 7
|
||||||
|
|
||||||
#define WIRE_EDGES 1
|
#define WIRE_EDGES 1
|
||||||
#define FACE_WIRE 2
|
#define FACE_WIRE 2
|
||||||
|
@ -119,6 +119,40 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleThreePnt
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeCircleCenter2Pnt
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleCenter2Pnt
|
||||||
|
(GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt3)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
//Set a not done flag
|
||||||
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
|
if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference points
|
||||||
|
Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
|
||||||
|
(thePnt1->GetStudyID(), thePnt1->GetEntry());
|
||||||
|
Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
|
||||||
|
(thePnt2->GetStudyID(), thePnt2->GetEntry());
|
||||||
|
Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
|
||||||
|
(thePnt3->GetStudyID(), thePnt3->GetEntry());
|
||||||
|
|
||||||
|
if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
// Make Circle
|
||||||
|
Handle(GEOM_Object) anObject = GetOperations()->MakeCircleCenter2Pnt(aPnt1, aPnt2, aPnt3);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeEllipse
|
* MakeEllipse
|
||||||
|
@ -48,6 +48,10 @@ class GEOM_I_EXPORT GEOM_ICurvesOperations_i :
|
|||||||
GEOM::GEOM_Object_ptr thePnt2,
|
GEOM::GEOM_Object_ptr thePnt2,
|
||||||
GEOM::GEOM_Object_ptr thePnt3);
|
GEOM::GEOM_Object_ptr thePnt3);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt2,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt3);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
|
GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
|
||||||
GEOM::GEOM_Object_ptr theVector,
|
GEOM::GEOM_Object_ptr theVector,
|
||||||
double theRMajor, double theRMinor);
|
double theRMajor, double theRMinor);
|
||||||
|
@ -114,6 +114,41 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdges
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeFilletEdges R1 R2
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdgesR1R2
|
||||||
|
(GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2, const GEOM::ListOfLong& theEdges)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
if (theShape == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference shape
|
||||||
|
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||||
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference edges
|
||||||
|
int ind = 0;
|
||||||
|
int aLen = theEdges.length();
|
||||||
|
list<int> anEdges;
|
||||||
|
for (; ind < aLen; ind++) {
|
||||||
|
anEdges.push_back(theEdges[ind]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Create the Fillet
|
||||||
|
Handle(GEOM_Object) anObject =
|
||||||
|
GetOperations()->MakeFilletEdgesR1R2(aShapeRef, theR1, theR2, anEdges);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeFilletFaces
|
* MakeFilletFaces
|
||||||
@ -149,6 +184,41 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFaces
|
|||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeFilletFaces R1 R2
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFacesR1R2
|
||||||
|
(GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2, const GEOM::ListOfLong& theFaces)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
if (theShape == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference shape
|
||||||
|
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||||
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference faces
|
||||||
|
int ind = 0;
|
||||||
|
int aLen = theFaces.length();
|
||||||
|
list<int> aFaces;
|
||||||
|
for (; ind < aLen; ind++) {
|
||||||
|
aFaces.push_back(theFaces[ind]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Create the Fillet
|
||||||
|
Handle(GEOM_Object) anObject =
|
||||||
|
GetOperations()->MakeFilletFacesR1R2(aShapeRef, theR1, theR2, aFaces);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakeChamferAll
|
* MakeChamferAll
|
||||||
@ -203,6 +273,33 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdge
|
|||||||
|
|
||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferEdgeAD
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgeAD
|
||||||
|
(GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
CORBA::Long theFace1, CORBA::Long theFace2)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
if (theShape == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference shape
|
||||||
|
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||||
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Create the Chamfer
|
||||||
|
Handle(GEOM_Object) anObject =
|
||||||
|
GetOperations()->MakeChamferEdgeAD(aShapeRef, theD, theAngle, theFace1, theFace2);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
@ -239,6 +336,113 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFaces
|
|||||||
|
|
||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
}
|
}
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferFacesAD
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFacesAD
|
||||||
|
(GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
const GEOM::ListOfLong& theFaces)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
if (theShape == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference shape
|
||||||
|
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||||
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference faces
|
||||||
|
int ind = 0;
|
||||||
|
int aLen = theFaces.length();
|
||||||
|
list<int> aFaces;
|
||||||
|
for (; ind < aLen; ind++) {
|
||||||
|
aFaces.push_back(theFaces[ind]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Create the Chamfer
|
||||||
|
Handle(GEOM_Object) anObject =
|
||||||
|
GetOperations()->MakeChamferFacesAD(aShapeRef, theD, theAngle, aFaces);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferEdges
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdges
|
||||||
|
(GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
|
const GEOM::ListOfLong& theEdges)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
if (theShape == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference shape
|
||||||
|
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||||
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference edges
|
||||||
|
int ind = 0;
|
||||||
|
int aLen = theEdges.length();
|
||||||
|
list<int> aEdges;
|
||||||
|
for (; ind < aLen; ind++) {
|
||||||
|
aEdges.push_back(theEdges[ind]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Create the Chamfer
|
||||||
|
Handle(GEOM_Object) anObject =
|
||||||
|
GetOperations()->MakeChamferEdges(aShapeRef, theD1, theD2, aEdges);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* MakeChamferEdgesAD
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgesAD
|
||||||
|
(GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
const GEOM::ListOfLong& theEdges)
|
||||||
|
{
|
||||||
|
GEOM::GEOM_Object_var aGEOMObject;
|
||||||
|
|
||||||
|
if (theShape == NULL) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference shape
|
||||||
|
Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject
|
||||||
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
if (aShapeRef.IsNull()) return aGEOMObject._retn();
|
||||||
|
|
||||||
|
//Get the reference edges
|
||||||
|
int ind = 0;
|
||||||
|
int aLen = theEdges.length();
|
||||||
|
list<int> aEdges;
|
||||||
|
for (; ind < aLen; ind++) {
|
||||||
|
aEdges.push_back(theEdges[ind]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Create the Chamfer
|
||||||
|
Handle(GEOM_Object) anObject =
|
||||||
|
GetOperations()->MakeChamferEdgesAD(aShapeRef, theD, theAngle, aEdges);
|
||||||
|
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
|
return GetObject(anObject);
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
|
@ -42,19 +42,49 @@ class GEOM_I_EXPORT GEOM_ILocalOperations_i :
|
|||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theR);
|
CORBA::Double theR);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
||||||
const GEOM::ListOfLong& theEdges);
|
const GEOM::ListOfLong& theEdges);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2,
|
||||||
|
const GEOM::ListOfLong& theEdges);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
||||||
const GEOM::ListOfLong& theFaces);
|
const GEOM::ListOfLong& theFaces);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2,
|
||||||
|
const GEOM::ListOfLong& theFaces);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
|
GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theD1, CORBA::Double theD2,
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
CORBA::Long theFace1, CORBA::Long theFace2);
|
CORBA::Long theFace1, CORBA::Long theFace2);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
CORBA::Long theFace1, CORBA::Long theFace2);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theD1, CORBA::Double theD2,
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
const GEOM::ListOfLong& theFaces);
|
const GEOM::ListOfLong& theFaces);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
const GEOM::ListOfLong& theFaces);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
|
const GEOM::ListOfLong& theEdges);
|
||||||
|
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
const GEOM::ListOfLong& theEdges);
|
||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theWeight,
|
CORBA::Double theWeight,
|
||||||
CORBA::Double theWaterDensity,
|
CORBA::Double theWaterDensity,
|
||||||
|
@ -993,7 +993,6 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections
|
|||||||
return anObj;
|
return anObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakePipe:
|
// MakePipe:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -1016,7 +1015,6 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithShellSections
|
|||||||
return anObj;
|
return anObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakeFuse:
|
// MakeFuse:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -2166,6 +2164,20 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr t
|
|||||||
endService( " GEOM_Superv_i::MakeCircleThreePnt" );
|
endService( " GEOM_Superv_i::MakeCircleThreePnt" );
|
||||||
return anObj;
|
return anObj;
|
||||||
}
|
}
|
||||||
|
//=============================================================================
|
||||||
|
// MakeCircleCenter2Pnt:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt2,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt3)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeCircleCenter2Pnt");
|
||||||
|
getCurvesOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myCurvesOp->MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3);
|
||||||
|
endService( " GEOM_Superv_i::MakeCircleCenter2Pnt" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakeEllipse:
|
// MakeEllipse:
|
||||||
@ -2322,6 +2334,28 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theS
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MakeFilletEdges R1 R2:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2,
|
||||||
|
GEOM::GEOM_List_ptr theEdges)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeFilletEdgesR1R2");
|
||||||
|
if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
|
||||||
|
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
|
||||||
|
getLocalOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletEdgesR1R2(theShape, theR1,
|
||||||
|
theR2, aListImplE->GetList());
|
||||||
|
endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
endService( " GEOM_Superv_i::MakeFilletEdgesR1R2" );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakeFilletFaces:
|
// MakeFilletFaces:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -2342,6 +2376,28 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theS
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MakeFilletFaces R1 R2:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2,
|
||||||
|
GEOM::GEOM_List_ptr theFaces)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeFilletFacesR1R2");
|
||||||
|
if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
|
||||||
|
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
|
||||||
|
getLocalOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeFilletFacesR1R2(theShape, theR1, theR2,
|
||||||
|
aListImplF->GetList());
|
||||||
|
endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
endService( " GEOM_Superv_i::MakeFilletFacesR1R2" );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakeChamferAll:
|
// MakeChamferAll:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -2370,6 +2426,21 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theS
|
|||||||
return anObj;
|
return anObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MakeChamferEdgeAD:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
CORBA::Long theFace1, CORBA::Long theFace2)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeChamferEdgeAD" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeChamferEdgeAD");
|
||||||
|
getLocalOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2);
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferEdgeAD" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakeChamferFaces:
|
// MakeChamferFaces:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -2390,6 +2461,66 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr the
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MakeChamferFacesAD:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
GEOM::GEOM_List_ptr theFaces)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeChamferFacesAD" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeChamferFacesAD");
|
||||||
|
if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
|
||||||
|
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theFaces, myPOA).in())) {
|
||||||
|
getLocalOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferFacesAD(theShape, theD, theAngle, aListImplF->GetList());
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferFacesAD" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferFacesAD" );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MakeChamferEdges:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
|
GEOM::GEOM_List_ptr theEdges)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeChamferEdges" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeChamferEdges");
|
||||||
|
if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
|
||||||
|
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
|
||||||
|
getLocalOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdges(theShape, theD1, theD2, aListImplF->GetList());
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferEdges" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferEdges" );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
// MakeChamferEdgesAD:
|
||||||
|
//=============================================================================
|
||||||
|
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
GEOM::GEOM_List_ptr theEdges)
|
||||||
|
{
|
||||||
|
beginService( " GEOM_Superv_i::MakeChamferEdgesAD" );
|
||||||
|
MESSAGE("GEOM_Superv_i::MakeChamferEdgesAD");
|
||||||
|
if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
|
||||||
|
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theEdges, myPOA).in())) {
|
||||||
|
getLocalOp();
|
||||||
|
GEOM::GEOM_Object_ptr anObj = myLocalOp->MakeChamferEdgesAD(theShape, theD, theAngle, aListImplF->GetList());
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
|
||||||
|
return anObj;
|
||||||
|
}
|
||||||
|
endService( " GEOM_Superv_i::MakeChamferEdgesAD" );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// MakeArchimede:
|
// MakeArchimede:
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -243,7 +243,7 @@ public:
|
|||||||
GEOM::GEOM_Object_ptr thePath,
|
GEOM::GEOM_Object_ptr thePath,
|
||||||
CORBA::Boolean theWithContact,
|
CORBA::Boolean theWithContact,
|
||||||
CORBA::Boolean theWithCorrections);
|
CORBA::Boolean theWithCorrections);
|
||||||
|
|
||||||
//-----------------------------------------------------------//
|
//-----------------------------------------------------------//
|
||||||
// BooleanOperations //
|
// BooleanOperations //
|
||||||
//-----------------------------------------------------------//
|
//-----------------------------------------------------------//
|
||||||
@ -477,6 +477,9 @@ public:
|
|||||||
GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
|
GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1,
|
||||||
GEOM::GEOM_Object_ptr thePnt2,
|
GEOM::GEOM_Object_ptr thePnt2,
|
||||||
GEOM::GEOM_Object_ptr thePnt3);
|
GEOM::GEOM_Object_ptr thePnt3);
|
||||||
|
GEOM::GEOM_Object_ptr MakeCircleCenter2Pnt (GEOM::GEOM_Object_ptr thePnt1,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt2,
|
||||||
|
GEOM::GEOM_Object_ptr thePnt3);
|
||||||
GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
|
GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter,
|
||||||
GEOM::GEOM_Object_ptr theVector,
|
GEOM::GEOM_Object_ptr theVector,
|
||||||
CORBA::Double theRMajor, CORBA::Double theRMinor);
|
CORBA::Double theRMajor, CORBA::Double theRMinor);
|
||||||
@ -500,15 +503,31 @@ public:
|
|||||||
CORBA::Double theR);
|
CORBA::Double theR);
|
||||||
GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
||||||
GEOM::GEOM_List_ptr theEdges);
|
GEOM::GEOM_List_ptr theEdges);
|
||||||
|
GEOM::GEOM_Object_ptr MakeFilletEdgesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2, GEOM::GEOM_List_ptr theEdges);
|
||||||
GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
|
||||||
GEOM::GEOM_List_ptr theFaces);
|
GEOM::GEOM_List_ptr theFaces);
|
||||||
|
GEOM::GEOM_Object_ptr MakeFilletFacesR1R2 (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR1,
|
||||||
|
CORBA::Double theR2, GEOM::GEOM_List_ptr theFaces);
|
||||||
GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
|
GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
|
||||||
GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theD1, CORBA::Double theD2,
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
CORBA::Long theFace1, CORBA::Long theFace2);
|
CORBA::Long theFace1, CORBA::Long theFace2);
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferEdgeAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
CORBA::Long theFace1, CORBA::Long theFace2);
|
||||||
GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theD1, CORBA::Double theD2,
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
GEOM::GEOM_List_ptr theFaces);
|
GEOM::GEOM_List_ptr theFaces);
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferFacesAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
GEOM::GEOM_List_ptr theFaces);
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferEdges (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD1, CORBA::Double theD2,
|
||||||
|
GEOM::GEOM_List_ptr theEdges);
|
||||||
|
GEOM::GEOM_Object_ptr MakeChamferEdgesAD (GEOM::GEOM_Object_ptr theShape,
|
||||||
|
CORBA::Double theD, CORBA::Double theAngle,
|
||||||
|
GEOM::GEOM_List_ptr theEdges);
|
||||||
GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
|
GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
|
||||||
CORBA::Double theWeight,
|
CORBA::Double theWeight,
|
||||||
CORBA::Double theWaterDensity,
|
CORBA::Double theWaterDensity,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
|
# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 CEA
|
# Copyright (C) 2003 CEA
|
||||||
|
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
@ -24,6 +25,7 @@
|
|||||||
# Module : GEOM
|
# Module : GEOM
|
||||||
# $Header$
|
# $Header$
|
||||||
|
|
||||||
|
|
||||||
def TestAll (geompy, math):
|
def TestAll (geompy, math):
|
||||||
|
|
||||||
#Create base Variables
|
#Create base Variables
|
||||||
@ -87,6 +89,7 @@ def TestAll (geompy, math):
|
|||||||
Arc2 = geompy.MakeArcCenter(py, pz, px,0) #(3 GEOM_Object_ptr,Boolean)->GEOM_Object_ptr
|
Arc2 = geompy.MakeArcCenter(py, pz, px,0) #(3 GEOM_Object_ptr,Boolean)->GEOM_Object_ptr
|
||||||
Circle = geompy.MakeCircle(p0, vz, radius1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
|
Circle = geompy.MakeCircle(p0, vz, radius1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
|
||||||
Circle1 = geompy.MakeCircleThreePnt(p0, pxyz, px) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
|
Circle1 = geompy.MakeCircleThreePnt(p0, pxyz, px) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
|
||||||
|
Circle2 = geompy.MakeCircleCenter2Pnt(p0, pxyz, py) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
|
||||||
Ellipse = geompy.MakeEllipse(p0, vy, radius2, radius1) #(2 GEOM_Object_ptr, 2 Doubles)->GEOM_Object_ptr
|
Ellipse = geompy.MakeEllipse(p0, vy, radius2, radius1) #(2 GEOM_Object_ptr, 2 Doubles)->GEOM_Object_ptr
|
||||||
Polyline = geompy.MakePolyline([p0, pz, py, p200]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr
|
Polyline = geompy.MakePolyline([p0, pz, py, p200]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr
|
||||||
Bezier = geompy.MakeBezier([p0, pz, p200, px]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr
|
Bezier = geompy.MakeBezier([p0, pz, p200, px]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr
|
||||||
@ -191,14 +194,20 @@ def TestAll (geompy, math):
|
|||||||
f_ind_2 = geompy.GetSubShapeID(Prism, prism_faces[1])
|
f_ind_2 = geompy.GetSubShapeID(Prism, prism_faces[1])
|
||||||
|
|
||||||
IDlist_f = [f_ind_1, f_ind_2]
|
IDlist_f = [f_ind_1, f_ind_2]
|
||||||
|
|
||||||
#Local operations
|
#Local operations
|
||||||
Fillet = geompy.MakeFillet (Prism, radius, ShapeTypeEdge,
|
Fillet = geompy.MakeFillet (Prism, radius, ShapeTypeEdge,
|
||||||
IDlist_e) #(GEOM_Object_ptr, Double, Short, ListOfLong)->GEOM_Object_ptr
|
IDlist_e) #(GEOM_Object_ptr, Double, Short, ListOfLong)->GEOM_Object_ptr
|
||||||
|
Fillet2 = geompy.MakeFilletR1R2 (Prism, 7., 13., ShapeTypeEdge,
|
||||||
|
IDlist_e) #(GEOM_Object_ptr, Double, Double, Short, ListOfLong)->GEOM_Object_ptr
|
||||||
Chamfer = geompy.MakeChamferEdge(Prism, d1, d2,
|
Chamfer = geompy.MakeChamferEdge(Prism, d1, d2,
|
||||||
f_ind_1, f_ind_2) #(GEOM_Object_ptr, 2 Doubles, 2 Long)->GEOM_Object_ptr
|
f_ind_1, f_ind_2) #(GEOM_Object_ptr, 2 Doubles, 2 Long)->GEOM_Object_ptr
|
||||||
Chamfer2 = geompy.MakeChamferFaces(Prism, d1, d2,
|
Chamfer2 = geompy.MakeChamferFaces(Prism, d1, d2,
|
||||||
IDlist_f) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr
|
IDlist_f) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr
|
||||||
|
Chamfer3 = geompy.MakeChamferEdges(Prism, d1, d2,
|
||||||
|
IDlist_e) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr
|
||||||
|
Chamfer4 = geompy.MakeChamferFacesAD(Prism, d1, 0.2,
|
||||||
|
IDlist_f) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr
|
||||||
|
|
||||||
#Create Patterns
|
#Create Patterns
|
||||||
MultiTrans1D = geompy.MakeMultiTranslation1D(Fillet, vz, step1, nbtimes1)
|
MultiTrans1D = geompy.MakeMultiTranslation1D(Fillet, vz, step1, nbtimes1)
|
||||||
@ -244,6 +253,7 @@ def TestAll (geompy, math):
|
|||||||
id_Arc = geompy.addToStudy(Arc, "Arc")
|
id_Arc = geompy.addToStudy(Arc, "Arc")
|
||||||
id_Circle = geompy.addToStudy(Circle, "Circle")
|
id_Circle = geompy.addToStudy(Circle, "Circle")
|
||||||
id_Circle1 = geompy.addToStudy(Circle1, "Circle by 3 points")
|
id_Circle1 = geompy.addToStudy(Circle1, "Circle by 3 points")
|
||||||
|
id_Circle2 = geompy.addToStudy(Circle2, "Circle by center and 2 points")
|
||||||
id_Ellipse = geompy.addToStudy(Ellipse, "Ellipse")
|
id_Ellipse = geompy.addToStudy(Ellipse, "Ellipse")
|
||||||
id_Polyline = geompy.addToStudy(Polyline, "Polyline")
|
id_Polyline = geompy.addToStudy(Polyline, "Polyline")
|
||||||
id_Bezier = geompy.addToStudy(Bezier, "Bezier")
|
id_Bezier = geompy.addToStudy(Bezier, "Bezier")
|
||||||
@ -304,8 +314,11 @@ def TestAll (geompy, math):
|
|||||||
id_Orientation = geompy.addToStudy(Orientation, "Orientation")
|
id_Orientation = geompy.addToStudy(Orientation, "Orientation")
|
||||||
|
|
||||||
id_Fillet = geompy.addToStudy(Fillet, "Fillet")
|
id_Fillet = geompy.addToStudy(Fillet, "Fillet")
|
||||||
|
id_Fillet2 = geompy.addToStudy(Fillet2, "Fillet2")
|
||||||
id_Chamfer = geompy.addToStudy(Chamfer, "Chamfer on Edge")
|
id_Chamfer = geompy.addToStudy(Chamfer, "Chamfer on Edge")
|
||||||
id_Chamfer2 = geompy.addToStudy(Chamfer2, "Chamfer on Faces")
|
id_Chamfer2 = geompy.addToStudy(Chamfer2, "Chamfer on Faces")
|
||||||
|
id_Chamfer3 = geompy.addToStudy(Chamfer3, "Chamfer on Edges")
|
||||||
|
id_Chamfer4 = geompy.addToStudy(Chamfer4, "Chamfer on Faces with params D Angle")
|
||||||
|
|
||||||
id_MultiTrans1D = geompy.addToStudy(MultiTrans1D, "MultiTrans1D")
|
id_MultiTrans1D = geompy.addToStudy(MultiTrans1D, "MultiTrans1D")
|
||||||
id_MultiTrans2D = geompy.addToStudy(MultiTrans2D, "MultiTrans2D")
|
id_MultiTrans2D = geompy.addToStudy(MultiTrans2D, "MultiTrans2D")
|
||||||
|
60
src/GEOM_SWIG/GEOM_example6.py
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 CEA
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : GEOM_example6.py
|
||||||
|
# Author : Dmitry MATVEITCHEV
|
||||||
|
# Module : GEOM
|
||||||
|
# $Header$
|
||||||
|
|
||||||
|
|
||||||
|
import salome
|
||||||
|
import geompy
|
||||||
|
|
||||||
|
ind = 1
|
||||||
|
circlelist = []
|
||||||
|
while ind < 6:
|
||||||
|
x1 = 0. + (10. * ind)
|
||||||
|
y1 = 0.
|
||||||
|
z1 = 0.
|
||||||
|
x2 = 10. + (10. * ind)
|
||||||
|
y2 = 20. * (ind+1)
|
||||||
|
z2 = 30. * (ind+1)
|
||||||
|
x3 = 50. + (10. * ind)
|
||||||
|
y3 = 0. * (ind+1)
|
||||||
|
z3 = -10. * (ind+1)
|
||||||
|
|
||||||
|
print x1, y1, z1, x2, y2, z2, x3, y3, z3
|
||||||
|
|
||||||
|
point1 = geompy.MakeVertex(x1, y1, z1)
|
||||||
|
name1 = "point1_%d"%(ind)
|
||||||
|
id_pt1 = geompy.addToStudy(point1, name1)
|
||||||
|
point2 = geompy.MakeVertex(x2, y2, z2)
|
||||||
|
name2 = "point2_%d"%(ind)
|
||||||
|
id_pt2 = geompy.addToStudy(point2, name2)
|
||||||
|
point3 = geompy.MakeVertex(x3, y3, z3)
|
||||||
|
name3 = "point3_%d"%(ind)
|
||||||
|
id_pt3 = geompy.addToStudy(point3, name3)
|
||||||
|
|
||||||
|
name = "circle%d"%(ind)
|
||||||
|
circle = geompy.MakeCircleCenter2Pnt(point1, point2, point3)
|
||||||
|
id_circle = geompy.addToStudy(circle, name)
|
||||||
|
circlelist.append(circle)
|
||||||
|
ind = ind + 1
|
@ -54,6 +54,7 @@ dist_salomescript_DATA= \
|
|||||||
GEOM_example3.py \
|
GEOM_example3.py \
|
||||||
GEOM_example4.py \
|
GEOM_example4.py \
|
||||||
GEOM_example5.py \
|
GEOM_example5.py \
|
||||||
|
GEOM_example6.py \
|
||||||
GEOM_moteur.py \
|
GEOM_moteur.py \
|
||||||
GEOM_TestAll.py \
|
GEOM_TestAll.py \
|
||||||
GEOM_TestOthers.py \
|
GEOM_TestOthers.py \
|
||||||
|
@ -249,6 +249,12 @@ def MakeCircleThreePnt(p1,p2,p3):
|
|||||||
print "MakeCircleThreePnt : ", CurvesOp.GetErrorCode()
|
print "MakeCircleThreePnt : ", CurvesOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
|
def MakeCircleCenter2Pnt(p1,p2,p3):
|
||||||
|
anObj = CurvesOp.MakeCircleCenter2Pnt(p1,p2,p3)
|
||||||
|
if CurvesOp.IsDone() == 0:
|
||||||
|
print "MakeCircleCenter2Pnt : ", CurvesOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
def MakeEllipse(p1,v1,radiusMaj,radiusMin):
|
def MakeEllipse(p1,v1,radiusMaj,radiusMin):
|
||||||
anObj = CurvesOp.MakeEllipse(p1,v1,radiusMaj, radiusMin)
|
anObj = CurvesOp.MakeEllipse(p1,v1,radiusMaj, radiusMin)
|
||||||
if CurvesOp.IsDone() == 0:
|
if CurvesOp.IsDone() == 0:
|
||||||
@ -852,6 +858,16 @@ def MakeFillet(aShape,radius,aShapeType,ListShape):
|
|||||||
print "MakeFillet : ", LocalOp.GetErrorCode()
|
print "MakeFillet : ", LocalOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
|
def MakeFilletR1R2(aShape,radius1,radius2,aShapeType,ListShape):
|
||||||
|
anObj = None
|
||||||
|
if aShapeType == ShapeType["EDGE"]:
|
||||||
|
anObj = LocalOp.MakeFilletEdgesR1R2(aShape,radius1,radius2,ListShape)
|
||||||
|
else:
|
||||||
|
anObj = LocalOp.MakeFilletFacesR1R2(aShape,radius1,radius2,ListShape)
|
||||||
|
if LocalOp.IsDone() == 0:
|
||||||
|
print "MakeFilletR1R2 : ", LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
def MakeChamferAll(aShape,d):
|
def MakeChamferAll(aShape,d):
|
||||||
anObj = LocalOp.MakeChamferAll(aShape,d)
|
anObj = LocalOp.MakeChamferAll(aShape,d)
|
||||||
if LocalOp.IsDone() == 0:
|
if LocalOp.IsDone() == 0:
|
||||||
@ -864,12 +880,36 @@ def MakeChamferEdge(aShape,d1,d2,face1,face2):
|
|||||||
print "MakeChamferEdge : ", LocalOp.GetErrorCode()
|
print "MakeChamferEdge : ", LocalOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
|
def MakeChamferEdgeAD(aShape,d,angle,face1,face2):
|
||||||
|
anObj = LocalOp.MakeChamferEdgeAD(aShape,d,angle,face1,face2)
|
||||||
|
if LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferEdgeAD : ", LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
def MakeChamferFaces(aShape,d1,d2,ListShape):
|
def MakeChamferFaces(aShape,d1,d2,ListShape):
|
||||||
anObj = LocalOp.MakeChamferFaces(aShape,d1,d2,ListShape)
|
anObj = LocalOp.MakeChamferFaces(aShape,d1,d2,ListShape)
|
||||||
if LocalOp.IsDone() == 0:
|
if LocalOp.IsDone() == 0:
|
||||||
print "MakeChamferFaces : ", LocalOp.GetErrorCode()
|
print "MakeChamferFaces : ", LocalOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
|
def MakeChamferFacesAD(aShape,d,angle,ListShape):
|
||||||
|
anObj = LocalOp.MakeChamferFacesAD(aShape,d,angle,ListShape)
|
||||||
|
if LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferFacesAD : ", LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
|
def MakeChamferEdges(aShape,d1,d2,ListShape):
|
||||||
|
anObj = LocalOp.MakeChamferEdges(aShape,d1,d2,ListShape)
|
||||||
|
if LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferEdges : ", LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
|
def MakeChamferEdgesAD(aShape,d,angle,ListShape):
|
||||||
|
anObj = LocalOp.MakeChamferEdgesAD(aShape,d,angle,ListShape)
|
||||||
|
if LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferEdgesAD : ", LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
def MakeChamfer(aShape,d1,d2,aShapeType,ListShape):
|
def MakeChamfer(aShape,d1,d2,aShapeType,ListShape):
|
||||||
anObj = None
|
anObj = None
|
||||||
if aShapeType == ShapeType["EDGE"]:
|
if aShapeType == ShapeType["EDGE"]:
|
||||||
|
@ -371,6 +371,19 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
if self.CurvesOp.IsDone() == 0:
|
if self.CurvesOp.IsDone() == 0:
|
||||||
print "MakeCircleThreePnt : ", self.CurvesOp.GetErrorCode()
|
print "MakeCircleThreePnt : ", self.CurvesOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
|
## Create a circle, with given point1 as center,
|
||||||
|
# passing through the point2 as radius and laying in the plane,
|
||||||
|
# defined by all three given points.
|
||||||
|
# @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
|
||||||
|
# @return New GEOM_Object, containing the created circle.
|
||||||
|
#
|
||||||
|
# Example: see GEOM_example6.py
|
||||||
|
def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
|
||||||
|
anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
|
||||||
|
if self.CurvesOp.IsDone() == 0:
|
||||||
|
print "MakeCircleCenter2Pnt : ", self.CurvesOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
## Create an ellipse with given center, normal vector and radiuses.
|
## Create an ellipse with given center, normal vector and radiuses.
|
||||||
# @param thePnt Ellipse center.
|
# @param thePnt Ellipse center.
|
||||||
@ -1841,6 +1854,16 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
if self.LocalOp.IsDone() == 0:
|
if self.LocalOp.IsDone() == 0:
|
||||||
print "MakeFillet : ", self.LocalOp.GetErrorCode()
|
print "MakeFillet : ", self.LocalOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
## The same but with two Fillet Radius R1 and R2
|
||||||
|
def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes):
|
||||||
|
anObj = None
|
||||||
|
if theShapeType == ShapeType["EDGE"]:
|
||||||
|
anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
|
||||||
|
else:
|
||||||
|
anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
|
||||||
|
if self.LocalOp.IsDone() == 0:
|
||||||
|
print "MakeFilletR1R2 : ", self.LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
## Perform a symmetric chamfer on all edges of the given shape.
|
## Perform a symmetric chamfer on all edges of the given shape.
|
||||||
# @param theShape Shape, to perform chamfer on.
|
# @param theShape Shape, to perform chamfer on.
|
||||||
@ -1869,6 +1892,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
if self.LocalOp.IsDone() == 0:
|
if self.LocalOp.IsDone() == 0:
|
||||||
print "MakeChamferEdge : ", self.LocalOp.GetErrorCode()
|
print "MakeChamferEdge : ", self.LocalOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
## The Same chamfer but with params theD is chamfer lenght and
|
||||||
|
# theAngle is Angle of chamfer (angle in radians)
|
||||||
|
def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
|
||||||
|
anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
|
||||||
|
if self.LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferEdgeAD : ", self.LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
## Perform a chamfer on all edges of the specified faces,
|
## Perform a chamfer on all edges of the specified faces,
|
||||||
# with distance D1 on the first specified face (if several for one edge)
|
# with distance D1 on the first specified face (if several for one edge)
|
||||||
@ -1887,6 +1917,34 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
if self.LocalOp.IsDone() == 0:
|
if self.LocalOp.IsDone() == 0:
|
||||||
print "MakeChamferFaces : ", self.LocalOp.GetErrorCode()
|
print "MakeChamferFaces : ", self.LocalOp.GetErrorCode()
|
||||||
return anObj
|
return anObj
|
||||||
|
## The Same chamfer but with params theD is chamfer lenght and
|
||||||
|
# theAngle is Angle of chamfer (angle in radians)
|
||||||
|
def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
|
||||||
|
anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
|
||||||
|
if self.LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferFacesAD : ", self.LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
|
## Perform a chamfer on edges,
|
||||||
|
# with distance D1 on the first specified face (if several for one edge)
|
||||||
|
# @param theShape Shape, to perform chamfer on.
|
||||||
|
# @param theD1 and theD2 Chamfer size
|
||||||
|
# @param theEdges Sequence of edges of \a theShape.
|
||||||
|
# @return New GEOM_Object, containing the result shape.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
|
||||||
|
anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
|
||||||
|
if self.LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferEdges : ", self.LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
## The Same chamfer but with params theD is chamfer lenght and
|
||||||
|
# theAngle is Angle of chamfer (angle in radians)
|
||||||
|
def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
|
||||||
|
anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
|
||||||
|
if self.LocalOp.IsDone() == 0:
|
||||||
|
print "MakeChamferEdgesAD : ", self.LocalOp.GetErrorCode()
|
||||||
|
return anObj
|
||||||
|
|
||||||
## Shortcut to MakeChamferEdge() and MakeChamferFaces()
|
## Shortcut to MakeChamferEdge() and MakeChamferFaces()
|
||||||
#
|
#
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
|
||||||
// License as published by the Free Software Foundation; either
|
|
||||||
// version 2.1 of the License.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@ -57,8 +57,9 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
|||||||
myConstructorId = -1;
|
myConstructorId = -1;
|
||||||
|
|
||||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_ALL")));
|
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_ALL")));
|
||||||
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_EDGE")));
|
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_EDGE_FROM_FACE")));
|
||||||
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_FACE")));
|
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_FACE")));
|
||||||
|
QPixmap image4(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_EDGE")));
|
||||||
QPixmap iconSelect(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
QPixmap iconSelect(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
||||||
|
|
||||||
setCaption( tr( "GEOM_CHAMFER_TITLE" ) );
|
setCaption( tr( "GEOM_CHAMFER_TITLE" ) );
|
||||||
@ -68,6 +69,8 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
|||||||
RadioButton1->setPixmap( image1 );
|
RadioButton1->setPixmap( image1 );
|
||||||
RadioButton2->setPixmap( image2 );
|
RadioButton2->setPixmap( image2 );
|
||||||
RadioButton3->setPixmap( image3 );
|
RadioButton3->setPixmap( image3 );
|
||||||
|
RadioButton4->show();
|
||||||
|
RadioButton4->setPixmap( image4 );
|
||||||
|
|
||||||
// Create first group
|
// Create first group
|
||||||
|
|
||||||
@ -82,7 +85,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
|||||||
QGroupBox* aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp1 );
|
QGroupBox* aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp1 );
|
||||||
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
||||||
aSpinGrp->setInsideMargin( 0 );
|
aSpinGrp->setInsideMargin( 0 );
|
||||||
|
|
||||||
new QLabel( tr( "D" ), aSpinGrp );
|
new QLabel( tr( "D" ), aSpinGrp );
|
||||||
mySpinBox[ SpinBox1 ] = new DlgRef_SpinBox( aSpinGrp );
|
mySpinBox[ SpinBox1 ] = new DlgRef_SpinBox( aSpinGrp );
|
||||||
|
|
||||||
@ -101,15 +104,32 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
|||||||
createSelWg( tr( "FACE_1" ), iconSelect, aSelGrp2, Face1 );
|
createSelWg( tr( "FACE_1" ), iconSelect, aSelGrp2, Face1 );
|
||||||
createSelWg( tr( "FACE_2" ), iconSelect, aSelGrp2, Face2 );
|
createSelWg( tr( "FACE_2" ), iconSelect, aSelGrp2, Face2 );
|
||||||
|
|
||||||
aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp2 );
|
QGroupBox* aSpinGrp1 = new QGroupBox( 1, Qt::Vertical, myGrp2 );
|
||||||
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
aSpinGrp1->setFrameStyle( QFrame::NoFrame );
|
||||||
aSpinGrp->setInsideMargin( 0 );
|
aSpinGrp1->setInsideMargin( 0 );
|
||||||
|
|
||||||
|
myRadioButton[ RadioButton21] = new QRadioButton( aSpinGrp1 );
|
||||||
|
|
||||||
new QLabel( tr( "GEOM_D1" ), aSpinGrp );
|
new QLabel( tr( "GEOM_D1" ), aSpinGrp1 );
|
||||||
mySpinBox[ SpinBox21 ] = new DlgRef_SpinBox( aSpinGrp );
|
mySpinBox[ SpinBox21 ] = new DlgRef_SpinBox( aSpinGrp1 );
|
||||||
|
|
||||||
new QLabel( tr( "GEOM_D2" ), aSpinGrp );
|
new QLabel( tr( "GEOM_D2" ), aSpinGrp1 );
|
||||||
mySpinBox[ SpinBox22 ] = new DlgRef_SpinBox( aSpinGrp );
|
mySpinBox[ SpinBox22 ] = new DlgRef_SpinBox( aSpinGrp1 );
|
||||||
|
|
||||||
|
QGroupBox* aSpinGrp2 = new QGroupBox( 1, Qt::Vertical, myGrp2 );
|
||||||
|
aSpinGrp2->setFrameStyle( QFrame::NoFrame );
|
||||||
|
aSpinGrp2->setInsideMargin( 0 );
|
||||||
|
|
||||||
|
myRadioButton[ RadioButton22] = new QRadioButton( aSpinGrp2 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_D" ), aSpinGrp2 );
|
||||||
|
mySpinBox[ SpinBox23 ] = new DlgRef_SpinBox( aSpinGrp2 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_ANGLE" ), aSpinGrp2 );
|
||||||
|
mySpinBox[ SpinBox24 ] = new DlgRef_SpinBox( aSpinGrp2 );
|
||||||
|
|
||||||
|
( new QLabel( myGrp2 ) )->setSizePolicy(
|
||||||
|
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
|
||||||
|
|
||||||
// Create third group
|
// Create third group
|
||||||
|
|
||||||
@ -122,17 +142,69 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
|||||||
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp3, MainObj3 );
|
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp3, MainObj3 );
|
||||||
createSelWg( tr( "SELECTED_FACES" ), iconSelect, aSelGrp3, Faces );
|
createSelWg( tr( "SELECTED_FACES" ), iconSelect, aSelGrp3, Faces );
|
||||||
|
|
||||||
aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp3 );
|
aSpinGrp1 = new QGroupBox( 1, Qt::Vertical, myGrp3 );
|
||||||
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
aSpinGrp1->setFrameStyle( QFrame::NoFrame );
|
||||||
aSpinGrp->setInsideMargin( 0 );
|
aSpinGrp1->setInsideMargin( 0 );
|
||||||
|
|
||||||
new QLabel( tr( "GEOM_D1" ), aSpinGrp );
|
myRadioButton[ RadioButton31] = new QRadioButton( aSpinGrp1 );
|
||||||
mySpinBox[ SpinBox31 ] = new DlgRef_SpinBox( aSpinGrp );
|
|
||||||
|
|
||||||
new QLabel( tr( "GEOM_D2" ), aSpinGrp );
|
new QLabel( tr( "GEOM_D1" ), aSpinGrp1 );
|
||||||
mySpinBox[ SpinBox32 ] = new DlgRef_SpinBox( aSpinGrp );
|
mySpinBox[ SpinBox31 ] = new DlgRef_SpinBox( aSpinGrp1 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_D2" ), aSpinGrp1 );
|
||||||
|
mySpinBox[ SpinBox32 ] = new DlgRef_SpinBox( aSpinGrp1 );
|
||||||
|
|
||||||
|
aSpinGrp2 = new QGroupBox( 1, Qt::Vertical, myGrp3 );
|
||||||
|
aSpinGrp2->setFrameStyle( QFrame::NoFrame );
|
||||||
|
aSpinGrp2->setInsideMargin( 0 );
|
||||||
|
|
||||||
|
myRadioButton[ RadioButton32] = new QRadioButton( aSpinGrp2 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_D" ), aSpinGrp2 );
|
||||||
|
mySpinBox[ SpinBox33 ] = new DlgRef_SpinBox( aSpinGrp2 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_ANGLE" ), aSpinGrp2 );
|
||||||
|
mySpinBox[ SpinBox34 ] = new DlgRef_SpinBox( aSpinGrp2 );
|
||||||
|
|
||||||
( new QLabel( myGrp3 ) )->setSizePolicy(
|
( new QLabel( myGrp3 ) )->setSizePolicy(
|
||||||
|
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
|
||||||
|
|
||||||
|
// Create fourth group
|
||||||
|
|
||||||
|
myGrp4 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_EDGE" ), this );
|
||||||
|
|
||||||
|
QGroupBox* aSelGrp4 = new QGroupBox( 3, Qt::Horizontal, myGrp4 );
|
||||||
|
aSelGrp4->setFrameStyle( QFrame::NoFrame );
|
||||||
|
aSelGrp4->setInsideMargin( 0 );
|
||||||
|
|
||||||
|
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp4, MainObj4 );
|
||||||
|
createSelWg( tr( "SELECTED_EDGE" ), iconSelect, aSelGrp4, Edges );
|
||||||
|
|
||||||
|
aSpinGrp1 = new QGroupBox( 1, Qt::Vertical, myGrp4 );
|
||||||
|
aSpinGrp1->setFrameStyle( QFrame::NoFrame );
|
||||||
|
aSpinGrp1->setInsideMargin( 0 );
|
||||||
|
|
||||||
|
myRadioButton[ RadioButton41] = new QRadioButton( aSpinGrp1 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_D1" ), aSpinGrp1 );
|
||||||
|
mySpinBox[ SpinBox41 ] = new DlgRef_SpinBox( aSpinGrp1 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_D2" ), aSpinGrp1 );
|
||||||
|
mySpinBox[ SpinBox42 ] = new DlgRef_SpinBox( aSpinGrp1 );
|
||||||
|
|
||||||
|
aSpinGrp2 = new QGroupBox( 1, Qt::Vertical, myGrp4 );
|
||||||
|
aSpinGrp2->setFrameStyle( QFrame::NoFrame );
|
||||||
|
aSpinGrp2->setInsideMargin( 0 );
|
||||||
|
|
||||||
|
myRadioButton[ RadioButton42] = new QRadioButton( aSpinGrp2 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_D" ), aSpinGrp2 );
|
||||||
|
mySpinBox[ SpinBox43 ] = new DlgRef_SpinBox( aSpinGrp2 );
|
||||||
|
|
||||||
|
new QLabel( tr( "GEOM_ANGLE" ), aSpinGrp2 );
|
||||||
|
mySpinBox[ SpinBox44 ] = new DlgRef_SpinBox( aSpinGrp2 );
|
||||||
|
|
||||||
|
( new QLabel( myGrp4 ) )->setSizePolicy(
|
||||||
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
|
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
|
||||||
|
|
||||||
// Add groups to layout
|
// Add groups to layout
|
||||||
@ -140,17 +212,23 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
|
|||||||
Layout1->addWidget( myGrp1, 2, 0 );
|
Layout1->addWidget( myGrp1, 2, 0 );
|
||||||
Layout1->addWidget( myGrp2, 2, 0 );
|
Layout1->addWidget( myGrp2, 2, 0 );
|
||||||
Layout1->addWidget( myGrp3, 2, 0 );
|
Layout1->addWidget( myGrp3, 2, 0 );
|
||||||
|
Layout1->addWidget( myGrp4, 2, 0 );
|
||||||
|
|
||||||
// Set range of spinboxes
|
// Set range of spinboxes
|
||||||
|
|
||||||
double SpecificStep = 10.0;
|
double SpecificStep = 10.0;
|
||||||
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
||||||
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
||||||
anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY );
|
{
|
||||||
|
anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, 3 );
|
||||||
|
if ( anIter.key() == SpinBox44 || anIter.key() == SpinBox34 || anIter.key() == SpinBox24 )
|
||||||
|
anIter.data()->RangeStepAndValidator( 0, 90, 5, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
setHelpFileName("chamfer.htm");
|
setHelpFileName("chamfer.htm");
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
|
RadioButtonPressed();
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,14 +281,21 @@ void OperationGUI_ChamferDlg::Init()
|
|||||||
connect( anIterSpin.data(), SIGNAL( valueChanged( double ) ),
|
connect( anIterSpin.data(), SIGNAL( valueChanged( double ) ),
|
||||||
this, SLOT( ValueChangedInSpinBox( double ) ) );
|
this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
|
// radio buttons
|
||||||
|
QMap< int, QRadioButton* >::iterator anIterRadio;
|
||||||
|
for ( anIterRadio = myRadioButton.begin(); anIterRadio != myRadioButton.end(); ++anIterRadio )
|
||||||
|
connect( anIterRadio.data(), SIGNAL( clicked() ),
|
||||||
|
this, SLOT( RadioButtonPressed() ) );
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||||
|
|
||||||
initName( tr( "GEOM_CHAMFER" ) );
|
initName( tr( "GEOM_CHAMFER" ) );
|
||||||
|
|
||||||
myGrp2->hide();
|
myGrp4->hide();
|
||||||
myGrp3->hide();
|
myGrp3->hide();
|
||||||
|
myGrp2->hide();
|
||||||
myGrp1->show();
|
myGrp1->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,18 +318,29 @@ void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Get values from previous widget
|
// Get values from previous widget
|
||||||
double D1 = 5, D2 = 5;
|
double D1 = 5, D2 = 5, D = 5, Angle = 5;
|
||||||
if ( myConstructorId == 0 )
|
if ( myConstructorId == 0 )
|
||||||
D1 = D2 = mySpinBox[ SpinBox1 ]->GetValue();
|
D1 = D2 = mySpinBox[ SpinBox1 ]->GetValue();
|
||||||
else if ( myConstructorId == 1 )
|
else if ( myConstructorId == 1 )
|
||||||
{
|
{
|
||||||
D1 = mySpinBox[ SpinBox21 ]->GetValue();
|
D1 = mySpinBox[ SpinBox21 ]->GetValue();
|
||||||
D2 = mySpinBox[ SpinBox22 ]->GetValue();
|
D2 = mySpinBox[ SpinBox22 ]->GetValue();
|
||||||
|
D = mySpinBox[ SpinBox23 ]->GetValue();
|
||||||
|
Angle = mySpinBox[ SpinBox24 ]->GetValue();
|
||||||
}
|
}
|
||||||
else if ( myConstructorId == 2 )
|
else if ( myConstructorId == 2 )
|
||||||
{
|
{
|
||||||
D1 = mySpinBox[ SpinBox31 ]->GetValue();
|
D1 = mySpinBox[ SpinBox31 ]->GetValue();
|
||||||
D2 = mySpinBox[ SpinBox32 ]->GetValue();
|
D2 = mySpinBox[ SpinBox32 ]->GetValue();
|
||||||
|
D = mySpinBox[ SpinBox33 ]->GetValue();
|
||||||
|
Angle = mySpinBox[ SpinBox34 ]->GetValue();
|
||||||
|
}
|
||||||
|
else if ( myConstructorId == 3 )
|
||||||
|
{
|
||||||
|
D1 = mySpinBox[ SpinBox41 ]->GetValue();
|
||||||
|
D2 = mySpinBox[ SpinBox42 ]->GetValue();
|
||||||
|
D = mySpinBox[ SpinBox43 ]->GetValue();
|
||||||
|
Angle = mySpinBox[ SpinBox44 ]->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
myConstructorId = constructorId;
|
myConstructorId = constructorId;
|
||||||
@ -255,21 +351,38 @@ void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId )
|
|||||||
myGrp1->show();
|
myGrp1->show();
|
||||||
myGrp2->hide();
|
myGrp2->hide();
|
||||||
myGrp3->hide();
|
myGrp3->hide();
|
||||||
|
myGrp4->hide();
|
||||||
mySpinBox[ SpinBox1 ]->SetValue( D1 );
|
mySpinBox[ SpinBox1 ]->SetValue( D1 );
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
myGrp1->hide();
|
myGrp1->hide();
|
||||||
myGrp2->show();
|
myGrp2->show();
|
||||||
myGrp3->hide();
|
myGrp3->hide();
|
||||||
|
myGrp4->hide();
|
||||||
mySpinBox[ SpinBox21 ]->SetValue( D1 );
|
mySpinBox[ SpinBox21 ]->SetValue( D1 );
|
||||||
mySpinBox[ SpinBox22 ]->SetValue( D2 );
|
mySpinBox[ SpinBox22 ]->SetValue( D2 );
|
||||||
|
mySpinBox[ SpinBox23 ]->SetValue( D );
|
||||||
|
mySpinBox[ SpinBox24 ]->SetValue( Angle );
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
myGrp1->hide();
|
myGrp1->hide();
|
||||||
myGrp2->hide();
|
myGrp2->hide();
|
||||||
myGrp3->show();
|
myGrp3->show();
|
||||||
|
myGrp4->hide();
|
||||||
mySpinBox[ SpinBox31 ]->SetValue( D1 );
|
mySpinBox[ SpinBox31 ]->SetValue( D1 );
|
||||||
mySpinBox[ SpinBox32 ]->SetValue( D2 );
|
mySpinBox[ SpinBox32 ]->SetValue( D2 );
|
||||||
|
mySpinBox[ SpinBox33 ]->SetValue( D );
|
||||||
|
mySpinBox[ SpinBox34 ]->SetValue( Angle );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
myGrp1->hide();
|
||||||
|
myGrp2->hide();
|
||||||
|
myGrp3->hide();
|
||||||
|
myGrp4->show();
|
||||||
|
mySpinBox[ SpinBox41 ]->SetValue( D1 );
|
||||||
|
mySpinBox[ SpinBox42 ]->SetValue( D2 );
|
||||||
|
mySpinBox[ SpinBox43 ]->SetValue( D );
|
||||||
|
mySpinBox[ SpinBox44 ]->SetValue( Angle );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -277,7 +390,8 @@ void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId )
|
|||||||
|
|
||||||
if ( constructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ];
|
if ( constructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ];
|
||||||
else if ( constructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ];
|
else if ( constructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ];
|
||||||
else myEditCurrentArgument = mySelName[ MainObj3 ];
|
else if ( constructorId == 2 ) myEditCurrentArgument = mySelName[ MainObj3 ];
|
||||||
|
else myEditCurrentArgument = mySelName[ MainObj4 ];
|
||||||
|
|
||||||
activateSelection();
|
activateSelection();
|
||||||
enableWidgets();
|
enableWidgets();
|
||||||
@ -317,7 +431,6 @@ bool OperationGUI_ChamferDlg::ClickOnApply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SelectionIntoArgument()
|
// function : SelectionIntoArgument()
|
||||||
// purpose : Called when selection has changed
|
// purpose : Called when selection has changed
|
||||||
@ -338,7 +451,7 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If selection of main object is activated
|
// If selection of main object is activated
|
||||||
if ( aCurrFocus == MainObj1 || aCurrFocus == MainObj2 || aCurrFocus == MainObj3 )
|
if ( aCurrFocus == MainObj1 || aCurrFocus == MainObj2 || aCurrFocus == MainObj3 || aCurrFocus == MainObj4)
|
||||||
{
|
{
|
||||||
if ( IObjectCount() == 1 )
|
if ( IObjectCount() == 1 )
|
||||||
{
|
{
|
||||||
@ -379,7 +492,7 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
QString aFaceName = QString( GEOMBase::GetName( anObj ) ) + ":%1";
|
QString aFaceName = QString( GEOMBase::GetName( anObj ) ) + ":%1";
|
||||||
myEditCurrentArgument->setText( aFaceName.arg( anIndex ) );
|
myEditCurrentArgument->setText( aFaceName.arg( anIndex ) );
|
||||||
myFace[ aCurrFocus ] = anIndex;
|
myFace[ aCurrFocus ] = anIndex;
|
||||||
displayPreview();
|
displayPreview();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,8 +500,8 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
myFace[ aCurrFocus ] = -1;
|
myFace[ aCurrFocus ] = -1;
|
||||||
}
|
}
|
||||||
// If face selection of third tab is activated
|
// If face selection of third or fourth tab is activated
|
||||||
else if ( aCurrFocus == Faces )
|
else if ( aCurrFocus == Faces || aCurrFocus == Edges )
|
||||||
{
|
{
|
||||||
if ( IObjectCount() == 1 )
|
if ( IObjectCount() == 1 )
|
||||||
{
|
{
|
||||||
@ -403,24 +516,30 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
if ( anIndexes.Extent() > 0 )
|
if ( anIndexes.Extent() > 0 )
|
||||||
{
|
{
|
||||||
QString aFaceName;
|
QString aName;
|
||||||
if ( anIndexes.Extent() == 1 )
|
if ( anIndexes.Extent() == 1 )
|
||||||
{
|
{
|
||||||
int anIndex = anIndexes( 1 );
|
int anIndex = anIndexes( 1 );
|
||||||
|
|
||||||
aFaceName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex );
|
aName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aFaceName = tr( "GEOM_MEN_POPUP_NAME" ).arg( anIndexes.Extent() );
|
aName = tr( "GEOM_MEN_POPUP_NAME" ).arg( anIndexes.Extent() );
|
||||||
|
|
||||||
myEditCurrentArgument->setText( aFaceName );
|
myEditCurrentArgument->setText( aName );
|
||||||
myFaces = anIndexes;
|
int aConstructorId = getConstructorId();
|
||||||
|
if ( aConstructorId == 2)
|
||||||
|
myFaces = anIndexes;
|
||||||
|
else if (aConstructorId == 3)
|
||||||
|
myEdges = anIndexes;
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myFaces.Clear();
|
myFaces.Clear();
|
||||||
|
myEdges.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,6 +560,38 @@ void OperationGUI_ChamferDlg::LineEditReturnPressed()
|
|||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : RadioButtonPressed()
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
void OperationGUI_ChamferDlg::RadioButtonPressed()
|
||||||
|
{
|
||||||
|
bool flag;
|
||||||
|
flag = ( myRadioButton[ RadioButton21 ]->isChecked() &&
|
||||||
|
myRadioButton[ RadioButton31 ]->isChecked() &&
|
||||||
|
myRadioButton[ RadioButton41 ]->isChecked() );
|
||||||
|
|
||||||
|
myRadioButton[ RadioButton21 ]->setChecked(!flag);
|
||||||
|
myRadioButton[ RadioButton31 ]->setChecked(!flag);
|
||||||
|
myRadioButton[ RadioButton41 ]->setChecked(!flag);
|
||||||
|
myRadioButton[ RadioButton22 ]->setChecked(flag);
|
||||||
|
myRadioButton[ RadioButton32 ]->setChecked(flag);
|
||||||
|
myRadioButton[ RadioButton42 ]->setChecked(flag);
|
||||||
|
mySpinBox[ SpinBox21 ]->setDisabled(flag);
|
||||||
|
mySpinBox[ SpinBox22 ]->setDisabled(flag);
|
||||||
|
mySpinBox[ SpinBox31 ]->setDisabled(flag);
|
||||||
|
mySpinBox[ SpinBox32 ]->setDisabled(flag);
|
||||||
|
mySpinBox[ SpinBox41 ]->setDisabled(flag);
|
||||||
|
mySpinBox[ SpinBox42 ]->setDisabled(flag);
|
||||||
|
mySpinBox[ SpinBox23 ]->setDisabled(!flag);
|
||||||
|
mySpinBox[ SpinBox24 ]->setDisabled(!flag);
|
||||||
|
mySpinBox[ SpinBox33 ]->setDisabled(!flag);
|
||||||
|
mySpinBox[ SpinBox34 ]->setDisabled(!flag);
|
||||||
|
mySpinBox[ SpinBox43 ]->setDisabled(!flag);
|
||||||
|
mySpinBox[ SpinBox44 ]->setDisabled(!flag);
|
||||||
|
displayPreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SetEditCurrentArgument()
|
// function : SetEditCurrentArgument()
|
||||||
@ -448,7 +599,7 @@ void OperationGUI_ChamferDlg::LineEditReturnPressed()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ChamferDlg::SetEditCurrentArgument()
|
void OperationGUI_ChamferDlg::SetEditCurrentArgument()
|
||||||
{
|
{
|
||||||
QPushButton* aSender = ( QPushButton* )sender();
|
QPushButton* aSender = ( QPushButton* )sender();
|
||||||
|
|
||||||
QMap< int, QPushButton* >::iterator anIter;
|
QMap< int, QPushButton* >::iterator anIter;
|
||||||
for ( anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter )
|
for ( anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter )
|
||||||
@ -521,7 +672,7 @@ void OperationGUI_ChamferDlg::createSelWg( const QString& theLbl,
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ChamferDlg::reset()
|
void OperationGUI_ChamferDlg::reset()
|
||||||
{
|
{
|
||||||
// Set Initial values of spinboxes
|
// Set Initial values of spinboxes
|
||||||
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
||||||
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
||||||
anIter.data()->SetValue( 5 );
|
anIter.data()->SetValue( 5 );
|
||||||
@ -536,11 +687,13 @@ void OperationGUI_ChamferDlg::reset()
|
|||||||
|
|
||||||
if ( aConstructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ];
|
if ( aConstructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ];
|
||||||
else if ( aConstructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ];
|
else if ( aConstructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ];
|
||||||
else myEditCurrentArgument = mySelName[ MainObj3 ];
|
else if ( aConstructorId == 2 ) myEditCurrentArgument = mySelName[ MainObj3 ];
|
||||||
|
else myEditCurrentArgument = mySelName[ MainObj4 ];
|
||||||
|
|
||||||
myShape = GEOM::GEOM_Object::_nil();
|
myShape = GEOM::GEOM_Object::_nil();
|
||||||
|
|
||||||
myFaces.Clear();
|
myFaces.Clear();
|
||||||
|
myEdges.Clear();
|
||||||
myFace[ Face1 ] = -1;
|
myFace[ Face1 ] = -1;
|
||||||
myFace[ Face2 ] = -1;
|
myFace[ Face2 ] = -1;
|
||||||
|
|
||||||
@ -569,8 +722,10 @@ void OperationGUI_ChamferDlg::activateSelection()
|
|||||||
if ( !myShape->_is_nil() &&
|
if ( !myShape->_is_nil() &&
|
||||||
( myEditCurrentArgument == mySelName[ Face1 ] ||
|
( myEditCurrentArgument == mySelName[ Face1 ] ||
|
||||||
myEditCurrentArgument == mySelName[ Face2 ] ||
|
myEditCurrentArgument == mySelName[ Face2 ] ||
|
||||||
myEditCurrentArgument == mySelName[ Faces ] ) )
|
myEditCurrentArgument == mySelName[ Faces ] ) )
|
||||||
localSelection( myShape, TopAbs_FACE );
|
localSelection( myShape, TopAbs_FACE );
|
||||||
|
else if (!myShape->_is_nil() && myEditCurrentArgument == mySelName[ Edges ] )
|
||||||
|
localSelection( myShape, TopAbs_EDGE );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
@ -611,9 +766,21 @@ void OperationGUI_ChamferDlg::enableWidgets()
|
|||||||
else if ( anId == 2 )
|
else if ( anId == 2 )
|
||||||
{
|
{
|
||||||
mySelName[ Faces ]->setEnabled( toEnable );
|
mySelName[ Faces ]->setEnabled( toEnable );
|
||||||
|
if ( !toEnable )
|
||||||
|
{
|
||||||
|
mySelName[ Faces ]->setText( "" );
|
||||||
|
myFaces = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( anId == 3 )
|
||||||
|
{
|
||||||
|
mySelName[ Edges ]->setEnabled( toEnable );
|
||||||
|
|
||||||
if ( !toEnable )
|
if ( !toEnable )
|
||||||
myFaces.Clear();
|
{
|
||||||
|
mySelName[ Edges ]->setText( "" );
|
||||||
|
myEdges = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,7 +792,6 @@ GEOM::GEOM_IOperations_ptr OperationGUI_ChamferDlg::createOperation()
|
|||||||
{
|
{
|
||||||
return getGeomEngine()->GetILocalOperations( getStudyId() );
|
return getGeomEngine()->GetILocalOperations( getStudyId() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ClickOnApply()
|
// function : ClickOnApply()
|
||||||
// purpose : Verify validity of input data
|
// purpose : Verify validity of input data
|
||||||
@ -637,6 +803,7 @@ bool OperationGUI_ChamferDlg::isValid( QString& )
|
|||||||
case 0: return !myShape->_is_nil();
|
case 0: return !myShape->_is_nil();
|
||||||
case 1: return !myShape->_is_nil() && myFace[ Face1 ] > 0 && myFace[ Face2 ] > 0;
|
case 1: return !myShape->_is_nil() && myFace[ Face1 ] > 0 && myFace[ Face2 ] > 0;
|
||||||
case 2: return !myShape->_is_nil() && myFaces.Extent() > 0;
|
case 2: return !myShape->_is_nil() && myFaces.Extent() > 0;
|
||||||
|
case 3: return !myShape->_is_nil() && myEdges.Extent() > 0;
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -648,6 +815,9 @@ bool OperationGUI_ChamferDlg::isValid( QString& )
|
|||||||
bool OperationGUI_ChamferDlg::execute( ObjectList& objects )
|
bool OperationGUI_ChamferDlg::execute( ObjectList& objects )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
bool flag = ( myRadioButton[ RadioButton21 ]->isChecked() &&
|
||||||
|
myRadioButton[ RadioButton31 ]->isChecked() &&
|
||||||
|
myRadioButton[ RadioButton41 ]->isChecked() );
|
||||||
|
|
||||||
int anId = getConstructorId();
|
int anId = getConstructorId();
|
||||||
if ( anId == 0 )
|
if ( anId == 0 )
|
||||||
@ -655,30 +825,55 @@ bool OperationGUI_ChamferDlg::execute( ObjectList& objects )
|
|||||||
getOperation() )->MakeChamferAll( myShape,
|
getOperation() )->MakeChamferAll( myShape,
|
||||||
mySpinBox[ SpinBox1 ]->GetValue() );
|
mySpinBox[ SpinBox1 ]->GetValue() );
|
||||||
else if ( anId == 1 )
|
else if ( anId == 1 )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
{
|
||||||
getOperation() )->MakeChamferEdge( myShape,
|
if ( flag )
|
||||||
mySpinBox[ SpinBox21 ]->GetValue(),
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
mySpinBox[ SpinBox22 ]->GetValue(),
|
getOperation() )->MakeChamferEdge( myShape,
|
||||||
myFace[ Face1 ],
|
mySpinBox[ SpinBox21 ]->GetValue(),
|
||||||
myFace[ Face2 ] );
|
mySpinBox[ SpinBox22 ]->GetValue(),
|
||||||
|
myFace[ Face1 ],
|
||||||
|
myFace[ Face2 ] );
|
||||||
|
else
|
||||||
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
|
getOperation() )->MakeChamferEdgeAD( myShape,
|
||||||
|
mySpinBox[ SpinBox23 ]->GetValue(),
|
||||||
|
mySpinBox[ SpinBox24 ]->GetValue() * PI180,
|
||||||
|
myFace[ Face1 ],
|
||||||
|
myFace[ Face2 ]);
|
||||||
|
}
|
||||||
else if ( anId == 2 )
|
else if ( anId == 2 )
|
||||||
{
|
{
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
||||||
anArray->length( myFaces.Extent() );
|
anArray->length( myFaces.Extent() );
|
||||||
|
|
||||||
|
|
||||||
for ( int i = 1, n = myFaces.Extent(); i <= n; i++ )
|
for ( int i = 1, n = myFaces.Extent(); i <= n; i++ )
|
||||||
anArray[ i - 1 ] = myFaces( i );
|
anArray[ i - 1 ] = myFaces( i );
|
||||||
|
if ( flag )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeChamferFaces( myShape,
|
getOperation() )->MakeChamferFaces( myShape,
|
||||||
mySpinBox[ SpinBox31 ]->GetValue(),
|
mySpinBox[ SpinBox31 ]->GetValue(),
|
||||||
mySpinBox[ SpinBox32 ]->GetValue(),
|
mySpinBox[ SpinBox32 ]->GetValue(),
|
||||||
anArray );
|
anArray );
|
||||||
|
else
|
||||||
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
|
getOperation() )->MakeChamferFacesAD( myShape,
|
||||||
|
mySpinBox[ SpinBox33 ]->GetValue(),
|
||||||
|
mySpinBox[ SpinBox34 ]->GetValue() * PI180,
|
||||||
|
anArray );
|
||||||
|
}
|
||||||
|
else if ( anId == 3 )
|
||||||
|
{ GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
||||||
|
anArray->length( myEdges.Extent() );
|
||||||
|
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 ]->GetValue(),
|
||||||
|
mySpinBox[ SpinBox42 ]->GetValue(), anArray );
|
||||||
|
else
|
||||||
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
|
getOperation() )->MakeChamferEdgesAD( myShape, mySpinBox[ SpinBox43 ]->GetValue(),
|
||||||
|
mySpinBox[ SpinBox44 ]->GetValue() * PI180, anArray );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() )
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
@ -687,10 +882,3 @@ bool OperationGUI_ChamferDlg::execute( ObjectList& objects )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,92 +1,101 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// File : OperationGUI_ChamferDlg.h
|
// File : OperationGUI_ChamferDlg.h
|
||||||
// Author : Damien COQUERET
|
// Author : Damien COQUERET
|
||||||
// Module : GEOM
|
// Module : GEOM
|
||||||
|
|
||||||
#ifndef DIALOGBOX_CHAMFER_H
|
#ifndef DIALOGBOX_CHAMFER_H
|
||||||
#define DIALOGBOX_CHAMFER_H
|
#define DIALOGBOX_CHAMFER_H
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include "GEOMBase_Skeleton.h"
|
||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
|
|
||||||
class DlgRef_SpinBox;
|
class DlgRef_SpinBox;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_ChamferDlg
|
// class : OperationGUI_ChamferDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_ChamferDlg : public GEOMBase_Skeleton
|
class OperationGUI_ChamferDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces };
|
enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces, MainObj4, Edges};
|
||||||
enum { SpinBox1, SpinBox21, SpinBox22, SpinBox31, SpinBox32 };
|
enum { SpinBox1,
|
||||||
|
SpinBox21, SpinBox22, SpinBox23, SpinBox24,
|
||||||
public:
|
SpinBox31, SpinBox32, SpinBox33, SpinBox34,
|
||||||
OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QWidget* parent);
|
SpinBox41, SpinBox42, SpinBox43, SpinBox44 };
|
||||||
virtual ~OperationGUI_ChamferDlg();
|
enum { RadioButton21, RadioButton22,
|
||||||
|
RadioButton31, RadioButton32,
|
||||||
protected:
|
RadioButton41, RadioButton42 };
|
||||||
// redefined from GEOMBase_Helper
|
public:
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QWidget* parent);
|
||||||
virtual bool isValid( QString& msg );
|
virtual ~OperationGUI_ChamferDlg();
|
||||||
virtual bool execute( ObjectList& objects );
|
|
||||||
|
protected:
|
||||||
private slots:
|
// redefined from GEOMBase_Helper
|
||||||
void ClickOnOk();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
bool ClickOnApply();
|
virtual bool isValid( QString& msg );
|
||||||
void ActivateThisDialog();
|
virtual bool execute( ObjectList& objects );
|
||||||
void LineEditReturnPressed();
|
|
||||||
void SelectionIntoArgument();
|
private slots:
|
||||||
void SetEditCurrentArgument();
|
void ClickOnOk();
|
||||||
void ValueChangedInSpinBox( double newValue );
|
bool ClickOnApply();
|
||||||
void ConstructorsClicked( int constructorId );
|
void ActivateThisDialog();
|
||||||
|
void LineEditReturnPressed();
|
||||||
private:
|
void RadioButtonPressed();
|
||||||
void Init();
|
void SelectionIntoArgument();
|
||||||
void enterEvent( QEvent* e );
|
void SetEditCurrentArgument();
|
||||||
void reset();
|
void ValueChangedInSpinBox( double newValue );
|
||||||
void createSelWg( const QString&, QPixmap&, QWidget*, const int );
|
void ConstructorsClicked( int constructorId );
|
||||||
int getConstructorId() const;
|
|
||||||
void activateSelection();
|
private:
|
||||||
void enableWidgets();
|
void Init();
|
||||||
|
void enterEvent( QEvent* e );
|
||||||
private:
|
void reset();
|
||||||
int myConstructorId;
|
void createSelWg( const QString&, QPixmap&, QWidget*, const int );
|
||||||
|
int getConstructorId() const;
|
||||||
GEOM::GEOM_Object_var myShape;
|
void activateSelection();
|
||||||
QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 )
|
void enableWidgets();
|
||||||
TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces )
|
|
||||||
|
private:
|
||||||
QFrame* myGrp1;
|
int myConstructorId;
|
||||||
QFrame* myGrp2;
|
|
||||||
QFrame* myGrp3;
|
GEOM::GEOM_Object_var myShape;
|
||||||
|
QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 )
|
||||||
QMap< int, QPushButton* > mySelBtn;
|
TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces )
|
||||||
QMap< int, QLineEdit* > mySelName;
|
TColStd_IndexedMapOfInteger myEdges; // indexes of edges from fourth tab (Edges)
|
||||||
QMap< int, DlgRef_SpinBox* > mySpinBox;
|
|
||||||
};
|
QFrame* myGrp1;
|
||||||
|
QFrame* myGrp2;
|
||||||
#endif // DIALOGBOX_CHAMFER_H
|
QFrame* myGrp3;
|
||||||
|
QFrame* myGrp4;
|
||||||
|
|
||||||
|
QMap< int, QPushButton* > mySelBtn;
|
||||||
|
QMap< int, QLineEdit* > mySelName;
|
||||||
|
QMap< int, DlgRef_SpinBox* > mySpinBox;
|
||||||
|
QMap< int, QRadioButton* > myRadioButton;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOGBOX_CHAMFER_H
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "OperationGUI_FilletDlg.h"
|
#include "OperationGUI_FilletDlg.h"
|
||||||
#include "DlgRef_1Sel1Spin.h"
|
#include "DlgRef_1Sel1Spin.h"
|
||||||
#include "DlgRef_2Sel1Spin.h"
|
#include "DlgRef_2Sel3Spin2Rb.h"
|
||||||
|
|
||||||
#include "SUIT_Desktop.h"
|
#include "SUIT_Desktop.h"
|
||||||
#include "SUIT_Session.h"
|
#include "SUIT_Session.h"
|
||||||
@ -79,21 +79,25 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWid
|
|||||||
Group1->PushButton1->setPixmap( iconSelect );
|
Group1->PushButton1->setPixmap( iconSelect );
|
||||||
Group1->LineEdit1->setReadOnly( true );
|
Group1->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
Group2 = new DlgRef_2Sel1Spin( this, "Group2" );
|
Group2 = new DlgRef_2Sel3Spin2Rb( this, "Group2" );
|
||||||
Group2->GroupBox1->setTitle( tr( "GEOM_FILLET_EDGES" ) );
|
Group2->GroupBox1->setTitle( tr( "GEOM_FILLET_EDGES" ) );
|
||||||
Group2->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
Group2->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
||||||
Group2->TextLabel2->setText( tr( "SELECTED_EDGES" ) );
|
Group2->TextLabel2->setText( tr( "SELECTED_EDGES" ) );
|
||||||
Group2->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
|
Group2->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
|
||||||
|
Group2->TextLabel4->setText( tr( "GEOM_R1" ) );
|
||||||
|
Group2->TextLabel5->setText( tr( "GEOM_R2" ) );
|
||||||
Group2->PushButton1->setPixmap( iconSelect );
|
Group2->PushButton1->setPixmap( iconSelect );
|
||||||
Group2->PushButton2->setPixmap( iconSelect );
|
Group2->PushButton2->setPixmap( iconSelect );
|
||||||
Group2->LineEdit1->setReadOnly( true );
|
Group2->LineEdit1->setReadOnly( true );
|
||||||
Group2->LineEdit2->setReadOnly( true );
|
Group2->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Group3 = new DlgRef_2Sel1Spin( this, "Group3" );
|
Group3 = new DlgRef_2Sel3Spin2Rb( this, "Group3" );
|
||||||
Group3->GroupBox1->setTitle(tr( "GEOM_FILLET_FACES" ) );
|
Group3->GroupBox1->setTitle(tr( "GEOM_FILLET_FACES" ) );
|
||||||
Group3->TextLabel1->setText(tr( "GEOM_MAIN_OBJECT" ) );
|
Group3->TextLabel1->setText(tr( "GEOM_MAIN_OBJECT" ) );
|
||||||
Group3->TextLabel2->setText(tr( "SELECTED_FACES" ) );
|
Group3->TextLabel2->setText(tr( "SELECTED_FACES" ) );
|
||||||
Group3->TextLabel3->setText(tr( "GEOM_RADIUS" ) );
|
Group3->TextLabel3->setText(tr( "GEOM_RADIUS" ) );
|
||||||
|
Group3->TextLabel4->setText(tr( "GEOM_R1" ) );
|
||||||
|
Group3->TextLabel5->setText(tr( "GEOM_R2" ) );
|
||||||
Group3->PushButton1->setPixmap( iconSelect );
|
Group3->PushButton1->setPixmap( iconSelect );
|
||||||
Group3->PushButton2->setPixmap( iconSelect );
|
Group3->PushButton2->setPixmap( iconSelect );
|
||||||
Group3->LineEdit1->setReadOnly( true );
|
Group3->LineEdit1->setReadOnly( true );
|
||||||
@ -107,7 +111,11 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWid
|
|||||||
double SpecificStep = 10.0;
|
double SpecificStep = 10.0;
|
||||||
Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
|
Group2->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
|
Group2->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
|
Group3->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
|
Group3->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||||
|
|
||||||
setHelpFileName("fillet.htm");
|
setHelpFileName("fillet.htm");
|
||||||
|
|
||||||
@ -158,7 +166,17 @@ void OperationGUI_FilletDlg::Init()
|
|||||||
// spin boxes
|
// spin boxes
|
||||||
connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
|
connect(Group2->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
|
connect(Group2->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
|
connect(Group3->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
|
connect(Group3->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
|
|
||||||
|
//RadioButtons
|
||||||
|
connect( Group2->RadioButton1, SIGNAL( clicked() ), this, SLOT( RadioButton_Clicked() ) );
|
||||||
|
connect( Group2->RadioButton2, SIGNAL( clicked() ), this, SLOT( RadioButton_Clicked() ) );
|
||||||
|
connect( Group3->RadioButton1, SIGNAL( clicked() ), this, SLOT( RadioButton_Clicked() ) );
|
||||||
|
connect( Group3->RadioButton2, SIGNAL( clicked() ), this, SLOT( RadioButton_Clicked() ) );
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||||
@ -189,10 +207,18 @@ void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Get radius from previous widget
|
// Get radius from previous widget
|
||||||
double R = 5;
|
double R = 5, R1 = 5, R2 = 5;
|
||||||
if ( myConstructorId == 0 ) R = Group1->SpinBox_DX->GetValue();
|
if ( myConstructorId == 0 ) R = Group1->SpinBox_DX->GetValue();
|
||||||
else if ( myConstructorId == 1 ) R = Group2->SpinBox_DX->GetValue();
|
else if ( myConstructorId == 1 ) {
|
||||||
else R = Group3->SpinBox_DX->GetValue();
|
R = Group2->SpinBox_DX->GetValue();
|
||||||
|
R1 = Group2->SpinBox_DY->GetValue();
|
||||||
|
R2 = Group2->SpinBox_DZ->GetValue();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
R = Group3->SpinBox_DX->GetValue();
|
||||||
|
R1 = Group3->SpinBox_DY->GetValue();
|
||||||
|
R2 = Group3->SpinBox_DZ->GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
myConstructorId = constructorId;
|
myConstructorId = constructorId;
|
||||||
|
|
||||||
@ -209,12 +235,16 @@ void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId )
|
|||||||
Group2->show();
|
Group2->show();
|
||||||
Group3->hide();
|
Group3->hide();
|
||||||
Group2->SpinBox_DX->SetValue( R );
|
Group2->SpinBox_DX->SetValue( R );
|
||||||
|
Group2->SpinBox_DY->SetValue( R1 );
|
||||||
|
Group2->SpinBox_DZ->SetValue( R2 );
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Group1->hide();
|
Group1->hide();
|
||||||
Group2->hide();
|
Group2->hide();
|
||||||
Group3->show();
|
Group3->show();
|
||||||
Group3->SpinBox_DX->SetValue( R );
|
Group3->SpinBox_DX->SetValue( R );
|
||||||
|
Group3->SpinBox_DY->SetValue( R1 );
|
||||||
|
Group3->SpinBox_DZ->SetValue( R2 );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -444,7 +474,11 @@ void OperationGUI_FilletDlg::reset()
|
|||||||
// Set Initial values of spinboxes
|
// Set Initial values of spinboxes
|
||||||
Group1->SpinBox_DX->SetValue( 5 );
|
Group1->SpinBox_DX->SetValue( 5 );
|
||||||
Group2->SpinBox_DX->SetValue( 5 );
|
Group2->SpinBox_DX->SetValue( 5 );
|
||||||
|
Group2->SpinBox_DY->SetValue( 5 );
|
||||||
|
Group2->SpinBox_DZ->SetValue( 5 );
|
||||||
Group3->SpinBox_DX->SetValue( 5 );
|
Group3->SpinBox_DX->SetValue( 5 );
|
||||||
|
Group3->SpinBox_DY->SetValue( 5 );
|
||||||
|
Group3->SpinBox_DZ->SetValue( 5 );
|
||||||
|
|
||||||
Group1->LineEdit1->setText( "" );
|
Group1->LineEdit1->setText( "" );
|
||||||
Group2->LineEdit1->setText( "" );
|
Group2->LineEdit1->setText( "" );
|
||||||
@ -572,8 +606,7 @@ bool OperationGUI_FilletDlg::execute( ObjectList& objects )
|
|||||||
int anId = getConstructorId();
|
int anId = getConstructorId();
|
||||||
if ( anId == 0 )
|
if ( anId == 0 )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeFilletAll( myShape,
|
getOperation() )->MakeFilletAll( myShape, getRadius() );
|
||||||
getRadius() );
|
|
||||||
else if ( anId == 1 )
|
else if ( anId == 1 )
|
||||||
{
|
{
|
||||||
GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
|
||||||
@ -581,9 +614,14 @@ bool OperationGUI_FilletDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
for ( int i = 1, n = myEdges.Extent(); i <= n; i++ )
|
for ( int i = 1, n = myEdges.Extent(); i <= n; i++ )
|
||||||
aList[ i - 1 ] = myEdges( i );
|
aList[ i - 1 ] = myEdges( i );
|
||||||
|
if ( Group2->RadioButton1->isChecked() )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeFilletEdges( myShape, getRadius(), aList );
|
getOperation() )->MakeFilletEdges( myShape, getRadius(), aList );
|
||||||
|
else
|
||||||
|
anObj = GEOM::GEOM_ILocalOperations::_narrow( getOperation() )->MakeFilletEdgesR1R2( myShape,
|
||||||
|
(Group2->SpinBox_DY->GetValue()),
|
||||||
|
(Group2->SpinBox_DZ->GetValue()),
|
||||||
|
aList );
|
||||||
}
|
}
|
||||||
else if ( anId == 2 )
|
else if ( anId == 2 )
|
||||||
{
|
{
|
||||||
@ -593,9 +631,13 @@ bool OperationGUI_FilletDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
for ( int i = 1, n = myFaces.Extent(); i <= n; i++ )
|
for ( int i = 1, n = myFaces.Extent(); i <= n; i++ )
|
||||||
aList[ i - 1 ] = myFaces( i );
|
aList[ i - 1 ] = myFaces( i );
|
||||||
|
if ( Group3->RadioButton1->isChecked() )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeFilletFaces( myShape, getRadius(), aList );
|
getOperation() )->MakeFilletFaces( myShape, getRadius(), aList );
|
||||||
|
else
|
||||||
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
|
getOperation() )->MakeFilletFacesR1R2( myShape, (Group3->SpinBox_DY->GetValue()),
|
||||||
|
(Group3->SpinBox_DZ->GetValue()), aList );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() )
|
||||||
@ -615,3 +657,26 @@ double OperationGUI_FilletDlg::getRadius() const
|
|||||||
else if ( anId == 1 ) return Group2->SpinBox_DX->GetValue();
|
else if ( anId == 1 ) return Group2->SpinBox_DX->GetValue();
|
||||||
else return Group3->SpinBox_DX->GetValue();
|
else return Group3->SpinBox_DX->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : RadiobuttonClicked
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
|
||||||
|
void OperationGUI_FilletDlg::RadioButton_Clicked()
|
||||||
|
{
|
||||||
|
bool flag = ( (Group2->RadioButton1->isChecked()) && (Group3->RadioButton1->isChecked()) );
|
||||||
|
flag = !flag;
|
||||||
|
|
||||||
|
Group2->SpinBox_DX->setEnabled(flag);
|
||||||
|
Group2->SpinBox_DY->setEnabled(!flag);
|
||||||
|
Group2->SpinBox_DZ->setEnabled(!flag);
|
||||||
|
Group2->RadioButton1->setChecked(flag);
|
||||||
|
Group2->RadioButton2->setChecked(!flag);
|
||||||
|
Group3->SpinBox_DX->setEnabled(flag);
|
||||||
|
Group3->SpinBox_DY->setEnabled(!flag);
|
||||||
|
Group3->SpinBox_DZ->setEnabled(!flag);
|
||||||
|
Group3->RadioButton1->setChecked(flag);
|
||||||
|
Group3->RadioButton2->setChecked(!flag);
|
||||||
|
displayPreview();
|
||||||
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
|
|
||||||
class DlgRef_1Sel1Spin;
|
class DlgRef_1Sel1Spin;
|
||||||
class DlgRef_2Sel1Spin;
|
class DlgRef_2Sel3Spin2Rb;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_FilletDlg
|
// class : OperationGUI_FilletDlg
|
||||||
@ -62,6 +62,7 @@ private slots:
|
|||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ValueChangedInSpinBox( double newValue );
|
void ValueChangedInSpinBox( double newValue );
|
||||||
void ConstructorsClicked( int constructorId );
|
void ConstructorsClicked( int constructorId );
|
||||||
|
void RadioButton_Clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
@ -80,8 +81,8 @@ private:
|
|||||||
TColStd_IndexedMapOfInteger myFaces;
|
TColStd_IndexedMapOfInteger myFaces;
|
||||||
|
|
||||||
DlgRef_1Sel1Spin* Group1;
|
DlgRef_1Sel1Spin* Group1;
|
||||||
DlgRef_2Sel1Spin* Group2;
|
DlgRef_2Sel3Spin2Rb* Group2;
|
||||||
DlgRef_2Sel1Spin* Group3;
|
DlgRef_2Sel3Spin2Rb* Group3;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_FILLET_H
|
#endif // DIALOGBOX_FILLET_H
|
||||||
|