diff --git a/EGkGdbConst.h b/EGkGdbConst.h index 6525f50..f1a53d5 100644 --- a/EGkGdbConst.h +++ b/EGkGdbConst.h @@ -21,6 +21,8 @@ const int GDB_ID_ROOT = 0 ; const int GDB_ID_NULL = -1 ; const int GDB_ID_SEL = -2 ; const int GDB_ID_GRID = -3 ; +const int GDB_ID_CURRPART = -4 ; +const int GDB_ID_CURRLAYER = -5 ; //----------------- Costanti posizione di inserimento nel DB geometrico -------- enum GdbInsPos { GDB_FIRST_SON = 0, diff --git a/EInAPI.h b/EInAPI.h index 7064ef4..447b6cb 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -110,11 +110,11 @@ EIN_EXPORT int __stdcall EgtCreateGeoPoint( int nParentId, const double ptP[3], EIN_EXPORT int __stdcall EgtCreateGeoVector( int nParentId, const double vtV[3], const double ptB[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateGeoFrame( int nParentId, const double ptOrig[3], const double vX[3], const double vY[3], const double vZ[3], int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateText( int nParentId, const double ptP[3], double dAngRotDeg, +EIN_EXPORT int __stdcall EgtCreateText( int nParentId, const double ptP[3], const wchar_t* wsText, double dH, int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateTextEx( int nParentId, const double ptP[3], const double vtN[3], const double vtD[3], +EIN_EXPORT int __stdcall EgtCreateTextEx( int nParentId, const double ptP[3], double dAngRotDeg, const wchar_t* wsText, const wchar_t* wsFont, BOOL bItalic, double dH, int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateTextAdv( int nParentId, const double ptP[3], const double vtN[3], const double vtD[3], +EIN_EXPORT int __stdcall EgtCreateTextAdv( int nParentId, const double ptP[3], double dAngRotDeg, const wchar_t* wsText, const wchar_t* wsFont, int nW, BOOL bItalic, double dH, double dRat, double dAddAdv, int nInsPos, int nRefType) ; @@ -123,40 +123,42 @@ EIN_EXPORT int __stdcall EgtCreateCurveLine( int nParentId, const double ptIni[3], const double ptFin[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveLineEx( int nParentId, const double ptIni[3], int nSepI, int nIdI, const double ptFin[3], int nSepF, int nIdF, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveLinePDL( int nParentId, const double ptIni[3], + double dDirDeg, double dLen, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveLinePVL( int nParentId, const double ptIni[3], const double vtDir[3], double dLen, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveLineMinPointCurve( int nParentId, const double ptStart[3], int nCrvId, double dNearPar, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveCircle( int nParentId, const double ptCen[3], - const double vtN[3], double dRad, int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateCurveCircleCPN( int nParentId, const double ptCen[3], - const double ptOn[3], const double vtN[3], int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateCurveCircleCPNEx( int nParentId, const double ptCen[3], - const double ptOn[3], int nSepO, int nIdO, - const double vtN[3], int nRefType) ; + double dRad, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveCircleCP( int nParentId, const double ptCen[3], + const double ptOn[3], int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveCircleCPEx( int nParentId, const double ptCen[3], + const double ptOn[3], int nSepO, int nIdO, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveCircle3P( int nParentId, const double ptP1[3], const double ptP2[3], const double ptP3[3], int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateCurveArc( int nParentId, const double ptCen[3], - const double vtN[3], double dRad, const double vtS[3], - double dAngCenDeg, double dDeltaN, int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateCurveArcC2PN( int nParentId, const double ptCen[3], const double ptStart[3], - const double ptNearEnd[3], const double vtNorm[3], int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateCurveArcC2PNEx( int nParentId, const double ptCen[3], - const double ptStart[3], int nSepS, int nIdS, - const double ptNearEnd[3], const double vtNorm[3], int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveArc( int nParentId, const double ptCen[3], double dRad, + double dAngIniDeg, double dAngCenDeg, double dDeltaN, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveArcC2P( int nParentId, const double ptCen[3], const double ptStart[3], + const double ptNearEnd[3], int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveArcC2PEx( int nParentId, const double ptCen[3], + const double ptStart[3], int nSepS, int nIdS, + const double ptNearEnd[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveArc3P( int nParentId, const double ptP1[3], const double ptP2[3], const double ptP3[3], int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateCurveArc2PVN( int nParentId, const double ptStart[3], const double ptEnd[3], - const double vtDirS[3], const double vtNorm[3], int nRefType) ; -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 EgtCreateCurveArc2PD( int nParentId, const double ptStart[3], const double ptEnd[3], + double dDirSDeg, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveArc2PDEx( int nParentId, const double ptStart[3], + const double ptEnd[3], int nSep, int nId, + double dDirSDeg, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateCurveArc2PV( int nParentId, const double ptStart[3], const double ptEnd[3], + const double vtDirS[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) ; + 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) ; + 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, @@ -167,14 +169,16 @@ EIN_EXPORT int __stdcall EgtCreateCurveCompoByChain( int nParentId, int nNumId, const double ptNear[3], BOOL bErase, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveCompoFromPoints( int nParentId, int nP, const double ptPs[/*3 x nP*/], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateCurveCompoFromPointBulges( int nParentId, int nPB, const double ptPBs[/*4 x nPB*/], int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateRectangle2P( int nParentId, const double ptIni[3], + const double ptCross[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateRectangle3P( int nParentId, const double ptIni[3], const double ptCross[3], const double ptDir[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreatePolygonFromRadius( int nParentId, int nNumSides, const double ptCen[3], - const double ptCorn[3], const double vtN[3], int nRefType) ; + const double ptCorn[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreatePolygonFromApothem( int nParentId, int nNumSides, const double ptCen[3], - const double ptMid[3], const double vtN[3], int nRefType) ; + const double ptMid[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreatePolygonFromSide( int nParentId, int nNumSides, const double ptIni[3], - const double ptFin[3], const double vtN[3], int nRefType) ; + const double ptFin[3], int nRefType) ; // GeomDB Create Surf EIN_EXPORT int __stdcall EgtCreateSurfTmBBox( int nParentId, const double ptMin[3], const double ptMax[3], int nRefType) ; diff --git a/EXeConst.h b/EXeConst.h index 39b7dfc..e5bdbd8 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -23,9 +23,14 @@ enum EinSep { SEP_STD = 0, //----------------- Costanti tipo di riferimento di input ---------------------- enum RefType{ RTY_GLOB = 0, RTY_GRID = -3, // come GDB_ID_GRID - RTY_LOC = -4} ; + RTY_LOC = -6} ; const int RTY_DEFAULT = RTY_LOC ; +//----------------- Costanti tipo di interpolazione ---------------------------- +enum InterpType{ ITT_AKIMA = 0, // curve risultanti archi + ITT_AKIMA_CORNER = 1, // curve risultanti archi + ITT_BESSEL = 2} ; // curve risultanti Bezier cubiche + //----------------- Costanti tipo di approssimazione di curve ------------------ enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD APP_LEFT_LINES = 1, // come ICurve::APL_LEFT diff --git a/EXeExecutor.h b/EXeExecutor.h index 6b95742..7564889 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -112,11 +112,11 @@ EXE_EXPORT int ExeCreateGroup( int nParentId, const Frame3d& frFrame, int nRefT EXE_EXPORT int ExeCreateGeoPoint( int nParentId, const Point3d& ptP, int nRefType) ; EXE_EXPORT int ExeCreateGeoVector( int nParentId, const Vector3d& vtV, const Point3d& ptB, int nRefType) ; EXE_EXPORT int ExeCreateGeoFrame( int nParentId, const Frame3d& frFrame, int nRefType) ; -EXE_EXPORT int ExeCreateText( int nParentId, const Point3d& ptP, double dAngRotDeg, +EXE_EXPORT int ExeCreateText( int nParentId, const Point3d& ptP, const std::string& sText, double dH, int nRefType) ; -EXE_EXPORT int ExeCreateTextEx( int nParentId, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, +EXE_EXPORT int ExeCreateTextEx( int nParentId, const Point3d& ptP, double dAngRotDeg, const std::string& sText, const std::string& sFont, bool bItalic, double dH, int nRefType) ; -EXE_EXPORT int ExeCreateTextAdv( int nParentId, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, +EXE_EXPORT int ExeCreateTextAdv( int nParentId, const Point3d& ptP, double dAngRotDeg, const std::string& sText, const std::string& sFont, int nW, bool bItalic, double dH, double dRat, double dAddAdv, int nInsPos, int nRefType) ; @@ -124,54 +124,62 @@ EXE_EXPORT int ExeCreateTextAdv( int nParentId, const Point3d& ptP, const Vect EXE_EXPORT int ExeCreateCurveLine( int nParentId, const Point3d& ptIni, const Point3d& ptFin, int nRefType) ; EXE_EXPORT int ExeCreateCurveLineEx( int nParentId, const Point3d& ptIni, int nSepI, int nIdI, const Point3d& ptFin, int nSepF, int nIdF, int nRefType) ; +EXE_EXPORT int ExeCreateCurveLinePDL( int nParentId, const Point3d& ptIni, + double dDirDeg, double dLen, int nRefType) ; EXE_EXPORT int ExeCreateCurveLinePVL( int nParentId, const Point3d& ptIni, const Vector3d& vtDir, double dLen, int nRefType) ; EXE_EXPORT int ExeCreateCurveLineMinPointCurve( int nParentId, const Point3d& ptStart, int nCrvId, double dNearPar, int nRefType) ; -EXE_EXPORT int ExeCreateCurveCircle( int nParentId, const Point3d& ptCen, - const Vector3d& vtN, double dRad, int nRefType) ; -EXE_EXPORT int ExeCreateCurveCircleCPN( int nParentId, const Point3d& ptCen, - const Point3d& ptOn, const Vector3d& vtN, int nRefType) ; -EXE_EXPORT int ExeCreateCurveCircleCPNEx( int nParentId, const Point3d& ptCen, - const Point3d& ptOn, int nSepO, int nIdO, const Vector3d& vtN, int nRefType) ; +EXE_EXPORT int ExeCreateCurveCircle( int nParentId, const Point3d& ptCen, double dRad, int nRefType) ; +EXE_EXPORT int ExeCreateCurveCircleCP( int nParentId, const Point3d& ptCen, + const Point3d& ptOn, int nRefType) ; +EXE_EXPORT int ExeCreateCurveCircleCPEx( int nParentId, const Point3d& ptCen, + const Point3d& ptOn, int nSepO, int nIdO, int nRefType) ; EXE_EXPORT int ExeCreateCurveCircle3P( int nParentId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ; -EXE_EXPORT int ExeCreateCurveArc( int nParentId, const Point3d& ptCen, const Vector3d& vtN, double dRad, - const Vector3d& vtS, double dAngCenDeg, double dDeltaN, int nRefType) ; -EXE_EXPORT int ExeCreateCurveArcC2PN( int nParentId, const Point3d& ptCen, const Point3d& ptStart, - const Point3d& ptNearEnd, const Vector3d& vtNorm, int nRefType) ; -EXE_EXPORT int ExeCreateCurveArcC2PNEx( int nParentId, const Point3d& ptCen, - const Point3d& ptStart, int nSepS, int nIdS, - const Point3d& ptNearEnd, const Vector3d& vtNorm, int nRefType) ; +EXE_EXPORT int ExeCreateCurveArc( int nParentId, const Point3d& ptCen, double dRad, + double dAngIniDeg, double dAngCenDeg, double dDeltaN, int nRefType) ; +EXE_EXPORT int ExeCreateCurveArcC2P( int nParentId, const Point3d& ptCen, const Point3d& ptStart, + const Point3d& ptNearEnd, int nRefType) ; +EXE_EXPORT int ExeCreateCurveArcC2PEx( int nParentId, const Point3d& ptCen, + const Point3d& ptStart, int nSepS, int nIdS, + const Point3d& ptNearEnd, int nRefType) ; EXE_EXPORT int ExeCreateCurveArc3P( int nParentId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ; -EXE_EXPORT int ExeCreateCurveArc2PVN( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, - const Vector3d& vtDirS, const Vector3d& vtNorm, int nRefType) ; -EXE_EXPORT int ExeCreateCurveArc2PVNEx( int nParentId, const Point3d& ptStart, - const Point3d& ptEnd, int nSep, int nId, - const Vector3d& vtDirS, const Vector3d& vtNorm, int nRefType) ; +EXE_EXPORT int ExeCreateCurveArc2PD( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, + double dDirSDeg, int nRefType) ; +EXE_EXPORT int ExeCreateCurveArc2PDEx( int nParentId, const Point3d& ptStart, + const Point3d& ptEnd, int nSep, int nId, + double dDirSDeg, int nRefType) ; +EXE_EXPORT int ExeCreateCurveArc2PV( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, + const Vector3d& vtDirS, int nRefType) ; +EXE_EXPORT int ExeCreateCurveBiArc( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, + double dDirSDeg, double dDirEDeg, double dPar, int nRefType) ; EXE_EXPORT int ExeCreateCurveFillet( int nParentId, int nCrv1, const Point3d& ptNear1, int nCrv2, const Point3d& ptNear2, - const Vector3d& vtNorm, double dRad, bool bTrim, int nRefType) ; + double dRad, bool bTrim, int nRefType) ; EXE_EXPORT int ExeCreateCurveChamfer( int nParentId, int nCrv1, const Point3d& ptNear1, int nCrv2, const Point3d& ptNear2, - const Vector3d& vtNorm, double dDist, bool bTrim, int nRefType) ; + double dDist, bool bTrim, int nRefType) ; EXE_EXPORT int ExeCreateCurveBezier( int nParentId, int nDegree, const PNTVECTOR& vPnt, int nRefType) ; EXE_EXPORT int ExeCreateCurveBezierRational( int nParentId, int nDegree, const PNTUVECTOR& vPntW, int nRefType) ; EXE_EXPORT int ExeCreateCurveBezierFromArc( int nParentId, int nArcId, bool bErase) ; EXE_EXPORT int ExeCreateCurveCompo( int nParentId, const INTVECTOR& vIds, bool bErase) ; EXE_EXPORT int ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds, const Point3d& ptNear, bool bErase, int nRefType, int* pnCount) ; +EXE_EXPORT int ExeCreateCurveCompoByInterpolation( int nParentId, const PolyLine& PL, int nType, int nRefType) ; EXE_EXPORT int ExeCreateCurveCompoFromPoints( int nParentId, const PolyLine& PL, int nRefType) ; EXE_EXPORT int ExeCreateCurveCompoFromPointBulges( int nParentId, const PolyArc& PA, int nRefType) ; +EXE_EXPORT int ExeCreateRectangle2P( int nParentId, const Point3d& ptIni, + const Point3d& ptCross, int nRefType) ; EXE_EXPORT int ExeCreateRectangle3P( int nParentId, const Point3d& ptIni, const Point3d& ptCross, const Point3d& ptDir, int nRefType) ; EXE_EXPORT int ExeCreatePolygonFromRadius( int nParentId, int nNumSides, const Point3d& ptCen, - const Point3d& ptCorn, const Vector3d& vtN, int nRefType) ; + const Point3d& ptCorn, int nRefType) ; EXE_EXPORT int ExeCreatePolygonFromApothem( int nParentId, int nNumSides, const Point3d& ptCen, - const Point3d& ptMid, const Vector3d& vtN, int nRefType) ; + const Point3d& ptMid, int nRefType) ; EXE_EXPORT int ExeCreatePolygonFromSide( int nParentId, int nNumSides, const Point3d& ptIni, - const Point3d& ptFin, const Vector3d& vtN, int nRefType) ; + const Point3d& ptFin, int nRefType) ; // GeomDB Create Surf EXE_EXPORT int ExeCreateSurfTmBBox( int nParentId, const BBox3d& b3Box, int nRefType) ; EXE_EXPORT int ExeCreateSurfTmBox( int nParentId, const Point3d& ptIni, const Point3d& ptCross,