diff --git a/EGkCurve.h b/EGkCurve.h index 1713c2c..fc84355 100644 --- a/EGkCurve.h +++ b/EGkCurve.h @@ -28,9 +28,11 @@ class __declspec( novtable) ICurve : public IGeoObj PP_START = 1, // punto coincidente con l'inizio PP_MID = 2, // punto appartenente all'interno della curva PP_END = 3} ; // punto coincidente con la fine - enum ApprLineType { APL_STD = 0, // approssimazione standard - APL_LEFT = 1, // linee sempre a sinistra - APL_RIGHT = 2} ; // linee sempre a destra + enum ApprLineType { APL_STD = 0, // approssimazione standard + APL_LEFT = 1, // linee sempre a sinistra + APL_LEFT_CONVEX = 11, // linee sempre a sinistra convesse + APL_RIGHT = 2, // linee sempre a destra + APL_RIGHT_CONVEX = 12} ; // linee sempre a destra convesse enum OffType { OFF_FILLET = 0, // si raccordano con arco gli spigoli esterni OFF_CHAMFER = 1, // si raccordano con smusso gli spigoli esterni OFF_EXTEND = 2, // si prolungano all'intersezione gli spigoli esterni diff --git a/EGkIntersLineSurfTm.h b/EGkIntersLineSurfTm.h index bf1a043..2aa5250 100644 --- a/EGkIntersLineSurfTm.h +++ b/EGkIntersLineSurfTm.h @@ -2,7 +2,7 @@ // EgalTech 2015-2015 //---------------------------------------------------------------------------- // File : EGkIntersLineSurfTm.h Data : 18.02.15 Versione : 1.6b7 -// Contenuto : Dichiarazione della classe intersezione linea/piano. +// Contenuto : Dichiarazione della classe intersezione Linea/SurfTriMesh. // // // @@ -13,7 +13,8 @@ #pragma once -#include "/EgtDev/Include/EGkTriangle3d.h" +#include "/EgtDev/Include/EGkSurfTriMesh.h" +#include "/EgtDev/Include/EGkIntersLineTria.h" //----------------------- Macro per import/export ---------------------------- #undef EGK_EXPORT @@ -26,12 +27,19 @@ //----------------------------------------------------------------------------- //! dati di intersezione linea - superficie trimesh struct IntLinStmInfo { + int nILTT ; //!< tipo di intersezione linea-triangolo double dU ; //!< parametro sulla linea + double dU2 ; //!< secondo parametro sulla linea int nT ; //!< indice del triangolo della superficie trimesh + double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo Point3d ptI ; //!< punto di intersezione + Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto) // costruttori - IntLinStmInfo( void) : dU( 0), nT(0), ptI() {} - IntLinStmInfo( double dUU, int nTT, const Point3d& ptP) : dU( dUU), nT( nTT), ptI( ptP) {} + IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {} + IntLinStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP) + : nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {} + IntLinStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2) + : nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {} } ; //! vettore di IntLinStmInfo typedef std::vector ILSIVECTOR ; diff --git a/EGkIntersLineTria.h b/EGkIntersLineTria.h index e975c80..a7e899c 100644 --- a/EGkIntersLineTria.h +++ b/EGkIntersLineTria.h @@ -32,7 +32,8 @@ EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double d //----------------------------------------------------------------------------- // Tipo di intersezione linea-triangolo enum IntLineTriaType { ILTT_NO = 0, // non c'è intersezione - ILTT_SEGM = 1, // una parte di linea appartiene al triangolo - ILTT_VERT = 2, // intersezione coincide con un vertice - ILTT_EDGE = 3, // intersezione coincide con interno di un lato - ILTT_IN = 4} ; // intersezione coincide con interno del triangolo + ILTT_SEGM = 1, // una parte di linea appartiene all'interno del triangolo + ILTT_SEGM_ON_EDGE = 2, // una parte di linea appartiene ad un lato del triangolo + ILTT_VERT = 3, // intersezione coincide con un vertice + ILTT_EDGE = 4, // intersezione coincide con interno di un lato + ILTT_IN = 5} ; // intersezione coincide con interno del triangolo diff --git a/EGkPolyLine.h b/EGkPolyLine.h index 0306b4d..c97920d 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -106,6 +106,7 @@ class PolyLine EGK_EXPORT bool AdjustForMaxSegmentLen( double dMaxLen) ; EGK_EXPORT bool RemoveAlignedPoints( double dToler = EPS_SMALL) ; EGK_EXPORT bool ApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ; + EGK_EXPORT bool MakeConvex( const Vector3d& vtN, bool bLeftSide) ; EGK_EXPORT bool Invert( bool bInvertU = true) ; private : diff --git a/EMkDispositionConst.h b/EMkDispositionConst.h new file mode 100644 index 0000000..13489cd --- /dev/null +++ b/EMkDispositionConst.h @@ -0,0 +1,29 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EmkDispositionConst.h Data : 22.06.15 Versione : 1.6f4 +// Contenuto : Costanti delle disposizioni. +// +// +// +// Modifiche : 22.06.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +//------------------------ Costanti per flag MoveToCorner --------------------- +// indica la posizione del corner rispetto al grezzo +enum RawPartCornerPos { MCH_CR_TL = 1, // top left + MCH_CR_TR = 2, // top right + MCH_CR_BL = 3, // bottom left + MCH_CR_BR = 4} ; // bottom right + +//------------------------ Costanti per flag MoveToCenter --------------------- +// indica la posizione del centro rispetto al grezzo +enum RawPartCenterPos { MCH_CE_TC = 1, // top center + MCH_CE_ML = 2, // middle left + MCH_CE_MR = 3, // middle right + MCH_CE_BC = 4, // bottom center + MCH_CE_MC = 5} ; // middle center under diff --git a/EMkMachMgr.h b/EMkMachMgr.h index 3dbd777..e2cf614 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -85,6 +85,10 @@ class __declspec( novtable) IMachMgr virtual bool VerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) = 0 ; // Operations virtual int AddMachining( const std::string& sName, const std::string& sMachining) = 0 ; + virtual bool SetMachiningParam( int nType, bool bVal) = 0 ; + virtual bool SetMachiningParam( int nType, int nVal) = 0 ; + virtual bool SetMachiningParam( int nType, double dVal) = 0 ; + virtual bool SetMachiningParam( int nType, const std::string& sVal) = 0 ; virtual bool SetMachiningGeometry( const SELVECTOR& vIds) = 0 ; virtual bool Apply( void) = 0 ; } ; @@ -93,18 +97,3 @@ class __declspec( novtable) IMachMgr extern "C" { EMK_EXPORT IMachMgr* CreateMachMgr(void) ; } - -//------------------------ Costanti per flag MoveToCorner --------------------- -// indica la posizione del corner rispetto al grezzo -enum RawPartCornerPos { MCH_CR_TL = 1, // top left - MCH_CR_TR = 2, // top right - MCH_CR_BL = 3, // bottom left - MCH_CR_BR = 4} ; // bottom right - -//------------------------ Costanti per flag MoveToCenter --------------------- -// indica la posizione del centro rispetto al grezzo -enum RawPartCenterPos { MCH_CE_TC = 1, // top center - MCH_CE_ML = 2, // middle left - MCH_CE_MR = 3, // middle right - MCH_CE_BC = 4, // bottom center - MCH_CE_MC = 5} ; // middle center under diff --git a/EMkMachiningConst.h b/EMkMachiningConst.h new file mode 100644 index 0000000..1987eaf --- /dev/null +++ b/EMkMachiningConst.h @@ -0,0 +1,95 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EmkMachiningConst.h Data : 22.06.15 Versione : 1.6f4 +// Contenuto : Costanti delle lavorazioni. +// +// +// +// Modifiche : 22.06.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include + +//---------------------------------------------------------------------------- +// Costanti famiglie di parametri ( i primi 12 bit (0-4095) restano liberi) +const int MPA_BOOL = 0x1000 ; +const int MPA_INT = 0x2000 ; +const int MPA_DOU = 0x4000 ; +const int MPA_STR = 0x8000 ; +// Costanti tipo parametri modificabili direttamente nelle lavorazioni +enum MpaType { MPA_NONE = 0, + MPA_INVERT = ( MPA_BOOL+ 0), + MPA_TOANDFROM = ( MPA_BOOL+ 1), + MPA_LEAVETAB = ( MPA_BOOL+ 2), + MPA_WORKSIDE = ( MPA_INT + 0), + MPA_HEADSIDE = ( MPA_INT + 1), + MPA_LEADINTYPE = ( MPA_INT + 2), + MPA_EXTLINKTYPE = ( MPA_INT + 3), + MPA_LEADOUTTYPE = ( MPA_INT + 4), + MPA_CURVEUSE = ( MPA_INT + 5), + MPA_STEPTYPE = ( MPA_INT + 6), + MPA_TOOLSPEED = ( MPA_DOU + 0), + MPA_TOOLFEED = ( MPA_DOU + 1), + MPA_TOOLSTARTFEED = ( MPA_DOU + 2), + MPA_TOOLENDFEED = ( MPA_DOU + 3), + MPA_TOOLTIPFEED = ( MPA_DOU + 4), + MPA_TOOLOFFSR = ( MPA_DOU + 5), + MPA_TOOLOFFSL = ( MPA_DOU + 6), + MPA_DEPTH = ( MPA_DOU + 7), + MPA_SIDEANGLE = ( MPA_DOU + 8), + MPA_APPROX = ( MPA_DOU + 9), + MPA_STARTPOS = ( MPA_DOU + 10), + MPA_STARTSLOWLEN = ( MPA_DOU + 11), + MPA_ENDSLOWLEN = ( MPA_DOU + 12), + MPA_THROUADDLEN = ( MPA_DOU + 13), + MPA_STEP = ( MPA_DOU + 14), + MPA_RETURNPOS = ( MPA_DOU + 15), + MPA_OVERLAP = ( MPA_DOU + 16), + MPA_TABLEN = ( MPA_DOU + 17), + MPA_TABDIST = ( MPA_DOU + 18), + MPA_TABHEIGHT = ( MPA_DOU + 19), + MPA_TABANGLE = ( MPA_DOU + 20), + MPA_LITANG = ( MPA_DOU + 21), + MPA_LIPERP = ( MPA_DOU + 22), + MPA_LIELEV = ( MPA_DOU + 23), + MPA_LICOMPLEN = ( MPA_DOU + 24), + MPA_LOTANG = ( MPA_DOU + 25), + MPA_LOPERP = ( MPA_DOU + 26), + MPA_LOELEV = ( MPA_DOU + 27), + MPA_LOCOMPLEN = ( MPA_DOU + 28), + MPA_TOOL = ( MPA_STR + 0), + MPA_DEPTH_STR = ( MPA_STR + 1)} ; + +//---------------------------------------------------------------------------- +// Parametri per lavorazione con lama +// Lato di lavoro +enum { SAW_WS_CENTER = 0, + SAW_WS_LEFT = 1, + SAW_WS_RIGHT = 2 } ; +// Lato di posizionamento della testa +enum { SAW_HS_LEFT = 1, + SAW_HS_RIGHT = 2 } ; +// Tipo di attacco +enum { SAW_LI_CENT = 0, + SAW_LI_STRICT = 1, + SAW_LI_OUT = 2, + SAW_LI_EXT_CENT = 3, + SAW_LI_EXT_OUT = 4} ; +// Tipo di link esterno +enum { SAW_EL_CENT = 0, + SAW_EL_EXT_PREV = 1, + SAW_EL_EXT_NEXT = 2, + SAW_EL_EXT_BOTH = 3} ; +// Tipo di uscita +enum { SAW_LO_CENT = 0, + SAW_LO_STRICT = 1, + SAW_LO_EXT = 2} ; +// Gestione curve +enum { SAW_CRV_SKIP = 0, + SAW_CRV_APPROX = 1, + SAW_CRV_CONVEX = 2} ; diff --git a/EXeConst.h b/EXeConst.h index f774f66..39b7dfc 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -27,7 +27,9 @@ enum RefType{ RTY_GLOB = 0, const int RTY_DEFAULT = RTY_LOC ; //----------------- Costanti tipo di approssimazione di curve ------------------ -enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD - APP_LEFT_LINES = 1, // come ICurve::APL_LEFT - APP_RIGHT_LINES = 2, // come ICurve::APL_RIGHT +enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD + APP_LEFT_LINES = 1, // come ICurve::APL_LEFT + APP_LEFT_CONVEX_LINES = 11, // come ICurve::APL_LEFT_CONVEX + APP_RIGHT_LINES = 2, // come ICurve::APL_RIGHT + APP_RIGHT_CONVEX_LINES = 12, // come ICurve::APL_RIGHT_CONVEX APP_ARCS = 3} ; \ No newline at end of file diff --git a/EXeExecutor.h b/EXeExecutor.h index 67f4866..3fe5370 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -432,6 +432,10 @@ EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, double dAngA, double dA int& nStat, double& dX, double& dY, double& dZ) ; EXE_EXPORT bool ExeVerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) ; EXE_EXPORT int ExeAddMachining( const std::string& sName, const std::string& sMachining) ; +EXE_EXPORT bool ExeSetMachiningParam( int nType, bool bVal) ; +EXE_EXPORT bool ExeSetMachiningParam( int nType, int nVal) ; +EXE_EXPORT bool ExeSetMachiningParam( int nType, double dVal) ; +EXE_EXPORT bool ExeSetMachiningParam( int nType, const std::string& sVal) ; EXE_EXPORT bool ExeSetMachiningGeometry( const SELVECTOR& vIds) ; EXE_EXPORT bool ExeApplyMachining( void) ;