diff --git a/EGkChainCurves.h b/EGkChainCurves.h index 22ee429..bb70224 100644 --- a/EGkChainCurves.h +++ b/EGkChainCurves.h @@ -55,6 +55,9 @@ class ChainCurves { return m_bIsFork ; } //! Restituisce il vettore con gli Id delle entità tra cui scegliere sulla biforcazione EGK_EXPORT bool GetForkIds( INTVECTOR& vForkIds) ; + //! Restituisce la tolleranza effettivamente usata + EGK_EXPORT double GetTolerance( void) + { return m_dToler ; } private : typedef std::unordered_set INTUSET ; diff --git a/EGkPlane3d.h b/EGkPlane3d.h index 363c89d..219ad36 100644 --- a/EGkPlane3d.h +++ b/EGkPlane3d.h @@ -94,6 +94,13 @@ DistPointPlane( const Point3d& ptP, const Plane3d& plPlane) return ((( ptP - ORIG) * plPlane.vtN) - plPlane.dDist) ; } +//----------------------------------------------------------------------------- +inline bool +PointInPlaneEpsilon( const Point3d& ptP, const Plane3d& plPlane, double dToler) +{ + return ( fabs( (( ptP - ORIG) * plPlane.vtN) - plPlane.dDist) < dToler) ; +} + //----------------------------------------------------------------------------- inline bool PointInPlaneApprox( const Point3d& ptP, const Plane3d& plPlane) diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 0741114..78ca632 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -47,7 +47,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf double dAngRot, double dStepRot) = 0 ; virtual bool CreateByScrewing( const PolyLine& PL, const Point3d& ptAx, const Vector3d& vtAx, double dAngRot, double dStepRot, double dMove) = 0 ; - virtual bool DoCompacting( void) = 0 ; + virtual bool DoCompacting( double dTol = EPS_SMALL) = 0 ; virtual bool DoSewing( const ISurfTriMesh& stmOther, const Frame3d& frOther = GLOB_FRM) = 0 ; virtual int GetVertexCount( void) const = 0 ; virtual int GetTriangleCount( void) const = 0 ; diff --git a/EGkVolZmap.h b/EGkVolZmap.h index 2020b2e..2398951 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -32,6 +32,7 @@ class __declspec( novtable) IVolZmap : public IGeoObj virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dPrec, bool bTriDex) = 0 ; virtual bool GetAllTriangles( TRIA3DLIST& lstTria) const = 0 ; virtual int GetBlockCount( void) const = 0 ; + virtual int GetPartCount( void) const = 0 ; virtual bool GetTriangles( bool bAllBlocks, INTVECTOR& nModifiedBlocks, TRIA3DLISTVECTOR& vLstTria) const ; virtual bool GetDexelLines( int nDir, int nPos1, int nPos2, POLYLINELIST& lstPL) const = 0 ; virtual bool SetTolerances( double dLinTol, double dAngTolDeg = 90) = 0 ; @@ -43,8 +44,9 @@ class __declspec( novtable) IVolZmap : public IGeoObj virtual bool SetGenTool( const std::string& sToolName, const ICurveComposite* pToolOutline) = 0 ; virtual bool MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d& ptPe, const Vector3d& vtDe) = 0 ; virtual bool MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs, const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) = 0 ; - virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength) = 0 ; - virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag) = 0 ; + virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength) const = 0 ; + virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag) const = 0 ; + virtual IVolZmap* ClonePart( int nPart) const = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EXeExecutor.h b/EXeExecutor.h index f31e3b9..91d93e3 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -469,6 +469,7 @@ EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; EXE_EXPORT bool ExeCutSurfTm( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ; // GeomDb Volume Modify +EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ; EXE_EXPORT bool ExeVolZmapSetStdTool( int nId, const std::string& sToolName, double dLen, double dDiam, double dCornR) ; EXE_EXPORT bool ExeVolZmapSetAdvTool( int nId, const std::string& sToolName, double dLen, double dDiam, double dTipLen, double dTipDiam, double dCornR) ; @@ -532,6 +533,7 @@ EXE_EXPORT bool ExeSurfTmFacetNearestMidPoint( int nId, int nFacet, const Point3 EXE_EXPORT bool ExeSurfTmFacetCenter( int nId, int nFacet, int nRefId, Point3d& ptCen, Vector3d& vtN) ; EXE_EXPORT bool ExeSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool& bAdjac, Point3d& ptP1, Point3d& ptP2, double& dAng) ; +EXE_EXPORT int ExeVolZmapPartCount( int nId) ; EXE_EXPORT bool ExeTextNormVersor( int nId, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeTextGetContent( int nId, std::string& sText) ; EXE_EXPORT bool ExePointToIdGlob( Point3d& ptP, int nId) ;