EgtGeomKernel 1.5f1 :
- aggiunta entità testo (con font Nfe e di sistema) - in tutte le rotate ora l'angolo è in gradi - aggiunta trasformazione Shear (scorrimento) - aggiunta trsformazione LocToLoc - Set/GetInfo specializzate per i diversi tipi di informazioni - Copy e Relocate con possibilità di indicare l'entità di riferimento rispetto a cui inserire - aggiunte trasformazioni a PolyLine.
This commit is contained in:
+22
-13
@@ -30,8 +30,9 @@ Point3d::Translate( const Vector3d& vtMove)
|
||||
// Rotazione
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Point3d::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngRad)
|
||||
Point3d::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
|
||||
{
|
||||
double dAngRad = dAngDeg * DEGTORAD ;
|
||||
return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ;
|
||||
}
|
||||
|
||||
@@ -41,11 +42,8 @@ Point3d::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngRad)
|
||||
bool
|
||||
Point3d::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng)
|
||||
{
|
||||
Vector3d vtDiff ;
|
||||
|
||||
|
||||
// vettore dall'asse al punto
|
||||
vtDiff = *this - ptAx ;
|
||||
Vector3d vtDiff = *this - ptAx ;
|
||||
if ( vtDiff.IsZero())
|
||||
return true ;
|
||||
|
||||
@@ -65,11 +63,8 @@ Point3d::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, doub
|
||||
bool
|
||||
Point3d::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ)
|
||||
{
|
||||
Vector3d vtDiff ;
|
||||
|
||||
|
||||
// vettore dal centro al punto
|
||||
vtDiff = *this - frRef.Orig() ;
|
||||
Vector3d vtDiff = *this - frRef.Orig() ;
|
||||
if ( vtDiff.IsZero())
|
||||
return true ;
|
||||
|
||||
@@ -89,11 +84,8 @@ Point3d::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCo
|
||||
bool
|
||||
Point3d::Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
|
||||
{
|
||||
Vector3d vtDiff ;
|
||||
|
||||
|
||||
// vettore dal riferimento al punto
|
||||
vtDiff = *this - ptOn ;
|
||||
Vector3d vtDiff = *this - ptOn ;
|
||||
if ( vtDiff.IsZero())
|
||||
return true ;
|
||||
|
||||
@@ -107,6 +99,23 @@ Point3d::Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Scorrimento
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Point3d::Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff)
|
||||
{
|
||||
// vettore dal riferimento al punto
|
||||
Vector3d vtDiff = *this - ptOn ;
|
||||
if ( vtDiff.IsZero())
|
||||
return true ;
|
||||
|
||||
// ricostruisco il punto
|
||||
*this += dCoeff * ( vtDiff * vtNorm) * vtDir ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Cambio di riferimento : dal riferimento al globale
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user