diff --git a/EGkVolZmap.h b/EGkVolZmap.h index cfc8b89..6b02796 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -17,6 +17,7 @@ #include "/EgtDev/Include/EGkPolyLine.h" #include "/EgtDev/Include/EGkCurveComposite.h" #include "/EgtDev/Include/EGkSurfFlatRegion.h" +#include "/EgtDev/Include/EGkSurfTriMesh.h" #include "/EgtDev/Include/EGkTriangle3d.h" @@ -25,8 +26,9 @@ class __declspec( novtable) IVolZmap : public IGeoObj { public : virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ; - virtual bool CreateMap( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dPrec) = 0 ; - virtual bool CreateMapFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dPrec) = 0 ; + virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dPrec) = 0 ; + virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dPrec) = 0 ; + virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dPrec) = 0 ; virtual bool GetAllTriangles( TRIA3DLIST& lstTria) const = 0 ; virtual bool GetDexelLines( int nDir, int nPos1, int nPos2, POLYLINELIST& lstPL) const = 0 ; virtual bool SetTolerances( double dLinTol, double dAngTolDeg = 90) = 0 ; @@ -35,8 +37,8 @@ class __declspec( novtable) IVolZmap : public IGeoObj double dH, double dR, double dTipH, double dTipR, double dCornR) = 0 ; 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 Deepness( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength) = 0 ; - virtual bool BBoxZmapIntersection( const Frame3d& frBBox, const Point3d& ptMax) = 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 ; } ; //----------------------------------------------------------------------------- diff --git a/EXeExecutor.h b/EXeExecutor.h index 246796f..92bcb17 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -260,6 +260,7 @@ EXE_EXPORT int ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, b EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, double dDimY, double dDimZ, double dPrec, int nRefType) ; EXE_EXPORT int ExeCreateVolZmapByRegionExtrusion( int nParentId, int nSfrId, double dDimZ, double dPrec) ; +EXE_EXPORT int ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec) ; // GeomDB PartLayer EXE_EXPORT bool ExeIsPart( int nPartId) ; @@ -457,6 +458,9 @@ EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, EXE_EXPORT bool ExeVolZmapSetStdTool( int nId, const std::string& sToolName, double dLen, double dDiam, double dCornR) ; EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs, const Point3d& ptPe, const Vector3d& vtD, int nRefTypee) ; +EXE_EXPORT bool ExeVolZmapGetDepth( int nId, const Point3d& ptP, const Vector3d& vtDir, int nRefType, + double& dInLen, double& dOutLen) ; +EXE_EXPORT bool ExeVolZmapAvoidBox( int nId, const Frame3d& frBox, const Vector3d& vtDiag, int nRefType) ; // Geo Snap Vector/Point/Frame EXE_EXPORT bool ExeStartPoint( int nId, int nRefId, Point3d& ptP) ; diff --git a/EgtNumUtils.h b/EgtNumUtils.h new file mode 100644 index 0000000..e63169c --- /dev/null +++ b/EgtNumUtils.h @@ -0,0 +1,28 @@ +//---------------------------------------------------------------------------- +// EgalTech 2016-2016 +//---------------------------------------------------------------------------- +// File : EgtNumBase.h Data : 05.11.16 Versione : 1.6w1 +// Contenuto : Funzioni numeriche di base. +// +// +// +// Modifiche : 05.11.16 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +//---------------------------------------------------------------------------- +inline +int Clamp( int nVal, int nMin, int nMax) +{ + return ( nVal <= nMin ? nMin : nVal >= nMax ? nMax : nVal) ; +} + +//---------------------------------------------------------------------------- +inline +double Clamp( double dVal, double dMin, double dMax) +{ + return ( dVal <= dMin ? dMin : dVal >= dMax ? dMax : dVal) ; +}