EgtExecutor :

- aggiunte funzioni Exe ExeSetUserLevel e ExeGetUserLevel
- aggiunta funzione Lua EgtGetUserLevel
- piccola modifica (Exe e Lua) a calcolo intersezioni piani paralleli con superficie.
This commit is contained in:
DarioS
2022-05-09 19:32:30 +02:00
parent f1d5fbfe94
commit 95c0673c72
4 changed files with 43 additions and 13 deletions
+9 -8
View File
@@ -371,7 +371,7 @@ ExeLineSurfTmInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRe
//-------------------------------------------------------------------------------
static int
MyAddPlaneStmIntersResultToGeomDB( IGeomDB * pGeomDB, const PNTVECTOR& vPnt, const BIPNTVECTOR& vBpt, const TRIA3DVECTOR& vTria,
MyAddPlaneStmIntersResultToGeomDB( IGeomDB* pGeomDB, const PNTVECTOR& vPnt, const BIPNTVECTOR& vBpt, const TRIA3DVECTOR& vTria,
const Frame3d& frOrig, const Frame3d& frDest, int nId, int nDestGrpId, const Vector3d& vtExtr,
double dToler, int& nPntCount, int& nCrvCount, int& nSrfCount)
{
@@ -494,6 +494,7 @@ MyAddPlaneStmIntersResultToGeomDB( IGeomDB * pGeomDB, const PNTVECTOR& vPnt, con
return nFirstId ;
}
//-------------------------------------------------------------------------------
static int
MyPlaneSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType, double dToler,
@@ -569,7 +570,7 @@ ExePlaneSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDe
//-------------------------------------------------------------------------------
static int
MyParPlanesSurfTmInters( const Vector3d& vtN, const Point3d& pt, const DBLVECTOR& vdDist, int nId, int nDestGrpId, int nRefType, double dToler, int& nGrpCount)
MyParPlanesSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist, int nId, int nDestGrpId, int nRefType, double dToler, int& nGrpCount)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
@@ -587,11 +588,11 @@ MyParPlanesSurfTmInters( const Vector3d& vtN, const Point3d& pt, const DBLVECTOR
return GDB_ID_NULL ;
// porto in locale la normale del piano
Point3d ptOnL = GetPointLocal( pGeomDB, ptOn, nRefType, frSurf) ;
Vector3d vtNL = GetVectorLocal( pGeomDB, vtN, nRefType, frSurf) ;
Point3d ptL = GetPointLocal( pGeomDB, pt, nRefType, frSurf) ;
// costruisco il frame dei piani
Frame3d frPlanes ;
frPlanes.Set( ptL, vtNL) ;
frPlanes.Set( ptOnL, vtNL) ;
// intersezione fra superficie e piani paralleli
IntersParPlanesSurfTm intPlStm( frPlanes, *pStm) ;
@@ -626,12 +627,12 @@ MyParPlanesSurfTmInters( const Vector3d& vtN, const Point3d& pt, const DBLVECTOR
//-------------------------------------------------------------------------------
int
ExeParPlanesSurfTmInters( const Vector3d& vtN, const Point3d& pt, const DBLVECTOR& vdDist, int nId, int nDestGrpId, int nRefType, double dToler,
ExeParPlanesSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist, int nId, int nDestGrpId, int nRefType, double dToler,
int* pnGrpCount)
{
// eseguo
int nGrpCount{ 0} ;
int nFirstId = MyParPlanesSurfTmInters( vtN, pt, vdDist, nId, nDestGrpId, nRefType, dToler, nGrpCount) ;
int nFirstId = MyParPlanesSurfTmInters( ptOn, vtN, vdDist, nId, nDestGrpId, nRefType, dToler, nGrpCount) ;
// aggiorno contatori
if ( nFirstId != GDB_ID_NULL) {
if ( pnGrpCount != nullptr)
@@ -641,8 +642,8 @@ ExeParPlanesSurfTmInters( const Vector3d& vtN, const Point3d& pt, const DBLVECTO
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtParPlanesSurfTmInters({" + ToString( vtN) + "},{" +
ToString( pt) + "},{" +
string sLua = "EgtParPlanesSurfTmInters({" + ToString( ptOn) + "},{" +
ToString( vtN) + "},{" +
ToString( vdDist) + "}," +
ToString( nId) + "," +
ToString( nDestGrpId) + "," +