EgtMachKernel :
- corretta anteprima WaterJetting (poteva sbagliare disegno ingresso/uscita con geometria senza vettore estrusione).
This commit is contained in:
+7
-14
@@ -1753,7 +1753,7 @@ WaterJetting::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
AdjustPathForInternalAngles( pCompo) ;
|
||||
|
||||
// creo l'anteprima del percorso
|
||||
if ( ! GeneratePreView( nPxId, pCompo, dAddedOverlap))
|
||||
if ( ! GeneratePreView( nPxId, pCompo, vtTool, dAddedOverlap))
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -1793,7 +1793,7 @@ WaterJetting::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
WaterJetting::GeneratePreView( int nPathId, const ICurveComposite* pCompo, double dAddedOverlap)
|
||||
WaterJetting::GeneratePreView( int nPathId, const ICurveComposite* pCompo, const Vector3d& vtTool, double dAddedOverlap)
|
||||
{
|
||||
// colore taglio, dipendente da angolo di inclinazione
|
||||
Color colCut = TEAL ;
|
||||
@@ -1832,7 +1832,7 @@ WaterJetting::GeneratePreView( int nPathId, const ICurveComposite* pCompo, doubl
|
||||
m_pGeomDB->SetMaterial( nRRId, INVISIBLE) ;
|
||||
|
||||
// regione per attacco
|
||||
PtrOwner<ISurfFlatRegion> pSfrLI( GenerateLeadInPreview( pCompo, bClosed)) ;
|
||||
PtrOwner<ISurfFlatRegion> pSfrLI( GenerateLeadInPreview( pCompo, vtTool, bClosed)) ;
|
||||
if ( IsNull( pSfrLI))
|
||||
return false ;
|
||||
if ( pSfrLI->IsValid()) {
|
||||
@@ -1863,7 +1863,7 @@ WaterJetting::GeneratePreView( int nPathId, const ICurveComposite* pCompo, doubl
|
||||
}
|
||||
|
||||
// regione per uscita
|
||||
PtrOwner<ISurfFlatRegion> pSfrLO( GenerateLeadOutPreview( pCompo)) ;
|
||||
PtrOwner<ISurfFlatRegion> pSfrLO( GenerateLeadOutPreview( pCompo, vtTool)) ;
|
||||
if ( IsNull( pSfrLO))
|
||||
return false ;
|
||||
if ( pSfrLO->IsValid()) {
|
||||
@@ -2024,7 +2024,7 @@ WaterJetting::GeneratePreView( int nPathId, const ICurveComposite* pCompo, doubl
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ISurfFlatRegion*
|
||||
WaterJetting::GenerateLeadInPreview( const ICurveComposite* pCompo, bool bClosed)
|
||||
WaterJetting::GenerateLeadInPreview( const ICurveComposite* pCompo, const Vector3d& vtN, bool bClosed)
|
||||
{
|
||||
// Creo la superficie
|
||||
PtrOwner<ISurfFlatRegion> pSfr( CreateSurfFlatRegion()) ;
|
||||
@@ -2037,8 +2037,6 @@ WaterJetting::GenerateLeadInPreview( const ICurveComposite* pCompo, bool bClosed
|
||||
// Recupero punto e direzione iniziali del percorso
|
||||
Point3d ptStart ; pCompo->GetStartPoint( ptStart) ;
|
||||
Vector3d vtStart ; pCompo->GetStartDir( vtStart) ;
|
||||
// Recupero versore estrusione
|
||||
Vector3d vtN ; pCompo->GetExtrusion( vtN) ;
|
||||
|
||||
// Verifico il tipo
|
||||
int nType = GetLeadInType() ;
|
||||
@@ -2091,7 +2089,7 @@ WaterJetting::GenerateLeadInPreview( const ICurveComposite* pCompo, bool bClosed
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ISurfFlatRegion*
|
||||
WaterJetting::GenerateLeadOutPreview( const ICurveComposite* pCompo)
|
||||
WaterJetting::GenerateLeadOutPreview( const ICurveComposite* pCompo, const Vector3d& vtN)
|
||||
{
|
||||
// Creo la regione
|
||||
PtrOwner<ISurfFlatRegion> pSfr( CreateSurfFlatRegion()) ;
|
||||
@@ -2121,8 +2119,6 @@ WaterJetting::GenerateLeadOutPreview( const ICurveComposite* pCompo)
|
||||
// Recupero punto e direzione iniziali del percorso
|
||||
Point3d ptEnd ; pCompo->GetEndPoint( ptEnd) ;
|
||||
Vector3d vtEnd ; pCompo->GetEndDir( vtEnd) ;
|
||||
// Recupero versore estrusione
|
||||
Vector3d vtN ; pCompo->GetExtrusion( vtN) ;
|
||||
// Calcolo la curva di uscita
|
||||
PtrOwner<ICurve> pCrv ;
|
||||
switch ( nType) {
|
||||
@@ -2329,9 +2325,6 @@ WaterJetting::AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTo
|
||||
// recupero distanze di sicurezza
|
||||
double dSafeZ = GetSafeZ() ;
|
||||
|
||||
// Recupero versore estrusione
|
||||
Vector3d vtN ; pCompo->GetExtrusion( vtN) ;
|
||||
|
||||
// verifico se la curva è chiusa a meno di eventuale dAddedOverlap
|
||||
bool bClosed = ( pCompo->IsClosed() || dAddedOverlap > EPS_SMALL) ;
|
||||
|
||||
@@ -2413,7 +2406,7 @@ WaterJetting::AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTo
|
||||
|
||||
// anello
|
||||
bool bLoopOk = true ;
|
||||
PtrOwner<ICurve> pCrvA( GetArc2PVN( ptPe, ptPs, vtEnd, vtN)) ;
|
||||
PtrOwner<ICurve> pCrvA( GetArc2PVN( ptPe, ptPs, vtEnd, vtTool)) ;
|
||||
if ( ! IsNull( pCrvA) && pCrvA->GetType() == CRV_ARC) {
|
||||
// verifico che l'anello non interferisca con la curva di lavoro
|
||||
IntersCurveCurve intAC( *pCrvA, *pCompo) ;
|
||||
|
||||
+3
-3
@@ -82,9 +82,9 @@ class WaterJetting : public Machining
|
||||
bool VerifySideAngle( void) ;
|
||||
bool ProcessPath( int nPathId, int nPvId, int nClId) ;
|
||||
bool AdjustPathForInternalAngles( ICurveComposite* pCompo) ;
|
||||
bool GeneratePreView( int nPathId, const ICurveComposite* pCompo, double dAddedOverlap) ;
|
||||
ISurfFlatRegion* GenerateLeadInPreview( const ICurveComposite* pCompo, bool bClosed) ;
|
||||
ISurfFlatRegion* GenerateLeadOutPreview( const ICurveComposite* pCompo) ;
|
||||
bool GeneratePreView( int nPathId, const ICurveComposite* pCompo, const Vector3d& vtTool, double dAddedOverlap) ;
|
||||
ISurfFlatRegion* GenerateLeadInPreview( const ICurveComposite* pCompo, const Vector3d& vtN, bool bClosed) ;
|
||||
ISurfFlatRegion* GenerateLeadOutPreview( const ICurveComposite* pCompo, const Vector3d& vtN) ;
|
||||
bool AddLoopsPreview( const ICurveComposite* pCompo, ISurfFlatRegion* pSPV) ;
|
||||
bool AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTool, bool bSplitArcs, double dAddedOverlap) ;
|
||||
bool AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, bool bSplit) ;
|
||||
|
||||
Reference in New Issue
Block a user