//---------------------------------------------------------------------------- // EgalTech 2015-2019 //---------------------------------------------------------------------------- // File : VolZmap.h Data : 07.03.19 Versione : 2.1c2 // Contenuto : Dichiarazione della classe Volume Zmap. // // // // Modifiche : 22.01.15 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "ObjGraphicsMgr.h" #include "GeoObjRW.h" #include "CurveComposite.h" #include "SurfFlatRegion.h" #include "CurveLine.h" #include "Tool.h" #include "/EgtDev/Include/EGkVolZmap.h" #include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkVector3d.h" #include "/EgtDev/Include/ENkPolynomialRoots.h" #include "/EgtDev/Include/EgkIntersLinesurfTm.h" #include #include // ------------------------- STRUTTURE ----------------------------------------------------------- struct AppliedVector { Point3d ptPApp ; Vector3d vtVec ; int nPropIndex ; } ; //---------------------------------------------------------------------------- class VolZmap : public IVolZmap, public IGeoObjRW { public : // IGeoObj ~VolZmap( void) override ; VolZmap* Clone( void) const override ; GeoObjType GetType( void) const override ; bool IsValid( void) const override { return ( m_nStatus == OK) ; } const std::string& GetTitle( void) const override ; bool Dump( std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const override ; bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const override ; bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const override ; bool Translate( const Vector3d& vtMove) override ; bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) override { double dAngRad = dAngDeg * DEGTORAD ; return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) override ; bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) override ; bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) override ; bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) override ; bool ToGlob( const Frame3d& frRef) override ; bool ToLoc( const Frame3d& frRef) override ; bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) override ; void SetObjGraphics( IObjGraphics* pOGr) override { m_OGrMgr.SetObjGraphics( pOGr) ; } IObjGraphics* GetObjGraphics( void) override { return m_OGrMgr.GetObjGraphics() ; } const IObjGraphics* GetObjGraphics( void) const override { return m_OGrMgr.GetObjGraphics() ; } void SetTempProp( int nProp) override { m_nTempProp = nProp ; } int GetTempProp( void) override { return m_nTempProp ; } public : // IVolZmap bool CopyFrom( const IGeoObj* pGObjSrc) override ; bool Clear( void) override ; bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex) override ; bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dStep, bool bTriDex) override ; bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dStep, bool bTriDex) override ; int GetBlockCount( void) const override ; int GetBlockUpdatingCounter( int nBlock) const override ; bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const override ; bool GetVolume( double& dVol) const override ; int GetPartCount( void) const override ; bool GetPartVolume( int nPart, double& dVol) const override ; bool GetDexelLines( int nDir, int nPos1, int nPos2, POLYLINELIST& lstPL) const override ; bool SetTolerances( double dLinTol, double dAngTolDeg = 90) override ; bool SetStdTool( const std::string& sToolName, double dH, double dR, double dCornR, int nFlag) override ; bool SetAdvTool( const std::string& sToolName, double dH, double dR, double dTipH, double dTipR, double dCornR, int nFlag) override ; bool SetSawTool( const std::string& sToolName, double dH, double dR, double dThick, double dStemR, double dCornR, int nFlag) override ; bool SetGenTool( const std::string& sToolName, const ICurveComposite* pToolOutline, int nFlag) override ; bool SetMortiserTool( const std::string& sToolName, double dH, double dW, double dTh, double dRc, int nFlag) override ; bool SetChiselTool( const std::string& sToolName, double dH, double dW, double dTh, int nFlag) override ; const ICurveComposite& GetToolOutline( bool bApprox = false) const override { return ( bApprox ? m_Tool.GetApproxOutline() : m_Tool.GetOutline()) ;} bool MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d& ptPe, const Vector3d& vtDe) override ; bool MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs, const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) override ; bool GetDepth( const Point3d& ptP, const Vector3d& vtD, double& dInLength, double& dOutLength, bool bExact) const override ; bool GetDepthWithDexel( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength) const ; bool GetDepthWithVoxel( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bEnh) const ; bool GetPlaneIntersection( const Plane3d& plPlane, ICURVEPOVECTOR& vpLoop) const override ; bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag) const override ; bool AvoidSphere( const Point3d& ptCenter, double dRad) const override ; bool AvoidCylinder( const Frame3d& frCyl, double dL, double dR) const override ; VolZmap* ClonePart( int nPart) const override ; bool RemovePart( int nPart) override ; bool Cut( const Plane3d& plPlane) override ; bool Compact( void) override ; public : // IGeoObjRW int GetNgeId( void) const override ; bool Save( NgeWriter& ngeOut) const override ; bool Load( NgeReader& ngeIn) override ; public : VolZmap( void) ; VolZmap( const VolZmap& stSrc) { if ( ! CopyFrom( stSrc)) LOG_ERROR( GetEGkLogger(), "VolZmap : copy constructor error") } VolZmap& operator =( const VolZmap& stSrc) { if ( ! CopyFrom( stSrc)) LOG_ERROR( GetEGkLogger(), "VolZmap : copy error") return *this ; } private : enum CubeType { VOX_EXTERN = 1, VOX_ON_BOUNDARY = 0, VOX_INNER = -1} ; // Per la creazione dei rettangoli grandi struct HeigthAndColor { int nTool ; double dHeigth ; HeigthAndColor( void) : nTool( 0), dHeigth( 0) {} HeigthAndColor( int nT, double dH) : nTool( nT), dHeigth( dH) {} } ; typedef std::unordered_map FlatVoxelContainer ; // Struttura indici di voxel struct VoxelIndexes { int nI, nJ, nK ; } ; // Struttura per componenti connesse struct ConComp { Point3d ptVert ; Vector3d vtNullSpace ; AppliedVector CompVecField[7] ; int nVertNum ; bool bInside ; bool bCorner ; } ; // Struttura per Voxel struct Voxel { int i, j, k ; int nNumComp ; ConComp Compo[4] ; } ; // Triangoli sharp-feature struct SharpTriaStruct { int i, j, k ; PNTVECTOR ptCompoVert ; std::vector vCompoTria ; std::vector vbFlipped ; } ; // Triangoli smooth struct SmoothTriaStruct { int i, j, k ; TRIA3DEXVECTOR vTria ; }; // Vettore di SharpTriaStruct con sharp feature typedef std::vector SharpTriHolder ; // Vettore di SmoothTriaStruct con triangoli smooth typedef std::vector SmoothTriHolder ; // Vettore di SharpTriHolder con sharp feature: il primo indice individua il blocco, il secondo il voxel typedef std::vector SharpTriaMatrix ; // Vettore di SmoothTriHolder smooth: il primo indice individua il blocco, il secondo il voxel typedef std::vector SmoothTriaMatrix ; // Tavola hash di Voxel typedef std::unordered_map VoxelContainer ; // Unordered map per la coerenza topologica typedef std::unordered_map InterVoxMatter ; private : bool CopyFrom( const VolZmap& clSrc) ; bool ResetGraphics( void) ; bool GetChunkPrisms( int nPos1, int nPos2, int nDim1, int nDim2, int nDimChk, int nBlock) const ; bool CalcChunkPrisms( int nPos1, int nPos2, int nDim1, int nDim2, int nBlock) const ; bool CalcDexelPrisms( int nPos1, int nPos2, int nBlock) const ; bool AddDexelSideFace( int nPos, int nPosAdj, const Point3d& ptP, const Point3d& ptQ, const Vector3d& vtZ, const Vector3d& vtNorm, int nBlock) const ; bool ProcessCell( int nGrid, int nCellI, int nCellJ, const Plane3d& plPlane, std::vector& vLine) const ; bool UpdateSingleMapGraphics( void) const ; bool UpdateTripleMapGraphics( void) const ; bool ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const ; bool RegulateFeaturesChain( std::vector& vVecVox) const ; bool CreateSharpFeatureTriangle( int nBlock, const VoxelContainer& vVox) const ; bool CreateSmoothTriangle( int nIndex, int nVertNum, AppliedVector TriVert[], bool bWasSharp, SmoothTriaStruct& VoxSmoothTria) const ; bool FlipEdgesII( int nBlock) const ; bool FlipEdgesBB() const ; bool IsThereMat( int nI, int nJ, int nK) const ; bool InOut( const Plane3d& plPlane, int nGrid, int nI, int nJ) const ; int CalcIndex( int nI, int nJ, int nK) const ; int CalcIndexForPlaneCells( const Plane3d& plPlane, int nGrid, int nCellI, int nCellJ) const ; bool IntersPos( int nVec1[], int nVec2[], bool bFirstCorner, AppliedVector& vfField) const ; bool IsPointInsideVoxelApprox( int nI, int nJ, int nK, const Point3d& ptP, double dPrec = EPS_SMALL) const ; bool GetPointVoxel( const Point3d& ptP, int& nVoxI, int& nVoxJ, int& nVoxK) const ; bool IsZInsideInterval( int nGrid, int nDex, double dZ) const ; // Per regolarizzazione della catena di feature bool FindAdjComp( const std::vector& vVecVox, int nCurBlock, int nCurVox, int nCurComp, INTVECTOR& vAdjBlockVoxComp, INTVECTOR& vAdjBordBlockVoxComp) const ; // OPERAZIONI SU INTERVALLI bool SubtractIntervals( int nGrid, int nI, int nJ, double dMin, double dMax, const Vector3d& vtNMin, const Vector3d& vtNMax) ; bool AddIntervals( int nGrid, int nI, int nJ, double dMin, double dMax, const Vector3d& vtNMin, const Vector3d& vtNMax) ; // SOTTRAZIONI // UTENSILI // Asse di simmetria parallelo a Z bool CylBall_ZDrilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool CylBall_ZPerp( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool CylBall_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_ZDrilling( int nGrid, const Point3d & ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_ZPerp( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Mrt_ZDrilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool Mrt_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool Chs_ZDrilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool Chs_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool GenTool_ZDrilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool GenTool_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; // Asse di simmetria nel piano bool CylBall_XYDrilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool CylBall_XYPerp( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool CylBall_XYMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_XYDrilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_XYPerp( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_XYMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; // Asse di simmetria con orientazione generica bool CylBall_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool CylBall_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Conus_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool Mrt_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool Mrt_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; // E' in realtà un Perp bool Chs_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool Chs_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; // E' in realtà un Perp bool GenTool_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; bool GenTool_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir) ; // COMPONENTI // Asse di simmetria diretto come l'asse Z bool CompCyl_ZDrilling( int nGrid, const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtToolDir, double dHei, double dRad) ; bool CompConus_ZDrilling( int nGrid, const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad) ; bool CompPar_ZDrilling( int nGrid, double dLenX, double dLenY, double dLenZ, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool CompCyl_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dRad) ; bool CompConus_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad) ; bool CompPar_ZMilling( int nGrid, double dLenX, double dLenY, double dLenZ, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; // E' in realtà MillingPerp // Asse di simmetria con orientazione generica bool CompCyl_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dRad, bool bTapB, bool bTapT) ; bool CompConus_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad, bool bTapB, bool bTapT) ; bool CompPar_Drilling( int nGrid, double dLenX, double dLenY, double dLenZ, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; bool CompCyl_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dRad, bool bTapB, bool bTapT) ; bool CompConus_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad, bool bTapB, bool bTapT) ; bool CompPar_Milling( int nGrid, double dLenX, double dLenY, double dLenZ, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, const Vector3d& vtAux) ; // E' in realtà MillingPerp // Generica traslazione sfera bool CompBall_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, double dRad) ; // BBox per utensili e solidi semplici con movimenti di traslazione inline bool TestToolBBox( int nGrid, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtV, int& nStI, int& nStJ, int& nEnI, int& nEnJ) ; inline bool TestCompoBBox( int nGrid, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtV, double dRad, double dTipRad, double dHei, int& nStI, int& nStJ, int& nEnI, int& nEnJ) ; inline bool TestParaBBox( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtD, const Vector3d& vtA, double dLenX, double dLenY, double dLenZ, int& nStI, int& nStJ, int& nEnI, int& nEnJ) ; // Intersezioni bool IntersLineBox( const Point3d& ptP, const Vector3d& vtV, const Point3d& ptMin, const Point3d& ptMax) const ; bool IntersLineBox( const Point3d& ptP, const Vector3d& vtV, const Point3d& ptMin, const Point3d& ptMax, double& dU1, double& dU2) const ; bool IntersLineZMapLattice( const Point3d& ptP, const Vector3d& vtV, double& dU1, double& dU2) const ; bool IntersLineZMapBBox( const Point3d& ptP, const Vector3d& vtV, double& dU1, double& dU2) const ; bool IntersLineDexel( const Point3d& ptP, const Vector3d& vtV, int nGrid, int nI, int nJ, double& dU1, double& dU2) const ; bool IntersRayDexel( const Point3d& ptP, const Vector3d& vtV, int nGrid, int nI, int nJ, double& dU1, double& dU2) const ; bool IntersLineCylinder( const Point3d& ptLineSt, const Vector3d& vtLineDir, const Frame3d& CylFrame, double dH, double dRad, bool bTapLow, bool bTapUp, Point3d& ptInt1, Vector3d& vtN1, Point3d& ptInt2, Vector3d& vtN2) ; bool IntersLineEllipticalCylinder( const Point3d& ptLineSt, const Vector3d& vtLineDir, const Frame3d& CircFrame, double dRad, double dLongMvLen, double dOrtMvLen, bool bTapLow, bool bTapUp, Point3d& ptInt1, Vector3d& vtN1, Point3d& ptInt2, Vector3d& vtN2) ; bool IntersLineConus( const Point3d& ptLineSt, const Vector3d& vtLineDir, const Frame3d& ConusFrame, double dTan, double dMinH, double dMaxH, bool bTapLow, bool bTapUp, Point3d& ptInt1, Vector3d& vtN1, Point3d& ptInt2, Vector3d& vtN2) ; bool IntersLineMyPolyhedron( const Point3d& ptLineSt, const Vector3d& vtLineDir, const Frame3d& PolyFrame, double dLenX, double dLenY, double dLenZ, double dDeltaX, Point3d& ptInt1, Vector3d& vtN1, Point3d& ptInt2, Vector3d& vtN2) ; bool TestIntersPlaneZmapBBox( const Plane3d& plPlane) const ; // Voxel: esistenza e passaggio da N a ijk per i voxel bool IsValidVoxel( int nN) const ; bool IsValidVoxel( int nI, int nJ, int nK) const ; bool GetVoxIJKFromN( int nN, int& nI, int& nJ, int& nK) const ; bool GetVoxNFromIJK( int nI, int nJ, int nK, int& nN) const ; // Funzioni di gestione dei blocchi bool GetBlockIJKFromN( int nBlock, int nIJK[]) const ; bool GetBlockNFromIJK( int nIJK[], int& nBlock) const ; bool GetBlockLimitsIJK( const int nIJK[], int nLimits[]) const ; bool GetVoxelBlockIJK( const int nVoxIJK[], int nBlockIJK[]) const ; bool SetToModifyDexelBlocks( int nGrid, int nDex, int nInt) ; bool GetAdjBlockToBlock( int nBlockN, int nDeltaI, int nDeltaJ, int nDeltaK, int& nAdjBlockN) const ; bool IsAVoxelOnBoundary( const int nLimits[], const int nIJK[], bool bType) const ; bool IsAVoxelOnBoundary( const int nLimits[], const int nIJK[], int nDeltaIndex[]) const ; bool GetFirstVoxIJK( int& i, int& j, int& k) const ; bool GetLastVoxIJK( int& i, int& j, int& k) const ; bool IsVoxelOnBoxEdge( int i, int j, int k) const ; bool CheckForFanNodeInterferance( AppliedVector CompVecField[], Point3d& ptFanVert, int nBasePointNum, int nVoxConfig, int nVoxI, int nVoxJ, int nVoxK) const ; bool IsTriangleOnBorder( const Triangle3dEx& trTria, const int nBlockLimits[], const int nVoxIJK[]) const ; // Funzioni per facce canoniche con grandi triangoli bool ProcessVoxContXY( FlatVoxelContainer& VoxContXY, int nBlock, bool bPlus) const ; bool ProcessVoxContYZ( FlatVoxelContainer& VoxContYZ, int nBlock, bool bPlus) const ; bool ProcessVoxContXZ( FlatVoxelContainer& VoxContXZ, int nBlock, bool bPlus) const ; bool Find( const FlatVoxelContainer& VoxCont, int nI, int nJ, int nK, double dPos, int nTool) const ; bool Remove( FlatVoxelContainer& VoxCont, int nI, int nJ, int nK) const ; // Connessione Zmap struct IntervalIndexes { int tMap ; int tDex ; int tInt ; } ; typedef std::stack IntContaier ; bool CheckMapConnection( void) ; bool ExpandFromXInterval( IntContaier& IntCont) ; bool ExpandFromYInterval( IntContaier& IntCont) ; bool ExpandFromZInterval( IntContaier& IntCont) ; bool IsBox( void) ; private : enum Status { ERR = 0, OK = 1, TO_VERIFY = 2} ; enum Shape { GENERIC = 0, BOX = 1, EXTRUSION = 2} ; static const int N_MAPS = 3 ; static const int N_VOXBLOCK = 32 ; static const int N_DEXVOXRATIO = 1 ; private : ObjGraphicsMgr m_OGrMgr ; // gestore grafica dell'oggetto Status m_nStatus ; // stato int m_nTempProp ; // proprietà temporanea double m_dStep ; // passo delle griglie int m_nMapNum ; // numero di griglie ( 1 o 3) Frame3d m_MapFrame ; // riferimento intrinseco dello Zmap int m_nNx[N_MAPS] ; // dimensione di ciascuna griglia in X int m_nNy[N_MAPS] ; // dimensione di ciascuna griglia in Y int m_nDim[N_MAPS] ; // dimensione di ciascuna griglia ( X * Y) double m_dMinZ[N_MAPS] ; // minimo in Zlocale di ciascuna griglia double m_dMaxZ[N_MAPS] ; // massimo in Zlocale di ciascuna griglia struct Data { // Tratto di dexel : dati estremi, versori normali e corpo di appartenenza double dMin ; Vector3d vtMinN ; int nToolMin ; double dMax ; Vector3d vtMaxN ; int nToolMax ; int nCompo ; } ; std::vector> m_Values[N_MAPS] ; // dexel delle 3 griglie int m_nShape ; // Forma : 0 generica, 1 box, 2 estrusione int m_nVoxNumPerBlock ; // Numero di voxel per blocco int m_nFracLin[3] ; // Numero di blocchi per ogni asse int m_nNumBlock ; // Numero totale di blocchi mutable BOOLVECTOR m_BlockToUpdate ; mutable INTVECTOR m_BlockUpdatingCounter ; int m_nConnectedCompoCount ; // Se == - 1 il numero di componenti non è noto // Se >= 0 è il numero di componenti connesse mutable std::vector m_InterBlockVox ; mutable SharpTriaMatrix m_InterBlockOriginalSharpTria ; mutable SharpTriaMatrix m_InterBlockSharpTria ; mutable SharpTriaMatrix m_BlockSharpTria ; mutable SmoothTriaMatrix m_BlockSmoothTria ; mutable std::vector m_BlockBigTria ; mutable std::vector m_SingleMapTria ; mutable std::vector m_SliceXY ; mutable std::vector m_SliceXZ ; mutable std::vector m_SliceYZ ; Tool m_Tool ; } ; //----------------------------------------------------------------------------- inline VolZmap* CreateBasicVolZmap( void) { return (static_cast( CreateGeoObj( VOL_ZMAP))) ; } inline VolZmap* CloneBasicVolZmap( const IGeoObj* pGObj) { if ( pGObj == nullptr || pGObj->GetType() != VOL_ZMAP) return nullptr ; return (static_cast(pGObj->Clone())) ; } inline const VolZmap* GetBasicVolZmap( const IGeoObj* pGObj) { if ( pGObj == nullptr || pGObj->GetType() != VOL_ZMAP) return nullptr ; return (static_cast(pGObj)) ; } inline VolZmap* GetBasicVolZmap( IGeoObj* pGObj) { if ( pGObj == nullptr || pGObj->GetType() != VOL_ZMAP) return nullptr ; return (static_cast(pGObj)) ; }