EgtGeomKernel 1.5g2 :
- aggiunte intersezioni tra linee ed archi - aggiunte intersezioni tra archi e archi - aggiunte funzioni di utilità per angoli.
This commit is contained in:
+16
-6
@@ -1831,8 +1831,8 @@ GdbExecutor::CurveCompoAddCurve( const STRVECTOR& vsParams, bool bEndOrStart)
|
||||
bool
|
||||
GdbExecutor::CurveCompoExtractCurve( const STRVECTOR& vsParams, bool bEndOrStart)
|
||||
{
|
||||
// 3 parametri : IdSou, IdDest, IdParent
|
||||
if ( vsParams.size() != 3)
|
||||
// 1 o 3 parametri : IdSou[, IdDest, IdParent]
|
||||
if ( vsParams.size() != 1 && vsParams.size() != 3)
|
||||
return false ;
|
||||
// recupero la curva composita e il suo riferimento
|
||||
int nIdCCompo = GetIdParam( vsParams[0]) ;
|
||||
@@ -1843,7 +1843,10 @@ GdbExecutor::CurveCompoExtractCurve( const STRVECTOR& vsParams, bool bEndOrStart
|
||||
if ( ! m_pGDB->GetGlobFrame( nIdCCompo, frSou))
|
||||
return false ;
|
||||
// estraggo la opportuna entità
|
||||
ICurve* pCrv = pCrvCompo->RemoveFirstOrLastCurve( bEndOrStart) ;
|
||||
PtrOwner<ICurve> pCrv( pCrvCompo->RemoveFirstOrLastCurve( bEndOrStart)) ;
|
||||
// se 1 solo parametro -> cancellazione
|
||||
if ( vsParams.size() == 1)
|
||||
return true ;
|
||||
// recupero il riferimento del gruppo destinazione
|
||||
Frame3d frDest ;
|
||||
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[2]), frDest))
|
||||
@@ -1852,7 +1855,7 @@ GdbExecutor::CurveCompoExtractCurve( const STRVECTOR& vsParams, bool bEndOrStart
|
||||
if ( ! AreSameFrame( frSou, frDest))
|
||||
pCrv->LocToLoc( frSou, frDest) ;
|
||||
// inserisco la curva estratta nel DB
|
||||
return AddGeoObj( vsParams[1], vsParams[2], pCrv) ;
|
||||
return AddGeoObj( vsParams[1], vsParams[2], ::Release( pCrv)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -3162,6 +3165,13 @@ GdbExecutor::GetPointWParam( const string& sParam, const Frame3d& frPnt, Point3d
|
||||
FromString( vsParams[2], ptP.z) &&
|
||||
FromString( vsParams[3], dW)) ;
|
||||
}
|
||||
// se 3 parti, sono 2 coordinate e un peso
|
||||
else if ( vsParams.size() == 3) {
|
||||
ptP.z = 0 ;
|
||||
return ( FromString( vsParams[0], ptP.x) &&
|
||||
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
|
||||
else if ( vsParams.size() == 2) {
|
||||
// recupero il punto
|
||||
@@ -4594,12 +4604,12 @@ GdbExecutor::SplitCurveByClass( const STRVECTOR& vsParams)
|
||||
if ( nIdGrp[nGrp] < GDB_ID_ROOT)
|
||||
continue ;
|
||||
// se curva praticamente nulla, vado oltre
|
||||
if ( fabs( ccClass[i].dParS - ccClass[i].dParE) < 10 * EPS_PARAM)
|
||||
if ( fabs( ccClass[i].dParE - ccClass[i].dParS) < 10 * EPS_PARAM)
|
||||
continue ;
|
||||
// copio la parte di curva che interessa e la porto nel riferimento del gruppo
|
||||
PtrOwner<ICurve> pSplit( pCrv->CopyParamRange( ccClass[i].dParS, ccClass[i].dParE)) ;
|
||||
if ( ! ::IsValid( pSplit))
|
||||
return false ;
|
||||
continue ;
|
||||
pSplit->LocToLoc( frCrv, frGrp[nGrp]) ;
|
||||
// la inserisco nel gruppo
|
||||
if ( m_pGDB->AddGeoObj( GDB_ID_NULL, nIdGrp[nGrp], ::Release( pSplit)) == GDB_ID_NULL)
|
||||
|
||||
Reference in New Issue
Block a user