EgtGeomKernel 1.9g1 :
- migliorata CollisionAvoidance con utensili generici - gestione Tool potenziata con possibilità di restituire il profilo.
This commit is contained in:
+123
-81
@@ -18,8 +18,10 @@
|
||||
using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LineDisc( const Point3d& ptPDisc, const Point3d& ptPLine, const Vector3d& vtVDisc, const Vector3d& vtVLine,
|
||||
double dRad, double& dU1, double& dU2)
|
||||
int
|
||||
LineDisc( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptPDisc, const Vector3d& vtVDisc, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType ;
|
||||
// Se il raggio non è significativamente
|
||||
@@ -115,10 +117,12 @@ int LineDisc( const Point3d& ptPDisc, const Point3d& ptPLine, const Vector3d& vt
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RayDisc( const Point3d& ptPDisc, const Point3d& ptPLine, const Vector3d& vtVDisc, const Vector3d& vtVLine,
|
||||
double dRad, double& dU1, double& dU2)
|
||||
int
|
||||
RayDisc( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptPDisc, const Vector3d& vtVDisc, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineDisc( ptPDisc, ptPLine, vtVDisc, vtVLine, dRad, dU1, dU2) ;
|
||||
int nIntType = LineDisc( ptPLine, vtVLine, ptPDisc, vtVDisc, dRad, dU1, dU2) ;
|
||||
if ( nIntType == D_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -148,10 +152,12 @@ int RayDisc( const Point3d& ptPDisc, const Point3d& ptPLine, const Vector3d& vtV
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentDisc( const Point3d& ptPDisc, const Point3d& ptPLine, const Vector3d& vtVDisc, const Vector3d& vtVLine,
|
||||
double dRad, double dLen, double& dU1, double& dU2)
|
||||
int
|
||||
SegmentDisc( const Point3d& ptPLine, const Vector3d& vtVLine, double dLen,
|
||||
const Point3d& ptPDisc, const Vector3d& vtVDisc, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineDisc( ptPDisc, ptPLine, vtVDisc, vtVLine, dRad, dU1, dU2) ;
|
||||
int nIntType = LineDisc( ptPLine, vtVLine, ptPDisc, vtVDisc, dRad, dU1, dU2) ;
|
||||
if ( nIntType == D_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -182,8 +188,10 @@ int SegmentDisc( const Point3d& ptPDisc, const Point3d& ptPLine, const Vector3d&
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LineSphere( const Point3d& ptSphC, const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
double dRad, double& dU1, double& dU2)
|
||||
int
|
||||
LineSphere( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptSphC, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = S_ERROR_INT ;
|
||||
// Se il raggio non è significativamente
|
||||
@@ -219,10 +227,12 @@ int LineSphere( const Point3d& ptSphC, const Point3d& ptPLine, const Vector3d& v
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RaySphere( const Point3d& ptSphC, const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
double dRad, double& dU1, double& dU2)
|
||||
int
|
||||
RaySphere( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptSphC, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineSphere( ptSphC, ptPLine, vtVLine, dRad, dU1, dU2) ;
|
||||
int nIntType = LineSphere( ptPLine, vtVLine, ptSphC, dRad, dU1, dU2) ;
|
||||
if ( nIntType == S_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -250,10 +260,12 @@ int RaySphere( const Point3d& ptSphC, const Point3d& ptPLine, const Vector3d& vt
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentSphere( const Point3d& ptSphC, const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
double dRad, double dLen, double& dU1, double& dU2)
|
||||
int
|
||||
SegmentSphere( const Point3d& ptPLine, const Vector3d& vtVLine, double dLen,
|
||||
const Point3d& ptSphC, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineSphere( ptSphC, ptPLine, vtVLine, dRad, dU1, dU2) ;
|
||||
int nIntType = LineSphere( ptPLine, vtVLine, ptSphC, dRad, dU1, dU2) ;
|
||||
if ( nIntType == S_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -296,11 +308,12 @@ int SegmentSphere( const Point3d& ptSphC, const Point3d& ptPLine, const Vector3d
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LineSemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
const Vector3d& vtSSphOrient, const Vector3d& vtVLine,
|
||||
double dRad, double& dU1, double& dU2)
|
||||
int
|
||||
LineSemiSphere( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptSphC, const Vector3d& vtSSphOrient, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineSphere( ptSphC, ptPLine, vtVLine, dRad, dU1, dU2) ;
|
||||
int nIntType = LineSphere( ptPLine, vtVLine, ptSphC, dRad, dU1, dU2) ;
|
||||
if ( nIntType == S_ERROR_INT || ( ! vtSSphOrient.IsNormalized()))
|
||||
return S_ERROR_INT ;
|
||||
// Un punto di tangenza
|
||||
@@ -340,11 +353,12 @@ int LineSemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RaySemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
const Vector3d& vtSSphOrient, const Vector3d& vtVLine,
|
||||
double dRad, double& dU1, double& dU2)
|
||||
int
|
||||
RaySemiSphere( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptSphC, const Vector3d& vtSSphOrient, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = RaySphere( ptSphC, ptPLine, vtVLine, dRad, dU1, dU2) ;
|
||||
int nIntType = RaySphere( ptPLine, vtVLine, ptSphC, dRad, dU1, dU2) ;
|
||||
if ( nIntType == S_ERROR_INT || ( ! vtSSphOrient.IsNormalized()))
|
||||
return S_ERROR_INT ;
|
||||
// Un Punto in cui la semi-retta interferisce con la semi-sfera
|
||||
@@ -384,11 +398,12 @@ int RaySemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentSemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
const Vector3d& vtSSphOrient, const Vector3d& vtVLine,
|
||||
double dRad, double dLen, double& dU1, double& dU2)
|
||||
int
|
||||
SegmentSemiSphere( const Point3d& ptPLine, const Vector3d& vtVLine, double dLen,
|
||||
const Point3d& ptSphC, const Vector3d& vtSSphOrient, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = SegmentSphere( ptSphC, ptPLine, vtVLine, dRad, dLen, dU1, dU2) ;
|
||||
int nIntType = SegmentSphere( ptPLine, vtVLine, dLen, ptSphC, dRad, dU1, dU2) ;
|
||||
if ( nIntType == S_ERROR_INT || ( ! vtSSphOrient.IsNormalized()))
|
||||
return S_ERROR_INT ;
|
||||
// Un Punto in cui il segmento interferisce con la semi-sfera
|
||||
@@ -428,20 +443,21 @@ int SegmentSemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LinCompSemiSphere( const Point3d& ptSphC, const Point3d& ptPLine,
|
||||
const Vector3d& vtSSphOrient, const Vector3d& vtVLine,
|
||||
double dRad, double dLen, int nLinType, double& dU1, double& dU2)
|
||||
int
|
||||
LinCompSemiSphere( const Point3d& ptPLine, const Vector3d& vtVLine, double dLen, int nLinType,
|
||||
const Point3d& ptSphC, const Vector3d& vtSSphOrient, double dRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType ;
|
||||
// Retta
|
||||
if ( nLinType == Line)
|
||||
nIntType = LineSphere( ptSphC, ptPLine, vtVLine, dRad, dU1, dU2) ;
|
||||
nIntType = LineSphere( ptPLine, vtVLine, ptSphC, dRad, dU1, dU2) ;
|
||||
// Semi-retta
|
||||
else if ( nLinType == Ray)
|
||||
nIntType = RaySphere( ptSphC, ptPLine, vtVLine, dRad, dU1, dU2) ;
|
||||
nIntType = RaySphere( ptPLine, vtVLine, ptSphC, dRad, dU1, dU2) ;
|
||||
// Segmento
|
||||
else if ( nLinType == Segment)
|
||||
nIntType = SegmentSphere( ptSphC, ptPLine, vtVLine, dRad, dLen, dU1, dU2) ;
|
||||
nIntType = SegmentSphere( ptPLine, vtVLine, dLen, ptSphC, dRad, dU1, dU2) ;
|
||||
// Errore
|
||||
else
|
||||
nIntType = S_ERROR_INT ;
|
||||
@@ -690,8 +706,9 @@ IntersLineSemiFiniteCylinder( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
RaySemiFiniteCylinder( const Point3d& ptPCyl, const Point3d& ptPLine, const Vector3d& vtVCyl, const Vector3d& vtVLine,
|
||||
double dCylRad, double& dU1, double& dU2)
|
||||
RaySemiFiniteCylinder( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptPCyl, const Vector3d& vtVCyl, double dCylRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = IntersLineSemiFiniteCylinder( ptPLine, vtVLine, ptPCyl, vtVCyl, dCylRad, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
@@ -736,8 +753,9 @@ RaySemiFiniteCylinder( const Point3d& ptPCyl, const Point3d& ptPLine, const Vect
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
SegmentSemiFiniteCylinder( const Point3d& ptPCyl, const Point3d& ptPLine, const Vector3d& vtVCyl, const Vector3d& vtVLine,
|
||||
double dCylRad, double dLen, double& dU1, double& dU2)
|
||||
SegmentSemiFiniteCylinder( const Point3d& ptPLine, const Vector3d& vtVLine, double dLen,
|
||||
const Point3d& ptPCyl, const Vector3d& vtVCyl, double dCylRad,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = IntersLineSemiFiniteCylinder( ptPLine, vtVLine, ptPCyl, vtVCyl, dCylRad, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
@@ -861,8 +879,9 @@ IntersLineCylinder( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
RayCylinder( const Point3d& ptPCyl, const Point3d& ptPLine, const Vector3d& vtVCyl, const Vector3d& vtVLine,
|
||||
double dCylRad, double dCylHeigth, double& dU1, double& dU2)
|
||||
RayCylinder( const Point3d& ptPLine, const Vector3d& vtVLine,
|
||||
const Point3d& ptPCyl, const Vector3d& vtVCyl, double dCylRad, double dCylHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = IntersLineCylinder( ptPLine, vtVLine, ptPCyl, vtVCyl, dCylRad, dCylHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
@@ -972,8 +991,9 @@ IntersSegmentCylinder( const Point3d& ptPLine, const Vector3d& vtVLine, double d
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
LineInfiniteCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dConeRad, double dConeHeigth, double& dU1, double& dU2)
|
||||
LineInfiniteCone( const Point3d& ptPLine, const Vector3d& vtDLine,
|
||||
const Point3d& ptVCone, const Vector3d& vtDCone, double dConeRad, double dConeHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType ;
|
||||
// Raggio e altezza del cono devono essere maggiori di zero
|
||||
@@ -1117,10 +1137,12 @@ LineInfiniteCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RayInfiniteCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dConeRad, double dConeHeigth, double& dU1, double& dU2)
|
||||
int
|
||||
RayInfiniteCone( const Point3d& ptPLine, const Vector3d& vtDLine,
|
||||
const Point3d& ptVCone, const Vector3d& vtDCone, double dConeRad, double dConeHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineInfiniteCone( ptVCone, ptPLine, vtDCone, vtDLine, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
int nIntType = LineInfiniteCone( ptPLine, vtDLine, ptVCone, vtDCone, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1163,10 +1185,12 @@ int RayInfiniteCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vecto
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentInfiniteCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dConeRad, double dConeHeigth, double dSgLen, double& dU1, double& dU2)
|
||||
int
|
||||
SegmentInfiniteCone( const Point3d& ptPLine, const Vector3d& vtDLine, double dSgLen,
|
||||
const Point3d& ptVCone, const Vector3d& vtDCone, double dConeRad, double dConeHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineInfiniteCone( ptVCone, ptPLine, vtDCone, vtDLine, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
int nIntType = LineInfiniteCone( ptPLine, vtDLine, ptVCone, vtDCone, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1233,10 +1257,12 @@ int SegmentInfiniteCone( const Point3d& ptVCone, const Point3d& ptPLine, const V
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LineCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dConeRad, double dConeHeigth, double& dU1, double& dU2)
|
||||
int
|
||||
LineCone( const Point3d& ptPLine, const Vector3d& vtDLine,
|
||||
const Point3d& ptVCone, const Vector3d& vtDCone, double dConeRad, double dConeHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineInfiniteCone( ptVCone, ptPLine, vtDCone, vtDLine, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
int nIntType = LineInfiniteCone( ptPLine, vtDLine, ptVCone, vtDCone, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
// Tangnte dell'angolo semi-apertura del cono
|
||||
@@ -1285,10 +1311,12 @@ int LineCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vt
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RayCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dConeRad, double dConeHeigth, double& dU1, double& dU2)
|
||||
int
|
||||
RayCone( const Point3d& ptPLine, const Vector3d& vtDLine,
|
||||
const Point3d& ptVCone, const Vector3d& vtDCone, double dConeRad, double dConeHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineCone( ptVCone, ptPLine, vtDCone, vtDLine, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
int nIntType = LineCone( ptPLine, vtDLine, ptVCone, vtDCone, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
// Parte della retta associata
|
||||
@@ -1332,10 +1360,12 @@ int RayCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtD
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dConeRad, double dConeHeigth, double dSgLen, double& dU1, double& dU2)
|
||||
int
|
||||
SegmentCone( const Point3d& ptPLine, const Vector3d& vtDLine, double dSgLen,
|
||||
const Point3d& ptVCone, const Vector3d& vtDCone, double dConeRad, double dConeHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineCone( ptVCone, ptPLine, vtDCone, vtDLine, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
int nIntType = LineCone( ptPLine, vtDLine, ptVCone, vtDCone, dConeRad, dConeHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1398,8 +1428,10 @@ int SegmentCone( const Point3d& ptVCone, const Point3d& ptPLine, const Vector3d&
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LineTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dMinRad, double dMaxRad, double dHeigth, double& dU1, double& dU2)
|
||||
int
|
||||
LineTruncatedCone( const Point3d& ptPLine, const Vector3d& vtDLine,
|
||||
const Point3d& ptMinBase, const Vector3d& vtDCone, double dMinRad, double dMaxRad, double dHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
// Controlli sull'ammissibilità del tronco di cono
|
||||
if ( ! ( dMinRad > EPS_SMALL && dMaxRad > EPS_SMALL && dHeigth > EPS_SMALL))
|
||||
@@ -1408,7 +1440,7 @@ int LineTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, const V
|
||||
double dDeltaH = dMinRad * dHeigth / ( dMaxRad - dMinRad) ;
|
||||
Point3d ptVCone = ptMinBase - dDeltaH * vtDCone ;
|
||||
|
||||
int nIntType = LineInfiniteCone( ptVCone, ptPLine, vtDCone, vtDLine, dMinRad, dDeltaH, dU1, dU2) ;
|
||||
int nIntType = LineInfiniteCone( ptPLine, vtDLine, ptVCone, vtDCone, dMinRad, dDeltaH, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1468,10 +1500,12 @@ int LineTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, const V
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RayTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dMinRad, double dMaxRad, double dHeigth, double& dU1, double& dU2)
|
||||
int
|
||||
RayTruncatedCone( const Point3d& ptPLine, const Vector3d& vtDLine,
|
||||
const Point3d& ptMinBase, const Vector3d& vtDCone, double dMinRad, double dMaxRad, double dHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineTruncatedCone( ptMinBase, ptPLine, vtDCone, vtDLine, dMinRad, dMaxRad, dHeigth, dU1, dU2) ;
|
||||
int nIntType = LineTruncatedCone( ptPLine, vtDLine, ptMinBase, vtDCone, dMinRad, dMaxRad, dHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1517,10 +1551,12 @@ int RayTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, const Ve
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, const Vector3d& vtDCone, const Vector3d& vtDLine,
|
||||
double dMinRad, double dMaxRad, double dHeigth, double dSgLen, double& dU1, double& dU2)
|
||||
int
|
||||
SegmentTruncatedCone( const Point3d& ptPLine, const Vector3d& vtDLine, double dSgLen,
|
||||
const Point3d& ptMinBase, const Vector3d& vtDCone, double dMinRad, double dMaxRad, double dHeigth,
|
||||
double& dU1, double& dU2)
|
||||
{
|
||||
int nIntType = LineTruncatedCone( ptMinBase, ptPLine, vtDCone, vtDLine, dMinRad, dMaxRad, dHeigth, dU1, dU2) ;
|
||||
int nIntType = LineTruncatedCone( ptPLine, vtDLine, ptMinBase, vtDCone, dMinRad, dMaxRad, dHeigth, dU1, dU2) ;
|
||||
if ( nIntType == CC_ERROR_INT)
|
||||
return nIntType ;
|
||||
// Parte della retta associata giace sul tronco
|
||||
@@ -1583,8 +1619,10 @@ int SegmentTruncatedCone( const Point3d& ptMinBase, const Point3d& ptPLine, cons
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int LineTorus( const Point3d& ptOTorus, const Point3d& ptLine, const Vector3d& vtAxTorus, const Vector3d& vtLine,
|
||||
double dMinRad, double dMaxRad, vector<double>& vdPar, vector<bool>& vbType)
|
||||
int
|
||||
LineTorus( const Point3d& ptLine, const Vector3d& vtLine,
|
||||
const Point3d& ptOTorus, const Vector3d& vtAxTorus, double dMinRad, double dMaxRad,
|
||||
vector<bool>& vbType, vector<double>& vdPar)
|
||||
{
|
||||
int nIntType = T_ERROR ;
|
||||
// Si richiede che i vettori siano normalizzati
|
||||
@@ -1734,10 +1772,12 @@ int LineTorus( const Point3d& ptOTorus, const Point3d& ptLine, const Vector3d& v
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int RayTorus( const Point3d& ptOTorus, const Point3d& ptLine, const Vector3d& vtAxTorus, const Vector3d& vtLine,
|
||||
double dMinRad, double dMaxRad, vector<double>& vdPar, vector<bool>& vbType)
|
||||
int
|
||||
RayTorus( const Point3d& ptLine, const Vector3d& vtLine,
|
||||
const Point3d& ptOTorus, const Vector3d& vtAxTorus, double dMinRad, double dMaxRad,
|
||||
vector<bool>& vbType, vector<double>& vdPar)
|
||||
{
|
||||
int nIntType = LineTorus( ptOTorus, ptLine, vtAxTorus, vtLine, dMinRad, dMaxRad, vdPar, vbType) ;
|
||||
int nIntType = LineTorus( ptLine, vtLine, ptOTorus, vtAxTorus, dMinRad, dMaxRad, vbType, vdPar) ;
|
||||
if ( nIntType == T_ERROR || nIntType == T_NO_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1818,10 +1858,12 @@ int RayTorus( const Point3d& ptOTorus, const Point3d& ptLine, const Vector3d& vt
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int SegmentTorus( const Point3d& ptOTorus, const Point3d& ptLine, const Vector3d& vtAxTorus, const Vector3d& vtLine,
|
||||
double dMinRad, double dMaxRad, double dSgLen, vector<double>& vdPar, vector<bool>& vbType)
|
||||
int
|
||||
SegmentTorus( const Point3d& ptLine, const Vector3d& vtLine, double dSgLen,
|
||||
const Point3d& ptOTorus, const Vector3d& vtAxTorus, double dMinRad, double dMaxRad,
|
||||
vector<bool>& vbType, vector<double>& vdPar)
|
||||
{
|
||||
int nIntType = LineTorus( ptOTorus, ptLine, vtAxTorus, vtLine, dMinRad, dMaxRad, vdPar, vbType) ;
|
||||
int nIntType = LineTorus( ptLine, vtLine, ptOTorus, vtAxTorus, dMinRad, dMaxRad, vbType, vdPar) ;
|
||||
if ( nIntType == T_ERROR || nIntType == T_NO_INT)
|
||||
return nIntType ;
|
||||
|
||||
@@ -1904,21 +1946,21 @@ int SegmentTorus( const Point3d& ptOTorus, const Point3d& ptLine, const Vector3d
|
||||
//----------------------------------------------------------------------------
|
||||
// Valuta la posizione reciproca fra un componente lineare e la parte inferiore
|
||||
// ed esterna rispetto al centro di una superficie torica.
|
||||
int LinCompTorusExtInt( const Point3d& ptOTorus, const Point3d& ptLine,
|
||||
const Vector3d& vtAxTorus, const Vector3d& vtLine,
|
||||
double dMinRad, double dMaxRad, double dSgLen, int nLinType,
|
||||
vector<double>& vdPar, vector<bool>& vbType)
|
||||
int
|
||||
LinCompTorusExtInt( const Point3d& ptLine, const Vector3d& vtLine, double dSgLen, int nLinType,
|
||||
const Point3d& ptOTorus, const Vector3d& vtAxTorus, double dMinRad, double dMaxRad,
|
||||
vector<bool>& vbType, vector<double>& vdPar)
|
||||
{
|
||||
int nIntType ;
|
||||
// Retta
|
||||
if ( nLinType == Line)
|
||||
nIntType = LineTorus( ptOTorus, ptLine, vtAxTorus, vtLine, dMinRad, dMaxRad, vdPar, vbType) ;
|
||||
nIntType = LineTorus( ptLine, vtLine, ptOTorus, vtAxTorus, dMinRad, dMaxRad, vbType, vdPar) ;
|
||||
// Semi-retta
|
||||
else if ( nLinType == Ray)
|
||||
nIntType = RayTorus( ptOTorus, ptLine, vtAxTorus, vtLine, dMinRad, dMaxRad, vdPar, vbType) ;
|
||||
nIntType = RayTorus( ptLine, vtLine, ptOTorus, vtAxTorus, dMinRad, dMaxRad, vbType, vdPar) ;
|
||||
// Segmento
|
||||
else if ( nLinType == Segment)
|
||||
nIntType = SegmentTorus( ptOTorus, ptLine, vtAxTorus, vtLine, dMinRad, dMaxRad, dSgLen, vdPar, vbType) ;
|
||||
nIntType = SegmentTorus( ptLine, vtLine, dSgLen, ptOTorus, vtAxTorus, dMinRad, dMaxRad, vbType, vdPar) ;
|
||||
// Errore
|
||||
else
|
||||
nIntType = S_ERROR_INT ;
|
||||
|
||||
Reference in New Issue
Block a user