diff --git a/Color.cpp b/Color.cpp index 78849fe..2a98971 100644 --- a/Color.cpp +++ b/Color.cpp @@ -90,8 +90,8 @@ Color GetSurfBackColor( Color cCol) { float fLum = ( cCol.GetRed() + cCol.GetGreen() + cCol.GetBlue()) / 3 ; - return Color( 0.4 * fLum + 0.2 * cCol.GetRed(), - 0.4 * fLum + 0.2 * cCol.GetGreen(), - 0.4 * fLum + 0.2 * cCol.GetBlue(), + return Color( 0.4 * fLum + 0.4 * cCol.GetRed(), + 0.4 * fLum + 0.4 * cCol.GetGreen(), + 0.4 * fLum + 0.4 * cCol.GetBlue(), cCol.GetAlpha()) ; } diff --git a/CurveCompositeOffset.cpp b/CurveCompositeOffset.cpp index ffefa38..5bd390a 100644 --- a/CurveCompositeOffset.cpp +++ b/CurveCompositeOffset.cpp @@ -295,15 +295,17 @@ VerifyAndAdjustExternalAngle( ICurve* pCrv1, ICurve* pCrv2, double dDist, int nT if ( IsNull( pCrvOri2) || ! pCrvOri2->SimpleOffset( - dDist, nType)) return false ; // eseguo calcolo spostato su curve originali - Point3d ptDummy ; double dU1 = 1 ; double dU2 = 0 ; + Point3d ptDummy ; + Vector3d vtDir1b ; + Vector3d vtDir2b ; if ( ! MoveParamToAvoidTg( dU1, ICurve::FROM_MINUS, *pCrvOri1) || - ! pCrvOri1->GetPointTang( dU1, ICurve::FROM_MINUS, ptDummy, vtDir1) || + ! pCrvOri1->GetPointTang( dU1, ICurve::FROM_MINUS, ptDummy, vtDir1b) || ! MoveParamToAvoidTg( dU2, ICurve::FROM_PLUS, *pCrvOri2) || - ! pCrvOri2->GetPointTang( dU2, ICurve::FROM_PLUS, ptDummy, vtDir2)) + ! pCrvOri2->GetPointTang( dU2, ICurve::FROM_PLUS, ptDummy, vtDir2b)) return false ; - if ( ! vtDir1.GetAngleXY( vtDir2, dAngDeg)) + if ( ! vtDir1b.GetAngleXY( vtDir2b, dAngDeg)) return false ; } @@ -336,7 +338,7 @@ VerifyAndAdjustExternalAngle( ICurve* pCrv1, ICurve* pCrv2, double dDist, int nT case ICurve::OFF_CHAMFER : { // lunghezza aggiuntiva in tangenza - double dLen = dDist * tan( fabs( dAngDeg) / 4 * DEGTORAD) ; + double dLen = fabs( dDist) * tan( fabs( dAngDeg) / 4 * DEGTORAD) ; // punti di costruzione smusso Point3d ptP1, ptP1a, ptP2a, ptP2 ; if ( ! pCrv1->GetEndPoint( ptP1) || ! pCrv2->GetStartPoint( ptP2)) @@ -387,7 +389,7 @@ VerifyAndAdjustExternalAngle( ICurve* pCrv1, ICurve* pCrv2, double dDist, int nT case ICurve::OFF_EXTEND : { // lunghezza aggiuntiva in tangenza - double dLen = dDist * tan( fabs( dAngDeg) / 2 * DEGTORAD) ; + double dLen = fabs( dDist) * tan( fabs( dAngDeg) / 2 * DEGTORAD) ; // punti di costruzione estensione Point3d ptP1, ptPc, ptP2 ; if ( ! pCrv1->GetEndPoint( ptP1) || ! pCrv2->GetStartPoint( ptP2)) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index df59174..3b7967c 100644 Binary files a/EgtGeomKernel.rc and b/EgtGeomKernel.rc differ diff --git a/GdbExecutor.cpp b/GdbExecutor.cpp index b6e1bbf..23fd51c 100644 --- a/GdbExecutor.cpp +++ b/GdbExecutor.cpp @@ -47,8 +47,7 @@ using namespace std ; //---------------------------------------------------------------------------- // Per Id di entità -static const int ID_SEL = -2 ; -static const int ID_NO = -3 ; +static const int ID_NO = -99 ; // Per tipo di costruzione di poligono static const int POLYG_INSCR = 1 ; static const int POLYG_CIRC = 2 ; @@ -160,7 +159,7 @@ GdbExecutor::AddStandardVariables( void) return false ; // imposto variabili predefinite m_pParser->AddVariable( "$ROOT", GDB_ID_ROOT) ; - m_pParser->AddVariable( "$SEL", ID_SEL) ; + m_pParser->AddVariable( "$SEL", GDB_ID_SEL) ; m_pParser->AddVariable( "$NN", ID_NO) ; // verifico la corrispondenza tra GDB_ID_NULL e CMD_ID_NULL return ( GDB_ID_NULL == CMD_ID_NULL) ; @@ -2983,7 +2982,7 @@ GdbExecutor::GetNamesParam( const string& sParam, INTVECTOR& vnNames) for ( Iter = vsNames.begin() ; Iter != vsNames.end() ; ++Iter) { Trim( (*Iter), " \t\r\n()") ; int nId = GetIdParam( *Iter) ; - if ( nId != ID_SEL) { + if ( nId != GDB_ID_SEL) { vnNames.push_back( nId) ; } else { @@ -3434,7 +3433,7 @@ GdbExecutor::GetPointsParam( const string& sParam, const Frame3d& frPnt, PolyLin STRVECTOR::iterator Iter ; for ( Iter = vsPoints.begin() ; Iter != vsPoints.end() ; ++Iter) { Trim( (*Iter), " \t\r\n") ; - if ( GetIdParam( *Iter) == ID_SEL) { + if ( GetIdParam( *Iter) == GDB_ID_SEL) { int nId = m_pGDB->GetFirstSelectedObj() ; while ( nId != GDB_ID_NULL) { Point3d ptP ; diff --git a/PointsPCA.h b/PointsPCA.h index a2d8770..0aceff0 100644 --- a/PointsPCA.h +++ b/PointsPCA.h @@ -13,8 +13,7 @@ #pragma once -#include "/EgtDev/Include/EGkFrame3d.h" -#include "/EgtDev/Include/EGkPlane3d.h" +#include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Extern/Eigen/Dense" //----------------------------------------------------------------------------