mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-06-08 08:47:50 +05:00
Implementation notebook in the GEOM.
This commit is contained in:
parent
46248f9be4
commit
a272957cb4
@ -621,7 +621,7 @@ bool BasicGUI_CircleDlg::isValid( QString& msg )
|
|||||||
//return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0;
|
//return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0;
|
||||||
//nil point means origin of global CS
|
//nil point means origin of global CS
|
||||||
//nil vector means Z axis
|
//nil vector means Z axis
|
||||||
return getRadius() > 0;
|
return getRadius() > 0 && GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview());
|
||||||
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 );
|
||||||
@ -643,9 +643,15 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
switch ( getConstructorId() ) {
|
switch ( getConstructorId() ) {
|
||||||
case 0 :
|
case 0 :
|
||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
|
{
|
||||||
res = true;
|
QStringList aParameters;
|
||||||
break;
|
aParameters << GroupPntVecR->SpinBox_DX->text();
|
||||||
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() );
|
||||||
|
if ( !anObj->_is_nil() )
|
||||||
|
anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
|
||||||
|
res = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 1 :
|
case 1 :
|
||||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleThreePnt( myPoint1, myPoint2, myPoint3 );
|
anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleThreePnt( myPoint1, myPoint2, myPoint3 );
|
||||||
res = true;
|
res = true;
|
||||||
|
@ -409,7 +409,10 @@ bool BasicGUI_EllipseDlg::isValid( QString& msg )
|
|||||||
//return !myPoint->_is_nil() && !myDir->_is_nil();
|
//return !myPoint->_is_nil() && !myDir->_is_nil();
|
||||||
//nil point means origin of global CS
|
//nil point means origin of global CS
|
||||||
//nil vector means Z axis
|
//nil vector means Z axis
|
||||||
return true;
|
bool ok = true;
|
||||||
|
ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -420,11 +423,17 @@ bool BasicGUI_EllipseDlg::execute( ObjectList& objects )
|
|||||||
{
|
{
|
||||||
double aMajorR = GroupPoints->SpinBox_DX->value();
|
double aMajorR = GroupPoints->SpinBox_DX->value();
|
||||||
double aMinorR = GroupPoints->SpinBox_DY->value();
|
double aMinorR = GroupPoints->SpinBox_DY->value();
|
||||||
|
|
||||||
|
QStringList aParameters;
|
||||||
|
aParameters<<GroupPoints->SpinBox_DX->text();
|
||||||
|
aParameters<<GroupPoints->SpinBox_DY->text();
|
||||||
|
|
||||||
GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeEllipse( myPoint, myDir, aMajorR, aMinorR );
|
GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeEllipse( myPoint, myDir, aMajorR, aMinorR );
|
||||||
|
for(int i = 0;i< aParameters.size();i++)
|
||||||
if ( !anObj->_is_nil() )
|
anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
|
||||||
|
if ( !anObj->_is_nil() ) {
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,13 +99,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
|
QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
|
||||||
|
|
||||||
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
|
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
|
||||||
myData[ X ] = new QDoubleSpinBox( anOriGrp );
|
myData[ X ] = new SalomeApp_DoubleSpinBox( anOriGrp );
|
||||||
anOriGrpLayout->addWidget( myData[ X ] );
|
anOriGrpLayout->addWidget( myData[ X ] );
|
||||||
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
|
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
|
||||||
myData[ Y ] = new QDoubleSpinBox( anOriGrp );
|
myData[ Y ] = new SalomeApp_DoubleSpinBox( anOriGrp );
|
||||||
anOriGrpLayout->addWidget( myData[ Y ] );
|
anOriGrpLayout->addWidget( myData[ Y ] );
|
||||||
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
|
anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
|
||||||
myData[ Z ] = new QDoubleSpinBox( anOriGrp );
|
myData[ Z ] = new SalomeApp_DoubleSpinBox( anOriGrp );
|
||||||
anOriGrpLayout->addWidget( myData[ Z ] );
|
anOriGrpLayout->addWidget( myData[ Z ] );
|
||||||
|
|
||||||
aMainGrpLayout->addWidget( anOriGrp );
|
aMainGrpLayout->addWidget( anOriGrp );
|
||||||
@ -114,13 +114,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
|
QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
|
||||||
|
|
||||||
aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
|
aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
|
||||||
myData[ DX1 ] = new QDoubleSpinBox( aXAxisGrp );
|
myData[ DX1 ] = new SalomeApp_DoubleSpinBox( aXAxisGrp );
|
||||||
aXAxisGrpLayout->addWidget( myData[ DX1 ] );
|
aXAxisGrpLayout->addWidget( myData[ DX1 ] );
|
||||||
aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
|
aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
|
||||||
myData[ DY1 ] = new QDoubleSpinBox( aXAxisGrp );
|
myData[ DY1 ] = new SalomeApp_DoubleSpinBox( aXAxisGrp );
|
||||||
aXAxisGrpLayout->addWidget( myData[ DY1 ] );
|
aXAxisGrpLayout->addWidget( myData[ DY1 ] );
|
||||||
aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
|
aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
|
||||||
myData[ DZ1 ] = new QDoubleSpinBox( aXAxisGrp );
|
myData[ DZ1 ] = new SalomeApp_DoubleSpinBox( aXAxisGrp );
|
||||||
aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
|
aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
|
||||||
|
|
||||||
aMainGrpLayout->addWidget( aXAxisGrp );
|
aMainGrpLayout->addWidget( aXAxisGrp );
|
||||||
@ -129,13 +129,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
|
|||||||
QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
|
QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
|
||||||
|
|
||||||
anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
|
anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
|
||||||
myData[ DX2 ] = new QDoubleSpinBox( anYAxisGrp );
|
myData[ DX2 ] = new SalomeApp_DoubleSpinBox( anYAxisGrp );
|
||||||
anYAxisGrpLayout->addWidget( myData[ DX2 ] );
|
anYAxisGrpLayout->addWidget( myData[ DX2 ] );
|
||||||
anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
|
anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
|
||||||
myData[ DY2 ] = new QDoubleSpinBox( anYAxisGrp );
|
myData[ DY2 ] = new SalomeApp_DoubleSpinBox( anYAxisGrp );
|
||||||
anYAxisGrpLayout->addWidget( myData[ DY2 ] );
|
anYAxisGrpLayout->addWidget( myData[ DY2 ] );
|
||||||
anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
|
anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
|
||||||
myData[ DZ2 ] = new QDoubleSpinBox( anYAxisGrp );
|
myData[ DZ2 ] = new SalomeApp_DoubleSpinBox( anYAxisGrp );
|
||||||
anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
|
anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
|
||||||
|
|
||||||
aMainGrpLayout->addWidget( anYAxisGrp );
|
aMainGrpLayout->addWidget( anYAxisGrp );
|
||||||
@ -698,8 +698,12 @@ bool BasicGUI_MarkerDlg::isValid( QString& msg )
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch ( id ) {
|
switch ( id ) {
|
||||||
case 0:
|
case 0: {
|
||||||
return isOk;
|
bool ok = true;
|
||||||
|
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
|
||||||
|
ok = anIter.value()->isValid( msg, !IsPreview()) && ok;
|
||||||
|
return isOk && ok;
|
||||||
|
}
|
||||||
case 1:
|
case 1:
|
||||||
return !Group1->LineEdit1->text().isEmpty() && isOk;
|
return !Group1->LineEdit1->text().isEmpty() && isOk;
|
||||||
case 2:
|
case 2:
|
||||||
@ -720,9 +724,21 @@ bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
|
|||||||
getOperation() )->MakeMarker( myData[ X ]->value(), myData[ Y ]->value(), myData[ Z ]->value(),
|
getOperation() )->MakeMarker( myData[ X ]->value(), myData[ Y ]->value(), myData[ Z ]->value(),
|
||||||
myData[ DX1 ]->value(), myData[ DY1 ]->value(), myData[ DZ1 ]->value(),
|
myData[ DX1 ]->value(), myData[ DY1 ]->value(), myData[ DZ1 ]->value(),
|
||||||
myData[ DX2 ]->value(), myData[ DY2 ]->value(), myData[ DZ2 ]->value() );
|
myData[ DX2 ]->value(), myData[ DY2 ]->value(), myData[ DZ2 ]->value() );
|
||||||
|
QStringList aParameters;
|
||||||
|
aParameters<<myData[X]->text();
|
||||||
|
aParameters<<myData[Y]->text();
|
||||||
|
aParameters<<myData[Z]->text();
|
||||||
|
aParameters<<myData[ DX1 ]->text();
|
||||||
|
aParameters<<myData[ DY1 ]->text();
|
||||||
|
aParameters<<myData[ DZ1 ]->text();
|
||||||
|
aParameters<<myData[ DX2 ]->text();
|
||||||
|
aParameters<<myData[ DY2 ]->text();
|
||||||
|
aParameters<<myData[ DZ2 ]->text();
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() ) {
|
||||||
|
anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
class DlgRef_1Sel;
|
class DlgRef_1Sel;
|
||||||
class DlgRef_3Sel;
|
class DlgRef_3Sel;
|
||||||
class QDoubleSpinBox;
|
class SalomeApp_DoubleSpinBox;
|
||||||
class QFrame;
|
class QFrame;
|
||||||
|
|
||||||
class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
|
class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
|
||||||
@ -41,7 +41,7 @@ class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
|
enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
|
||||||
typedef QMap< int, QDoubleSpinBox* > DataMap;
|
typedef QMap< int, SalomeApp_DoubleSpinBox* > DataMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
|
BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
|
||||||
|
@ -569,6 +569,20 @@ double BasicGUI_PlaneDlg::getSize() const
|
|||||||
return 0.;
|
return 0.;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : getSize()
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
QString BasicGUI_PlaneDlg::getSizeAsString() const
|
||||||
|
{
|
||||||
|
switch ( getConstructorId() ) {
|
||||||
|
case 0 : return GroupPntDir->SpinBox_DX->text();
|
||||||
|
case 1 : return Group3Pnts->SpinBox_DX->text();
|
||||||
|
case 2 : return GroupFace->SpinBox_DX->text();
|
||||||
|
}
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : createOperation
|
// function : createOperation
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -598,13 +612,17 @@ bool BasicGUI_PlaneDlg::isValid( QString& msg )
|
|||||||
msg = QString( "Please, enter size greater than 0." );
|
msg = QString( "Please, enter size greater than 0." );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( id == 0 )
|
if ( id == 0 )
|
||||||
return !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir );
|
return !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ) &&
|
||||||
else if ( id == 1 )
|
GroupPntDir->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
|
else if ( id == 1 ) {
|
||||||
return !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) &&
|
return !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) &&
|
||||||
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
|
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ) &&
|
||||||
|
Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() );;
|
||||||
|
}
|
||||||
else if ( id == 2 )
|
else if ( id == 2 )
|
||||||
return !CORBA::is_nil( myFace );
|
return !CORBA::is_nil( myFace ) && GroupFace->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,9 +651,10 @@ bool BasicGUI_PlaneDlg::execute( ObjectList& objects )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if ( !anObj->_is_nil() ) {
|
||||||
|
anObj->SetParameters(getSizeAsString().toLatin1().constData());
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -55,6 +55,7 @@ private:
|
|||||||
void Init();
|
void Init();
|
||||||
void enterEvent( QEvent* );
|
void enterEvent( QEvent* );
|
||||||
double getSize() const;
|
double getSize() const;
|
||||||
|
QString getSizeAsString() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3, myFace;
|
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3, myFace;
|
||||||
|
@ -453,7 +453,16 @@ GEOM::GEOM_IOperations_ptr BasicGUI_VectorDlg::createOperation()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool BasicGUI_VectorDlg::isValid( QString& msg )
|
bool BasicGUI_VectorDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
return getConstructorId() == 0 ? !myPoint1->_is_nil() && !myPoint2->_is_nil() : true;
|
if(getConstructorId() == 0)
|
||||||
|
return !myPoint1->_is_nil() && !myPoint2->_is_nil();
|
||||||
|
else if(getConstructorId() == 1)
|
||||||
|
{
|
||||||
|
bool ok = true;
|
||||||
|
ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
ok = GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -478,7 +487,16 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects )
|
|||||||
double dx = GroupDimensions->SpinBox_DX->value();
|
double dx = GroupDimensions->SpinBox_DX->value();
|
||||||
double dy = GroupDimensions->SpinBox_DY->value();
|
double dy = GroupDimensions->SpinBox_DY->value();
|
||||||
double dz = GroupDimensions->SpinBox_DZ->value();
|
double dz = GroupDimensions->SpinBox_DZ->value();
|
||||||
|
|
||||||
|
QStringList aParameters;
|
||||||
|
aParameters << GroupDimensions->SpinBox_DX->text();
|
||||||
|
aParameters << GroupDimensions->SpinBox_DY->text();
|
||||||
|
aParameters << GroupDimensions->SpinBox_DZ->text();
|
||||||
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorDXDYDZ( dx, dy, dz );
|
anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorDXDYDZ( dx, dy, dz );
|
||||||
|
|
||||||
|
if ( !anObj->_is_nil() )
|
||||||
|
anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
|
||||||
|
|
||||||
res = true;
|
res = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="1" colspan="2" >
|
<item row="2" column="1" colspan="2" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DX" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX" />
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0" >
|
||||||
<widget class="QLabel" name="TextLabel3" >
|
<widget class="QLabel" name="TextLabel3" >
|
||||||
@ -153,9 +153,9 @@
|
|||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QtxDoubleSpinBox</class>
|
<class>SalomeApp_DoubleSpinBox</class>
|
||||||
<extends>QDoubleSpinBox</extends>
|
<extends>QDoubleSpinBox</extends>
|
||||||
<header location="global" >QtxDoubleSpinBox.h</header>
|
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
@ -56,10 +56,10 @@
|
|||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="3" column="1" colspan="2" >
|
<item row="3" column="1" colspan="2" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DY" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY" />
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="2" >
|
<item row="2" column="1" colspan="2" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DX" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX" />
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
<item row="3" column="0" >
|
||||||
<widget class="QLabel" name="TextLabel4" >
|
<widget class="QLabel" name="TextLabel4" >
|
||||||
@ -166,9 +166,9 @@
|
|||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QtxDoubleSpinBox</class>
|
<class>SalomeApp_DoubleSpinBox</class>
|
||||||
<extends>QDoubleSpinBox</extends>
|
<extends>QDoubleSpinBox</extends>
|
||||||
<header location="global" >QtxDoubleSpinBox.h</header>
|
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
@ -180,7 +180,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2" >
|
<item row="3" column="1" colspan="2" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DX" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX" />
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -191,9 +191,9 @@
|
|||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QtxDoubleSpinBox</class>
|
<class>SalomeApp_DoubleSpinBox</class>
|
||||||
<extends>QDoubleSpinBox</extends>
|
<extends>QDoubleSpinBox</extends>
|
||||||
<header location="global" >QtxDoubleSpinBox.h</header>
|
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
@ -111,13 +111,13 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DX" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX" />
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="1" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DY" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY" />
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="2" column="1" >
|
||||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DZ" />
|
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ" />
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -128,9 +128,9 @@
|
|||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QtxDoubleSpinBox</class>
|
<class>SalomeApp_DoubleSpinBox</class>
|
||||||
<extends>QDoubleSpinBox</extends>
|
<extends>QDoubleSpinBox</extends>
|
||||||
<header location="global" >QtxDoubleSpinBox.h</header>
|
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
@ -152,7 +152,7 @@ SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
char* GeometryGUI::JoinObjectParameters(const QStringList& theParametersList)
|
char* GeometryGUI::JoinObjectParameters(const QStringList& theParametersList)
|
||||||
{
|
{
|
||||||
return (char*)theParametersList.join(":").toLatin1().constData();
|
return theParametersList.join(":").toLatin1().data();
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : GeometryGUI::GeometryGUI()
|
// function : GeometryGUI::GeometryGUI()
|
||||||
|
@ -326,7 +326,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
#
|
#
|
||||||
# @ref swig_MakeVertexOnSurface "Example"
|
# @ref swig_MakeVertexOnSurface "Example"
|
||||||
def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
|
def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
|
||||||
theUParameter, theVParameter, Parameters = ParseParameters(theParameter)
|
theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
|
anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
|
||||||
RaiseIfFailed("MakePointOnSurface", self.BasicOp)
|
RaiseIfFailed("MakePointOnSurface", self.BasicOp)
|
||||||
@ -364,8 +364,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref tui_creation_vector "Example"
|
# @ref tui_creation_vector "Example"
|
||||||
def MakeVectorDXDYDZ(self,theDX, theDY, theDZ):
|
def MakeVectorDXDYDZ(self,theDX, theDY, theDZ):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
|
||||||
anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
|
anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
|
||||||
RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
|
RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a vector between two points.
|
## Create a vector between two points.
|
||||||
@ -427,8 +429,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref tui_creation_plane "Example"
|
# @ref tui_creation_plane "Example"
|
||||||
def MakePlane(self,thePnt, theVec, theTrimSize):
|
def MakePlane(self,thePnt, theVec, theTrimSize):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
theTrimSize, Parameters = ParseParameters(theTrimSize);
|
||||||
anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
|
anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
|
||||||
RaiseIfFailed("MakePlanePntVec", self.BasicOp)
|
RaiseIfFailed("MakePlanePntVec", self.BasicOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a plane, passing through the three given points
|
## Create a plane, passing through the three given points
|
||||||
@ -441,8 +445,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref tui_creation_plane "Example"
|
# @ref tui_creation_plane "Example"
|
||||||
def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize):
|
def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
theTrimSize, Parameters = ParseParameters(theTrimSize);
|
||||||
anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
|
anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
|
||||||
RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
|
RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a plane, similar to the existing one, but with another size of representing face.
|
## Create a plane, similar to the existing one, but with another size of representing face.
|
||||||
@ -453,8 +459,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref tui_creation_plane "Example"
|
# @ref tui_creation_plane "Example"
|
||||||
def MakePlaneFace(self,theFace, theTrimSize):
|
def MakePlaneFace(self,theFace, theTrimSize):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
theTrimSize, Parameters = ParseParameters(theTrimSize);
|
||||||
anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
|
anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
|
||||||
RaiseIfFailed("MakePlaneFace", self.BasicOp)
|
RaiseIfFailed("MakePlaneFace", self.BasicOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a local coordinate system.
|
## Create a local coordinate system.
|
||||||
@ -466,8 +474,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref swig_MakeMarker "Example"
|
# @ref swig_MakeMarker "Example"
|
||||||
def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
|
def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
|
||||||
anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
|
anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
|
||||||
RaiseIfFailed("MakeMarker", self.BasicOp)
|
RaiseIfFailed("MakeMarker", self.BasicOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a local coordinate system.
|
## Create a local coordinate system.
|
||||||
@ -535,8 +545,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref tui_creation_circle "Example"
|
# @ref tui_creation_circle "Example"
|
||||||
def MakeCircle(self, thePnt, theVec, theR):
|
def MakeCircle(self, thePnt, theVec, theR):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
theR, Parameters = ParseParameters(theR)
|
||||||
anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
|
anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
|
||||||
RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
|
RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a circle with given radius.
|
## Create a circle with given radius.
|
||||||
@ -583,8 +595,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @ref tui_creation_ellipse "Example"
|
# @ref tui_creation_ellipse "Example"
|
||||||
def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor):
|
def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
|
||||||
anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
|
anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
|
||||||
RaiseIfFailed("MakeEllipse", self.CurvesOp)
|
RaiseIfFailed("MakeEllipse", self.CurvesOp)
|
||||||
|
anObj.SetParameters(Parameters)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create an ellipse with given radiuses.
|
## Create an ellipse with given radiuses.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user