From 7d1156a6718ba5ff5dc88b7dae7be9ba731a5036 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 10 Sep 2015 21:46:19 +0000 Subject: [PATCH] Include : - aggiornamenti. --- EGkBBox3d.h | 6 ++++++ EGkGeoCollection.h | 6 ++++++ EGkPoint3d.h | 4 ++-- EInAPI.h | 8 +++++++- EXeExecutor.h | 8 +++++++- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/EGkBBox3d.h b/EGkBBox3d.h index 1a686b8..0214722 100644 --- a/EGkBBox3d.h +++ b/EGkBBox3d.h @@ -55,6 +55,10 @@ class EGK_EXPORT BBox3d public : bool IsEmpty( void) const { return ( ! IsValid()) ; } + bool IsSmall( void) const ; + bool IsSmallXY( void) const ; + bool IsEpsilon( double dToler) const ; + bool IsEpsilonXY( double dToler) const ; void Add( const Point3d& ptP) ; void Add( double dX, double dY, double dZ) ; void Add( const BBox3d& b3B) ; @@ -78,6 +82,8 @@ class EGK_EXPORT BBox3d bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ; bool Encloses( const Point3d& ptP) const ; bool EnclosesXY( const Point3d& ptP) const ; + bool Encloses( const BBox3d& b3Box) const ; + bool EnclosesXY( const BBox3d& b3Box) const ; bool Overlaps( const BBox3d& b3B) const ; bool OverlapsXY( const BBox3d& b3B) const ; bool FindIntersection( const BBox3d& b3B, BBox3d& b3Int) const ; diff --git a/EGkGeoCollection.h b/EGkGeoCollection.h index b93431d..277af5a 100644 --- a/EGkGeoCollection.h +++ b/EGkGeoCollection.h @@ -14,6 +14,7 @@ #pragma once #include "/EgtDev/Include/EGkPoint3d.h" +#include "/EgtDev/Include/EGkBBox3d.h" #include "/EgtDev/Include/EGkCurvePointDiffGeom.h" #include "/EgtDev/Include/EgtNumCollection.h" @@ -43,3 +44,8 @@ typedef std::list CPDGLIST ; // lista di CrvPointDiffGe // Raccolte di Vector3d typedef std::vector VCT3DVECTOR ; // vettore di vettori 3d typedef std::list VCT3DLIST ; // lista di vettori 3d + +//---------------------------------------------------------------------------- +// Raccolte di BBox3d +typedef std::vector BOXVECTOR ; // vettore di bounding box 3d +typedef std::list BOXLIST ; // lista di bounding box 3d diff --git a/EGkPoint3d.h b/EGkPoint3d.h index c5589a6..19cc175 100644 --- a/EGkPoint3d.h +++ b/EGkPoint3d.h @@ -315,7 +315,7 @@ DirDist( const Point3d& ptP1, const Point3d& ptP2, Vector3d& vtDir, double& dDis //! Verifica se due punti sono quasi coincidenti (tolleranza come parametro) //---------------------------------------------------------------------------- inline bool -AreSamePointEpsilon( const Point3d& ptP1, const Point3d& ptP2, const double dToler) +AreSamePointEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler) { return ( SqDist( ptP1, ptP2) < ( dToler * dToler)) ; } @@ -324,7 +324,7 @@ AreSamePointEpsilon( const Point3d& ptP1, const Point3d& ptP2, const double dTol //! Verifica se due punti sono quasi coincidenti nel piano XY (tolleranza come parametro) //---------------------------------------------------------------------------- inline bool -AreSamePointXYEpsilon( const Point3d& ptP1, const Point3d& ptP2, const double dToler) +AreSamePointXYEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler) { return ( SqDistXY( ptP1, ptP2) < ( dToler * dToler)) ; } diff --git a/EInAPI.h b/EInAPI.h index 793ec6c..97e441e 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -432,7 +432,13 @@ 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 EgtPackPart( int nId, double dXmin, double dYmin, double dXmax, double dOffs) ; +EIN_EXPORT BOOL __stdcall EgtPackPart( int nId, double dXmin, double dYmin, + double dXmax, double dYmax, double dOffs, BOOL bBottomUp) ; +EIN_EXPORT BOOL __stdcall EgtPackCluster( int nId[], int nCount, double dXmin, double dYmin, + double dXmax, double dYmax, double dOffs, BOOL bBottomUp) ; +EIN_EXPORT BOOL __stdcall EgtGetClusterBBoxGlob( int nId[], int nCount, double ptMin[3], double ptMax[3]) ; +EIN_EXPORT BOOL __stdcall EgtMoveCluster( int nId[], int nCount, const double vtMove[3], + double dXmin, double dYmin, double dXmax, double dYmax, double dOffs) ; // Machining EIN_EXPORT BOOL __stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index c97d7de..8622e0e 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -441,7 +441,13 @@ EXE_EXPORT bool ExeShearGroup( int nId, const Point3d& ptP, const Vector3d& vtN, // Nesting EXE_EXPORT bool ExeCreateFlatParts( int nType) ; -EXE_EXPORT bool ExePackPart( int nId, double dXmin, double dYmin, double dXmax, double dOffs) ; +EXE_EXPORT bool ExePackPart( int nId, double dXmin, double dYmin, + double dXmax, double dYmax, double dOffs, bool bBottomUp) ; +EXE_EXPORT bool ExePackCluster( const INTVECTOR& vIds, double dXmin, double dYmin, + double dXmax, double dYmax, double dOffs, bool bBottomUp) ; +EXE_EXPORT bool ExeGetClusterBBoxGlob( const INTVECTOR& vIds, BBox3d& b3Box) ; +EXE_EXPORT bool ExeMoveCluster( const INTVECTOR& vIds, const Vector3d& vtMove, + double dXmin, double dYmin, double dXmax, double dYmax, double dOffs) ; // Machining EXE_EXPORT bool ExeInitMachMgr( const std::string& sMachinesDir) ;