//---------------------------------------------------------------------------- // EgalTech 2016-2025 //---------------------------------------------------------------------------- // File : Operation.h Data : 09.05.25 Versione : 2.7e2 // Contenuto : Dichiarazione della classe Operation da cui derivano // Disposition e Machining. // // // // Modifiche : 29.04.16 DS Creazione modulo. // 09.05.25 DS Generalizzazionee funzione IsEmpty con tipo (EMPTY_*). // //---------------------------------------------------------------------------- #pragma once #include "MachMgr.h" #include "MachConst.h" #include "MachineStruConst.h" #include "CamData.h" #include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkUserObj.h" #include "/EgtDev/Include/EGkSelection.h" #include "/EgtDev/Include/EgtNumCollection.h" class CamData ; class ICurve ; class ICurveComposite ; //---------------------------------------------------------------------------- class Operation : public IUserObj { friend class Machine ; public : // IUserObj bool SetOwner( int nId, IGeomDB* pGDB) override ; int GetOwner( void) const override ; IGeomDB* GetGeomDB( void) const override ; bool Removing( int nParentId, int nNextId) override ; bool Relocate( int nOrigParentId, int nOrigNextId, int nRefId, int nSonBeforeAfter, bool bGlob) override ; public : virtual bool Init( MachMgr* pMchMgr) ; virtual bool SetPhase( int nPhase) { m_nPhase = nPhase ; return true ; } virtual int GetPhase( void) const { return m_nPhase ; } virtual bool RemoveHome( bool bMain = true) ; std::string GetName( void) const ; public : virtual int GetType( void) const = 0 ; virtual bool IsEmpty( int nEmptyType = 0) const = 0 ; virtual bool UpdateStatus( int nModif) = 0 ; public : bool GetInitialAxesValues( bool bSkipClimb, bool bMain, DBLVECTOR& vAxVal) const ; bool GetFinalAxesValues( bool bSkipRise, bool bMain, DBLVECTOR& vAxVal) const ; protected : virtual const std::string& GetToolName( void) const = 0 ; virtual const std::string& GetHeadName( void) const = 0 ; virtual int GetExitNbr( void) const = 0 ; virtual int GetSolCh( void) const = 0 ; virtual const std::string& GetToolTcPos( void) const = 0 ; virtual bool GetDoubleToolData( std::string& sDblTool, std::string& sDblTcPos, std::string& sDblHead, int& nDblExit) const = 0 ; virtual bool NeedPrevHome( void) const = 0 ; virtual bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const { return true ; } virtual bool AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const { return true ; } virtual bool NeedSplit( bool bSplit = true, bool bFeed = true) const { return ( bSplit && ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrIsRobot())) ; } virtual double GetMaxSplitLen( bool bSplit = true, bool bFeed = true) const { return ( bSplit && ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrIsRobot()) ? ( bFeed ? 5 : 50) : 0) ; } virtual double GetSafeZ( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 100 ; // MF_CURR_SAFEZ in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetSafeZ() ; } virtual double GetSafeAggrBottZ( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 10 ; // MF_CURR_SAFEAGGRBOTTZ in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetSafeAggrBottZ() ; } virtual double GetExtraLOnCutRegion( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 0 ; // MF_CURR_EXTRALCR in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetExtraLOnCutRegion() ; } virtual double GetExtraROnDrillRegion( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 0 ; // MF_CURR_EXTRARDR in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetExtraROnDrillRegion() ; } virtual double GetHoleDiamToler( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 10 * EPS_SMALL ; // MF_CURR_HOLEDTOL in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetHoleDiamToler() ; } virtual double GetExtSawArcMinRad( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 200 ; // MF_CURR_EXTSAWARCMINRAD in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetExtSawArcMinRad() ; } virtual double GetIntSawArcMaxSideAng( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 45 ; // MF_CURR_INTSAWARCMAXSIDEANG in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetIntSawArcMaxSideAng() ; } virtual bool GetSplitArcs( const Vector3d& vtTool) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrIsRobot() || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return true ; int nSplitArcs = m_pMchMgr->GetCurrMachiningsMgr()->GetSplitArcs() ; return ( nSplitArcs == SPLAR_ALWAYS || ( nSplitArcs == SPLAR_NO_XY_PLANE && ! vtTool.IsZplus()) || ( nSplitArcs == SPLAR_GEN_PLANE && vtTool.IsGeneric())) ; } virtual double GetApproxLinTol( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 50 * EPS_SMALL ; // MF_APPROX_LINTOL in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetApproxLinTol() ; } virtual double GetMaxDepthSafe( void) const { if ( m_pMchMgr == nullptr || m_pMchMgr->GetCurrMachiningsMgr() == nullptr) return 2 ; // MF_CURR_MAXDEPTHSAFE in MachiningsMgr return m_pMchMgr->GetCurrMachiningsMgr()->GetMaxDepthSafe() ; } protected : Operation( void) ; protected : bool IsAtLeastOnePathOk( void) const ; bool AreAllPathsOk( void) const ; bool GetToolpathsStatus( int& nCnt, int& nEmpty) const ; int GetFirstFullToolpath( bool bMain = true) const ; int GetNextFullToolpath( int nClPathId, bool bMain = true) const ; int GetLastFullToolpath( bool bMain = true) const ; int GetPrevFullToolpath( int nClPathId, bool bMain = true) const ; bool UpdateFollowingOperationsStatus( int nModif) ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dElev, Vector3d& vtNorm) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dElev, INTVECTOR& vRawStmId) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dElev, Vector3d& vtNorm, INTVECTOR& vRawStmId) const ; bool GetElevation( int nPhase, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, double dLen, const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, double dLen, double dSafeDist, const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtTool, double dRad, double dLen, const Vector3d& vtDir, double& dElev) const ; bool GetAhPointUnderRaw( const Point3d& ptP, const Vector3d& vtTool, double dToolRad, double dToolRadForElev, double dToolLen, bool bIsSaw, double dSafeZ, const Vector3d& vtDir, double& dElev) const ; bool GetUhPointAboveRaw( const Point3d& ptP, const Vector3d& vtTool, double dToolRad, double dToolRadForElev, double dToolLen, bool bIsSaw, double dSafeZ, const Vector3d& vtDir, double& dElev) const ; bool GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dDist) const ; bool GetAggrBottDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double dEncSafeH, double& dDist) const ; bool GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double dExpand, double& dDist, Vector3d& vtDir) const ; bool GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double dExpand, const Vector3d& vtMainDir, double dCosMaxDelta, double& dDist, Vector3d& vtDir) const ; bool GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, double& dRbDist) const { double dDummy ; return GetDistanceFromRawBottom( nPhase, nPathId, dToler, dRbDist, dDummy) ; } bool GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, double& dRbDist, double& dAllRbDist) const ; bool GetRawGlobBox( int nPhase, int nPathId, double dToler, BBox3d& b3Raw) const ; bool GetRawGlobBox( int nPhase, const BBox3d& b3Test, double dToler, BBox3d& b3Raw) const ; bool GetCurrRawsGlobBox( BBox3d& b3Raw) const ; bool AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nFaceUse, const Vector3d& vtFaceUse, const INTVECTOR& vnEdgesFaceUse, double dToolThick, int nGrade = 3) ; bool ApproxWithArcsIfUseful( ICurveComposite* pCompo, bool bCareTempProp = false) const ; bool ApproxWithLines( ICurveComposite* pCompo, bool bFeed = true) const ; bool VerifyArcs( ICurveComposite* pCompo, double dMaxAngCen = MAX_ANG_CEN) const ; bool CalcAndSetBBox( int nClId) ; bool CalcAndSetAxesBBox( void) ; std::string ExtractInfo( const std::string& sNotes, const std::string& sKey) const ; std::string ExtractHint( const std::string& sNotes) const ; bool SetBlockedRotAxis( const std::string& sBlockedAxis, bool bToolSetOk = false) const ; bool CalculateAxesValues( const std::string& sHint, bool bSolChExact = false, double dSingConeAng = 0) ; bool CalculateDoubleAxesValues( const std::string& sHint, bool bSolChExact = false, double dSingConeAng = 0) ; bool AdjustStartEndMovements( bool bVerifyPreviousLink = true) ; bool RemoveClimbRiseHome( bool bMain = true) ; double GetDeltaSafeZ( const Vector3d& vtTool) const ; bool TestCollisionAvoid( const DBLVECTOR& vAxStart, double dStartOffsX, const DBLVECTOR& vAxEnd, int* pnLKAMO = nullptr) const ; bool GetAggrBottomData( const std::string& sHead, AggrBottom& agbData) const ; bool IsAggrBottom( const std::string& sHead) const ; private : struct Position { int nSide ; DBLVECTOR vAxis ; int nFlag ; int nFlag2 ; int nMask ; std::string sInfo ; Position() : nSide( 0), nFlag( 0), nFlag2( 0), nMask( -1) {} } ; typedef std::vector POSVECTOR ; private : bool GetClPathInitialAxesValues( int nClPathId, bool bSkipClimb, DBLVECTOR& vAxVal) const ; bool GetClPathFinalAxesValues( int nClPathId, bool bSkipRise, DBLVECTOR& vAxVal) const ; bool GetInitialToolDir( bool bSkipClimb, Vector3d& vtTool) const ; bool GetClPathInitialToolDir( int nClPathId, bool bSkipClimb, Vector3d& vtTool) const ; bool GetFinalToolDir( bool bSkipRise, Vector3d& vtTool) const ; bool GetClPathFinalToolDir( int nClPathId, bool bSkipRise, Vector3d& vtTool) const ; const CamData* GetInitialCamData( bool bSkipClimb, bool bMain = true) const ; const CamData* GetClPathInitialCamData( int nClPathId, bool bSkipClimb) const ; const CamData* GetFinalCamData( bool bSkipRise, bool bMain = true) const ; const CamData* GetClPathFinalCamData( int nClPathId, bool bSkipRise) const ; bool ApplyHintToPrevAxRot( const std::string& sHint, const Machine* pMch, DBLVECTOR& vAxRotPrec) ; bool CalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) ; bool EraseAddedPoints( int nClPathId) ; bool MyCalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, bool bFirstTry, int& nOutStrC) ; bool CalculateMcentRotAxesValues( bool bFirst, const Vector3d& vtTool, const Vector3d& vtAux, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxRot) ; bool VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, const Point3d& ptP, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, int nCnt, int nEntId, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) ; bool CalculateClPathRobotAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) ; bool CalculateRobotAxesValues( bool bFirst, const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtAux, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxRot) ; bool VerifyRobotLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, const Point3d& ptP, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, int nCnt, int nEntId, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) ; bool GetAxisMidForTestCollisionAvoid( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, int nAxisOrder, Machine* pMch, DBLVECTOR& vAxMid) const ; bool OneMoveTestCollisionAvoid( const STRVECTOR& vAxName, const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, Machine* pMch, const INTVECTOR& vRawId, const INTVECTOR& vFxtId) const ; bool AdjustStartEndMovementsStd( bool bVerifyPreviousLink) ; bool AdjustOneStartEndMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOpe, const DBLVECTOR& vAxPrev, double dPrevOffsX, bool bMaxZ) ; bool AdjustStartEndMovementsNew( void) ; bool MoveHeadFromHomeToMach( bool bMain, const std::string& sToolName, const std::string& sHeadName, int nExitNbr, int nStartZMax, int nOtherLinkType) ; bool MoveHeadFromMachToMach( Operation* pPrevOpe, bool bPrevMain, const std::string& sPrevToolName, const std::string& sPrevHeadName, int nPrevExitNbr, bool bCurrMain, const std::string& sCurrToolName, const std::string& sCurrHeadName, int nCurrExitNbr, bool bToolChange, int nStartZMax, int nOtherLinkType, int nOtherLinkType1) ; bool MoveHeadFromMachToHome( Operation* pPrevOpe, bool bCurrMain, const std::string& sCurrToolName, const std::string& sCurrHeadName, int nCurrExitNbr, int nStartZMax, int nOtherLinkType) ; bool ManageDoubleOperNew( Operation* pPrevOpe) ; bool ManageSpecialLink( Operation* pPrevOpe, int nPrevClPathId, bool bPrevMain, Operation* pNextOpe, int nNextClPathId, bool bNextMain, int nStartZMax, int nOtherLinkType = LINK_NULL) ; bool ToolChangeNeeded( const Operation& Ope1, bool bMain1, const Operation& Ope2, bool bMain2) const ; bool AddSpecialClimb( const DBLVECTOR& vAxVal, bool bOk = true, int nClPathId = GDB_ID_NULL, bool bMain = true, int nFlag = 0, int nFlag2 = 0, int nMask = -1, const std::string& sInfo = "", bool bFirst = true) ; bool RemoveClimb( int nClPathId = GDB_ID_NULL, bool bMain = true) ; bool AddRise( DBLVECTOR& vAxVal, double dDelta = NAN, int nClPathId = GDB_ID_NULL, bool bMain = true, int nToMinMaxZ = 0) ; bool AddSpecialRise( const DBLVECTOR& vAxVal, bool bOk = true, int nClPathId = GDB_ID_NULL, bool bMain = true, int nFlag = 0, int nFlag2 = 0, int nMask = -1, const std::string& sInfo = "") ; bool RemoveRise( int nClPathId = GDB_ID_NULL, bool bMain = true) ; bool AddHome( bool bMain = true) ; bool AddRobotClimb( int nEntId, double dDeltaZ = NAN) ; bool CalcRobotAxesAbovePos( const Point3d& ptP, const Vector3d& vtT, const Vector3d& vtA, double dDeltaZ, DBLVECTOR& vAx, double* pdNewDeltaZ = nullptr) const ; bool CalcDeltaZForHeadRotation( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, double& dDeltaZ) const ; bool GetExtraZ( const DBLVECTOR& vAx1, const Vector3d& vtTool1, const DBLVECTOR& vAx2, const Vector3d& vtTool2, double dHomeZ, double& dExtraZ) const ; bool SpecialGetMaxZ( const DBLVECTOR& vAx1, const Vector3d& vtTool1, const DBLVECTOR& vAx2, const Vector3d& vtTool2, double& dMaxZ) const ; bool GetRotationAtZmax( void) const ; bool ForcedZmax( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, const BBox3d& b3Raws) const ; int GetUserNotesZmax( void) const ; bool GetZHomeDown( void) const ; int SpecialTestCollisionAvoid( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd) const ; bool SpecialMoveZup( DBLVECTOR& vAx, Vector3d& vtTool, int& nFlag, int& nFlag2, bool& bModif) ; bool SpecialMoveRapid( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, DBLVECTOR& vAxNew, bool& bModif) ; bool SpecialLink( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, int nLinkType, const Operation* pPrevOpe, bool bPrevMain, const Operation* pNextOpe, bool bNextMain, int nStartZMax, int nOtherLinkType = LINK_NULL) ; bool SpecialPrevMachiningOffset( const Operation* pPrevOpe, double& dOffsetX) ; protected : int m_nOwnerId ; // identificativo dell'oggetto geometrico possessore IGeomDB* m_pGeomDB ; // puntatore al DB geometrico MachMgr* m_pMchMgr ; // puntatore al gestore di tutte le lavorazioni int m_nPhase ; // indice della fase di appartenenza (da 1 in su) protected : bool SetPathId( int nPathId) ; bool SetToolDir( const Vector3d& vtDir) ; bool SetCorrDir( const Vector3d& vtDir) ; bool SetAuxDir( const Vector3d& vtDir) ; bool SetCorrAuxDir( const Vector3d& vtDir) ; bool SetFeed( double dFeed) ; bool SetFlag( int nFlag) ; bool SetFlagOnLastMove( int nFlag) ; bool SetFlag2( int nFlag2) ; bool SetIndex( int nIndex) ; bool GetCurrPos( Point3d& ptCurr) const { if ( ! m_bCurr) return false ; ptCurr = m_ptCurr ; return true ; } bool SameAsCurrPos( const Point3d& ptP) const { if ( ! m_bCurr) return false ; return AreSamePointEpsilon( ptP, m_ptCurr, 10 * EPS_SMALL) ; } bool GetCurrCorr( Vector3d& vtCCurr) const { if ( ! m_bCurr) return false ; vtCCurr = m_vtCorr ; return true ; } bool GetCurrAux( Vector3d& vtACurr) const { if ( ! m_bCurr) return false ; vtACurr = m_vtAux ; return true ; } int AddRapidStart( const Point3d& ptP) ; int AddRapidStart( const Point3d& ptP, const std::string& sName) ; int AddRapidMove( const Point3d& ptP) ; int AddRapidMove( const Point3d& ptP, const std::string& sName) ; int AddRapidMove( const Point3d& ptP, bool bSplit) ; int AddRapidMove( const Point3d& ptP, bool bSplit, const std::string& sName) ; int AddRapidStartOrMove( const Point3d& ptP, bool bFirst) { return ( bFirst ? AddRapidStart( ptP) : AddRapidMove( ptP)) ; } int AddRapidStartOrMove( const Point3d& ptP, bool bFirst, const std::string& sName) { return ( bFirst ? AddRapidStart( ptP, sName) : AddRapidMove( ptP, sName)) ; } int AddRapidStartOrMove( const Point3d& ptP, bool bFirst, bool bSplit) { return ( bFirst ? AddRapidStart( ptP) : AddRapidMove( ptP, bSplit)) ; } int AddRapidStartOrMove( const Point3d& ptP, bool bFirst, bool bSplit, const std::string& sName) { return ( bFirst ? AddRapidStart( ptP, sName) : AddRapidMove( ptP, bSplit, sName)) ; } int AddLinearMove( const Point3d& ptP) ; int AddLinearMove( const Point3d& ptP, const std::string& sName) ; int AddLinearMove( const Point3d& ptP, bool bSplit) ; int AddLinearMove( const Point3d& ptP, bool bSplit, const std::string& sName) ; int AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen, const Vector3d& vtN) ; int AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen, const Vector3d& vtN, const std::string& sName) ; int AddCurveMove( const ICurve* pCrv) ; int AddCurveMove( const ICurve* pCrv, const std::string& sName) ; int AddCurveMove( const ICurve* pCrv, bool bSplit) ; int AddCurveMove( const ICurve* pCrv, bool bSplit, const std::string& sName) ; bool ResetMoveData( void) ; protected : int m_nPathId ; // identificativo del gruppo corrente di inserimento dati bool m_bCurr ; // punto corrente valido Point3d m_ptCurr ; // posizione corrente Vector3d m_vtTool ; // direzione fresa corrente Vector3d m_vtCorr ; // direzione correzione corrente Vector3d m_vtAux ; // direzione ausiliaria corrente double m_dFeed ; // feed corrente int m_nFlag ; // flag corrente int m_nFlag2 ; // secondo flag corrente int m_nIndex ; // indice corrente } ; //---------------------------------------------------------------------------- inline const Operation* GetOperation( const IUserObj* pUserObj) { return dynamic_cast( pUserObj) ; } inline Operation* GetOperation( IUserObj* pUserObj) { return dynamic_cast< Operation*>( pUserObj) ; } //---------------------------------------------------------------------------- // Tipo di controllo per lavorazione vuota enum { NEED_GEOM = 0, NEED_ONE_TP_OK = 1, NEED_ALL_TP_OK = 2} ; // tipo posizione utensile enum { TOOL_PARAL = 1, TOOL_ORTHO = 2, TOOL_ORTUP = 3, TOOL_PAR_SLANT= 4} ; // tipo di utilizzo contorno faccia enum { FACE_DOWN = 1, FACE_TOP = 2, FACE_FRONT = 3, FACE_BACK = 4, FACE_LEFT = 5, FACE_RIGHT = 6, FACE_CONT = 7, FACE_VERSOR = 8, FACE_EDGES = 9} ; // risultato di SpecialTestCollisionAvoid enum { SCAV_ERROR = -1, SCAV_COLLIDE = 0, SCAV_AVOID = 1, SCAV_TOTEST = 2} ; // ordine di movimento assi nei link enum { LKAMO_INTERP = 0, LKAMO_HEAD_BEFORE = -1, LKAMO_HEAD_AFTER = +1, LKAMO_HEAD_BEFORE_IF_SAME_ANG = -2, LKAMO_HEAD_AFTER_IF_SAME_ANG = +2} ;