EgtGeomKernel 2.3h1 :

- piccole migliorie suggerite da clang-cl.
This commit is contained in:
DarioS
2021-08-01 10:50:15 +02:00
parent d0f9c2fff5
commit a5fad89380
5 changed files with 125 additions and 124 deletions
BIN
View File
Binary file not shown.
+117 -117
View File
@@ -57,7 +57,7 @@
using namespace std ;
//----------------------------------------------------------------------------
// Per Id di entità
// Per Id di entità
static const int ID_NO = -99 ;
// Per tipo di costruzione di poligono
static const int POLYG_INSCR = 1 ;
@@ -189,7 +189,7 @@ GdbExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR&
LOG_ERROR( GetEGkLogger(), "Error : null GeomDb in GdbExecutor.")
return ER_ERR ;
}
// verifico validità CmdParser
// verifico validità CmdParser
if ( m_pParser == nullptr) {
LOG_ERROR( GetEGkLogger(), "Error : null CmdParser in GdbExecutor.")
return ER_ERR ;
@@ -218,7 +218,7 @@ GdbExecutor::ExecuteGroup( const string& sCmd2, const STRVECTOR& vsParams)
// 2 o 3 parametri : Id, Id del padre[, Frame]
if ( vsParams.size() != 2 && vsParams.size() != 3)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -236,7 +236,7 @@ GdbExecutor::ExecuteGroup( const string& sCmd2, const STRVECTOR& vsParams)
// 3 parametri : Id, Id del padre, Orig
if ( vsParams.size() != 3)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -253,7 +253,7 @@ GdbExecutor::ExecuteGroup( const string& sCmd2, const STRVECTOR& vsParams)
// creo il gruppo
int nIdDest = GetIdParam( vsParams[0], true) ;
int nIdNew = m_pGDB->AddGroup( nIdDest, GetIdParam( vsParams[1]), frFrame) ;
// se IdDest da calcolare, può essere una variabili a cui cambiare il valore
// se IdDest da calcolare, può essere una variabili a cui cambiare il valore
if ( nIdDest == GDB_ID_NULL)
m_pParser->SetVariable( vsParams[0], nIdNew) ;
@@ -270,7 +270,7 @@ GdbExecutor::ExecutePoint( const string& sCmd2, const STRVECTOR& vsParams)
// 3 parametri : Id, IdParent e punto
if ( vsParams.size() != 3)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frPnt ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frPnt))
return false ;
@@ -289,7 +289,7 @@ GdbExecutor::ExecutePoint( const string& sCmd2, const STRVECTOR& vsParams)
// 4 : Id, IdParent, ptP, vtV
if ( vsParams.size() != 4)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frPnt ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frPnt))
return false ;
@@ -351,7 +351,7 @@ GdbExecutor::VectorMake( const STRVECTOR& vsParams)
// 3 o 4 parametri : Id, IdParent, Vettore [, ScaleFactor]
if ( vsParams.size() != 3 && vsParams.size() != 4)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frVect ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frVect))
return false ;
@@ -378,7 +378,7 @@ GdbExecutor::VectorFromSpherical( const STRVECTOR& vsParams)
// 5 parametri : Id, IdParent, dLen, dAngVertDeg, dAngOrizzDeg
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frVect ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frVect))
return false ;
@@ -386,7 +386,7 @@ GdbExecutor::VectorFromSpherical( const STRVECTOR& vsParams)
double dLen ;
if ( ! GetLengthParam( vsParams[2], dLen))
return false ;
// recupero l'angolo in verticale (non c'è metodo generale)
// recupero l'angolo in verticale (non c'è metodo generale)
double dAngVertDeg ;
if ( ! FromString( vsParams[3], dAngVertDeg))
return false ;
@@ -410,7 +410,7 @@ GdbExecutor::VectorCrossProduct( const STRVECTOR& vsParams)
// 4 o 5 parametri : Id, IdParent, vtV1, vtV2 [, bNorm]
if ( vsParams.size() != 4 && vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frVect ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frVect))
return false ;
@@ -444,7 +444,7 @@ GdbExecutor::VectorDifference( const STRVECTOR& vsParams)
// 4 o 5 parametri : Id, IdParent, ptP1, ptP2 [, bNorm]
if ( vsParams.size() != 4 && vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frVect ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frVect))
return false ;
@@ -478,7 +478,7 @@ GdbExecutor::VectorBaseVector( const STRVECTOR& vsParams)
// 4 o 5 parametri : Id, IdParent, PtBase, Vettore [, ScaleFactor]
if ( vsParams.size() != 4 && vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frVect ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frVect))
return false ;
@@ -512,7 +512,7 @@ GdbExecutor::VectorModifyBase( const STRVECTOR& vsParams)
return false ;
// indice dell'oggetto
int nId = GetIdParam( vsParams[0]) ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frVect ;
if ( ! m_pGDB->GetGlobFrame( nId, frVect))
return false ;
@@ -537,7 +537,7 @@ GdbExecutor::ExecuteFrame( const string& sCmd2, const STRVECTOR& vsParams)
// 3 parametri : Id, ParentId, Frame
if ( vsParams.size() != 3)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -557,7 +557,7 @@ GdbExecutor::ExecuteFrame( const string& sCmd2, const STRVECTOR& vsParams)
// 5 parametri : Id, ParentId, ptOrig, ptOnX, ptNearY
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -579,7 +579,7 @@ GdbExecutor::ExecuteFrame( const string& sCmd2, const STRVECTOR& vsParams)
// 4 parametri
if ( vsParams.size() != 4)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -634,7 +634,7 @@ GdbExecutor::CurveLineMake( const STRVECTOR& vsParams)
// 4 parametri : Id, IdParent, ptStart, ptEnd
if ( vsParams.size() != 4)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -664,7 +664,7 @@ GdbExecutor::CurveLineVersorLength( const STRVECTOR& vsParams)
// 5 parametri : Id, IdParent, ptStart, vtDir, dLen
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -698,7 +698,7 @@ GdbExecutor::CurveLineDirLength( const STRVECTOR& vsParams)
// 5 parametri : Id, IdParent, ptStart, dAngDeg, dLen
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -863,7 +863,7 @@ GdbExecutor::CurveLineMinPointCurve( const STRVECTOR& vsParams)
// porto il punto nel riferimento della curva
Point3d ptSloc = ptStart ;
ptSloc.LocToLoc( frPoint, frCurve) ;
// recupero eventuale parametro per discriminare tra più soluzioni
// recupero eventuale parametro per discriminare tra più soluzioni
double dNearParam ;
if ( vsParams.size() < 5 || ! FromString( vsParams[4], dNearParam))
dNearParam = 0 ;
@@ -962,7 +962,7 @@ GdbExecutor::CurveCircleMake( const STRVECTOR& vsParams)
// 5 parametri
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -996,7 +996,7 @@ GdbExecutor::CurveCirclePlaneXY( const STRVECTOR& vsParams)
// 4 parametri
if ( vsParams.size() != 4)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1026,7 +1026,7 @@ GdbExecutor::CurveArcMake( const STRVECTOR& vsParams)
// 8 parametri
if ( vsParams.size() != 8)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1072,7 +1072,7 @@ GdbExecutor::CurveArcPlaneXY( const STRVECTOR& vsParams)
// 7 parametri
if ( vsParams.size() != 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1114,7 +1114,7 @@ GdbExecutor::CurveArcCircle3P( const STRVECTOR& vsParams, bool bCirc)
// 5 parametri : Id, ParentId, ptP0, ptP1, ptP2
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1148,7 +1148,7 @@ GdbExecutor::CurveArc2PDi( const STRVECTOR& vsParams)
// 5 parametri : Id, ParentId, ptPi, ptPf, dDiri
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1164,7 +1164,7 @@ GdbExecutor::CurveArc2PDi( const STRVECTOR& vsParams)
double dDirI ;
if ( ! GetDirParam( vsParams[4], frRef, dDirI))
return false ;
// calcolo l'arco (in casi particolari può essere una retta)
// calcolo l'arco (in casi particolari può essere una retta)
ICurve* pCurve = GetArc2PD( ptPi, ptPf, dDirI) ;
if ( pCurve == nullptr)
return false ;
@@ -1179,7 +1179,7 @@ GdbExecutor::CurveArc2PRS( const STRVECTOR& vsParams)
// 5 o 6 parametri : Id, ParentId, ptPi, ptPf, dRad[, CCW/CW]
if ( vsParams.size() != 5 && vsParams.size() != 6)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1217,7 +1217,7 @@ GdbExecutor::CurveArcC2P( const STRVECTOR& vsParams)
// 5 parametri : Id, ParentId, ptCen, ptPi, ptNearPf
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1251,7 +1251,7 @@ GdbExecutor::CurveCircleCenterTgArc( const STRVECTOR& vsParams)
// 5 parametri : Id, ParentId, ptCen, IdArc, ptNear
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frDest ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frDest))
return false ;
@@ -1297,7 +1297,7 @@ GdbExecutor::CurveArcCenterTgArcP( const STRVECTOR& vsParams)
// 6 parametri : Id, ParentId, ptCen, IdArc, ptNearTg, ptNearEnd
if ( vsParams.size() != 6)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frDest ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frDest))
return false ;
@@ -1349,7 +1349,7 @@ GdbExecutor::CurveArcPDiTgArc( const STRVECTOR& vsParams)
// 6 parametri : Id, ParentId, ptStart, dirStart, IdArc, ptNear
if ( vsParams.size() != 6)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frDest ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frDest))
return false ;
@@ -1382,7 +1382,7 @@ GdbExecutor::CurveArcPDiTgArc( const STRVECTOR& vsParams)
return false ;
Point3d ptNtloc = ptNear ;
ptNtloc.LocToLoc( frDest, frTgArc) ;
// calcolo l'arco (in casi particolari può essere una linea)
// calcolo l'arco (in casi particolari può essere una linea)
ICurve* pCurve = GetArcPntDirTgCurve( ptSloc, FromPolar( 1, dDirI), *pTgArc, ptNtloc, Z_AX) ;
if ( pCurve == nullptr)
return false ;
@@ -1521,7 +1521,7 @@ GdbExecutor::ExecuteCurveBez( const string& sCmd2, const STRVECTOR& vsParams)
// inizializzo la curva di Bezier
if ( ! pCrvBez->Init( nDeg, false))
return false ;
// recupero il riferimento in cui è immersa
// recupero il riferimento in cui è immersa
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1547,7 +1547,7 @@ GdbExecutor::ExecuteCurveBez( const string& sCmd2, const STRVECTOR& vsParams)
// inizializzo la curva di Bezier
if ( ! pCrvBez->Init( nDeg, true))
return false ;
// recupero il riferimento in cui è immersa
// recupero il riferimento in cui è immersa
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1949,7 +1949,7 @@ GdbExecutor::CurveCompoFromPolygon( const STRVECTOR& vsParams, int nType)
int nNumLati ;
if ( ! FromString( vsParams[2], nNumLati))
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -1994,7 +1994,7 @@ GdbExecutor::CurveCompoFromBiarc( const STRVECTOR& vsParams)
// 6 o 7 parametri : Id, IdParent, ptP1, Dir1, ptP2, Dir2 [, Par]
if ( vsParams.size() != 6 && vsParams.size() != 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -2074,7 +2074,7 @@ GdbExecutor::CurveCompoExtractCurve( const STRVECTOR& vsParams, bool bEndOrStart
Frame3d frSou ;
if ( ! m_pGDB->GetGlobFrame( nIdCCompo, frSou))
return false ;
// estraggo la opportuna entità
// estraggo la opportuna entità
PtrOwner<ICurve> pCrv( pCrvCompo->RemoveFirstOrLastCurve( bEndOrStart)) ;
// se 1 solo parametro -> cancellazione
if ( vsParams.size() == 1)
@@ -2161,7 +2161,7 @@ GdbExecutor::ExecuteSurfTriMesh( const string& sCmd2, const STRVECTOR& vsParams)
else if ( sCmd2 == "COMP" || sCmd2 == "DOCOMPACTING") {
return SurfTriMeshDoCompacting( vsParams) ;
}
// se unione di due o più superfici per cucitura
// se unione di due o più superfici per cucitura
else if ( sCmd2 == "SEW" || sCmd2 == "DOSEWING") {
return SurfTriMeshDoSewing( vsParams) ;
}
@@ -2395,7 +2395,7 @@ GdbExecutor::SurfTriMeshByExtrusion( const STRVECTOR& vsParams)
CurveLocal CrvLoc( m_pGDB, nCrvId, frDest) ;
if ( CrvLoc.Get() == nullptr)
return false ;
// recupero il vettore di estrusione (già in locale)
// recupero il vettore di estrusione (già in locale)
Vector3d vtExtr ;
if ( ! GetVectorParam( vsParams[3], frDest, vtExtr))
return false ;
@@ -2471,7 +2471,7 @@ GdbExecutor::SurfTriMeshByScrewing( bool bMove, const STRVECTOR& vsParams)
// recupero la tolleranza lineare
if ( vsParams.size() == 7)
FromString( vsParams[6], dLinTol) ;
// non c'é movimento lungo l'asse
// non c'é movimento lungo l'asse
}
// recupero il riferimento del gruppo destinazione
Frame3d frDest ;
@@ -2642,7 +2642,7 @@ GdbExecutor::SurfTrimeshClonePart( const STRVECTOR& vsParams)
// Parametri : IdNew, IdOld, IdParent, nPart
if ( vsParams.size() != 4)
return false ;
// Recupero il riferimento in cui è immerso
// Recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[2]), frRef))
return false ;
@@ -2785,7 +2785,7 @@ GdbExecutor::VolZmapCreate( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptO, dLengthX, dLengthY, dLengthZ, dPrec [, bTriDexel]
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -2829,7 +2829,7 @@ GdbExecutor::VolZmapCreateFromFlatRegion( const STRVECTOR& vsParams)
// parametri : Id, IdParent, idCurv, dPrec, dLengthZ [, bTriDexel]
if ( vsParams.size() < 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -2867,7 +2867,7 @@ GdbExecutor::VolZmapCreateFromTriMesh( const STRVECTOR& vsParams)
// parametri : Id, IdParent, idSurf, dPrec, bFlag
if ( vsParams.size() != 5)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -2900,7 +2900,7 @@ GdbExecutor::VolZmapMilling( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptPs, ptPe, vtVs, vtVe, dLinTol, dAngTolDeg (dLinTol e dAngTol sono per lavo con gen tool), bType
if ( vsParams.size() != 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3019,7 +3019,7 @@ bool GdbExecutor::VolZmapDeepnessMeasure( const STRVECTOR& vsParams) {
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
if ( pZmap == nullptr)
return false ;
// recupero il riferimento in cui è immerso lo Zmap
// recupero il riferimento in cui è immerso lo Zmap
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3051,7 +3051,7 @@ GdbExecutor::VolZmapBBoxZmapIntersection( const STRVECTOR& vsParams)
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
if ( pZmap == nullptr)
return false ;
// recupero il riferimento in cui è immerso lo Zmap
// recupero il riferimento in cui è immerso lo Zmap
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3096,7 +3096,7 @@ GdbExecutor::VolZmapBBoxZmapIntersection( const STRVECTOR& vsParams)
// VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
// if ( pZmap == nullptr)
// return false ;
// // recupero il riferimento in cui è immerso lo Zmap
// // recupero il riferimento in cui è immerso lo Zmap
// Frame3d frRef ;
// if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
// return false ;
@@ -3143,7 +3143,7 @@ GdbExecutor::VolZmapBBoxZmapIntersection( const STRVECTOR& vsParams)
// VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
// if ( pZmap == nullptr)
// return false;
// // recupero il riferimento in cui è immerso lo Zmap
// // recupero il riferimento in cui è immerso lo Zmap
// Frame3d frRef ;
// if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
// return false ;
@@ -3213,7 +3213,7 @@ GdbExecutor::LineDiscInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptDisc, ptLine, vtDisc, vtLine, dRad
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3281,7 +3281,7 @@ GdbExecutor::RayDiscInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptDisc, ptLine, vtDisc, vtLine, dRad
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3349,7 +3349,7 @@ GdbExecutor::SegmentDiscInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptDisc, ptLine, vtDisc, vtLine, dRad, dLen
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3421,7 +3421,7 @@ GdbExecutor::LineSphereInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptC, ptP, vtV, dRad
if ( vsParams.size() < 6)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3472,7 +3472,7 @@ GdbExecutor::RaySphereInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptC, ptP, vtV, dRad
if ( vsParams.size() < 6)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3530,7 +3530,7 @@ GdbExecutor::SegmentSphereInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptC, ptP, vtV, dRad, dLen
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3594,7 +3594,7 @@ GdbExecutor::LineSemiSphereInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptC, ptP, vtSphOr, vtV, dRad
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3651,7 +3651,7 @@ GdbExecutor::RaySemiSphereInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptC, ptP, vtSphOr, vtV, dRad
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3714,7 +3714,7 @@ GdbExecutor::SegmentSemiSphereInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptC, ptP, vtSphOr, vtV, dRad, dLen
if ( vsParams.size() < 8)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3783,7 +3783,7 @@ GdbExecutor::LinCompSemiSphereInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptC, ptP, vtSphOr, vtV, dRad, dLen, nLinType
if ( vsParams.size() < 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3854,7 +3854,7 @@ GdbExecutor::LineInfiniteCylinderInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptCyl, ptLine, vtCyl, vtLine, dRad
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3923,7 +3923,7 @@ GdbExecutor::RayInfiniteCylinderInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptCyl, ptLine, vtCyl, vtLine, dRad
if ( vsParams.size() < 7)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -3992,7 +3992,7 @@ GdbExecutor::SegmentInfiniteCylinderInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptCyl, ptLine, vtCyl, vtLine, dRad, dLen
if ( vsParams.size() < 8)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4064,7 +4064,7 @@ GdbExecutor::SegmentCylinderInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptCyl, ptLine, vtCyl, vtLine, dRad, dCylHeigth, dLen
if ( vsParams.size() < 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4140,7 +4140,7 @@ GdbExecutor::SegmentConeInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptVCone, ptLine, vtCone, vtLine, dRad, dCylHeigth, dLen
if ( vsParams.size() < 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4221,7 +4221,7 @@ GdbExecutor::LineTruncateConeInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptMinBase, ptLine, vtCone, vtLine, dMinRad, dMaxRad, dConeHeigth
if ( vsParams.size() < 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4303,7 +4303,7 @@ GdbExecutor::RayTruncateConeInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptMinBase, ptLine, vtCone, vtLine, dMinRad, dMaxRad, dConeHeigth
if ( vsParams.size() < 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4384,7 +4384,7 @@ GdbExecutor::SegmentTruncateConeInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptMinBase, ptLine, vtCone, vtLine, dMinRad, dMaxRad, dConeHeigth
if ( vsParams.size() < 10)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4469,7 +4469,7 @@ GdbExecutor::LineTorusInters( const STRVECTOR& vsParams)
{ // parametri : Id, IdParent, ptTorus, ptLine, vtTorus, vtLine, dMinRad, dMaxRad,
if ( vsParams.size() < 8)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4584,7 +4584,7 @@ GdbExecutor::RayTorusInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptTorus, ptLine, vtTorus, vtLine, dMinRad, dMaxRad,
if ( vsParams.size() < 8)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4734,7 +4734,7 @@ GdbExecutor::SegmentTorusInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptTorus, ptLine, vtTorus, vtLine, dMinRad, dMaxRad, dSgLen
if ( vsParams.size() < 9)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -4903,7 +4903,7 @@ GdbExecutor::LinCompTorusPartInters( const STRVECTOR& vsParams)
// parametri : Id, IdParent, ptTorus, ptLine, vtTorus, vtLine, dMinRad, dMaxRad, dSgLen, nLinType
if ( vsParams.size() < 10)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -5124,7 +5124,7 @@ GdbExecutor::ExecuteDistPointTrimesh( const std::string& sCmd2, const STRVECTOR&
// parametri : Id, IdMovedTria, IdParent, ptP, idSurf
if ( vsParams.size() != 4)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -5228,7 +5228,7 @@ GdbExecutor::TextSimple( const STRVECTOR& vsParams)
// parametri : Id, ParentId, Text, Point, AngDeg, H
if ( vsParams.size() != 6)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -5266,7 +5266,7 @@ GdbExecutor::TextComplete( const STRVECTOR& vsParams)
// parametri : Id, ParentId, Text, Point, AngDeg, Font, W, Italic, H, Rat, AddAdv, PosIns
if ( vsParams.size() != 12)
return false ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
@@ -5486,7 +5486,7 @@ GdbExecutor::AddGeoObj( const string& sId, const string& sIdParent, IGeoObj* pGe
// creo il gruppo
int nId = GetIdParam( sId, true) ;
int nIdNew = m_pGDB->AddGeoObj( nId, GetIdParam( sIdParent), pGeoObj) ;
// se nId da calcolare, può essere una variabile a cui cambiare il valore
// se nId da calcolare, può essere una variabile a cui cambiare il valore
if ( nId == GDB_ID_NULL)
m_pParser->SetVariable( sId, nIdNew) ;
@@ -5600,9 +5600,9 @@ GdbExecutor::GetVectorParam( const string& sParam, const Frame3d& frVect, Vector
// ci deve essere almeno un parametro
if ( vsParams.size() < 1)
return false ;
// recupero l'indice dell'entità indicata dal primo parametro
// recupero l'indice dell'entità indicata dal primo parametro
int nIdEnt = GetIdParam( vsParams[0]) ;
// recupero il riferimento in cui è immersa
// recupero il riferimento in cui è immersa
Frame3d frEnt ;
if ( ! m_pGDB->GetGlobFrame( nIdEnt, frEnt))
return false ;
@@ -5623,7 +5623,7 @@ GdbExecutor::GetVectorParam( const string& sParam, const Frame3d& frVect, Vector
return false ;
}
}
// se entità geometrica
// se entità geometrica
const IGeoObj* pGObj ;
if ( ( pGObj = m_pGDB->GetGeoObj( nIdEnt)) != nullptr) {
// se curva
@@ -5659,7 +5659,7 @@ GdbExecutor::GetVectorParam( const string& sParam, const Frame3d& frVect, Vector
return false ;
return vtV.LocToLoc( frEnt, frVect) ;
}
case 'N' : // versore direzione nel punto più vicino a punto dato
case 'N' : // versore direzione nel punto più vicino a punto dato
{
// secondo parametro : punto di riferimento
Point3d ptRef ;
@@ -5669,7 +5669,7 @@ GdbExecutor::GetVectorParam( const string& sParam, const Frame3d& frVect, Vector
ICurve::Side nSide = ICurve::FROM_MINUS ;
if ( vsParams.size() >= 3 && vsParams[2] == "+")
nSide = ICurve::FROM_PLUS ;
// calcolo il parametro del punto della curva più vicino al punto di riferimento
// calcolo il parametro del punto della curva più vicino al punto di riferimento
DistPointCurve dstPC( ptRef, *pCrv) ;
int nFlag ;
double dU ;
@@ -5723,7 +5723,7 @@ GdbExecutor::GetVectorParam( const string& sParam, const Frame3d& frVect, Vector
}
return false ;
}
// altrimenti nome di vettore già nel DB
// altrimenti nome di vettore già nel DB
else {
int nIdEnt = GetIdParam( sParam) ;
const IGeoVector3d* pV ;
@@ -5742,7 +5742,7 @@ GdbExecutor::GetVectorParam( const string& sParam, const Frame3d& frVect, Vector
bool
GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d& ptP)
{
// se insieme di 2 o 3 coordinate (considerate già nel riferimento frPnt)
// se insieme di 2 o 3 coordinate (considerate già nel riferimento frPnt)
if ( sParam[0] == '(') {
// divido in parti
STRVECTOR vsParams ;
@@ -5766,7 +5766,7 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
else
return false ;
}
// se altrimenti punto predefinito ORIG (considerato già nel riferimento frPnt)
// se altrimenti punto predefinito ORIG (considerato già nel riferimento frPnt)
else if ( sParam == "ORIG") {
ptP = ORIG ;
return true ;
@@ -5784,9 +5784,9 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
// ci deve essere almeno un parametro
if ( vsParams.size() < 1)
return false ;
// recupero l'indice dell'entità indicata dal primo parametro
// recupero l'indice dell'entità indicata dal primo parametro
int nIdEnt = GetIdParam( vsParams[0]) ;
// recupero il riferimento in cui è immersa
// recupero il riferimento in cui è immersa
Frame3d frEnt ;
if ( ! m_pGDB->GetGlobFrame( nIdEnt, frEnt))
return false ;
@@ -5801,7 +5801,7 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
return false ;
}
}
// se entità geometrica
// se entità geometrica
const IGeoObj* pGObj ;
if ( ( pGObj = m_pGDB->GetGeoObj( nIdEnt)) != nullptr) {
// se curva
@@ -5835,13 +5835,13 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
return false ;
return ptP.LocToLoc( frEnt, frPnt) ;
}
case 'N' : // punto più vicino a punto dato
case 'N' : // punto più vicino a punto dato
{
// secondo parametro : punto di riferimento
Point3d ptRef ;
if ( vsParams.size() < 2 || ! GetPointParam( vsParams[1], frEnt, ptRef))
return false ;
// calcolo il punto della curva più vicino al punto di riferimento
// calcolo il punto della curva più vicino al punto di riferimento
DistPointCurve dstPC( ptRef, *pCrv) ;
int nFlag ;
if ( ! dstPC.GetMinDistPoint( 0, ptP, nFlag))
@@ -5859,11 +5859,11 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
const ICurve* pCrv2 = GetCurve( pGObj2) ;
if ( pCrv2 == nullptr)
return false ;
// recupero il riferimento in cui è immersa
// recupero il riferimento in cui è immersa
Frame3d frEnt2 ;
if ( ! m_pGDB->GetGlobFrame( nIdEnt2, frEnt2))
return false ;
// se il riferimento è diverso da quello della prima entità, devo trasformarla
// se il riferimento è diverso da quello della prima entità, devo trasformarla
PtrOwner<ICurve> pcrvTrans( nullptr) ;
if ( ! AreSameFrame( frEnt, frEnt2)) {
pcrvTrans.Set( pCrv2->Clone()) ;
@@ -5876,7 +5876,7 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
Point3d ptRef ;
if ( vsParams.size() >= 3 && ! GetPointParam( vsParams[2], frEnt, ptRef))
return false ;
// calcolo il punto di intersezione sulla prima curva più vicino al punto di riferimento
// calcolo il punto di intersezione sulla prima curva più vicino al punto di riferimento
IntersCurveCurve intCC( *pCrv, *pCrv2, true) ;
if ( ! intCC.GetIntersPointNearTo( 0, ptRef, ptP))
return false ;
@@ -5938,7 +5938,7 @@ GdbExecutor::GetPointParam( const string& sParam, const Frame3d& frPnt, Point3d&
}
return false ;
}
// altrimenti nome di punto già nel DB
// altrimenti nome di punto già nel DB
else {
int nIdEnt = GetIdParam( sParam) ;
const IGeoPoint3d* pPt ;
@@ -6015,7 +6015,7 @@ GdbExecutor::GetPointWParam( const string& sParam, const Frame3d& frPnt, Point3d
FromString( vsParams[1], ptP.y) &&
FromString( vsParams[2], dW)) ;
}
// se 2 parti, nome di punto predefinito, punto notevole o già nel DB e un peso
// se 2 parti, nome di punto predefinito, punto notevole o già nel DB e un peso
else if ( vsParams.size() == 2) {
// recupero il punto
if ( ! GetPointParam( vsParams[0], frPnt, ptP))
@@ -6065,7 +6065,7 @@ GdbExecutor::GetLengthParam( const string& sParam, double& dLen)
// ci deve essere almeno un parametro
if ( vsParams.size() < 1)
return false ;
// recupero l'entità indicata dal primo parametro
// recupero l'entità indicata dal primo parametro
const IGeoObj* pGObj ;
if ( ( pGObj = m_pGDB->GetGeoObj( GetIdParam( vsParams[0]))) == nullptr)
return false ;
@@ -6088,7 +6088,7 @@ GdbExecutor::GetLengthParam( const string& sParam, double& dLen)
// ci deve essere almeno un parametro
if ( vsParams.size() < 1)
return false ;
// recupero l'entità indicata dal primo parametro
// recupero l'entità indicata dal primo parametro
const IGeoObj* pGObj ;
if ( ( pGObj = m_pGDB->GetGeoObj( GetIdParam( vsParams[0]))) == nullptr)
return false ;
@@ -6124,12 +6124,12 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
// ci deve essere almeno un parametro
if ( vsParams.size() < 1)
return false ;
// recupero l'entità indicata dal primo parametro
// recupero l'entità indicata dal primo parametro
int nIdEnt = GetIdParam( vsParams[0]) ;
const IGeoObj* pGObj ;
if ( ( pGObj = m_pGDB->GetGeoObj( nIdEnt)) == nullptr)
return false ;
// recupero il riferimento in cui è immersa
// recupero il riferimento in cui è immersa
Frame3d frEnt ;
if ( ! m_pGDB->GetGlobFrame( nIdEnt, frEnt))
return false ;
@@ -6143,7 +6143,7 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
if ( ! pCrv->GetStartDir( vtDir) || ! vtDir.LocToLoc( frEnt, frDir))
return false ;
vtDir.ToSpherical( nullptr, nullptr, &dDir) ;
// se esiste un secondo parametro è un offset di rotazione
// se esiste un secondo parametro è un offset di rotazione
if ( vsParams.size() >= 2) {
double dOffsetDeg = 0 ;
FromString( vsParams[1], dOffsetDeg) ;
@@ -6154,7 +6154,7 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
if ( ! pCrv->GetEndDir( vtDir) || ! vtDir.LocToLoc( frEnt, frDir))
return false ;
vtDir.ToSpherical( nullptr, nullptr, &dDir) ;
// se esiste un secondo parametro è un offset di rotazione
// se esiste un secondo parametro è un offset di rotazione
if ( vsParams.size() >= 2) {
double dOffsetDeg = 0 ;
FromString( vsParams[1], dOffsetDeg) ;
@@ -6165,7 +6165,7 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
if ( ! pCrv->GetMidDir( vtDir) || ! vtDir.LocToLoc( frEnt, frDir))
return false ;
vtDir.ToSpherical( nullptr, nullptr, &dDir) ;
// se esiste un secondo parametro è un offset di rotazione
// se esiste un secondo parametro è un offset di rotazione
if ( vsParams.size() >= 2) {
double dOffsetDeg = 0 ;
FromString( vsParams[1], dOffsetDeg) ;
@@ -6196,7 +6196,7 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
}
return true ;
}
case 'N' : // versore direzione nel punto più vicino a punto dato
case 'N' : // versore direzione nel punto più vicino a punto dato
{
// secondo parametro : punto di riferimento
Point3d ptRef ;
@@ -6206,7 +6206,7 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
ICurve::Side nSide = ICurve::FROM_MINUS ;
if ( vsParams.size() >= 3 && vsParams[2] == "+")
nSide = ICurve::FROM_PLUS ;
// calcolo il parametro del punto della curva più vicino al punto di riferimento
// calcolo il parametro del punto della curva più vicino al punto di riferimento
DistPointCurve dstPC( ptRef, *pCrv) ;
int nFlag ;
double dU ;
@@ -6236,7 +6236,7 @@ GdbExecutor::GetDirParam( const string& sParam, const Frame3d& frDir, double& dD
Vector3d vtDir = pGVect->GetVector() ;
vtDir.LocToLoc( frEnt, frDir) ;
vtDir.ToSpherical( nullptr, nullptr, &dDir) ;
// se esiste un secondo parametro è un offset di rotazione
// se esiste un secondo parametro è un offset di rotazione
if ( vsParams.size() >= 2) {
double dOffsetDeg = 0 ;
FromString( vsParams[1], dOffsetDeg) ;
@@ -6294,7 +6294,7 @@ GdbExecutor::GetFrameParam( const string& sParam, const Frame3d& frRef, Frame3d&
STRVECTOR::iterator Iter ;
for ( Iter = vsParams.begin() ; Iter != vsParams.end() ; ++Iter)
Trim( (*Iter), " \t\r\n") ;
// se c'è un parametro è l'origine
// se c'è un parametro è l'origine
Point3d ptOrig ;
if ( vsParams.size() >= 1) {
if ( ! GetPointParam( vsParams[0], frRef, ptOrig))
@@ -6325,11 +6325,11 @@ GdbExecutor::GetFrameParam( const string& sParam, const Frame3d& frRef, Frame3d&
}
return true ;
}
// altrimenti nome di gruppo o di frame già nel DB
// altrimenti nome di gruppo o di frame già nel DB
else {
// identificativo
int nIdEnt = GetIdParam( sParam) ;
// recupero il riferimento in cui è immerso
// recupero il riferimento in cui è immerso
Frame3d frEnt ;
if ( ! m_pGDB->GetGlobFrame( nIdEnt, frEnt))
return false ;
@@ -6337,7 +6337,7 @@ GdbExecutor::GetFrameParam( const string& sParam, const Frame3d& frRef, Frame3d&
if ( m_pGDB->GetGroupFrame( nIdEnt, frF)) {
return frF.LocToLoc( frEnt, frRef) ;
}
// altrimenti entità geometrica
// altrimenti entità geometrica
else {
// verifico se riferimento
const IGeoFrame3d* pFr ;
@@ -6393,7 +6393,7 @@ GdbExecutor::GetColorParam( const string& sParam, bool& bByParent, Color& cCol)
// ci deve essere un parametro
if ( vsParams.size() != 1)
return false ;
// recupero il colore dell'entità indicata dal parametro
// recupero il colore dell'entità indicata dal parametro
bByParent = false ;
return m_pGDB->GetCalcMaterial( GetIdParam( vsParams[0]), cCol) ;
}
@@ -6427,7 +6427,7 @@ GdbExecutor::GetMaterialParam( const string& sParam, bool& bByParent, int& nMat)
// ci deve essere un parametro
if ( vsParams.size() != 1)
return false ;
// recupero il materiale dell'entità indicata dal parametro
// recupero il materiale dell'entità indicata dal parametro
bByParent = false ;
return ( m_pGDB->GetCalcMaterial( GetIdParam( vsParams[0]), nMat) && nMat != GDB_MT_COLOR) ;
}
@@ -6975,7 +6975,7 @@ GdbExecutor::ExecuteCopy( const string& sCmd2, const STRVECTOR& vsParams)
nIdNew = m_pGDB->CopyGlob( GetIdParam( vsParams[0]), nIdDest, GetIdParam( vsParams[2]), nSonBeforeAfter) ;
else
nIdNew = m_pGDB->Copy( GetIdParam( vsParams[0]), nIdDest, GetIdParam( vsParams[2]), nSonBeforeAfter) ;
// se IdDest da calcolare, può essere una variabile a cui cambiare il valore
// se IdDest da calcolare, può essere una variabile a cui cambiare il valore
if ( nIdDest == GDB_ID_NULL)
m_pParser->SetVariable( vsParams[1], nIdNew) ;
@@ -7877,7 +7877,7 @@ GdbExecutor::ExecuteOutTextIcci( const string& sCmd2, const STRVECTOR& vsParams)
// devono essere 6 parametri : IdText, IdGroup, IdEnt1, IdEnt2, ptText, hText
if ( vsParams.size() != 6)
return false ;
// recupero l'indice delle entità
// recupero l'indice delle entità
int nIdEnt1 = GetIdParam( vsParams[2]) ;
int nIdEnt2 = GetIdParam( vsParams[3]) ;
// verifico siano due curve
@@ -7894,7 +7894,7 @@ GdbExecutor::ExecuteOutTextIcci( const string& sCmd2, const STRVECTOR& vsParams)
Frame3d frEnt2 ;
if ( ! m_pGDB->GetGlobFrame( nIdEnt2, frEnt2))
return false ;
// se i riferimenti sono diversi, porto la seconda entità nel riferimento della prima
// se i riferimenti sono diversi, porto la seconda entità nel riferimento della prima
PtrOwner<ICurve> pcrvTrans ;
if ( ! AreSameFrame( frEnt1, frEnt2)) {
pcrvTrans.Set( pCrv2->Clone()) ;
@@ -7953,7 +7953,7 @@ GdbExecutor::ExecuteOutTextIcci( const string& sCmd2, const STRVECTOR& vsParams)
}
}
}
// recupero il riferimento in cui è immerso il testo
// recupero il riferimento in cui è immerso il testo
Frame3d frText ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frText))
return false ;
@@ -8090,7 +8090,7 @@ bool
GdbExecutor::OutGroupTsc( int nId, int nFlag, int nLev)
{
m_OutTsc.Remark( "Start Group ---") ;
// emetto dati gruppo ( se non è radice)
// emetto dati gruppo ( se non è radice)
if ( nId > GDB_ID_ROOT) {
Frame3d frFrame ;
if ( ( nLev == 0 && m_pGDB->GetGroupGlobFrame( nId, frFrame)) ||
@@ -8113,7 +8113,7 @@ GdbExecutor::OutGroupTsc( int nId, int nFlag, int nLev)
}
}
}
// emetto entità gruppo
// emetto entità gruppo
m_OutTsc.Remark( "Entities :") ;
GdbIterator Iter( m_pGDB) ;
bool bNext = Iter.GoToFirstInGroup( nId) ;
+3 -2
View File
@@ -32,8 +32,9 @@ using namespace std ;
//----------------------------------------------------------------------------
GdbObj::GdbObj( void)
: m_nId( GDB_ID_NULL), m_pAttribs( nullptr), m_pTxrData( nullptr), m_pUserObj( nullptr),
m_pSelPrev( nullptr), m_pSelNext( nullptr),
m_pGDB( nullptr), m_pNext( nullptr), m_pPrev( nullptr), m_pParent( nullptr)
m_pGDB( nullptr), m_pNext( nullptr), m_pPrev( nullptr), m_pParent( nullptr),
m_pSelNext( nullptr), m_pSelPrev( nullptr)
{
}
+3 -3
View File
@@ -27,9 +27,9 @@ using namespace std ;
//----------------------------------------------------------------------------
Tool::Tool( bool bApproxWithLines)
: m_dLinTol( LIN_TOL_STD), m_dAngTolDeg( ANG_TOL_APPROX_DEG), m_nType( UNDEF), m_nCurrentNum( 0), m_dHeight( 0), m_dTipHeight( 0),
m_dRadius( 0), m_dRCorner( 0), m_dTipRadius( 0), m_dRefRadius( 0), m_dCutterHeight( 0), m_dMrtChsWidth( 0), m_dMrtChsThickness( 0),
m_bApproxWithLines( bApproxWithLines)
: m_bApproxWithLines( bApproxWithLines), m_dLinTol( LIN_TOL_STD), m_dAngTolDeg( ANG_TOL_APPROX_DEG),
m_nType( UNDEF), m_nCurrentNum( 0), m_dHeight( 0), m_dTipHeight( 0), m_dRadius( 0), m_dRCorner( 0),
m_dTipRadius( 0), m_dRefRadius( 0), m_dCutterHeight( 0), m_dMrtChsWidth( 0), m_dMrtChsThickness( 0)
{
}
+2 -2
View File
@@ -34,8 +34,8 @@ GEOOBJ_REGISTER( VOL_ZMAP, NGE_V_ZMP, VolZmap) ;
//----------------------------------------------------------------------------
VolZmap::VolZmap(void)
: m_nStatus( TO_VERIFY), m_nMapNum( 0), m_nNumBlock( 0), m_nConnectedCompoCount( 0), m_dStep( 10.0),
m_nVoxNumPerBlock( N_VOXBLOCK), m_nDexVoxRatio( 1), m_nShape( GENERIC), m_Tool( true)
: m_nStatus( TO_VERIFY), m_dStep( 10.0), m_nMapNum( 0), m_nShape( GENERIC), m_nVoxNumPerBlock( N_VOXBLOCK),
m_nDexVoxRatio( 1), m_nNumBlock( 0), m_nConnectedCompoCount( 0), m_Tool( true)
{
for ( int i = 0 ; i < N_MAPS ; ++ i) {
m_nNx[i] = 0 ;