diff --git a/EGkOffsetCurve.h b/EGkOffsetCurve.h index fc554dc..3a972d6 100644 --- a/EGkOffsetCurve.h +++ b/EGkOffsetCurve.h @@ -29,6 +29,7 @@ class OffsetCurve EGK_EXPORT ~OffsetCurve( void) ; public : + EGK_EXPORT bool Reset( void) ; EGK_EXPORT bool Make( const ICurve* pCrv, double dDist, int nType) ; EGK_EXPORT int GetCurveCount( void) { return int( m_CrvLst.size()) ; } EGK_EXPORT ICurve* GetCurve( void) ; diff --git a/EGkPoint3d.h b/EGkPoint3d.h index 387d7ff..2707e24 100644 --- a/EGkPoint3d.h +++ b/EGkPoint3d.h @@ -178,7 +178,7 @@ operator/( const Point3d& ptP, double dDiv) //! Somma mediata di due punti (baricentrica) //---------------------------------------------------------------------------- inline Point3d -Media( const Point3d& ptP1, const Point3d& ptP2, double dCoeff) +Media( const Point3d& ptP1, const Point3d& ptP2, double dCoeff = 0.5) { return Point3d( ( 1 - dCoeff) * ptP1.x + dCoeff * ptP2.x, ( 1 - dCoeff) * ptP1.y + dCoeff * ptP2.y, diff --git a/EGkPolyLine.h b/EGkPolyLine.h index c4c73de..5a398e7 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -33,7 +33,7 @@ class PolyLine EGK_EXPORT PolyLine( void) ; EGK_EXPORT ~PolyLine( void) ; EGK_EXPORT bool Clear( void) ; - EGK_EXPORT bool AddUPoint( double dPar, const Point3d& ptP) ; + EGK_EXPORT bool AddUPoint( double dPar, const Point3d& ptP, bool bEndOrStart = true) ; EGK_EXPORT bool Close( void) ; EGK_EXPORT bool ModifyLastParam( double dPar) ; EGK_EXPORT bool EraseFirstUPoint( void) ; @@ -114,9 +114,10 @@ class PolyLine EGK_EXPORT bool Flatten( double dZ = 0) ; EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ; EGK_EXPORT bool GetMinAreaRectangleXY( Point3d& ptCen, Vector3d& vtAx, double& dLen, double& dHeight) const ; + EGK_EXPORT bool Trim( const Plane3d& plPlane, bool bInVsOut = true) ; private : - bool MyChangeStartOnMiddle( void) ; + bool MyChangeStart( int nPos) ; bool MyApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ; bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ; diff --git a/EGkStmFromCurves.h b/EGkStmFromCurves.h index 9ebd28e..6a6e3e2 100644 --- a/EGkStmFromCurves.h +++ b/EGkStmFromCurves.h @@ -37,4 +37,4 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const P double dAngRotDeg, double dMove, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ; -EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, double dLinTol = 10 * EPS_SMALL) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ; diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 38dea87..a112e46 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -26,6 +26,9 @@ inline bool IsValidSvt( int nSvt) //---------------------------------------------------------------------------- class __declspec( novtable) ISurfTriMesh : public ISurf { + public : + enum RuledType { RLT_ISOPAR = 0, // con parametrizzazione simile tra le due curve + RLT_MINDIST = 1} ; // con distanza minima tra le due curve public : // IGeoObj ISurfTriMesh* Clone( void) const override = 0 ; public : @@ -42,7 +45,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ; virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ; virtual bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) = 0 ; - virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2) = 0 ; + virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nRuledType) = 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, diff --git a/EInAPI.h b/EInAPI.h index c5be280..1e57d7a 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -242,7 +242,8 @@ EIN_EXPORT int __stdcall EgtCreateSurfTmByRevolve( int nParentId, int nCrvId, EIN_EXPORT int __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId, const double ptAx[3], const double vtAx[3], double dAngRotDeg, double dMove, double dLinTol, int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, double dLinTol) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, BOOL bCapEnds, double dLinTol) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, int nType, double dLinTol) ; EIN_EXPORT int __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ; EIN_EXPORT int __stdcall EgtCreateSurfTmBySewing( int nParentId, int nNumId, const int nIds[], BOOL bErase) ; diff --git a/EXeConst.h b/EXeConst.h index 2804d4e..b4ba09d 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -62,6 +62,10 @@ enum SLiType { SLT_NONE = 0, SLT_TG_FIN = 4, SLT_TOUCH = 5} ; +//----------------- Costanti tipo di costruzione di superficie rigata ---------- +enum RuledType{ RUL_TYPE_ISOPAR = 0, // come ISurfTrimesh::RLT_ISOPAR + RUL_TYPE_MINDIST = 1} ; // come ISurfTrimesh::RLT_MINDIST + //----------------- Costanti flag import CNC ----------------------------------- enum EicFlag { EIC_FLAG_NONE = 0, // come EImCncFlag::EICFLAG_NONE EIC_FLAG_CHAIN = 1, // come EImCncFlag::EICFLAG_CHAIN diff --git a/EXeExecutor.h b/EXeExecutor.h index f7cc92b..b5d7510 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -272,7 +272,7 @@ EXE_EXPORT int ExeCreateSurfTmByScrewing( int nParentId, int nCrvId, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, double dMove, double dLinTol, int nRefType) ; EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ; -EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, double dLinTol) ; +EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, int nType, double dLinTol) ; EXE_EXPORT int ExeCreateSurfTmByTriangles( int nParentId, const INTVECTOR& vIds, bool bErase) ; EXE_EXPORT int ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, bool bErase) ; EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ;