diff --git a/EGkGeoConst.h b/EGkGeoConst.h index ce11f4c..e604579 100644 --- a/EGkGeoConst.h +++ b/EGkGeoConst.h @@ -19,9 +19,10 @@ const double ONEMM = 1.0 ; const double ONEINCH = 25.4 ; -// epsilon per lunghezze e versori +// epsilon per lunghezze, versori e parametri const double EPS_SMALL = 1e-3 ; const double EPS_ZERO = 1e-7 ; +const double EPS_PARAM = 1e-7 ; // infinito per lunghezze const double INFINITO = 1e10 ; diff --git a/EGkPolyLine.h b/EGkPolyLine.h index 8a098d8..b91f375 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -42,25 +42,25 @@ class PolyLine EGK_EXPORT int GetPointNbr( void) const { return m_nCount ; } EGK_EXPORT bool GetFirstUPoint( double* pdPar, Point3d* pptP) const ; - EGK_EXPORT bool GetNextUPoint( double* pdPar, Point3d* pptP) const ; + EGK_EXPORT bool GetNextUPoint( double* pdPar, Point3d* pptP, bool bNotLast = false) const ; EGK_EXPORT bool GetFirstU( double& dPar) const { return GetFirstUPoint( &dPar, nullptr) ; } - EGK_EXPORT bool GetNextU( double& dPar) const - { return GetNextUPoint( &dPar, nullptr) ; } + EGK_EXPORT bool GetNextU( double& dPar, bool bNotLast = false) const + { return GetNextUPoint( &dPar, nullptr, bNotLast) ; } EGK_EXPORT bool GetFirstPoint( Point3d& ptP) const { return GetFirstUPoint( nullptr, &ptP) ; } - EGK_EXPORT bool GetNextPoint( Point3d& ptP) const - { return GetNextUPoint( nullptr, &ptP) ; } + EGK_EXPORT bool GetNextPoint( Point3d& ptP, bool bNotLast = false) const + { return GetNextUPoint( nullptr, &ptP, bNotLast) ; } EGK_EXPORT bool GetLastUPoint( double* pdPar, Point3d* pptP) const ; - EGK_EXPORT bool GetPrevUPoint( double* pdPar, Point3d* pptP) const ; + EGK_EXPORT bool GetPrevUPoint( double* pdPar, Point3d* pptP, bool bNotFirst = false) const ; EGK_EXPORT bool GetLastU( double& dPar) const { return GetLastUPoint( &dPar, nullptr) ; } - EGK_EXPORT bool GetPrevU( double& dPar) const - { return GetPrevUPoint( &dPar, nullptr) ; } + EGK_EXPORT bool GetPrevU( double& dPar, bool bNotFirst = false) const + { return GetPrevUPoint( &dPar, nullptr, bNotFirst) ; } EGK_EXPORT bool GetLastPoint( Point3d& ptP) const { return GetLastUPoint( nullptr, &ptP) ; } - EGK_EXPORT bool GetPrevPoint( Point3d& ptP) const - { return GetPrevUPoint( nullptr, &ptP) ; } + EGK_EXPORT bool GetPrevPoint( Point3d& ptP, bool bNotFirst = false) const + { return GetPrevUPoint( nullptr, &ptP, bNotFirst) ; } EGK_EXPORT int GetLineNbr( void) const { return ( m_nCount > 1 ? ( m_nCount - 1) : 0) ; } EGK_EXPORT bool GetFirstULine( double* pdIni, Point3d* pptIni, double* pdFin, Point3d* pptFin) const ; diff --git a/EgkSurfTriMesh.h b/EgkSurfTriMesh.h index 163dc65..920cce9 100644 --- a/EgkSurfTriMesh.h +++ b/EgkSurfTriMesh.h @@ -31,10 +31,13 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual int AddVertex( const Point3d& ptVert) = 0 ; virtual int AddTriangle( const int nIdVert[3]) = 0 ; virtual bool AdjustTopology( void) = 0 ; - virtual bool CreateByTriangulation( const PolyLine& PL) = 0 ; + virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ; virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ; + virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2) = 0 ; virtual bool CreateByRevolution( const PolyLine& PL, const Point3d& ptAx, const Vector3d& vtAx, double dAngRot, double dStepRot) = 0 ; + virtual bool CreateByScrewing( const PolyLine& PL, const Point3d& ptAx, const Vector3d& vtAx, + double dAngRot, double dStepRot, double dMove) = 0 ; virtual int GetVertexNum( void) const = 0 ; virtual int GetTriangleNum( void) const = 0 ; virtual int GetFirstVertex( Point3d& ptP) const = 0 ;