EgtGeomKernel 1.5a2 : Aggiunto calcolo singolarità in Curve Bezier.
Migliorato calcolo distanza punto-curva di Bezier. Aggiunta classe PolynomialPoint3d.
This commit is contained in:
+33
-12
@@ -45,7 +45,9 @@ CreateGdbExecutor( void)
|
||||
GdbExecutor::GdbExecutor( void)
|
||||
{
|
||||
m_pGDB = nullptr ;
|
||||
// alias predefiniti
|
||||
// dimensioni mappa dei nomi
|
||||
m_NameMap.rehash( 100) ;
|
||||
// nomi predefiniti
|
||||
m_NameMap.insert( pair< string, int>( "$ROOT", GDB_ID_ROOT)) ;
|
||||
m_NameMap.insert( pair< string, int>( "$NN", ID_NO)) ;
|
||||
}
|
||||
@@ -73,13 +75,16 @@ GdbExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR&
|
||||
|
||||
|
||||
// output di debug
|
||||
sOut = "Cmd = [" + sCmd1 + "][" + sCmd2 + "] Par = [" ;
|
||||
sOut = " " + sCmd1 ;
|
||||
if ( ! sCmd2.empty())
|
||||
sOut += "." + sCmd2 ;
|
||||
sOut += "( " ;
|
||||
for ( theConstIter = vsParams.begin() ; theConstIter != vsParams.end() ; ++theConstIter) {
|
||||
if ( theConstIter != vsParams.begin())
|
||||
sOut += "][" ;
|
||||
sOut += ", " ;
|
||||
sOut += *theConstIter ;
|
||||
}
|
||||
sOut += "]" ;
|
||||
sOut += ")" ;
|
||||
LOG_DBG_INFO( GetEGkLogger(), sOut.c_str())
|
||||
|
||||
// esecuzione comando
|
||||
@@ -1061,13 +1066,29 @@ GdbExecutor::ExecuteOutScl( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
}
|
||||
// emetto gruppo
|
||||
else if ( sCmd2 == "PUTGR") {
|
||||
int nFlag ;
|
||||
int nId ;
|
||||
// un parametro
|
||||
if ( vsParams.size() != 1)
|
||||
STRVECTOR vsNames ;
|
||||
STRVECTOR::iterator Iter ;
|
||||
// almeno un parametro
|
||||
if ( vsParams.size() < 1)
|
||||
return false ;
|
||||
nId = GetIdParam( vsParams[0]) ;
|
||||
// emetto gruppo e suoi sottoposti
|
||||
return OutGroupScl( nId) ;
|
||||
// se esiste il secondo
|
||||
if ( vsParams.size() == 2)
|
||||
FromString( vsParams[1], nFlag) ;
|
||||
else
|
||||
nFlag = 0 ;
|
||||
// recupero lista nomi
|
||||
if ( ! GetNamesParam( vsParams[0], vsNames))
|
||||
return false ;
|
||||
// esecuzione
|
||||
for ( Iter = vsNames.begin() ; Iter != vsNames.end() ; ++Iter) {
|
||||
// recupero l'oggetto ed eseguo l'output
|
||||
nId = GetIdParam( *Iter) ;
|
||||
if ( ! OutGroupScl( nId, nFlag))
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
// emetto oggetto geometrico
|
||||
else if ( sCmd2 == "PUT") {
|
||||
@@ -1101,7 +1122,7 @@ GdbExecutor::ExecuteOutScl( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::OutGroupScl( int nId)
|
||||
GdbExecutor::OutGroupScl( int nId, int nFlag)
|
||||
{
|
||||
bool bNext ;
|
||||
int nParentId ;
|
||||
@@ -1126,11 +1147,11 @@ GdbExecutor::OutGroupScl( int nId)
|
||||
while ( bNext) {
|
||||
nGdbType = Iter.GetGdbType() ;
|
||||
if ( nGdbType == GDB_GEO) {
|
||||
if ( ! m_OutScl.PutCurve( Iter.GetGeoObj(), 0))
|
||||
if ( ! m_OutScl.PutCurve( Iter.GetGeoObj(), nFlag))
|
||||
return false ;
|
||||
}
|
||||
else if ( nGdbType == GDB_GROUP) {
|
||||
if ( ! OutGroupScl( Iter.GetId()))
|
||||
if ( ! OutGroupScl( Iter.GetId(), nFlag))
|
||||
return false ;
|
||||
}
|
||||
bNext = Iter.GoToNext() ;
|
||||
|
||||
Reference in New Issue
Block a user