added missing descriptions and basic properties in WhatIs dialof for all newly supported edge types in KindOfShape() method

This commit is contained in:
mbs 2023-05-31 19:41:55 +01:00
parent cfc267474f
commit 132bafd2dc
5 changed files with 365 additions and 3 deletions

View File

@ -515,6 +515,14 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_CREATE_SINGLE_SOLID</source> <source>GEOM_CREATE_SINGLE_SOLID</source>
<translation>Create a single solid</translation> <translation>Create a single solid</translation>
</message> </message>
<message>
<source>GEOM_CRV_BEZIER</source>
<translation>Bézier Curve</translation>
</message>
<message>
<source>GEOM_CRV_BSPLINE</source>
<translation>B-Spline Curve</translation>
</message>
<message> <message>
<source>GEOM_CURVE</source> <source>GEOM_CURVE</source>
<translation>Curve</translation> <translation>Curve</translation>
@ -555,6 +563,10 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_D2</source> <source>GEOM_D2</source>
<translation>D2 :</translation> <translation>D2 :</translation>
</message> </message>
<message>
<source>GEOM_DEGREE</source>
<translation>Degree :</translation>
</message>
<message> <message>
<source>GEOM_DETECT</source> <source>GEOM_DETECT</source>
<translation>Detect</translation> <translation>Detect</translation>
@ -864,6 +876,10 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_FILLING_TOL_3D</source> <source>GEOM_FILLING_TOL_3D</source>
<translation>Tol. 3D :</translation> <translation>Tol. 3D :</translation>
</message> </message>
<message>
<source>GEOM_FOCAL_LENGTH</source>
<translation>Focal Length :</translation>
</message>
<message> <message>
<source>GEOM_FREE_BOUNDARIES</source> <source>GEOM_FREE_BOUNDARIES</source>
<translation>Free boundaries</translation> <translation>Free boundaries</translation>
@ -948,6 +964,10 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_HOLES</source> <source>GEOM_HOLES</source>
<translation>Holes</translation> <translation>Holes</translation>
</message> </message>
<message>
<source>GEOM_HYPERBOLA</source>
<translation>Hyperbola</translation>
</message>
<message> <message>
<source>GEOM_INIT_SHAPE</source> <source>GEOM_INIT_SHAPE</source>
<translation>Initial shape</translation> <translation>Initial shape</translation>
@ -988,6 +1008,14 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_KEEP_OBJECT</source> <source>GEOM_KEEP_OBJECT</source>
<translation>Keep Object</translation> <translation>Keep Object</translation>
</message> </message>
<message>
<source>GEOM_KNOT_I</source>
<translation>Knot #%1 :</translation>
</message>
<message>
<source>GEOM_KNOTS</source>
<translation>Knots</translation>
</message>
<message> <message>
<source>GEOM_LENGTH</source> <source>GEOM_LENGTH</source>
<translation>Length :</translation> <translation>Length :</translation>
@ -1224,10 +1252,30 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_NODES</source> <source>GEOM_NODES</source>
<translation>Nodes</translation> <translation>Nodes</translation>
</message> </message>
<message>
<source>GEOM_NON_PERIODIC</source>
<translation>Non-Periodic</translation>
</message>
<message>
<source>GEOM_NUM_KNOTS</source>
<translation>Number of knots :</translation>
</message>
<message>
<source>GEOM_NUM_MULTIS</source>
<translation>Number of multiplicities :</translation>
</message>
<message>
<source>GEOM_NUM_POLES</source>
<translation>Number of poles :</translation>
</message>
<message> <message>
<source>GEOM_NUM_SPLIT_POINTS</source> <source>GEOM_NUM_SPLIT_POINTS</source>
<translation>Number of splitting points</translation> <translation>Number of splitting points</translation>
</message> </message>
<message>
<source>GEOM_NUM_WEIGHTS</source>
<translation>Number of weights :</translation>
</message>
<message> <message>
<source>GEOM_OBJECT</source> <source>GEOM_OBJECT</source>
<translation>Object</translation> <translation>Object</translation>
@ -1256,10 +1304,34 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_OFFSET_TITLE</source> <source>GEOM_OFFSET_TITLE</source>
<translation>Offset Surface</translation> <translation>Offset Surface</translation>
</message> </message>
<message>
<source>GEOM_PARABOLA</source>
<translation>Parabola</translation>
</message>
<message>
<source>GEOM_PARAMETERS</source>
<translation>Parameters</translation>
</message>
<message> <message>
<source>GEOM_PATTERN</source> <source>GEOM_PATTERN</source>
<translation>Division pattern</translation> <translation>Division pattern</translation>
</message> </message>
<message>
<source>GEOM_PERIODIC</source>
<translation>Periodic</translation>
</message>
<message>
<source>GEOM_PERIODICITY</source>
<translation>Periodicity : </translation>
</message>
<message>
<source>GEOM_POLE_I</source>
<translation>Pole #%1 : </translation>
</message>
<message>
<source>GEOM_POLES</source>
<translation>Poles</translation>
</message>
<message> <message>
<source>GEOM_PROJECTION_ON_FACE</source> <source>GEOM_PROJECTION_ON_FACE</source>
<translation>Projection on Face</translation> <translation>Projection on Face</translation>

View File

@ -515,6 +515,14 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_CREATE_SINGLE_SOLID</source> <source>GEOM_CREATE_SINGLE_SOLID</source>
<translation>Créer un solide unique</translation> <translation>Créer un solide unique</translation>
</message> </message>
<message>
<source>GEOM_CRV_BEZIER</source>
<translation>Courbe de Bézier</translation>
</message>
<message>
<source>GEOM_CRV_BSPLINE</source>
<translation>Courbe B-Spline</translation>
</message>
<message> <message>
<source>GEOM_CURVE</source> <source>GEOM_CURVE</source>
<translation>Courbe</translation> <translation>Courbe</translation>
@ -555,6 +563,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_D2</source> <source>GEOM_D2</source>
<translation>D2 :</translation> <translation>D2 :</translation>
</message> </message>
<message>
<source>GEOM_DEGREE</source>
<translation>Degré :</translation>
</message>
<message> <message>
<source>GEOM_DETECT</source> <source>GEOM_DETECT</source>
<translation>Détecter</translation> <translation>Détecter</translation>
@ -864,6 +876,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_FILLING_TOL_3D</source> <source>GEOM_FILLING_TOL_3D</source>
<translation>Tol. 3D :</translation> <translation>Tol. 3D :</translation>
</message> </message>
<message>
<source>GEOM_FOCAL_LENGTH</source>
<translation>Distance Focale :</translation>
</message>
<message> <message>
<source>GEOM_FREE_BOUNDARIES</source> <source>GEOM_FREE_BOUNDARIES</source>
<translation>Contours libres</translation> <translation>Contours libres</translation>
@ -948,6 +964,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_HOLES</source> <source>GEOM_HOLES</source>
<translation>Trous</translation> <translation>Trous</translation>
</message> </message>
<message>
<source>GEOM_HYPERBOLA</source>
<translation>Hyperbole</translation>
</message>
<message> <message>
<source>GEOM_INIT_SHAPE</source> <source>GEOM_INIT_SHAPE</source>
<translation>Objet d&apos;origine</translation> <translation>Objet d&apos;origine</translation>
@ -988,6 +1008,14 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_KEEP_OBJECT</source> <source>GEOM_KEEP_OBJECT</source>
<translation>Garder l&apos;objet</translation> <translation>Garder l&apos;objet</translation>
</message> </message>
<message>
<source>GEOM_KNOT_I</source>
<translation>Noeud #%1 :</translation>
</message>
<message>
<source>GEOM_KNOTS</source>
<translation>Noeuds</translation>
</message>
<message> <message>
<source>GEOM_LENGTH</source> <source>GEOM_LENGTH</source>
<translation>Longueur :</translation> <translation>Longueur :</translation>
@ -1224,10 +1252,30 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_NODES</source> <source>GEOM_NODES</source>
<translation>Noeuds</translation> <translation>Noeuds</translation>
</message> </message>
<message>
<source>GEOM_NON_PERIODIC</source>
<translation>Non Périodique</translation>
</message>
<message>
<source>GEOM_NUM_KNOTS</source>
<translation>Nombre de Noeuds :</translation>
</message>
<message>
<source>GEOM_NUM_MULTIS</source>
<translation>Nombre de Multiplicités :</translation>
</message>
<message>
<source>GEOM_NUM_POLES</source>
<translation>Nombre de Pôles :</translation>
</message>
<message> <message>
<source>GEOM_NUM_SPLIT_POINTS</source> <source>GEOM_NUM_SPLIT_POINTS</source>
<translation>Nombre de points de découpe</translation> <translation>Nombre de points de découpe</translation>
</message> </message>
<message>
<source>GEOM_NUM_WEIGHTS</source>
<translation>Nombre de Poids :</translation>
</message>
<message> <message>
<source>GEOM_OBJECT</source> <source>GEOM_OBJECT</source>
<translation>Objet</translation> <translation>Objet</translation>
@ -1256,10 +1304,34 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_OFFSET_TITLE</source> <source>GEOM_OFFSET_TITLE</source>
<translation>Décaler une surface</translation> <translation>Décaler une surface</translation>
</message> </message>
<message>
<source>GEOM_PARABOLA</source>
<translation>Parabole</translation>
</message>
<message>
<source>GEOM_PARAMETERS</source>
<translation>Paramètres</translation>
</message>
<message> <message>
<source>GEOM_PATTERN</source> <source>GEOM_PATTERN</source>
<translation>Schema de découpe</translation> <translation>Schema de découpe</translation>
</message> </message>
<message>
<source>GEOM_PERIODIC</source>
<translation>Périodique</translation>
</message>
<message>
<source>GEOM_PERIODICITY</source>
<translation>Périodicité : </translation>
</message>
<message>
<source>GEOM_POLE_I</source>
<translation>Pôle #%1 : </translation>
</message>
<message>
<source>GEOM_POLES</source>
<translation>Pôles</translation>
</message>
<message> <message>
<source>GEOM_PROJECTION_ON_FACE</source> <source>GEOM_PROJECTION_ON_FACE</source>
<translation>Projection sur une face</translation> <translation>Projection sur une face</translation>

View File

@ -511,6 +511,14 @@
<source>GEOM_CREATE_SINGLE_SOLID</source> <source>GEOM_CREATE_SINGLE_SOLID</source>
<translation>1 </translation> <translation>1 </translation>
</message> </message>
<message>
<source>GEOM_CRV_BEZIER</source>
<translation></translation>
</message>
<message>
<source>GEOM_CRV_BSPLINE</source>
<translation>B-</translation>
</message>
<message> <message>
<source>GEOM_CURVE</source> <source>GEOM_CURVE</source>
<translation>Curve</translation> <translation>Curve</translation>
@ -551,6 +559,10 @@
<source>GEOM_D2</source> <source>GEOM_D2</source>
<translation>D2:</translation> <translation>D2:</translation>
</message> </message>
<message>
<source>GEOM_DEGREE</source>
<translation> :</translation>
</message>
<message> <message>
<source>GEOM_DETECT</source> <source>GEOM_DETECT</source>
<translation></translation> <translation></translation>
@ -859,6 +871,10 @@
<source>GEOM_FILLING_TOL_3D</source> <source>GEOM_FILLING_TOL_3D</source>
<translation>Tol. 3D :</translation> <translation>Tol. 3D :</translation>
</message> </message>
<message>
<source>GEOM_FOCAL_LENGTH</source>
<translation> :</translation>
</message>
<message> <message>
<source>GEOM_FREE_BOUNDARIES</source> <source>GEOM_FREE_BOUNDARIES</source>
<translation></translation> <translation></translation>
@ -943,6 +959,10 @@
<source>GEOM_HOLES</source> <source>GEOM_HOLES</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_HYPERBOLA</source>
<translation></translation>
</message>
<message> <message>
<source>GEOM_INIT_SHAPE</source> <source>GEOM_INIT_SHAPE</source>
<translation></translation> <translation></translation>
@ -983,6 +1003,14 @@
<source>GEOM_KEEP_OBJECT</source> <source>GEOM_KEEP_OBJECT</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_KNOT_I</source>
<translation> #%1 :</translation>
</message>
<message>
<source>GEOM_KNOTS</source>
<translation></translation>
</message>
<message> <message>
<source>GEOM_LENGTH</source> <source>GEOM_LENGTH</source>
<translation>:</translation> <translation>:</translation>
@ -1219,10 +1247,30 @@
<source>GEOM_NODES</source> <source>GEOM_NODES</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_NON_PERIODIC</source>
<translation></translation>
</message>
<message>
<source>GEOM_NUM_KNOTS</source>
<translation> :</translation>
</message>
<message>
<source>GEOM_NUM_MULTIS</source>
<translation> :</translation>
</message>
<message>
<source>GEOM_NUM_POLES</source>
<translation> :</translation>
</message>
<message> <message>
<source>GEOM_NUM_SPLIT_POINTS</source> <source>GEOM_NUM_SPLIT_POINTS</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_NUM_WEIGHTS</source>
<translation> :</translation>
</message>
<message> <message>
<source>GEOM_OBJECT</source> <source>GEOM_OBJECT</source>
<translation></translation> <translation></translation>
@ -1251,10 +1299,34 @@
<source>GEOM_OFFSET_TITLE</source> <source>GEOM_OFFSET_TITLE</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_PARABOLA</source>
<translation></translation>
</message>
<message>
<source>GEOM_PARAMETERS</source>
<translation></translation>
</message>
<message> <message>
<source>GEOM_PATTERN</source> <source>GEOM_PATTERN</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_PERIODIC</source>
<translation></translation>
</message>
<message>
<source>GEOM_PERIODICITY</source>
<translation> : </translation>
</message>
<message>
<source>GEOM_POLE_I</source>
<translation> #%1 : </translation>
</message>
<message>
<source>GEOM_POLES</source>
<translation></translation>
</message>
<message> <message>
<source>GEOM_PROJECTION_ON_FACE</source> <source>GEOM_PROJECTION_ON_FACE</source>
<translation></translation> <translation></translation>

View File

@ -749,7 +749,7 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
break; break;
case GEOMAlgo_KN_CURVEBSPLINE: case GEOMAlgo_KN_CURVEBSPLINE:
{ {
// (+) geompy.kind.CRV_BSPLINE np nk nw nm x1 y1 z1 ... xnp ynp znp k1 ... knk w1 ... wnw m1 ... mnm // (+) geompy.kind.CRV_BSPLINE p d np nk nw nm x1 y1 z1 ... xnp ynp znp k1 ... knk w1 ... wnw m1 ... mnm
aKind = SK_CRV_BSPLINE; aKind = SK_CRV_BSPLINE;
Standard_Integer aNbPoles = anInfo.NbPoles(); Standard_Integer aNbPoles = anInfo.NbPoles();
Standard_Integer aNbKnots = anInfo.NbKnots(); Standard_Integer aNbKnots = anInfo.NbKnots();

View File

@ -263,6 +263,7 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
return aKindStr; return aKindStr;
#define PRINT_DOUBLE(val, tol) QString(" %1").arg( DlgRef::PrintDoubleValue( val, tol ) ) #define PRINT_DOUBLE(val, tol) QString(" %1").arg( DlgRef::PrintDoubleValue( val, tol ) )
#define PRINT_INTEGER(val) QString(" %1").arg( val )
#define TITLE(val) QString("<b>%1</b>").arg(tr(val)) #define TITLE(val) QString("<b>%1</b>").arg(tr(val))
#define TITLE_I(val, i) QString("<b>%1</b>").arg(tr(val).arg(i)) #define TITLE_I(val, i) QString("<b>%1</b>").arg(tr(val).arg(i))
switch ( aKind ) switch ( aKind )
@ -543,7 +544,15 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
"<br>" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) + "<br>" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
"<br>" + TITLE( "GEOM_DIMENSIONS" ) + "<br>" + TITLE( "GEOM_DIMENSIONS" ) +
"<br>" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) + "<br>" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
"<br>" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ); "<br>" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
"<br>" + TITLE( "GEOM_X_AXIS") +
"<br>" + "Xx :" + PRINT_DOUBLE( aDbls[8], aLenPrecision ) +
"<br>" + "Xy :" + PRINT_DOUBLE( aDbls[9], aLenPrecision ) +
"<br>" + "Xz :" + PRINT_DOUBLE( aDbls[10], aLenPrecision ) +
"<br>" + TITLE( "GEOM_Y_AXIS") +
"<br>" + "Yx :" + PRINT_DOUBLE( aDbls[11], aLenPrecision ) +
"<br>" + "Yy :" + PRINT_DOUBLE( aDbls[12], aLenPrecision ) +
"<br>" + "Yz :" + PRINT_DOUBLE( aDbls[13], aLenPrecision );
break; break;
case GEOM::GEOM_IKindOfShape::ARC_ELLIPSE: case GEOM::GEOM_IKindOfShape::ARC_ELLIPSE:
aKindStr = tr( "GEOM_ARC_ELLIPSE" ); aKindStr = tr( "GEOM_ARC_ELLIPSE" );
@ -565,7 +574,15 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
"<br>" + TITLE_I( "GEOM_POINT_I", 2 ) + "<br>" + TITLE_I( "GEOM_POINT_I", 2 ) +
"<br>" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11], aLenPrecision ) + "<br>" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11], aLenPrecision ) +
"<br>" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12], aLenPrecision ) + "<br>" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12], aLenPrecision ) +
"<br>" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[13], aLenPrecision ); "<br>" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[13], aLenPrecision ) +
"<br>" + TITLE( "GEOM_X_AXIS") +
"<br>" + "Xx :" + PRINT_DOUBLE( aDbls[14], aLenPrecision ) +
"<br>" + "Xy :" + PRINT_DOUBLE( aDbls[15], aLenPrecision ) +
"<br>" + "Xz :" + PRINT_DOUBLE( aDbls[16], aLenPrecision ) +
"<br>" + TITLE( "GEOM_Y_AXIS") +
"<br>" + "Yx :" + PRINT_DOUBLE( aDbls[17], aLenPrecision ) +
"<br>" + "Yy :" + PRINT_DOUBLE( aDbls[18], aLenPrecision ) +
"<br>" + "Yz :" + PRINT_DOUBLE( aDbls[19], aLenPrecision );
break; break;
case GEOM::GEOM_IKindOfShape::LINE: case GEOM::GEOM_IKindOfShape::LINE:
aKindStr = tr( "GEOM_LINE" ); aKindStr = tr( "GEOM_LINE" );
@ -589,6 +606,135 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
"<br>" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) + "<br>" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
"<br>" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ); "<br>" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[5], aLenPrecision );
break; break;
case GEOM::GEOM_IKindOfShape::CRV_BSPLINE:
{
aKindStr = tr( "GEOM_CRV_BSPLINE" );
theParameters = TITLE( "GEOM_PARAMETERS" ) +
"<br>" + tr( "GEOM_PERIODICITY" ) + tr( anInts[0] ? "GEOM_PERIODIC" : "GEOM_NON_PERIODIC") +
"<br>" + tr( "GEOM_DEGREE" ) + PRINT_INTEGER( anInts[1] ) +
"<br>" + tr( "GEOM_NUM_POLES" ) + PRINT_INTEGER( anInts[2] ) +
"<br>" + tr( "GEOM_NUM_WEIGHTS" ) + PRINT_INTEGER( anInts[4] ) +
"<br>" + tr( "GEOM_NUM_KNOTS" ) + PRINT_INTEGER( anInts[3] ) +
"<br>" + tr( "GEOM_NUM_MULTIS" ) + PRINT_INTEGER( anInts[5] ) +
"<br>" + TITLE( "GEOM_POLES" );
// Show max. 5 poles
Standard_Integer i, nb = std::min(5, anInts[2]);
if (anInts[4] == anInts[2]) {
// Each pole has a specific weight associated
Standard_Integer widx = anInts[2] * 3 + anInts[3]; // skip poles and knots
for (i=0; i<nb; i++) {
theParameters +=
"<br>" + tr( "GEOM_POLE_I" ).arg( i+1 ) +
"(" + PRINT_DOUBLE( aDbls[i*3], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+1], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+2], aLenPrecision ) +
" )\t" + PRINT_DOUBLE( aDbls[widx+i], aLenPrecision );
}
} else {
for (i=0; i<nb; i++) {
theParameters +=
"<br>" + tr( "GEOM_POLE_I" ).arg( i+1 ) + "(" + PRINT_DOUBLE( aDbls[i*3], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+1], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+2], aLenPrecision ) + " )";
}
}
if (nb < anInts[2])
theParameters += "<br>...";
// Show max. 5 knots
theParameters += "<br>" + TITLE( "GEOM_KNOTS" );
nb = std::min(5, anInts[3]);
Standard_Integer kidx = anInts[2] * 3; // skip poles
if (anInts[5] == anInts[3]) {
// Each knot has a multiplicity associated
for (i=0; i<nb; i++) {
theParameters +=
"<br>" + tr( "GEOM_KNOT_I" ).arg( i+1 ) + PRINT_DOUBLE( aDbls[kidx+i], aLenPrecision ) +
"\t" + PRINT_INTEGER( anInts[6+i] );
}
} else {
// Each pole has a uniform weight of 1 (do not show it)
for (i=0; i<nb; i++) {
theParameters +=
"<br>" + tr( "GEOM_POLE_I" ).arg( i+1 ) + PRINT_DOUBLE( aDbls[kidx+i], aLenPrecision );
}
}
if (nb < anInts[3])
theParameters = theParameters + "<br>...";
}
break;
case GEOM::GEOM_IKindOfShape::CRV_BEZIER:
{
aKindStr = tr( "GEOM_CRV_BEZIER" );
theParameters = TITLE( "GEOM_PARAMETERS" ) +
"<br>" + tr( "GEOM_NUM_POLES" ) + PRINT_INTEGER( anInts[0] ) +
"<br>" + tr( "GEOM_NUM_WEIGHTS" ) + PRINT_INTEGER( anInts[1] ) +
"<br>" + TITLE( "GEOM_POLES" );
Standard_Integer i, nb = std::min(5, anInts[0]); // show max. 5 poles
if (anInts[1] > 0) {
Standard_Integer widx = anInts[2] * 3 + anInts[3];
for (i=0; i<nb; i++) {
theParameters = theParameters +
"<br>" + tr( "GEOM_POLE_I" ).arg( i+1 ) + "(" + PRINT_DOUBLE( aDbls[i*3], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+1], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+2], aLenPrecision ) +
") " + PRINT_DOUBLE( aDbls[widx+i], aLenPrecision );
}
} else {
for (i=0; i<nb; i++) {
theParameters = theParameters +
"<br>" + tr( "GEOM_POLE_I" ).arg( i+1 ) + "(" + PRINT_DOUBLE( aDbls[i*3], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+1], aLenPrecision ) +
", " + PRINT_DOUBLE( aDbls[i*3+2], aLenPrecision ) + ")";
}
}
if (nb < anInts[0])
theParameters = theParameters + "<br>...";
}
break;
case GEOM::GEOM_IKindOfShape::HYPERBOLA:
aKindStr = tr( "GEOM_HYPERBOLA" );
theParameters = TITLE( "GEOM_CENTER" ) +
"<br>" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
"<br>" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
"<br>" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
"<br>" + TITLE( "GEOM_NORMAL" ) +
"<br>" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
"<br>" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
"<br>" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
"<br>" + TITLE( "GEOM_DIMENSIONS" ) +
"<br>" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
"<br>" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
"<br>" + TITLE( "GEOM_X_AXIS") +
"<br>" + "Xx :" + PRINT_DOUBLE( aDbls[8], aLenPrecision ) +
"<br>" + "Xy :" + PRINT_DOUBLE( aDbls[9], aLenPrecision ) +
"<br>" + "Xz :" + PRINT_DOUBLE( aDbls[10], aLenPrecision ) +
"<br>" + TITLE( "GEOM_Y_AXIS") +
"<br>" + "Yx :" + PRINT_DOUBLE( aDbls[11], aLenPrecision ) +
"<br>" + "Yy :" + PRINT_DOUBLE( aDbls[12], aLenPrecision ) +
"<br>" + "Yz :" + PRINT_DOUBLE( aDbls[13], aLenPrecision );
break;
case GEOM::GEOM_IKindOfShape::PARABOLA:
aKindStr = tr( "GEOM_PARABOLA" );
theParameters = TITLE( "GEOM_CENTER" ) +
"<br>" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0], aLenPrecision ) +
"<br>" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1], aLenPrecision ) +
"<br>" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2], aLenPrecision ) +
"<br>" + TITLE( "GEOM_NORMAL" ) +
"<br>" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3], aLenPrecision ) +
"<br>" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4], aLenPrecision ) +
"<br>" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5], aLenPrecision ) +
"<br>" + TITLE( "GEOM_DIMENSIONS" ) +
"<br>" + tr( "GEOM_FOCAL_LENGTH" ) + PRINT_DOUBLE( aDbls[6], aLenPrecision ) +
"<br>" + TITLE( "GEOM_X_AXIS") +
"<br>" + "Xx :" + PRINT_DOUBLE( aDbls[7], aLenPrecision ) +
"<br>" + "Xy :" + PRINT_DOUBLE( aDbls[8], aLenPrecision ) +
"<br>" + "Xz :" + PRINT_DOUBLE( aDbls[9], aLenPrecision ) +
"<br>" + TITLE( "GEOM_Y_AXIS") +
"<br>" + "Yx :" + PRINT_DOUBLE( aDbls[10], aLenPrecision ) +
"<br>" + "Yy :" + PRINT_DOUBLE( aDbls[11], aLenPrecision ) +
"<br>" + "Yz :" + PRINT_DOUBLE( aDbls[12], aLenPrecision );
break;
case GEOM::GEOM_IKindOfShape::EDGE: case GEOM::GEOM_IKindOfShape::EDGE:
aKindStr = tr( "GEOM_EDGE" ); aKindStr = tr( "GEOM_EDGE" );
break; break;