0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape

Additional change: customize "What Is" information
This commit is contained in:
vsr 2010-03-31 15:37:44 +00:00
parent 692942dacc
commit 6e35826cb7
4 changed files with 23 additions and 1 deletions

View File

@ -3984,6 +3984,10 @@ Please, select face, shell or solid and try again</translation>
<translation>Would you like to take into account the units?
Otherwise the dimensions will be kept without modifications.</translation>
</message>
<message>
<source>GEOM_ADVANCED</source>
<translation>Advanced shape: type %1</translation>
</message>
</context>
<context>
<name>BasicGUI_CurveDlg</name>

View File

@ -155,6 +155,14 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
TopoDS_Shape aShape = aRefShape->GetValue();
if (aShape.IsNull()) return aKind;
int geom_type = theShape->GetType();
// check if it's advanced shape
if ( geom_type > ADVANCED_BASE ) {
SetErrorCode(OK);
return SK_ADVANCED;
}
// Call algorithm
GEOMAlgo_ShapeInfoFiller aSF;
aSF.SetShape(aShape);

View File

@ -78,7 +78,9 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
SK_SEGMENT, // segment
SK_EDGE, // other edge
// VERTEX
SK_VERTEX
SK_VERTEX,
// ADVANCED shapes
SK_ADVANCED, // all advanced shapes (temporary implementation)
};
Standard_EXPORT ShapeKind KindOfShape (Handle(GEOM_Object) theShape,

View File

@ -587,6 +587,14 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
"\n" + tr( "GEOM_Y" ) + PRINT_DOUBLE( aDbls[1] ) +
"\n" + tr( "GEOM_Z" ) + PRINT_DOUBLE( aDbls[2] );
break;
case GEOM::GEOM_IKindOfShape::ADVANCED:
{
QString strid = QString( "GEOM_ADVANCED_%1" ).arg( myObj->GetType() );
aKindStr = tr( strid.toLatin1().constData() ) == strid ?
tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) :
tr( strid.toLatin1().constData() );
break;
}
default:
break;
}