ab8ec30e29
- sistemato minuscole/maiuscole.
120 lines
7.7 KiB
C++
120 lines
7.7 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2020
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkVolZmap.h Data : 12.05.19 Versione : 2.2k1
|
|
// Contenuto : Dichiarazione della interfaccia IVolZmap.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 22.01.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkGeoObj.h"
|
|
#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"
|
|
#include "/EgtDev/Include/EGkIntersLineTria.h"
|
|
|
|
// ------------------------- STRUTTURE -----------------------------------------------------------
|
|
// Informazioni su intersezione linea - volume Zmap
|
|
struct IntLineZmapInfo {
|
|
int nILTT ; // Tipo di intersezione linea-triangolo
|
|
double dU ; // Parametro sulla linea
|
|
double dU2 ; // Secondo parametro sulla linea
|
|
int nVox ; // Indice del voxel del triangolo
|
|
int nBlock ; // Indice del blocco del triangolo
|
|
Point3d ptI ; // Punto di intersezione
|
|
Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto)
|
|
Triangle3d trTria ; // Triangolo
|
|
// Costruttori
|
|
IntLineZmapInfo( void)
|
|
: nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), ptI(), ptI2(), trTria() {}
|
|
IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, const Point3d& ptP, Triangle3d& trTr)
|
|
: nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2(), trTria( trTr) {}
|
|
IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl,
|
|
const Point3d& ptP, const Point3d& ptP2, Triangle3d& trTr)
|
|
: nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2( ptP2), trTria( trTr) {}
|
|
} ;
|
|
// Vettore di IntLineZmapInfo
|
|
typedef std::vector<IntLineZmapInfo> ILZIVECTOR ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class __declspec( novtable) IVolZmap : public IGeoObj
|
|
{
|
|
public : // IGeoObj
|
|
IVolZmap* Clone( void) const override = 0 ;
|
|
public :
|
|
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
|
|
virtual bool Clear( void) = 0 ;
|
|
virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dPrec, bool bTriDex) = 0 ;
|
|
virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dPrec, bool bTriDex) = 0 ;
|
|
virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dPrec, bool bTriDex) = 0 ;
|
|
virtual int GetBlockCount( void) const = 0 ;
|
|
virtual int GetBlockUpdatingCounter( int nBlock) const = 0 ;
|
|
virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ;
|
|
virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ;
|
|
virtual bool GetVolume( double& dVol) const = 0 ;
|
|
virtual bool GetDexelLines( int nDir, int nPos1, int nPos2, POLYLINELIST& lstPL) const = 0 ;
|
|
virtual int GetResolution( void) const = 0 ;
|
|
virtual bool ChangeResolution( int nDexvoxRatio) = 0 ;
|
|
virtual bool SetToolTolerances( double dLinTol, double dAngTolDeg = 90) = 0 ;
|
|
virtual bool SetStdTool( const std::string& sToolName, double dH, double dR, double dCornR, double dCutterH, int nFlag) = 0 ;
|
|
virtual bool SetAdvTool( const std::string& sToolName,
|
|
double dH, double dR, double dTipH, double dTipR, double dCornR, double dCutterH, int nFlag) = 0 ;
|
|
virtual bool SetSawTool( const std::string& sToolName,
|
|
double dH, double dR, double dThick, double dStemR, double dCornR, int nFlag) = 0 ;
|
|
virtual bool SetGenTool( const std::string& sToolName, const ICurveComposite* pToolOutline, int nFlag) = 0 ;
|
|
virtual bool SetMortiserTool( const std::string& sToolName, double dH, double dW, double dTh, double dRc, int nFlag) = 0 ;
|
|
virtual bool SetChiselTool( const std::string& sToolName, double dH, double dW, double dTh, int nFlag) = 0 ;
|
|
virtual bool ResetTool( void) = 0 ;
|
|
virtual const ICurveComposite& GetToolOutline( bool bApprox = false) const = 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, bool bExact) const = 0 ;
|
|
virtual bool GetLineIntersection( const Point3d& ptP, const Vector3d& vtD, ILZIVECTOR& vIntersInfo) const = 0 ;
|
|
virtual bool GetPlaneIntersection( const Plane3d& plPlane, ICURVEPOVECTOR& vpLoop) const = 0 ;
|
|
virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool AvoidSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool AvoidCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool AvoidConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight,
|
|
double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool AvoidRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
|
|
double dLenghtTopX, double dLenghtTopY, double dHeight,
|
|
double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool AvoidTorus( const Frame3d& frTorus, double dRadMax, double dRadMin,
|
|
double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool AvoidSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ;
|
|
virtual bool Cut( const Plane3d& plPlane) = 0 ;
|
|
virtual bool Compact( void) = 0 ;
|
|
virtual int GetPartCount( void) const = 0 ;
|
|
virtual bool GetPartVolume( int nPart, double& dVol) const = 0 ;
|
|
virtual bool GetPartLocalBBox( int nPart, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 0 ;
|
|
virtual bool GetPartBBox( int nPart, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ;
|
|
virtual IVolZmap* ClonePart( int nPart) const = 0 ;
|
|
virtual bool RemovePart( int nPart) = 0 ;
|
|
virtual int GetPartMinDistFromPoint( const Point3d& ptP) const = 0 ;
|
|
} ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
inline IVolZmap* CreateVolZmap( void)
|
|
{ return (static_cast<IVolZmap*>( CreateGeoObj( VOL_ZMAP))) ; }
|
|
inline IVolZmap* CloneVolZmap( const IGeoObj* pGObj)
|
|
{ if ( pGObj == nullptr || pGObj->GetType() != VOL_ZMAP)
|
|
return nullptr ;
|
|
return (static_cast<IVolZmap*>(pGObj->Clone())) ; }
|
|
inline const IVolZmap* GetVolZmap( const IGeoObj* pGObj)
|
|
{ if ( pGObj == nullptr || pGObj->GetType() != VOL_ZMAP)
|
|
return nullptr ;
|
|
return (static_cast<const IVolZmap*>(pGObj)) ; }
|
|
inline IVolZmap* GetVolZmap( IGeoObj* pGObj)
|
|
{ if ( pGObj == nullptr || pGObj->GetType() != VOL_ZMAP)
|
|
return nullptr ;
|
|
return (static_cast<IVolZmap*>(pGObj)) ; }
|