diff --git a/EGkIntersLineSphere.h b/EGkIntersLineSphere.h new file mode 100644 index 0000000..94c8175 --- /dev/null +++ b/EGkIntersLineSphere.h @@ -0,0 +1,35 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkIntersLinePlane.h Data : 18.02.15 Versione : 1.6b7 +// Contenuto : Dichiarazione della classe intersezione linea/piano. +// +// +// +// Modifiche : 18.02.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkPlane3d.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGK_EXPORT int IntersLineSphere( const Point3d& ptL, const Vector3d& vtL, const Point3d& ptCen, double dRad, + Point3d& ptI1, Point3d& ptI2) ; + +//----------------------------------------------------------------------------- +// Tipo di intersezione linea-sfera +const int ILST_NO = 0 ; // non c'è intersezione +const int ILST_TG = 1 ; // la linea è tangente alla sfera (1 intersezione) +const int ILST_SEC = 2 ; // la linea è secante alla sfera (2 intersezioni) + \ No newline at end of file diff --git a/EGkVolZmap.h b/EGkVolZmap.h index 8326460..e3f0789 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -50,6 +50,8 @@ class __declspec( novtable) IVolZmap : public IGeoObj virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bExact) const = 0 ; virtual bool GetPlaneIntersection( const Plane3d& plPlane, POCRVVECTOR& vpLoop) const = 0 ; virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag) const = 0 ; + virtual bool AvoidSphere( const Point3d& ptCenter, double dRad) const = 0 ; + virtual bool AvoidCylinder( const Frame3d& frCyl, double dL, double dR) const = 0 ; virtual IVolZmap* ClonePart( int nPart) const = 0 ; virtual bool RemovePart( int nPart) = 0 ; } ; diff --git a/EInAPI.h b/EInAPI.h index a49011c..51cb994 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -507,6 +507,7 @@ EIN_EXPORT BOOL __stdcall EgtShearGroup( int nId, const double vPnt[3], const do // Nesting EIN_EXPORT BOOL __stdcall EgtCreateFlatParts( int nType) ; EIN_EXPORT BOOL __stdcall EgtAdjustFlatPartLayer( int nLayerId) ; +EIN_EXPORT BOOL __stdcall EgtCalcFlatPartUpRegion( int nPartId, BOOL bCalc) ; EIN_EXPORT BOOL __stdcall EgtCalcFlatPartDownRegion( int nPartId, double dH) ; EIN_EXPORT BOOL __stdcall EgtPackBox( int nId, double dXmin, double dYmin, double dXmax, double dYmax, double dOffs, BOOL bBottomUp) ; diff --git a/EMkMachiningGeoConst.h b/EMkMachiningGeoConst.h index a5bbf2a..75b3ccd 100644 --- a/EMkMachiningGeoConst.h +++ b/EMkMachiningGeoConst.h @@ -66,8 +66,9 @@ static std::string KEY_DELTALIEXT = "DLIEXT" ; static std::string KEY_DELTALOEXT = "DLOEXT" ; // Chiave info in gruppo CL per versore estrusione (normale al piano di interpolazione) static std::string KEY_EXTR = "EXTR" ; -// Chiave info in gruppo CL per punto iniziale +// Chiavi info in gruppo CL per punti iniziale e finale static std::string KEY_START = "START" ; +static std::string KEY_END = "END" ; // Chiavi info in gruppo CL per punti minimo e massimo di ingombro static std::string KEY_PMIN = "PMIN" ; static std::string KEY_PMAX = "PMAX" ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 6d78e5f..34db327 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -494,6 +494,7 @@ EXE_EXPORT bool ExeVolZmapGetDepth( int nId, const Point3d& ptP, const Vector3d& double& dInLen, double& dOutLen) ; EXE_EXPORT int ExeVolZmapIntersPlane( int nId, const Plane3d& plPlane, int nDestGrpId, int nRefType, int* pnCount) ; EXE_EXPORT bool ExeVolZmapAvoidBox( int nId, const Frame3d& frBox, const Vector3d& vtDiag, int nRefType) ; +EXE_EXPORT bool ExeVolZmapAvoidSphere( int nId, const Point3d& ptCen, double dRad, int nRefType) ; // Geo Snap Vector/Point/Frame EXE_EXPORT bool ExeStartPoint( int nId, int nRefId, Point3d& ptP) ; @@ -577,6 +578,7 @@ EXE_EXPORT bool ExeShearGroup( int nId, const Point3d& ptP, const Vector3d& vtN, // CreateFlatParts EXE_EXPORT bool ExeCreateFlatParts( int nType) ; EXE_EXPORT bool ExeAdjustFlatPartLayer( int nLayerId) ; +EXE_EXPORT bool ExeCalcFlatPartUpRegion( int nPartId, bool bCalc) ; EXE_EXPORT bool ExeCalcFlatPartDownRegion( int nPartId, double dH) ; // Box Nesting EXE_EXPORT bool ExePackBox( int nId, double dXmin, double dYmin,