diff --git a/EGkFilletChamfer.h b/EGkFilletChamfer.h new file mode 100644 index 0000000..77878ab --- /dev/null +++ b/EGkFilletChamfer.h @@ -0,0 +1,35 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkFilletChamfer.h Data : 19.03.15 Versione : 1.6c4 +// Contenuto : Dichiarazione funzioni per calcolo fillet e chamfer. +// +// +// +// Modifiche : 19.03.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkCurveLine.h" +#include "/EgtDev/Include/EGkCurveArc.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 ICurveArc* CreateFillet( const ICurve& cCrv1, const Point3d& ptNear1, + const ICurve& cCrv2, const Point3d& ptNear2, + const Vector3d& vtNorm, double dRadius, double& dPar1, double& dPar2) ; +EGK_EXPORT ICurveLine* CreateChamfer( const ICurve& cCrv1, const Point3d& ptNear1, + const ICurve& cCrv2, const Point3d& ptNear2, + const Vector3d& vtNorm, double dDist, double& dPar1, double& dPar2) ; + diff --git a/EInAPI.h b/EInAPI.h index c87f382..b25d6b9 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -138,6 +138,12 @@ EIN_EXPORT int __stdcall EgtCreateCurveArc2PVN( int nParentId, const double ptS EIN_EXPORT int __stdcall EgtCreateCurveArc2PVNEx( int nParentId, const double ptStart[3], const double ptEnd[3], int nSep, int nId, const double vtDirS[3], const double vtNorm[3], int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveFillet( int nParentId, int nCrv1, const double ptNear1[3], + int nCrv2, const double ptNear2[3], + const double vtNorm[3], double dRad, BOOL bTrim, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveChamfer( int nParentId, int nCrv1, const double ptNear1[3], + int nCrv2, const double ptNear2[3], + const double vtNorm[3], double dDist, BOOL bTrim, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveBezier( int nParentId, int nDegree, const double ptCtrls[/*3x(nDegree+1)*/], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveBezierRational( int nParentId, int nDegree, diff --git a/EgkCurve.h b/EgkCurve.h index e54f9b7..deea843 100644 --- a/EgkCurve.h +++ b/EgkCurve.h @@ -62,6 +62,8 @@ class __declspec( novtable) ICurve : public IGeoObj virtual bool GetPointTang( double dU, Side nS, Point3d& ptPos, Vector3d& vtTang) const = 0 ; virtual bool GetPointDiffGeom( double dU, Side nS, CrvPointDiffGeom& oDiffG) const = 0 ; virtual bool IsPointOn( const Point3d& ptP, double dTol = EPS_SMALL) const = 0 ; + virtual bool GetParamAtPoint( const Point3d& ptP, double& dPar, double dTol = EPS_SMALL) const = 0 ; + virtual bool GetLengthAtPoint( const Point3d& ptP, double& dLen, double dTol = EPS_SMALL) const = 0 ; virtual bool ApproxWithLines( double dLinTol, double dAngTolDeg, PolyLine& PL) const = 0 ; virtual bool ApproxWithArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) const = 0 ; virtual ICurve* CopyParamRange( double dUStart, double dUEnd) const = 0 ;