diff --git a/EGkFrame3d.h b/EGkFrame3d.h index b503fce..338b2c0 100644 --- a/EGkFrame3d.h +++ b/EGkFrame3d.h @@ -53,9 +53,9 @@ class EGK_EXPORT Frame3d bool ToGlob( const Frame3d& frRef) ; bool ToLoc( const Frame3d& frRef) ; bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ; - const Frame3d& operator*=( const Frame3d& frRef) + Frame3d& operator*=( const Frame3d& frRef) { this->ToGlob( frRef) ; return *this ;} - const Frame3d& operator/=( const Frame3d& frRef) + Frame3d& operator/=( const Frame3d& frRef) { this->ToLoc( frRef) ; return *this ;} bool IsValid( void) const { return ( m_nType != ERR) ; } @@ -94,7 +94,7 @@ const Frame3d GLOB_FRM ; //---------------------------------------------------------------------------- // Prodotto di due frame (porta il primo dal secondo nel globale) //---------------------------------------------------------------------------- -inline const Frame3d +inline Frame3d operator*( const Frame3d& frRef1, const Frame3d& frRef2) { Frame3d frRefR ; @@ -109,7 +109,7 @@ operator*( const Frame3d& frRef1, const Frame3d& frRef2) //---------------------------------------------------------------------------- // Divisione di due frame (porta il primo dal globale nel secondo) //---------------------------------------------------------------------------- -inline const Frame3d +inline Frame3d operator/( const Frame3d& frRef1, const Frame3d& frRef2) { Frame3d frRefR ; diff --git a/EGkPoint3d.h b/EGkPoint3d.h index f1f582b..71cc72b 100644 --- a/EGkPoint3d.h +++ b/EGkPoint3d.h @@ -40,11 +40,6 @@ class EGK_EXPORT Point3d Point3d( void) : x( 0), y( 0), z( 0) {} //! Assegnazione delle componenti X, Y e Z al punto void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ;} - //! Copia - const Point3d& operator =( const Point3d& ptSrc) - { if ( &ptSrc != this) { - x = ptSrc.x , y = ptSrc.y , z = ptSrc.z ; } - return *this ; } public : //! Verifica se il punto è quasi l'origine diff --git a/EGkVector3d.h b/EGkVector3d.h index 6a30617..e882b6a 100644 --- a/EGkVector3d.h +++ b/EGkVector3d.h @@ -41,11 +41,6 @@ class EGK_EXPORT Vector3d Vector3d( void) : x( 0), y( 0), z( 0) {} //! Assegnazione delle componenti X, Y e Z al vettore void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ; } - //! Copia - const Vector3d& operator =( const Vector3d& vtSrc) - { if ( &vtSrc != this) { - x = vtSrc.x , y = vtSrc.y , z = vtSrc.z ; } - return *this ; } public : //! Quadrato della lunghezza del vettore @@ -86,16 +81,16 @@ class EGK_EXPORT Vector3d bool IsZminus( void) const { return ( fabs( x) < EPS_ZERO && fabs( y) < EPS_ZERO && z < - EPS_ZERO) ; } //! Somma sul posto con altro vettore - const Vector3d& operator +=( const Vector3d& vtV) + Vector3d& operator +=( const Vector3d& vtV) { this->x += vtV.x ; this->y += vtV.y ; this->z += vtV.z ; return *this ; } //! Sottrazione sul posto con altro vettore - const Vector3d& operator -=( const Vector3d& vtV) + Vector3d& operator -=( const Vector3d& vtV) { this->x -= vtV.x ; this->y -= vtV.y ; this->z -= vtV.z ; return *this ; } //! Moltiplicazione sul posto con un numero - const Vector3d& operator *=( double dMul) + Vector3d& operator *=( double dMul) { this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; } //! Divisione sul posto con un numero - const Vector3d& operator /=( double dDiv) + Vector3d& operator /=( double dDiv) { double dMul = 1 / dDiv ; this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; } //! Ritorna la rappresentazione in coordinate sferiche void ToSpherical( double* pdLen, double* pdAngVertDeg, double* pdAngOrizzDeg) const ; diff --git a/EGrScene.h b/EGrScene.h index 55e967a..aad03cb 100644 --- a/EGrScene.h +++ b/EGrScene.h @@ -101,6 +101,8 @@ class IEGrScene // Snap virtual bool GetGraphicSnapPoint( int nSnap, const Point3d& ptWin, int nW, int nH, Point3d& ptSel) = 0 ; virtual bool GetGridSnapPointZ( bool bSketch, const Point3d& ptWin, const Point3d& ptGrid, Point3d& ptSel) = 0 ; + virtual int GetLastSnapId( void) = 0 ; + virtual bool GetLastSnapDir( Vector3d& vtDir) = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EInAPI.h b/EInAPI.h index 095ef95..5f341aa 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -78,6 +78,8 @@ EIN_EXPORT BOOL __stdcall EgtPointLocToLoc( double* pdX, double* pdY, double* pd const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3]) ; EIN_EXPORT BOOL __stdcall EgtFrameFrom3Points( double ptO[3], double ptOnX[3], double ptNearY[3], double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3]) ; +EIN_EXPORT BOOL __stdcall EgtFrameOCS( double ptO[3], double vtDirZ[3], + double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3]) ; EIN_EXPORT BOOL __stdcall EgtFrameTranslate( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], const double vtMove[3]) ; EIN_EXPORT BOOL __stdcall EgtFrameRotate( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], @@ -116,6 +118,7 @@ EIN_EXPORT int __stdcall EgtCreateTextEx( int nParentId, const wchar_t* wsText, // GeomDB Create Curve EIN_EXPORT int __stdcall EgtCreateCurveLine( int nParentId, const double ptIni[3], const double ptFin[3]) ; +EIN_EXPORT int __stdcall EgtCreateCurveLinePVL( int nParentId, const double ptIni[3], const double vtDir[3], double dLen) ; EIN_EXPORT int __stdcall EgtCreateCurveLineMinPointCurve( int nParentId, const double ptStart[3], int nCrvId, double dNearPar) ; EIN_EXPORT int __stdcall EgtCreateCurveCircle( int nParentId, @@ -136,6 +139,8 @@ EIN_EXPORT int __stdcall EgtCreateCurveArc3P( int nParentId, const double ptP1[3], const double ptP2[3], const double ptP3[3]) ; EIN_EXPORT int __stdcall EgtCreateCurveArcC2PN( int nParentId, const double ptCen[3], const double ptStart[3], const double ptNearEnd[3], const double vtNorm[3]) ; +EIN_EXPORT int __stdcall EgtCreateCurveArc2PVN( int nParentId, const double ptStart[3], + const double ptEnd[3], const double vtDirS[3], const double vtNorm[3]) ; EIN_EXPORT int __stdcall EgtCreateCurveBezier( int nParentId, int nDegree, const double ptCtrls[/*3x(nDegree+1)*/]) ; EIN_EXPORT int __stdcall EgtCreateCurveBezierRational( int nParentId, int nDegree, @@ -208,7 +213,9 @@ EIN_EXPORT BOOL __stdcall EgtGetName( int nId, wchar_t*& wsName) ; EIN_EXPORT BOOL __stdcall EgtExistsName( int nId) ; EIN_EXPORT BOOL __stdcall EgtRemoveName( int nId) ; EIN_EXPORT BOOL __stdcall EgtSetInfo( int nId, const wchar_t* wsKey, const wchar_t* wsInfo) ; +EIN_EXPORT BOOL __stdcall EgtSetInfoInt( int nId, const wchar_t* wsKey, int nInfo) ; EIN_EXPORT BOOL __stdcall EgtGetInfo( int nId, const wchar_t* wsKey, wchar_t*& wsInfo) ; +EIN_EXPORT BOOL __stdcall EgtGetInfoInt( int nId, const wchar_t* wsKey, int* pnInfo) ; EIN_EXPORT BOOL __stdcall EgtExistsInfo( int nId, const wchar_t* wsKey) ; EIN_EXPORT BOOL __stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey) ; @@ -257,6 +264,7 @@ EIN_EXPORT BOOL __stdcall EgtExtendCurveEndByLen( int nId, double dLen) ; EIN_EXPORT BOOL __stdcall EgtExtendCurveByLen( int nId, double dLen, const double ptNear[3]) ; EIN_EXPORT BOOL __stdcall EgtSplitCurveAtPoint( int nId, double ptOn[3]) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveCircleCPN( int nId, const double ptOn[3]) ; +EIN_EXPORT BOOL __stdcall EgtModifyCurveArcRadius( int nId, double dRad) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveArcC2PN( int nId, const double ptEnd[3]) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveArc3P( int nId, const double ptMid[3]) ; EIN_EXPORT BOOL __stdcall EgtSeparateCurveCompo( int nId) ; @@ -275,10 +283,14 @@ EIN_EXPORT BOOL __stdcall EgtMidVector( int nId, double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtAtParamVector( int nId, double dU, int nSide, double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtFrame( int nId, double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3]) ; -EIN_EXPORT BOOL __stdcall EgtVectorToIdGlob( double vtV[3], int nId) ; -EIN_EXPORT BOOL __stdcall EgtVectorToIdLoc( double vtV[3], int nId) ; +EIN_EXPORT BOOL __stdcall EgtCurveExtrusion( int nId, double vtExtr[3]) ; +EIN_EXPORT BOOL __stdcall EgtCurveThickness( int nId, double* pdThick) ; +EIN_EXPORT BOOL __stdcall EgtCurveArcNormVersor( int nId, double vtNorm[3]) ; +EIN_EXPORT BOOL __stdcall EgtExtTextNormVersor( int nId, double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtPointToIdGlob( double ptP[3], int nId) ; EIN_EXPORT BOOL __stdcall EgtPointToIdLoc( double ptP[3], int nId) ; +EIN_EXPORT BOOL __stdcall EgtVectorToIdGlob( double vtV[3], int nId) ; +EIN_EXPORT BOOL __stdcall EgtVectorToIdLoc( double vtV[3], int nId) ; // Geo Transform EIN_EXPORT BOOL __stdcall EgtMove( int nId, double vVtMove[3]) ; @@ -328,6 +340,8 @@ EIN_EXPORT BOOL __stdcall EgtUnselectableRemove( int nId) ; EIN_EXPORT BOOL __stdcall EgtUnselectableClearAll( void) ; EIN_EXPORT BOOL __stdcall EgtGetGraphicSnapPoint( int nSnap, int nWinX, int nWinY, int nSelW, int nSelH, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtGetGridSnapPointZ( BOOL bSketch, int nWinX, int nWinY, const double ptGrid[3], double ptP[3]) ; +EIN_EXPORT int __stdcall EgtGetLastSnapId( void) ; +EIN_EXPORT BOOL __stdcall EgtGetLastSnapDir( double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtSetShowMode( int nShowMode, BOOL bRedraw) ; EIN_EXPORT int __stdcall EgtGetShowMode( void) ; EIN_EXPORT BOOL __stdcall EgtSetShowCurveDirection( BOOL bShow, BOOL bRedraw) ; diff --git a/EgkCurveArc.h b/EgkCurveArc.h index 3d28b44..79ce119 100644 --- a/EgkCurveArc.h +++ b/EgkCurveArc.h @@ -28,6 +28,7 @@ class __declspec( novtable) ICurveArc : public ICurve virtual bool Set3P( const Point3d& ptStart, const Point3d& ptOther, const Point3d& ptEnd, bool bCirc = false) = 0 ; virtual bool Set2PNB( const Point3d& ptIni, const Point3d& ptFin, const Vector3d& vtN, double dBulge) = 0 ; virtual bool Set2PD( const Point3d& ptStart, const Point3d& ptEnd, double dDirStartDeg) = 0 ; + virtual bool Set2PVN( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDirS, const Vector3d& vtN) = 0 ; virtual bool Set2PRS( const Point3d& ptStart, const Point3d& ptEnd, double dRad, bool bCCW = true) = 0 ; virtual bool Set2PNRS( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN, double dRad, bool bCCW = true) = 0 ; virtual bool SetC2P( const Point3d& ptCen, const Point3d& ptStart, const Point3d& ptNearEnd) = 0 ;