Compare commits

...

49 Commits

Author SHA1 Message Date
Daniele Bariletti 65e20afeab Include :
- aggiornate le interfacce per le funzioni di conversione di curve in/da bezier.
2025-09-12 15:39:24 +02:00
Daniele Bariletti d8c4b93e46 Merge branch 'master' into FasterVMill5Axis_Bez3x1 2025-09-12 15:12:19 +02:00
Daniele Bariletti d39e6dfe19 Include :
- enum per intersezione linea bezier.
2025-09-12 13:18:19 +02:00
SaraP ee01a02292 Include :
- aggiunti prototipi per calcolo shear sequence nel nesting
- aggiunta funzione LuaSetParam per vettore di punti.
2025-09-12 10:20:30 +02:00
Dario Sassi d8f50f040c Include :
- aggiornamento parametri.
2025-09-11 15:20:55 +02:00
Daniele Bariletti 9cbfcd7422 Include :
- aggiunte intersezioni linea triangolo ausiliario per le sup di bezier.
2025-09-10 09:47:47 +02:00
Dario Sassi 4cc94522ca Include :
- ripristinate costanti risultato intersezione linea triangolo.
2025-09-10 08:51:58 +02:00
Dario Sassi fd3d53c777 Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2025-09-10 08:18:30 +02:00
Dario Sassi 6699e21059 Include :
- aggiornamento prototipi.
2025-09-10 08:10:36 +02:00
Daniele Bariletti 59dc7c0cce Include :
- aggiunta una funzione per l'accoppiamento delle polyline.
- aggiornato un enum per le intersezioni linea trinagolo.
2025-09-09 15:02:17 +02:00
Riccardo Elitropi 2010e58f5c Include :
- Aggiunta gestione Offset Thickening per superfici TriMesh
- Aggiunta gestione Offset Chamfer ed Extend.
2025-09-05 17:00:44 +02:00
Dario Sassi 5df80c8ae7 Include :
- aggiornamento codici di protezione mensili.
2025-09-04 19:34:43 +02:00
Daniele Bariletti d377f00b9b Include :
- aggiunta commenti.
2025-09-02 13:21:54 +02:00
Daniele Bariletti be2c7b8d7d Include :
- uniformazione delle funzioni di conversione in curve di bezier.
2025-08-28 16:10:38 +02:00
Dario Sassi 6c3cb3289e Include :
- aggiornamento prototipi.
2025-08-24 19:15:57 +02:00
SaraP c98318f8ba Include :
- aggiunte nuove costanti per lavorazione SawRoughing.
2025-08-22 12:34:37 +02:00
Dario Sassi 31436bfb7c Include :
- aggiunta funzione Pow per potenze con esponente intere caclolate in modo efficiente
- aggiunti prototipi di funzioni per impostazione tolleranze per superfici di Bezier.
2025-08-22 11:29:30 +02:00
Riccardo Elitropi fd382173c9 Include :
- In IntersParLinesSurfTm aggiunta estensione per intersezione con vettore di superfici TriMesh e aggiunto indice di superficie in IntLinStmInfo.
2025-08-04 14:43:24 +02:00
Dario Sassi efe425a243 Include :
- aggiornamento codice di protezione mensile.
2025-08-03 13:38:24 +02:00
Dario Sassi 97767e1945 Include :
- aggiornamento prototipi.
2025-07-22 08:33:02 +02:00
Riccardo Elitropi 53cf69101e Include :
- in EGkCalcPocketing aggiunto flag per calcolo delle regioni non svuotate alla funzione CalcPocketing
2025-07-14 10:20:13 +02:00
Dario Sassi d0292c7fcf Include :
- prime sistemazioni per offset superfici trimesh tramite Zmap.
2025-07-07 14:58:13 +02:00
Riccardo Elitropi f96c15de7e Include :
- aggiunte funzioni per calcolo di Zmap e TriMesh di Offset Fillet Thickening.
2025-07-04 12:58:17 +02:00
Riccardo Elitropi a8d98900e4 Include :
- in EGkSurfTriMesh aggiunte le funzioni per il calcolo dei Box delle Parts
2025-07-02 11:45:26 +02:00
Dario Sassi afa460495a Include :
- aggiornamento codice di protezione mensile.
2025-07-02 08:22:27 +02:00
Riccardo Elitropi 35dcbbf6d0 Include :
- aggiunte funzioni per Offset e FatOffset per un insieme di curve
- in MachiningConst aggiunto il tipo di finitura Pencil.
2025-06-25 15:47:06 +02:00
Riccardo Elitropi c0de49ff5c Include :
- aggiornamento prototipi IVolZmap.
2025-06-19 12:44:23 +02:00
Riccardo Elitropi 3cceff83c9 Include :
- ricollocazione funzione di Offset per superfici TriMesh chiuse.
2025-06-16 13:18:41 +02:00
Riccardo Elitropi 9c2ccb300e Include :
- Aggiunte funzioni per Offset di Stm chiuse.
2025-06-16 11:26:07 +02:00
Dario Sassi 172037d8a7 Include :
- aggiunta costante per nuovo tipo Plunge in lavorazione di mortasatura (MORTISE_PLUNGE_STEP_NO_SAFEZ = 10).
2025-06-11 19:22:49 +02:00
Dario Sassi 125cce1983 Include :
- aggiunte costanti per utensile di tipo Probe
- aggiunte costanti per operazione/lavorazione Probing.
2025-06-10 18:29:01 +02:00
Riccardo Elitropi ec4162e8be Merge branch 'master' of https://gitlab.steamware.net/egaltech/Include 2025-06-09 12:17:35 +02:00
Riccardo Elitropi 0c72da8b1c Include :
- In CalcPocketing piccola modifica sui nomi dei parametri della funzione.
2025-06-09 12:14:21 +02:00
Dario Sassi 5d25f7917e Include :
- aggiornamento prototipi.
2025-06-08 12:15:09 +02:00
Dario Sassi c22d4bbcd9 Include :
- aggiornamento mensile codici protezione librerie.
2025-06-06 16:11:53 +02:00
Dario Sassi 6a355ccfe3 Include :
- aggiornamento prototipi.
2025-05-31 11:55:40 +02:00
Riccardo Elitropi 0e636829dd Include :
- modifica parametri per CalcPocketing.
2025-05-30 11:47:09 +02:00
Riccardo Elitropi 9f41af0b3c Include :
- in CalcPocketing aggiunta temp prop per casi SpiralCirle.
2025-05-27 14:28:47 +02:00
Riccardo Elitropi 410b6aa2b5 Include :
- Modifica prototipi alle funzioni per generare la FatCurve.
2025-05-27 08:29:44 +02:00
Daniele Bariletti 82cb2d7010 Include :
- aggiunta funzione per il riempimento di un box3D.
2025-05-20 10:06:47 +02:00
Riccardo Elitropi 47e48d2439 Include :
- Esposta funzione di smusso curve in CalcPocketing
- Aggiunto parametro MaxOptSize a CalcPocketing.
2025-05-15 16:25:32 +02:00
Dario Sassi 8a4c550e2e Include :
- aggiornamento prototipi.
2025-05-12 09:45:40 +02:00
Riccardo Elitropi 880967a813 Include :
- Aggiunta costante per lati aperti interni al grezzo per le sottocurve/curve
- Rimozione parametro in ModifyRawPart.
2025-05-09 16:13:04 +02:00
Dario Sassi 1fe12bac99 EgtInclude :
- aggiornamento mensile codici protezione librerie.
2025-05-02 19:10:17 +02:00
Dario Sassi 94fe68fd89 Include :
- corretto valore costante RUL_TYPE_ISOPAR_SMOOTH (deve essere 2 come altra costante cui fa riferimento).
2025-04-28 08:30:15 +02:00
Dario Sassi 9a37f9033a Include :
- aggiornamento prototipi.
2025-04-23 12:16:38 +02:00
Dario Sassi c77fb38e64 Merge commit 'bb029712a9805c52ec5b2d2735559be8e574ce42' 2025-04-23 10:54:29 +02:00
Riccardo Elitropi bb029712a9 Include :
- Aggiunte funzioni e definizioni per classe di calcolo per ottimizzazione lavorazioni
- Aggiunti vincoli per algoritmo ShortestPath
- Aggiunte funzioni per Executor.
2025-04-23 10:08:37 +02:00
Daniele Bariletti 2233bab91f Merge branch 'FasterBezier' 2025-04-14 11:22:09 +02:00
28 changed files with 482 additions and 143 deletions
+4 -1
View File
@@ -15,6 +15,7 @@
#pragma once
#include "/EgtDev/Include/EGkPoint3d.h"
#include <vector>
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
@@ -47,7 +48,7 @@ class EGK_EXPORT BBox3d
{ m_ptMin = Point3d( +INFINITO, +INFINITO, +INFINITO) ;
m_ptMax = Point3d( -INFINITO, -INFINITO, -INFINITO) ; }
void Set( const Point3d& ptP)
{ m_ptMin = ptP ; m_ptMax = ptP ; }
{ m_ptMin = ptP ; m_ptMax = ptP ; }
void Set( double dX, double dY, double dZ)
{ m_ptMin = Point3d( dX, dY, dZ) ; m_ptMax = m_ptMin ; }
void Set( const Point3d& ptP1, const Point3d& ptP2) ;
@@ -65,6 +66,8 @@ class EGK_EXPORT BBox3d
void Add( const Point3d& ptP) ;
void Add( double dX, double dY, double dZ) ;
void Add( const BBox3d& b3B) ;
void Add( const std::vector<Point3d>& vPnt) { for ( const Point3d& pt: vPnt){
Add( pt) ; }}
void Expand( double dDelta) ;
void Expand( double dDeltaX, double dDeltaY, double dDeltaZ) ;
const Point3d& GetMin( void) const
+14 -3
View File
@@ -26,9 +26,10 @@
//-----------------------------------------------------------------------------
EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dRadOffs, double dStep,
double dAngle, double dOpenMinSafe, int nType, bool bSmooth, bool bInvert, bool bAvoidOpt,
double dAngle, double dOpenMinSafe, int nType, bool bSmooth, bool bCalcUnclReg, bool bInvert, bool bAvoidOpt,
bool bAllowZigZagOneWayBorders, bool bCalcFeed, const Point3d& ptEndPrec, const ISurfFlatRegion* pSfrLimit,
bool bAllOffs, ICRVCOMPOPOVECTOR& vCrv) ;
bool bAllOffs, double dMaxOptSize, double dLiTang, int nLiType, ICRVCOMPOPOVECTOR& vCrv) ;
EGK_EXPORT bool CalcSmoothCurve( ICurveComposite* pCrv, double dRightLen, double dLeftLen, bool bAsParam) ;
EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, bool bRemoveOverlapLink,
ICRVCOMPOPOVECTOR& vCrvCompoRes) ;
@@ -45,7 +46,8 @@ enum { POCKET_ZIGZAG = 0,
// Definizione di lato aperto e lato chiuso
enum {
TEMP_PROP_CLOSE_EDGE = 0,
TEMP_PROP_OPEN_EDGE = 1
TEMP_PROP_OPEN_EDGE = 1,
TEMP_PROP_OPEN_EDGE_IN_RAW = 2
} ;
// Definizione di curva invalida
@@ -63,6 +65,7 @@ enum {
TEMP_PROP_SINGLE_CURVE = - 3,
TEMP_PROP_OPT_TRAPEZOID = - 4,
TEMP_PROP_BORDER_CURVE = - 5,
TEMP_PROP_OPT_CIRCLE = - 9
} ;
// Definizione tipo di curva per entrate da fuori
@@ -75,3 +78,11 @@ enum {
TEMP_PROP_CURVE_ACTIVE = - 7,
TEMP_PROP_CURVE_INACTIVE = - 8
} ;
// Definizione tipo LeadIn
enum {
LEAD_IN_NONE = 0,
LEAD_IN_GLIDE = 1,
LEAD_IN_ZIGZAG = 2,
LEAD_IN_HELIX = 3
} ;
+20 -9
View File
@@ -16,7 +16,6 @@
#include "/EgtDev/Include/EGkCurveComposite.h"
class ICurveBezier ;
class ICurveLine ;
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
@@ -47,32 +46,32 @@ struct CNurbsData
// tutte le operazioni richiedono la forma OMOGENEA, finite le quali posso riportarmi alla forma NON OMOGENEA
//----------------------------------------------------------------------------
//! Trasforma una linea in una nuova curva di Bezier semplice
//! Trasforma una curva in una nuova curva di Bezier semplice
EGK_EXPORT ICurve* CurveToBezierCurve( const ICurve* pCrv, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma una linea in una nuova curva di Bezier semplice
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pLine, int nDeg = 3, bool bMakeRatOrNot = true) ;
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pCrvLine, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma un arco in una nuova curva di Bezier semplice o composta
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurve* pArc, int nDeg = 3, bool bMakeRatOrNot = true) ;
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurveArc* pArc, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma una curva compo in una nuova curva di Bezier semplice o composta
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrvCompo, int nDeg = 3, bool bMakeRatOrNot = true) ;
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrv, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma una curva bezier in una nuova curva di Bezier semplice o composta della razionalità e grado desiderato ( minimo 3)
EGK_EXPORT ICurve* EditBezierCurve( const ICurveBezier* pCrvBezier, int nDeg = 3, bool bMakeRatOrNot = true, double dTol = 10 * EPS_SMALL) ;
EGK_EXPORT ICurve* EditBezierCurve( const ICurveBezier* pCrv, int nDeg = 3, bool bMakeRatOrNot = true, double dTol = 10 * EPS_SMALL) ;
//----------------------------------------------------------------------------
//! Approssima una bezier con una serie di bezier cubiche
EGK_EXPORT ICurve* ApproxBezierWithCubics( const ICurveBezier* pCrvBezier, double dTol) ;
EGK_EXPORT ICurve* ApproxBezierWithCubics( const ICurve* pCrv, double dTol) ;
//----------------------------------------------------------------------------
//! Approssima una bezier con una serie di bezier cubiche
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurveBezier* pCrvBezier, const Point3d& ptCen) ;
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurve* pCrv, const Point3d& ptCen) ;
//----------------------------------------------------------------------------
//! Campiona una serie di punti dalla curva e li approssima con una o più curve di bezier
@@ -141,7 +140,8 @@ EGK_EXPORT bool CalcCurvesMedialAxis( const CICURVEPVECTOR& vCrvC, ICURVEPOVECTO
//----------------------------------------------------------------------------
//! Calcola l'offset completo di una curva
EGK_EXPORT bool CalcCurveFatCurve( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids) ;
EGK_EXPORT bool CalcCurveFatCurve( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids,
bool bMergeOnlySameProps = true) ;
//----------------------------------------------------------------------------
//! Calcola, nel caso di curve chiuse, il valore limite di offset ( in valore assoluto) che fa sparire la curva
@@ -151,6 +151,17 @@ EGK_EXPORT bool CalcCurveLimitOffset( const ICurve& crvC, double& dOffs) ;
//! Calcola, se possibile, le curve di offset del valore richiesto come curve singole
EGK_EXPORT bool CalcCurveSingleCurvesOffset( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dOffs) ;
//----------------------------------------------------------------------------
//! Calcola, se possibile, le curve di offset dato un vettore di curve aperte/chiuse
EGK_EXPORT bool CalcOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR& vCrvs, double dOffs,
int nType = ICurve::OFF_FILLET) ;
//----------------------------------------------------------------------------
//! Calcola, se possibile, le fat curve di offset dato un vettore di curve aperte/chiuse
EGK_EXPORT bool CalcFatOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR& vCrvs, double dOffs,
bool bSquareEnds, bool bSquareMids,
bool bMergeOnlySameProps = true) ;
//----------------------------------------------------------------------------
//! Resetta l'oggetto voronoi associato alla curva liberandone la memoria
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
-1
View File
@@ -70,7 +70,6 @@ class __declspec( novtable) ICurveComposite : public ICurve
virtual bool GetCurveTempProp( int nCrv, int& nProp, int nPropInd = 0) const = 0 ;
virtual bool SetCurveTempParam( int nCrv, double dParam, int nParamInd = 0) = 0 ;
virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const = 0 ;
virtual bool FromPoint( Point3d& ptStart) = 0 ;
virtual bool GetOnlyPoint( Point3d& ptStart) const = 0 ;
} ;
+5 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2020
// EgalTech 2014-2025
//----------------------------------------------------------------------------
// File : EGkDllMain.h Data : 19.09.20 Versione : 2.2i2
// File : EGkDllMain.h Data : 11.09.25 Versione : 2.7i2
// Contenuto : Prototipi funzioni generali della DLL.
//
//
@@ -9,6 +9,7 @@
// Modifiche : 21.11.13 DS Creazione modulo.
// 13.01.15 DS Agg. funzioni Get sui font.
// 19.09.20 DS Agg. funzione SetEGkDebugLev.
// 11.09.25 DS Agg. funzione SetDefaultFont.
//
//----------------------------------------------------------------------------
@@ -42,6 +43,8 @@ EGK_EXPORT void SetEGkKeyType( int nType) ;
EGK_EXPORT void SetEGkNetHwKey( bool bNetHwKey) ;
// permette di inizializzare il font manager
EGK_EXPORT void InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont) ;
// imposta il font di default
EGK_EXPORT void SetDefaultFont( const std::string& sDefaultFont) ;
// restituisce il direttorio dei font proprietari (Nfe)
EGK_EXPORT const std::string& GetNfeFontDir( void) ;
// restituisce il nome del font di default
+32 -22
View File
@@ -26,28 +26,6 @@
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
//! dati di intersezione linea - superficie trimesh
struct IntLinSbzInfo {
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)
Point3d ptUV ; //!< coordinate del punto nello spazio parametrico
Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico
// costruttori
IntLinSbzInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){}
IntLinSbzInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP)
: nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {}
IntLinSbzInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {}
} ;
//! vettore di IntLinSbzInfo
typedef std::vector<IntLinSbzInfo> ILSBIVECTOR ;
//-----------------------------------------------------------------------------
// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio
enum LSBiType { LSBT_NONE = 0,
@@ -57,6 +35,38 @@ enum LSBiType { LSBT_NONE = 0,
LSBT_TG_FIN = 4,
LSBT_TOUCH = 5} ;
//-----------------------------------------------------------------------------
// Tipo di intersezione linea-triangolo ausiliario (della trimesh ausilaria)
enum IntLineTriaAuxType { ILTA_NO_TRIA = -1, // l'intersezione è stata calcolata direttamente con la superficie bezier
ILTA_NO = 0, // non c'è intersezione
ILTA_SEGM = 1, // una parte di linea appartiene all'interno del triangolo
ILTA_SEGM_ON_EDGE = 2, // una parte di linea appartiene ad un lato del triangolo
ILTA_VERT = 3, // intersezione coincide con un vertice
ILTA_EDGE = 4, // intersezione coincide con interno di un lato
ILTA_IN = 5} ; // intersezione in interno del triangolo
//-----------------------------------------------------------------------------
//! dati di intersezione linea - superficie trimesh
struct IntLinSbzInfo {
int nILTA ; //!< tipo di intersezione linea-triangolo // se -1 vuol dire che l'intersezione stata calcolata direttamente, senza usare la trimesh
double dU ; //!< parametro sulla linea
double dU2 ; //!< secondo parametro sulla linea
int nT ; //!< indice del triangolo della superficie trimesh // se -1 vuol dire che l'intersezione stata calcolata direttamente, senza usare la 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)
Point3d ptUV ; //!< coordinate del punto nello spazio parametrico
Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico
// costruttori
IntLinSbzInfo( void) : nILTA( ILTA_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){}
IntLinSbzInfo( int nILT, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP)
: nILTA( nILT), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {}
IntLinSbzInfo( int nILT, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2)
: nILTA( nILT), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {}
} ;
//! vettore di IntLinSbzInfo
typedef std::vector<IntLinSbzInfo> ILSBIVECTOR ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier* pSBz,
ILSBIVECTOR& vInfo, bool bFinite = true) ;
+15 -9
View File
@@ -31,19 +31,20 @@ struct IntLinStmInfo {
int nILTT ; //!< tipo di intersezione linea-triangolo
double dU ; //!< distanza sulla linea
double dU2 ; //!< seconda distanza sulla linea
int nStm ; //!< indice della superficie TriMesh di intersezione
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) : 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) {}
IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nStm( 0), nT( 0), dCosDN( 0), ptI(), ptI2() {}
IntLinStmInfo( int nIL, double dUU, int nSurfTm, int nTT, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nStm( nSurfTm), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
IntLinStmInfo( int nIL, double dUU, double dUU2, int nSurfTm, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nStm( nSurfTm), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
} ;
//! vettore di IntLinStmInfo
typedef std::vector<IntLinStmInfo> ILSIVECTOR ;
typedef std::vector<IntLinStmInfo> ILSIVECTOR ;
//-----------------------------------------------------------------------------
// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio
@@ -63,13 +64,18 @@ class IntersParLinesSurfTm
{
public :
EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const ISurfTriMesh& Stm) ;
EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const CISURFTMPVECTOR& vStm) ;
EGK_EXPORT bool GetInters( const Point3d& ptL, double dLen, ILSIVECTOR& vInfo, bool bFinite = true) const ;
private :
int GetSurfInd( int nT) const ;
private :
bool m_bOk ;
const Frame3d m_frLines ;
const ISurfTriMesh* m_pSTm ;
HashGrids2d m_HGrids ;
const Frame3d m_frLines ; // direzione della linea come versore Z
CISURFTMPVECTOR m_vpSTm ; // vettore delle superfici con cui calcolare le intersezioni con le linee
INTVECTOR m_vBaseInd ; // [0, nTriaStm0, nTriaStm0 + nTriaStm1, nTriaStm0 + nTriaStm1 + nTriaStm2, ...]
HashGrids2d m_HGrids ; // HasGrid di ottimizzazione per ricerca triangoli
} ;
//-----------------------------------------------------------------------------
+27
View File
@@ -277,6 +277,33 @@ LuaSetParam( lua_State* L, const Vector3d& vtPar)
return true ;
}
//-------------------------------------------------------------------------------
inline bool
LuaSetParam( lua_State* L, const PNTVECTOR& vPar)
{
try {
// recupero dimensione vettore
int nDim = int( vPar.size()) ;
// creo tavola principale
lua_createtable( L, nDim, 0) ;
// creo e inserisco tavola per ogni componente
for ( int i = 1 ; i <= nDim ; ++ i) {
// creo tavola componente
lua_createtable( L, 3, 0) ;
for ( int j = 1 ; j <= 3 ; ++ j) {
lua_pushnumber( L, vPar[i-1].v[j-1]) ;
lua_rawseti( L, -2, j) ;
}
// la metto nel vettore
lua_rawseti( L, -2, i) ;
}
}
catch( ...) {
return false ;
}
return true ;
}
//-------------------------------------------------------------------------------
inline bool
LuaSetParam( lua_State* L, const VCT3DVECTOR& vPar)
+26
View File
@@ -8,6 +8,7 @@
//
// Modifiche : 08.04.14 DS Creazione modulo.
// 25.02.15 DS Agg. PointInPlane*.
// 05.09.25 RE Agg. funzioni di confronto tra due piani
//
//----------------------------------------------------------------------------
@@ -154,3 +155,28 @@ PointInPlaneExact( const Point3d& ptP, const Plane3d& plPlane)
{
return ( abs( (( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist()) < EPS_ZERO) ;
}
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneEpsilon( const Plane3d& plPlaneA, const Plane3d& plPlaneB, double dToler)
{
return ( AreSameVectorEpsilon( plPlaneA.GetVersN(), plPlaneB.GetVersN(), dToler) &&
PointInPlaneEpsilon( plPlaneA.GetPoint(), plPlaneB, dToler)) ;
}
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneApprox( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
{
return ( AreSameVectorApprox( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
PointInPlaneApprox( plPlaneA.GetPoint(), plPlaneB)) ;
}
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneExact( const Plane3d plPlaneA, const Plane3d& plPlaneB)
{
return ( AreSameVectorExact( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
PointInPlaneExact( plPlaneA.GetPoint(), plPlaneB)) ;
}
+1
View File
@@ -150,3 +150,4 @@ EGK_EXPORT bool GetPointParamOnPolyLine( const Point3d& ptP, const PolyLine& plP
EGK_EXPORT bool ChangePolyLineStart( PolyLine& plPoly, const Point3d& ptNewStart, double dToler) ;
EGK_EXPORT bool SplitPolyLineAtPoint( const PolyLine& plPoly, const Point3d& ptP, double dToler, PolyLine& plPoly1, PolyLine& plPoly2) ;
EGK_EXPORT bool AssociatePolyLinesMinDistPoints( const PolyLine& PL1, const PolyLine& PL2, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2, bool& bCommonInternalPoints) ;
EGK_EXPORT bool MatchPolyLinesAddingPoints( const PolyLine& PL1, const PolyLine& PL2, int nType, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2) ;
+8 -8
View File
@@ -42,15 +42,15 @@ struct Point5ax {
typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
//----------------------------------------------------------------------------
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const Vector3d& vtDir,
// Proiezione di una curva su una o più superfici lungo la direzione data
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione del punto
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const IGeoPoint3d& gpRef,
// Proiezione di una curva su una o più superfici in direzione del punto
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione della curva
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const ICurve& crRef,
// Proiezione di una curva su una o più superfici in direzione della curva
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione della superficie
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const ISurf& sfRef,
// Proiezione di una curva su una o più superfici in direzione della superficie
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const ISurf& sfRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
+2 -1
View File
@@ -30,7 +30,8 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dL
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius,
bool bSquareEnds, bool bSquareMids, double dOffsLinTol = 10 * EPS_SMALL) ;
bool bSquareEnds, bool bSquareMids, double dOffsLinTol = 10 * EPS_SMALL,
bool bMergeOnlySameProps = true) ;
// NB : la curva ingrassata non deve autointersecarsi
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ;
+28 -13
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2020-2024
// EgalTech 2020-2025
//----------------------------------------------------------------------------
// File : EGkSurfBezier.h Data : 10.04.24 Versione : 2.6d2
// File : EGkSurfBezier.h Data : 22.08.25 Versione : 2.7h1
// Contenuto : Dichiarazione della interfaccia ISurfBezier.
//
//
//
// Modifiche : 22.03.20 DS Creazione modulo.
//
// 22.08.25 DS Aggiunte funzioni globali di impostazione tolleranze.
//
//----------------------------------------------------------------------------
@@ -17,6 +17,15 @@
#include "/EgtDev/Include/EGkCurveComposite.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//----------------------- Forward --------------------------------------------
class PolyLine ;
class ICurveComposite ;
class ISurfFlatRegion ;
@@ -28,16 +37,16 @@ class __declspec( novtable) ISurfBezier : public ISurf
public :
enum Side { FROM_MINUS = -1, // da valori inferiori del parametro
FROM_PLUS = 1} ; // da valori superiori del parametro
public :
enum RuledType { RLT_B_ISOPAR = 0, // con parametrizzazione simile tra le due curve
RLT_B_MINDIST = 1, // con distanza minima tra le due curve, usando start e end delle curve presenti
RLT_B_MINDIST_PLUS = 2, // con distanza minima tra le due curve, aggiungendo punti lungo le curve dove necessario
RLT_B_LENPAR = 3} ; // aggiungo punti alla curve in modo da matchare meglio le sottocurve, inoltre parametrizzo le curve in base alla lunghezza e non al numero di curve
enum Is_Planar { NOT_CALCULATED = -1,
NOT_PLANAR_SURF = 0 ,
PLANAR_SURF = 1};
public :
enum RuledType { RLT_B_ISOPAR = 0, // con parametrizzazione simile tra le due curve
RLT_B_MINDIST = 1, // con distanza minima tra le due curve, usando start e end delle curve presenti
RLT_B_MINDIST_PLUS = 2, // con distanza minima tra le due curve, aggiungendo punti lungo le curve dove necessario
RLT_B_LENPAR = 3} ; // aggiungo punti alla curve in modo da matchare meglio le sottocurve, inoltre parametrizzo le curve in base alla lunghezza e non al numero di curve
enum Is_Planar { NOT_CALCULATED = -1,
NOT_PLANAR_SURF = 0 ,
PLANAR_SURF = 1} ;
public : // IGeoObj
public : // IGeoObj
ISurfBezier* Clone( void) const override = 0 ;
public :
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
@@ -94,7 +103,7 @@ public : // IGeoObj
} ;
//-----------------------------------------------------------------------------
static const double SBZ_TREG_COEFF = 1000 ;
static const double SBZ_TREG_COEFF = 1024 ;
//-----------------------------------------------------------------------------
inline ISurfBezier* CreateSurfBezier( void)
@@ -112,6 +121,12 @@ inline ISurfBezier* GetSurfBezier( IGeoObj* pGObj)
return nullptr ;
return (static_cast<ISurfBezier*>(pGObj)) ; }
//----------------------------------------------------------------------------
EGK_EXPORT void SetSurfBezierAuxSurfTol( double dTol) ;
EGK_EXPORT double GetSurfBezierAuxSurfTol( void) ;
EGK_EXPORT void SetSurfBezierAuxSurfRefinedTol( double dTol) ;
EGK_EXPORT double GetSurfBezierAuxSurfRefinedTol( void) ;
//----------------------------------------------------------------------------
// Raccolte di puntatori a ISurfBezier
typedef std::vector<const ISurfBezier*> CISURFBEZPVECTOR ; // vettore di puntatori a const ISurfBezier
+3 -1
View File
@@ -119,7 +119,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual bool Intersect( const ISurfTriMesh& Other) = 0 ;
virtual bool Subtract( const ISurfTriMesh& Other) = 0 ;
virtual bool GetSurfClassification( const ISurfTriMesh& ClassifierSurf,
INTVECTOR& vTriaIn, INTVECTOR& vTriaOut, INTVECTOR& vTriaOnP, INTVECTOR& vTriaOnM, INTVECTOR& vTriaIndef) = 0 ;
INTVECTOR& vTriaIn, INTVECTOR& vTriaOut, INTVECTOR& vTriaOnP, INTVECTOR& vTriaOnM, INTVECTOR& vTriaIndef) = 0 ;
virtual bool CutWithOtherSurf( const ISurfTriMesh& CutterSurf, bool bInVsOut, bool bSaveOnEq) = 0 ;
virtual bool Repair( double dMaxEdgeLen = MAX_EDGE_LEN_STD) = 0 ;
virtual bool GetAllTriaOverlapBox( const BBox3d& b3Box, INTVECTOR& vT) const = 0 ;
@@ -128,6 +128,8 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual bool GetShellArea( int nShell, double& dArea) const = 0 ;
virtual bool RemoveShell( int nShell) = 0 ;
virtual ISurfTriMesh* CloneShell( int nShell) const = 0 ;
virtual bool GetPartLocalBBox( int nP, BBox3d& b3Loc) const = 0 ;
virtual bool GetPartBBox( int nP, const Frame3d& frRef, BBox3d& b3Ref) const = 0 ;
virtual int GetPartCount( void) const = 0 ;
virtual bool GetPartArea( int nPart, double& dArea) const = 0 ;
virtual bool GetPartVolume( int nPart, double& dVolume) const = 0 ;
+30
View File
@@ -0,0 +1,30 @@
//----------------------------------------------------------------------------
// EgalTech 2025-2025
//----------------------------------------------------------------------------
// File : EGkSurfTriMeshAux.h Data : 07.07.25 Versione : 2.7g1
// Contenuto : Funzioni ausiliarie per ISurfTriMesh.
//
//
//
// Modifiche : 07.07.25 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurfTriMesh.h"
//----------------------------------------------------------------------------
// Costanti per offset
static int STMOFF_FILLET = 0 ;
static int STMOFF_CHAMFER = 1 ;
static int STMOFF_EXTEND = 2 ;
//----------------------------------------------------------------------------
// Funzioni per Offset di singola superficie
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshOffset( const ISurfTriMesh* pStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshThickeningOffset( const ISurfTriMesh* pStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
// Funzioni per Offset di più superfici
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshesOffset( const CISURFTMPVECTOR& vStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshesThickeningOffset( const CISURFTMPVECTOR& vStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
+6 -2
View File
@@ -9,6 +9,8 @@
// Modifiche : 22.01.15 DS Creazione modulo.
// 12.09.23 DS Aggiunto metodo IsTriDexel.
// 09.03.24 DS Aggiunti SetShowEdges e GetShowEdges.
// 10.06.25 RE Aggiunte funzioni per Offset di superfici TriMesh chiuse
// 04.07.25 RE Aggiunte funzioni per Thickening Offset di superfici TriMesh generiche
//
//----------------------------------------------------------------------------
@@ -17,7 +19,7 @@
#include "/EgtDev/Include/EGkGeoObj.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkSurfTriMeshAux.h"
//----------------------------------------------------------------------------
class __declspec( novtable) IVolZmap : public IGeoObj
@@ -30,10 +32,11 @@ class __declspec( novtable) IVolZmap : public IGeoObj
virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex) = 0 ;
virtual bool CreateEmpty( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex) = 0 ;
virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dStep, bool bTriDex) = 0 ;
virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dStep, bool bTriDex) = 0 ;
virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dStep, bool bTriDex, double dExtraBox = 0.) = 0 ;
virtual int GetBlockCount( void) const = 0 ;
virtual int GetBlockUpdatingCounter( int nBlock) const = 0 ;
virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ;
virtual ISurfTriMesh* GetSurfTriMesh( void) const = 0 ;
virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ;
virtual bool GetVolume( double& dVol) const = 0 ;
virtual bool IsTriDexel( void) const = 0 ;
@@ -89,6 +92,7 @@ class __declspec( novtable) IVolZmap : public IGeoObj
virtual bool RemovePart( int nPart) = 0 ;
virtual int GetPartMinDistFromPoint( const Point3d& ptP) const = 0 ;
virtual bool AddSurfTm( const ISurfTriMesh* pStm) = 0 ;
virtual bool SubtractSurfTm( const ISurfTriMesh* pStm) = 0 ;
virtual bool MakeUniform( double dToler) = 0 ;
} ;
+10 -7
View File
@@ -774,7 +774,7 @@ EIN_EXPORT int __stdcall EgtAddRawPart( const double ptOrig[3],
EIN_EXPORT BOOL __stdcall EgtModifyRawPart( int nRawId, const double ptOrig[3],
double dLength, double dWidth, double dHeight, const int vCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtModifyRawPart2( int nRawId, int nCrvId,
double dOverMat, double dZmin, double dHeight, const int vCol[4]) ;
double dOverMat, double dHeight, const int vCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) ;
EIN_EXPORT BOOL __stdcall EgtModifyRawPartHeight( int nRawId, double dHeight) ;
EIN_EXPORT BOOL __stdcall EgtKeepRawPart( int nRawId, int nSouPhase) ;
@@ -898,16 +898,16 @@ EIN_EXPORT int __stdcall EgtGetFirstOperation( void) ;
EIN_EXPORT int __stdcall EgtGetNextOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetLastOperation( void) ;
EIN_EXPORT int __stdcall EgtGetPrevOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetFirstActiveOperation( void) ;
EIN_EXPORT int __stdcall EgtGetNextActiveOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetLastActiveOperation( void) ;
EIN_EXPORT int __stdcall EgtGetPrevActiveOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetFirstActiveOperation( bool bNeedMachNotEmpty) ;
EIN_EXPORT int __stdcall EgtGetNextActiveOperation( int nId, bool bNeedMachNotEmpty) ;
EIN_EXPORT int __stdcall EgtGetLastActiveOperation( bool bNeedMachNotEmpty) ;
EIN_EXPORT int __stdcall EgtGetPrevActiveOperation( int nId, bool bNeedMachNotEmpty) ;
EIN_EXPORT int __stdcall EgtGetOperationType( int nId) ;
EIN_EXPORT int __stdcall EgtGetOperationPhase( int nId) ;
EIN_EXPORT BOOL __stdcall EgtSetOperationName( int nId, const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtGetOperationName( int nId, wchar_t*& wsName) ;
EIN_EXPORT int __stdcall EgtGetOperationId( const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtIsOperationEmpty( int nId) ;
EIN_EXPORT BOOL __stdcall EgtIsOperationEmpty( int nId, int nEmptyType) ;
EIN_EXPORT BOOL __stdcall EgtRemoveOperation( int nId) ;
EIN_EXPORT BOOL __stdcall EgtRemoveAllPhaseOperations( int nPhase) ;
EIN_EXPORT BOOL __stdcall EgtRemoveAllOperations( void) ;
@@ -949,7 +949,7 @@ EIN_EXPORT BOOL __stdcall EgtGetMachiningParamInt( int nType, int* pnVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamDouble( int nType, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamString( int nType, wchar_t*& wsVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningGeometry( int nInd, int* pnId, int* pnSub) ;
EIN_EXPORT BOOL __stdcall EgtIsMachiningEmpty( void) ;
EIN_EXPORT BOOL __stdcall EgtIsMachiningEmpty( int nEmptyType) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningStartPoint( double ptP[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningEndPoint( double ptP[3]) ;
EIN_EXPORT BOOL __stdcall EgtApplyAllMachinings( BOOL bRecalc, BOOL bStopOnFirstErr, wchar_t*& wsErrList) ;
@@ -961,6 +961,7 @@ EIN_EXPORT BOOL __stdcall EgtSimMove( int* pnStatus) ;
EIN_EXPORT BOOL __stdcall EgtSimHome( void) ;
EIN_EXPORT BOOL __stdcall EgtSimSetStep( double dStep) ;
EIN_EXPORT BOOL __stdcall EgtSimSetUiStatus( int nUiStatus) ;
EIN_EXPORT BOOL __stdcall EgtSimEnableToolTipTrace( BOOL bEnable) ;
EIN_EXPORT BOOL __stdcall EgtSimGetAxisInfoPos( int nI, wchar_t*& wsName, wchar_t*& wsToken, BOOL* pbLinear, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtSimGetToolInfo( wchar_t*& wsTool, double* pdSpeed) ;
EIN_EXPORT BOOL __stdcall EgtSimGetOperationInfo( wchar_t*& wsName, int* pnType) ;
@@ -1042,6 +1043,8 @@ EIN_EXPORT BOOL __stdcall EgtSetShowCurveDirection( BOOL bShow, BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtGetShowCurveDirection( void) ;
EIN_EXPORT BOOL __stdcall EgtSetShowTriaAdv( BOOL bAdvanced, BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtGetShowTriaAdv( void) ;
EIN_EXPORT BOOL __stdcall EgtSetShowSurfBezierTol( double dLinTol, BOOL bRedraw) ;
EIN_EXPORT double __stdcall EgtGetShowSurfBezierTol( void) ;
EIN_EXPORT BOOL __stdcall EgtSetShowZmap( int nMode, BOOL bRedraw) ;
EIN_EXPORT int __stdcall EgtGetShowZmap( void) ;
EIN_EXPORT BOOL __stdcall EgtZoom( int nZoom, BOOL bRedraw) ;
+13 -9
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EMkMachMgr.h Data : 25.11.24 Versione : 2.6k5
// File : EMkMachMgr.h Data : 09.09.25 Versione : 2.7i2
// Contenuto : Dichiarazione della interfaccia IMachMgr.
//
//
@@ -19,6 +19,7 @@
// 02.04.24 DS Aggiunta in interfaccia GetClEntAxesMask.
// 22.04.24 DS Aggiunta in interfaccia GetExitId.
// 25.11.24 DS Aggiunta in interfaccia GetMachiningSkippedGeometry.
// 09.09.25 DS Aggiunta in interfaccia GetRobotAngles.
//
//----------------------------------------------------------------------------
@@ -86,7 +87,7 @@ class __declspec( novtable) IMachMgr
virtual int AddRawPart( const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ;
virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ;
virtual bool ModifyRawPart( int nRawId, const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ;
virtual bool ModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) = 0 ;
virtual bool ModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dHeight, Color cCol) = 0 ;
virtual bool ModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) = 0 ;
virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ;
virtual bool KeepRawPart( int nRawId, int nSouPhase) = 0 ;
@@ -219,16 +220,16 @@ class __declspec( novtable) IMachMgr
virtual int GetNextOperation( int nId) const = 0 ;
virtual int GetLastOperation( void) const = 0 ;
virtual int GetPrevOperation( int nId) const = 0 ;
virtual int GetFirstActiveOperation( void) const = 0 ;
virtual int GetNextActiveOperation( int nId) const = 0 ;
virtual int GetLastActiveOperation( void) const = 0 ;
virtual int GetPrevActiveOperation( int nId) const = 0 ;
virtual int GetFirstActiveOperation( bool bNeedMachNotEmpty = false) const = 0 ;
virtual int GetNextActiveOperation( int nId, bool bNeedMachNotEmpty = false) const = 0 ;
virtual int GetLastActiveOperation( bool bNeedMachNotEmpty = false) const = 0 ;
virtual int GetPrevActiveOperation( int nId, bool bNeedMachNotEmpty = false) const = 0 ;
virtual int GetOperationType( int nId) const = 0 ;
virtual int GetOperationPhase( int nId) const = 0 ;
virtual bool SetOperationName( int nId, const std::string& sName) = 0 ;
virtual std::string GetOperationName( int nId) const = 0 ;
virtual int GetOperationId( const std::string& sName) const = 0 ;
virtual bool IsOperationEmpty( int nId) const = 0 ;
virtual bool IsOperationEmpty( int nId, int nEmptyType = 0) const = 0 ;
virtual bool RemoveOperation( int nId) = 0 ;
virtual bool RemoveAllPhaseOperations( int nPhase) = 0 ;
virtual bool RemoveAllOperations( void) = 0 ;
@@ -274,7 +275,7 @@ class __declspec( novtable) IMachMgr
virtual bool GetMachiningParam( int nType, std::string& sVal) const = 0 ;
virtual bool GetMachiningGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool GetMachiningSkippedGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool IsMachiningEmpty( void) const = 0 ;
virtual bool IsMachiningEmpty( int nEmptyType = 0) const = 0 ;
virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ;
virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ;
// CL Entities Interrogations
@@ -294,6 +295,7 @@ class __declspec( novtable) IMachMgr
virtual bool SimGetMoveInfo( int& nGmove, double& dFeed) const = 0 ;
virtual bool SimSetStep( double dStep) = 0 ;
virtual bool SimSetUiStatus( int nUiStatus) = 0 ;
virtual bool SimEnableToolTipTrace( bool bEnable) = 0 ;
virtual bool SimGoHome( void) = 0 ;
virtual bool SimExit( void) = 0 ;
// Generation
@@ -317,6 +319,8 @@ class __declspec( novtable) IMachMgr
int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
virtual bool GetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng,
int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
virtual bool GetRobotAngles( const Point3d& ptP, const Vector3d& vtDirT, const Vector3d& vtDirA,
DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ;
virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
bool bOverall, bool bBottom, Point3d& ptTip) const = 0 ;
virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, const DBLVECTOR& vAng,
+10 -5
View File
@@ -68,7 +68,8 @@ enum MachiningType {
MT_SURFROUGHING = OPER_SURFROUGHING,
MT_SURFFINISHING = OPER_SURFFINISHING,
MT_WATERJETTING = OPER_WATERJETTING,
MT_FIVEAXISMILLING = OPER_FIVEAXISMILLING
MT_FIVEAXISMILLING = OPER_FIVEAXISMILLING,
MT_PROBING = OPER_PROBING
} ;
//----------------------------------------------------------------------------
@@ -300,10 +301,12 @@ enum { SAWROU_HS_LEFT = 1,
SAWROU_HS_RIGHT = 2} ;
// Tipo di lavorazione a step
enum { SAWROU_ST_ZIGZAG = 0,
SAWROU_ST_ONEWAY = 1} ;
SAWROU_ST_ONEWAY = 1,
SAWROU_ST_ZCONST = 2} ;
// Tipo di attacco/uscita/link
enum { SAWROU_LL_CENT = 0,
SAWROU_LL_OUT = 1} ;
SAWROU_LL_OUT = 1,
SAWROU_LL_INT = 2} ;
//----------------------------------------------------------------------------
// Parametri per finitura con lama
@@ -366,7 +369,8 @@ enum { MORTISE_PLUNGE_STEP = 0,
MORTISE_PLUNGE_START = 1,
MORTISE_PLUNGE_END = 2,
MORTISE_PLUNGE_START_END = 3,
MORTISE_PLUNGE_START_TO_END = 4} ;
MORTISE_PLUNGE_START_TO_END = 4,
MORTISE_PLUNGE_STEP_NO_SAFEZ = 10} ;
//----------------------------------------------------------------------------
// Parametri per sgrossatura superfici
@@ -395,7 +399,8 @@ enum { SURFFIN_SUB_ZIGZAG = 0,
SURFFIN_SUB_SPIRALOUT = 3,
SURFFIN_SUB_Z_CONST = 4,
SURFFIN_SUB_OPTIMAL = 5,
SURFFIN_SUB_PROJECT = 6} ;
SURFFIN_SUB_PROJECT = 6,
SURFFIN_SUB_PENCIL = 7} ;
// Tipo di attacco
enum { SURFFIN_LI_NONE = 0,
SURFFIN_LI_LINEAR = 1,
+7 -4
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EmkOperationConst.h Data : 22.05.24 Versione : 2.6e5
// File : EmkOperationConst.h Data : 09.06.25 Versione : 2.7f2
// Contenuto : Costanti delle operazioni.
//
//
@@ -13,6 +13,7 @@
// 25.05.19 DS Agg. SurfRoughing e SurfFinishing.
// 08.07.19 DS Agg. WaterJetting.
// 06.09.23 DS Agg. 5AxMachining.
// 09.06.25 DS Agg. Probing.
//
//----------------------------------------------------------------------------
@@ -33,7 +34,8 @@ enum OperType { OPER_NULL = 0, // nulla
OPER_SURFROUGHING = 0x040000, // sgrossatura superficie
OPER_SURFFINISHING = 0x080000, // finitura superficie
OPER_WATERJETTING = 0x100000, // taglio water jet
OPER_FIVEAXISMILLING = 0x200000} ; // lavorazione 5 assi
OPER_FIVEAXISMILLING = 0x200000, // lavorazione 5 assi
OPER_PROBING = 0x400000} ; // tastatura
// Controllo tipo valido
bool inline IsValidDispositionType( int nType)
{
@@ -53,5 +55,6 @@ bool inline IsValidMachiningType( int nType)
nType == OPER_SURFROUGHING ||
nType == OPER_SURFFINISHING ||
nType == OPER_WATERJETTING ||
nType == OPER_FIVEAXISMILLING) ;
nType == OPER_FIVEAXISMILLING ||
nType == OPER_PROBING) ;
}
+8 -4
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2021
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EmkToolConst.h Data : 16.09.21 Versione : 2.3i6
// File : EmkToolConst.h Data : 09.06.25 Versione : 2.7f2
// Contenuto : Costanti degli utensili.
//
//
@@ -11,6 +11,7 @@
// 20.09.18 DS Agg. costanti per ToolHolder
// 05.04.21 DS Agg. TPA_DIST e TPA_STEMDIAM.
// 16.09.21 DS Agg. TPA_CORE.
// 09.06.25 DS Agg. probe.
//
//----------------------------------------------------------------------------
@@ -27,6 +28,7 @@ const int TF_MORTISE = 0x0800 ; // 2048
const int TF_CHISEL = 0x1000 ; // 4096
const int TF_WATERJET = 0x2000 ; // 8192
const int TF_COMPO = 0x4000 ; // 16384
const int TF_PROBE = 0x8000 ; // 32768
// Costante per tutte le famiglie
const int TF_ALL = 0xFF00 ;
// Tipologie di utensili
@@ -42,7 +44,8 @@ enum ToolType {
TT_MORTISE_STD = TF_MORTISE + 0, // 2048
TT_CHISEL_STD = TF_CHISEL + 0, // 4096
TT_WATERJET = TF_WATERJET + 0, // 8192
TT_COMPO = TF_COMPO + 0 // 16384
TT_COMPO = TF_COMPO + 0, // 16384
TT_PROBE = TF_PROBE + 0 // 32768
} ;
// Controllo tipo valido
bool inline IsValidToolType( int nType)
@@ -53,7 +56,8 @@ bool inline IsValidToolType( int nType)
nType == TT_MORTISE_STD ||
nType == TT_CHISEL_STD ||
nType == TT_WATERJET ||
nType == TT_COMPO) ;
nType == TT_COMPO ||
nType == TT_PROBE) ;
}
//----------------------------------------------------------------------------
+111
View File
@@ -0,0 +1,111 @@
//----------------------------------------------------------------------------
// EgalTech 2025-2025
//----------------------------------------------------------------------------
// File : ENkMachOptimization.h Data : 31.03.25 Versione : 2.7a1
// Contenuto : Classe per calcolo ottimizzato per le lavorazioni.
//
//
// Modifiche : 31.03.2025 RE Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EgtNumCollection.h"
//----------------------- Macro per import/export ----------------------------
#undef ENK_EXPORT
#if defined( I_AM_ENK) // da definirsi solo nella DLL
#define ENK_EXPORT __declspec( dllexport)
#else
#define ENK_EXPORT __declspec( dllimport)
#endif
//----------------------------------------------------------------------------
// Definizione utensile
struct ToolOptm {
int nId ; // Id dell'utensile ( univoco)
double dTCX ; // Coordinata cambio utensile per X
double dTCY ; // Coordinata cambio utensile per Y
double dTCZ ; // Coordinata cambio utensile per Z
double dTCA ; // Coordinata cambio utensile per A
double dTCB ; // Coordinata cambio utensile per B
double dTCC ; // Coordinata cambio utensile per C
bool bTCX ; // Flag per condsiderare/scartare il controllo sulla coordinata X
bool bTCY ; // Flag per condsiderare/scartare il controllo sulla coordinata Y
bool bTCZ ; // Flag per condsiderare/scartare il controllo sulla coordinata Z
bool bTCA ; // Flag per condsiderare/scartare il controllo sulla coordinata A
bool bTCB ; // Flag per condsiderare/scartare il controllo sulla coordinata B
bool bTCC ; // Flag per condsiderare/scartare il controllo sulla coordinata C
double dTLoad ; // Tempo di carico
double dTUnLoad ; // Tempo di scarico
ToolOptm( int nI, double dX, double dY, double dZ, double dA, double dB, double dC,
bool bX, bool bY, bool bZ, bool bA, bool bB, bool bC, double dTL, double dTUL) :
nId( nI), dTCX( dX), dTCY( dY), dTCZ( dZ), dTCA( dA), dTCB( dB), dTCC( dC),
bTCX( bX), bTCY( bY), bTCZ( bZ), bTCA( bA), bTCB( bB), bTCC( bC), dTLoad( dTL), dTUnLoad( dTUL) {}
} ;
typedef std::vector<ToolOptm> TOOLOPTMVECTOR ;
typedef std::list<ToolOptm> TOOLOPTMLIST ;
// Definizione strutta per singola lavorazione
struct MachOptm {
int nId ; // Id della lavorazione corrente
int nIdTool ; // Id dell'utensile corrente
int nGroup ; // Gruppo di appartenenza della lavorazione
double dX_Start ; // Stato iniziale asse lineare X
double dY_Start ; // Stato iniziale asse lineare Y
double dZ_Start ; // Stato iniziale asse lineare Z
double dA_Start ; // Stato iniziale asse rotante A
double dB_Start ; // Stato iniziale asse rotante B
double dC_Start ; // Stato iniziale asse rotante C
double dX_End ; // Stato finale asse lineare X
double dY_End ; // Stato finale asse lineare Y
double dZ_End ; // Stato finale asse lineare Z
double dA_End ; // Stato finale asse rotante A
double dB_End ; // Stato finale asse rotante B
double dC_End ; // Stato finale asse rotante C
MachOptm( int nIdL, int nToolL, int nGroupL,
double dX_Start, double dY_Start, double dZ_Start, double dA_Start, double dB_Start, double dC_Start,
double dX_End, double dY_End, double dZ_End, double dA_End, double dB_End, double dC_End) :
nId( nIdL), nIdTool( nToolL), nGroup( nGroupL),
dX_Start( dX_Start), dY_Start( dY_Start), dZ_Start( dZ_Start),
dA_Start( dA_Start) , dB_Start( dB_Start), dC_Start( dC_Start),
dX_End( dX_End), dY_End( dY_End), dZ_End( dZ_End),
dA_End( dA_End), dB_End( dB_End), dC_End( dC_End) {}
} ;
typedef std::vector<MachOptm> MACHOPTMVECTOR ;
typedef std::list<MachOptm> MACHOPTMLIST ;
//----------------------------------------------------------------------------
class __declspec( novtable) IMachOptimization
{
public :
virtual ~IMachOptimization( void) {}
virtual bool InsertTool( int nId, double dTCX, double dTCY, double dTCZ, double dTCA,
double dTCB, double dTCC, bool bX, bool bY, bool bZ, bool bA,
bool bB, bool bC, double dTLoad, double dTUnL) ;
virtual bool InsertMachining( int nId, int nToolId, int nGroup,
double dX_Start, double dY_Start, double dZ_Start,
double dA_Start, double dB_Start, double dC_Start,
double dX_End, double dY_End, double dZ_End,
double dA_End, double dB_End, double dC_End) = 0 ;
virtual bool InsertDependence( int nIdPrec, int nIdSucc) = 0 ;
virtual bool InsertSuggestedDependences( int nIdPrec, int nIdSucc) = 0 ;
virtual bool SetFirstMachining( int nId) = 0 ;
virtual bool SetLastMachining( int nId) = 0 ;
virtual bool SetFeeds( double dFeedL, double dFeedA) = 0 ;
virtual bool SetAllGroupsAsMandatory( bool bAllMandatory = false) = 0 ;
virtual bool GetResult( INTVECTOR& vIds) = 0 ;
} ;
//-----------------------------------------------------------------------------
ENK_EXPORT IMachOptimization* CreateMachOptimization( void) ;
+3
View File
@@ -39,6 +39,9 @@ class __declspec( novtable) IShortestPath
virtual bool Calculate( int nType) = 0 ;
virtual bool GetOrder( INTVECTOR& vOrder) = 0 ;
virtual bool GetMinLength( double& dMinLen) = 0 ;
virtual bool SetConstraintOrder( int nPrev, int nNext) = 0 ;
virtual bool SetSuggestedOrder( int nPrev, int nNext) = 0 ;
virtual bool SetDistMatrix( const INTMATRIX& mDistMatrix) = 0 ;
public :
enum SpType{ SP_NONE = 0,
+2
View File
@@ -57,11 +57,13 @@ class __declspec( novtable) IAutoNester
virtual bool SetStripYconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) = 0 ;
virtual bool SetStripXconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) = 0 ;
virtual bool SetInterpartGap( double dGap) = 0 ;
virtual bool SetShearGap( double dShearGap) = 0 ;
virtual bool SetReportFile( const std::string& sReportFile) = 0 ;
virtual bool Compute( bool bMinimizeOnXvsY, int nMaxTime) = 0 ;
virtual bool CancelComputation( void) = 0 ;
virtual bool GetComputationStatus( int& nStatus) = 0 ;
virtual bool GetResults( double& dTotFillRatio, ANIVECT& vANI) = 0 ;
virtual bool CalcShearSequence( int nNesting, std::vector<Point3d>& vPtStart, std::vector<Point3d>& vPtEnd) = 0 ;
virtual bool PrintResults( const std::string& sHtmlFile) = 0 ;
} ;
+31 -26
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2022
// EgalTech 2014-2025
//----------------------------------------------------------------------------
// File : EXeConst.h Data : 11.01.22 Versione : 2.4a
// File : EXeConst.h Data : 11.05.25 Versione : 2.7e2
// Contenuto : Costanti generali per EgtExecuter.
//
//
@@ -84,8 +84,9 @@ enum CLiType { CLT_NONE = 0,
//----------------- Costanti tipo di costruzione di superficie rigata ----------
enum RuledType{ RUL_TYPE_ISOPAR = 0, // come ISurfTrimesh::RLT_ISOPAR
RUL_TYPE_MINDIST = 1, // come ISurfTrimesh::RLT_MINDIST
RUL_TYPE_ISOPAR_SMOOTH = 3} ; // come ISurfTrimesh::RLT_ISOPAR_SMOOTH
RUL_TYPE_ISOPAR_SMOOTH = 2} ; // come ISurfTrimesh::RLT_ISOPAR_SMOOTH
//----------------- Costanti per classificazione di curve rispetto a regioni ---------
enum CrvRegClass { CRC_NULL = 0,
CRC_IN = 1,
CRC_OUT = 2,
@@ -98,6 +99,10 @@ enum RSCapType { RSCT_NONE = 0, // come RSCAP_NONE
RSCT_ROUND = 2, // come RSCAP_ROUND
RSCT_BEVEL = 3} ; // come RSCAP_BEVEL
//----------------- Costanti tipo Zoom -----------------------------------------
enum ZoomType { ZM_ALL = 1, // zoom tutto
ZM_IN = 2, // ingrandisci
ZM_OUT = 3} ; // rimpicciolisci
//----------------- Costanti flag import CNC -----------------------------------
enum EicFlag { EIC_FLAG_NONE = 0, // come EImCncFlag::EICFLAG_NONE
@@ -112,36 +117,36 @@ enum EibFlag { EIB_FLAG_NONE = 0, // come EImBtlFlag::EIBFLAG_NONE
EIB_FLAG_SPECIAL_TRIM = 4} ; // come EImBtlFlag::EIBFLAG_SPECIAL_TRIM
//----------------- Costanti tipo costruzione pezzi piani ----------------------
enum FpcType{ FPC_NGE = 0, // costruzione da pezzo Nge
FPC_REGION = 1, // costruzione da regione
FPC_LAYER = 2, // costruzione da layer
FPC_CLOSEDCURVE = 3} ; // costruzione da curva chiusa
enum FpcType { FPC_NGE = 0, // costruzione da pezzo Nge
FPC_REGION = 1, // costruzione da regione
FPC_LAYER = 2, // costruzione da layer
FPC_CLOSEDCURVE = 3} ; // costruzione da curva chiusa
//----------------- Costanti tipo interferenza di lavorazioni piane ------------
enum FmiType{ FMI_NONE = 0, // nessuna interferenza
FMI_LI = 1, // interferenza con attacco
FMI_RM = 2, // interferenza con lavorazione ridotta
FMI_LO = 4} ; // interferenza con uscita
enum FmiType { FMI_NONE = 0, // nessuna interferenza
FMI_LI = 1, // interferenza con attacco
FMI_RM = 2, // interferenza con lavorazione ridotta
FMI_LO = 4} ; // interferenza con uscita
//----------------- Costanti risultato verifica tagli lama allungati -----------
enum CarRes{ CAR_INTERF = 0, // interferiscono entrambi gli allungamenti
CAR_LI_OK = 1, // allungamento inizio va bene
CAR_LO_OK = 2, // allungameno uscita va bene
CAR_LI_LO_OK = 1 + 2} ; // entrambi gli allungamenti vanno bene
enum CarRes { CAR_INTERF = 0, // interferiscono entrambi gli allungamenti
CAR_LI_OK = 1, // allungamento inizio va bene
CAR_LO_OK = 2, // allungameno uscita va bene
CAR_LI_LO_OK = 1 + 2} ; // entrambi gli allungamenti vanno bene
//----------------- Costanti tipo Zoom -----------------------------------------
enum ZoomType { ZM_ALL = 1, // zoom tutto
ZM_IN = 2, // ingrandisci
ZM_OUT = 3} ; // rimpicciolisci
//----------------- Costanti tipo controllo lavorazione vuota -------------------
enum EmptyNeed { EMP_NEED_GEOM = 0, // necessaria solo presenza geometria di definizione
EMP_NEED_ONE_TP_OK = 1, // almeno un percorso utensile non vuoto
EMP_NEED_ALL_TP_OK = 2} ; // tutti i percorsi utensile non vuoti
//----------------- Costanti errore simulatore in cieco ------------------------
enum SimHideErr { SHE_NONE = 0, // nessun errore
SHE_INIT = 1, // errore nell'avvio della simulazione
SHE_OUTSTROKE = 2, // errore di extracorsa
SHE_DIR_ERR = 3, // errore direzione utensile non raggiungibile
SHE_COLLISION = 4, // errore collisione testa-pezzo
SHE_SPECIAL = 5, // errore speciale/custom
SHE_GENERAL = 6} ; // errore generico
enum SimHideErr { SHE_NONE = 0, // nessun errore
SHE_INIT = 1, // errore nell'avvio della simulazione
SHE_OUTSTROKE = 2, // errore di extracorsa
SHE_DIR_ERR = 3, // errore direzione utensile non raggiungibile
SHE_COLLISION = 4, // errore collisione testa-pezzo
SHE_SPECIAL = 5, // errore speciale/custom
SHE_GENERAL = 6} ; // errore generico
//----------------- Costanti per sostituzione direttorio e nome progetto --------------------
const std::string SUB_PROJECT_DIR = "%PRJDIR%" ;
+43 -14
View File
@@ -213,6 +213,26 @@ EXE_EXPORT bool ExeSpCalculate( int nType) ;
EXE_EXPORT bool ExeSpGetOrder( INTVECTOR& vOrder) ;
EXE_EXPORT bool ExeSpGetMinLength( double& dMinLen) ;
// Machining Order Optimization
EXE_EXPORT bool ExeOptMachInit( void) ;
EXE_EXPORT bool ExeOptMachTerminate( void) ;
EXE_EXPORT bool ExeOptMachAddTool( int nId,
double dTCX, double dTCY, double dTCZ, double dTCA, double dTCB, double dTCC,
bool bX, bool bY, bool bZ, bool bA, bool bB, bool bC,
double dTLoad, double dTUnL) ;
EXE_EXPORT bool ExeOptMachAddMachining( int nId, int nToolId, int nGroup,
double dX_Start, double dY_Start, double dZ_Start,
double dA_Start, double dB_Start, double dC_Start,
double dX_End, double dY_End, double dZ_End,
double dA_End, double dB_End, double dC_End) ;
EXE_EXPORT bool ExeOptMachSetFirstMachining( int nId) ;
EXE_EXPORT bool ExeOptMachSetLastMachining( int nId) ;
EXE_EXPORT bool ExeOptMachSetFeeds( double dFeedL, double dFeedA) ;
EXE_EXPORT bool ExeOptMachAddDependence( int nIdPrec, int nIdNext) ;
EXE_EXPORT bool ExeOptMachAddSuggestedDependence( int nIdPrec, int nIdNext) ;
EXE_EXPORT bool ExeOptMachSetAllGroupDependencesAsMandatory( bool bAllMandatory) ;
EXE_EXPORT bool ExeOptMachGetResult( INTVECTOR& vIds) ;
// GeomDB Create
EXE_EXPORT int ExeCreateGroup( int nParentId, const Frame3d& frFrame, int nRefType) ;
EXE_EXPORT int ExeCreateGeoPoint( int nParentId, const Point3d& ptP, int nRefType) ;
@@ -299,6 +319,7 @@ EXE_EXPORT int ExeCreateCurveChamfer( int nParentId, int nCrv1, const Point3d&
EXE_EXPORT int ExeCreateCurveBezier( int nParentId, int nDegree, const PNTVECTOR& vPnt, int nRefType) ;
EXE_EXPORT int ExeCreateCurveBezierRational( int nParentId, int nDegree, const PNTUVECTOR& vPntW, int nRefType) ;
EXE_EXPORT int ExeCreateCurveBezierFromArc( int nParentId, int nArcId, bool bErase) ;
EXE_EXPORT int ExeCreateCurveBezierFromCurve( int nParentId, int nCrvId, int nDeg) ;
EXE_EXPORT int ExeCreateCurveCompo( int nParentId, const INTVECTOR& vIds, bool bErase) ;
EXE_EXPORT int ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
const Point3d& ptNear, bool bErase, int nRefType, int* pnCount) ;
@@ -325,7 +346,6 @@ EXE_EXPORT int ExeCreatePolygonFromSide( int nParentId, int nNumSides, const Po
const Point3d& ptFin, int nRefType) ;
EXE_EXPORT int ExeCreateCirclesAlongCurve( int nParentId, int nCrvId, double dOffset, double dOverlap,
double dStartAdd, double dEndAdd, double dDiam, int* pnCount) ;
EXE_EXPORT int ExeCreateCurveBezierForm( int nParentId, int nCrvId, int nDeg) ;
// GeomDB Create Surf
EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) ;
@@ -377,6 +397,8 @@ EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrC
EXE_EXPORT int ExeCreateSurfTmByTriangles( int nParentId, const INTVECTOR& vIds, bool bErase) ;
EXE_EXPORT int ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, bool bErase) ;
EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ;
EXE_EXPORT int ExeSurfTmOffset( int nParentId, const INTVECTOR& vIds, double dOffs, double dLinTol, int nType) ;
EXE_EXPORT int ExeSurfTmThickeningOffset( int nParentId, const INTVECTOR& vIds, double dOffs, double dLinTol, int nType) ;
EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ;
EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ;
EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false, int* pnCount = nullptr) ;
@@ -385,7 +407,7 @@ EXE_EXPORT int ExeCreateSurfBezierTria2D( int nParentId, int nSurfBzId, int nTe
EXE_EXPORT int ExeCreateSurfBzByFlatContour( int nParentId, int nCrvId, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfBzByRegion( int nParentId, const INTVECTOR& vCrvId, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfBzByExtrusion( int nParentId, int nCrvId, const Vector3d& vtExtr, bool bCapEnds,
double dLinTol, int nRefType) ;
double dLinTol, int nRefType, int* pnCount = nullptr) ;
EXE_EXPORT int ExeCreateSurfBzByRegionExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr, bool bCapEnds,
double dLinTol, int nRefType) ;
EXE_EXPORT int ExeCreateSurfBzByScrewing( int nParentId, int nCrvId,
@@ -407,8 +429,6 @@ EXE_EXPORT int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, doub
double dDimY, double dDimZ, double dPrec, bool bTriDex, int nRefType) ;
EXE_EXPORT int ExeCreateVolZmapByRegionExtrusion( int nParentId, int nSfrId, double dDimZ, double dPrec, bool bTriDex) ;
EXE_EXPORT int ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDex) ;
EXE_EXPORT bool ExeUpdateVolZmapByAddingSurfTm( int nVolZmapId, int nStmId) ;
EXE_EXPORT bool ExeUniformVolZmap( int nVolZmapId, double dToler) ;
// GeomDB PartLayer
EXE_EXPORT bool ExeIsPart( int nPartId) ;
@@ -637,9 +657,9 @@ EXE_EXPORT bool ExeCurveCompoSetTempProp( int nId, int nCrv, int nProp, int nPro
EXE_EXPORT bool ExeCurveCompoSetTempParam( int nId, int nCrv, double dParam, int nParamInd = 0) ;
EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
EXE_EXPORT bool ExeReorderCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int nDestGrpId,
EXE_EXPORT bool ExeProjectCurveOnSurf( int nCurveId, const INTVECTOR& vnSurfId, const Vector3d& vtProj, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrpId,
EXE_EXPORT bool ExeProjectCurveOnSurfExt( int nCurveId, const INTVECTOR& vnSurfId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
EXE_EXPORT int ExeCurveGetVoronoi( const INTVECTOR& vIds, int nDestGrpId, int nBound, int* pnCount) ;
EXE_EXPORT int ExeCurveGetMedialAxis( const INTVECTOR& vIds, int nDestGrpId, int nSide, int* pnCount) ;
@@ -711,6 +731,8 @@ EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vecto
EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe, int nRefType) ;
EXE_EXPORT bool ExeCutVolZmapPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ;
EXE_EXPORT bool ExeUpdateVolZmapByAddingSurfTm( int nVolZmapId, int nStmId) ;
EXE_EXPORT bool ExeUniformVolZmap( int nVolZmapId, double dToler) ;
// GeomDB Get
EXE_EXPORT bool ExeTextNormVersor( int nId, int nRefId, Vector3d& vtNorm) ;
@@ -721,7 +743,7 @@ EXE_EXPORT bool ExeTextGetItalic( int nId, bool& bItl) ;
// GeomDb Get Pocketing
EXE_EXPORT bool ExePocketing( const int nId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ;
EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, bool bRemoveOverlapLink,int* pnCount) ;
EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, bool bRemoveOverlapLink,int* pnCount) ;
// GeomDb Curve Get
EXE_EXPORT bool ExeCurveDomain( int nId, double* pdStart, double* pdEnd) ;
@@ -986,6 +1008,7 @@ EXE_EXPORT bool ExeAutoNestSetRestrictedZoneToPart( int nPartId, int nRzConstrId
EXE_EXPORT bool ExeAutoNestSetStripYconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) ;
EXE_EXPORT bool ExeAutoNestSetStripXconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) ;
EXE_EXPORT bool ExeAutoNestSetInterpartGap( double dGap) ;
EXE_EXPORT bool ExeAutoNestSetShearGap( double dShearGap) ;
EXE_EXPORT bool ExeAutoNestSetReportFile( const std::string& sReportFile) ;
EXE_EXPORT bool ExeAutoNestCompute( bool bMinimizeOnXvsY, int nMaxTime) ;
EXE_EXPORT bool ExeAutoNestCancelComputation( void) ;
@@ -993,6 +1016,7 @@ EXE_EXPORT bool ExeAutoNestGetComputationStatus( int& nStatus) ;
EXE_EXPORT bool ExeAutoNestPrintResults( const std::string& sHtmlFile) ;
EXE_EXPORT bool ExeAutoNestGetResults( int& nNestedParts, int& nParts, int& nSheets, int& nNestings, double& dTotFillRatio) ;
EXE_EXPORT bool ExeAutoNestGetOneResult( int nInd, int& nType, int& nId, int& nFlag, double& dX, double& dY, double& dAngRot) ;
EXE_EXPORT bool ExeAutoNestCalcShearSequence( int nNesting, PNTVECTOR& vPtStart, PNTVECTOR& vPtEnd) ;
// Collision Avoidance Tool SurfaceTriMesh
EXE_EXPORT bool ExeCAvSetStdTool( double dToolLen, double dToolDiam, double dToolCornR) ;
@@ -1048,7 +1072,7 @@ EXE_EXPORT bool ExeIsRawPart( int nRawId) ;
EXE_EXPORT int ExeAddRawPart( Point3d ptOrig, double dLength, double dWidth, double dHeight, Color cCol) ;
EXE_EXPORT int ExeAddRawPartWithPart( int nPartId, int nCrvId, double dOverMat, Color cCol) ;
EXE_EXPORT bool ExeModifyRawPart( int nRawId, Point3d ptOrig, double dLength, double dWidth, double dHeight, Color cCol) ;
EXE_EXPORT bool ExeModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) ;
EXE_EXPORT bool ExeModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dHeight, Color cCol) ;
EXE_EXPORT bool ExeModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) ;
EXE_EXPORT bool ExeModifyRawPartHeight( int nRawId, double dHeight) ;
EXE_EXPORT bool ExeKeepRawPart( int nRawId, int nSouPhase) ;
@@ -1180,16 +1204,16 @@ EXE_EXPORT int ExeGetFirstOperation( void) ;
EXE_EXPORT int ExeGetNextOperation( int nId) ;
EXE_EXPORT int ExeGetLastOperation( void) ;
EXE_EXPORT int ExeGetPrevOperation( int nId) ;
EXE_EXPORT int ExeGetFirstActiveOperation( void) ;
EXE_EXPORT int ExeGetNextActiveOperation( int nId) ;
EXE_EXPORT int ExeGetLastActiveOperation( void) ;
EXE_EXPORT int ExeGetPrevActiveOperation( int nId) ;
EXE_EXPORT int ExeGetFirstActiveOperation( bool bNeedMachNotEmpty = false) ;
EXE_EXPORT int ExeGetNextActiveOperation( int nId, bool bNeedMachNotEmpty = false) ;
EXE_EXPORT int ExeGetLastActiveOperation( bool bNeedMachNotEmpty = false) ;
EXE_EXPORT int ExeGetPrevActiveOperation( int nId, bool bNeedMachNotEmpty = false) ;
EXE_EXPORT int ExeGetOperationType( int nId) ;
EXE_EXPORT int ExeGetOperationPhase( int nId) ;
EXE_EXPORT bool ExeSetOperationName( int nId, const std::string& sName) ;
EXE_EXPORT bool ExeGetOperationName( int nId, std::string& sName) ;
EXE_EXPORT int ExeGetOperationId( const std::string& sName) ;
EXE_EXPORT bool ExeIsOperationEmpty( int nId) ;
EXE_EXPORT bool ExeIsOperationEmpty( int nId, int nEmptyType = 0) ;
EXE_EXPORT bool ExeRemoveOperation( int nId) ;
EXE_EXPORT bool ExeRemoveAllPhaseOperations( int nPhase) ;
EXE_EXPORT bool ExeRemoveAllOperations( void) ;
@@ -1233,7 +1257,7 @@ EXE_EXPORT bool ExeGetMachiningParam( int nType, double& dVal) ;
EXE_EXPORT bool ExeGetMachiningParam( int nType, std::string& sVal) ;
EXE_EXPORT bool ExeGetMachiningGeometry( SELVECTOR& vIds) ;
EXE_EXPORT bool ExeGetMachiningSkippedGeometry( SELVECTOR& vIds) ;
EXE_EXPORT bool ExeIsMachiningEmpty( void) ;
EXE_EXPORT bool ExeIsMachiningEmpty( int nEmptyType) ;
EXE_EXPORT bool ExeGetMachiningStartPoint( Point3d& ptStart) ;
EXE_EXPORT bool ExeGetMachiningEndPoint( Point3d& ptEnd) ;
EXE_EXPORT bool ExeApplyAllMachinings( bool bRecalc, bool bStopOnFirstErr, std::string& sErrList) ;
@@ -1255,6 +1279,7 @@ EXE_EXPORT bool ExeSimMove( int& nStatus) ;
EXE_EXPORT bool ExeSimHome( void) ;
EXE_EXPORT bool ExeSimSetStep( double dStep) ;
EXE_EXPORT bool ExeSimSetUiStatus( int nUiStatus) ;
EXE_EXPORT bool ExeSimEnableToolTipTrace( bool bEnable) ;
EXE_EXPORT bool ExeSimGetAxisInfoPos( int nI, std::string& sName, std::string& sToken, bool& bLinear, double& dVal) ;
EXE_EXPORT bool ExeSimGetToolInfo( std::string& sName, double& dSpeed) ;
EXE_EXPORT bool ExeSimGetOperationInfo( std::string& sName, int& nType) ;
@@ -1297,6 +1322,8 @@ EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, double dAngA, double dA
int& nStat, double& dX, double& dY, double& dZ) ;
EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng,
int& nStat, double& dX, double& dY, double& dZ) ;
EXE_EXPORT bool ExeGetRobotAngles( const Point3d& ptP, const Vector3d& vtDirT, const Vector3d& vtDirA,
DBLVECTOR& vAng1, DBLVECTOR& vAng2) ;
EXE_EXPORT bool ExeGetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
bool bBottom, Point3d& ptTip) ;
EXE_EXPORT bool ExeGetCalcTipFromPositions( double dX, double dY, double dZ, const DBLVECTOR& vAng,
@@ -1356,6 +1383,8 @@ EXE_EXPORT bool ExeSetShowCurveDirection( bool bShow, bool bRedraw) ;
EXE_EXPORT bool ExeGetShowCurveDirection( void) ;
EXE_EXPORT bool ExeSetShowTriaAdv( bool bAdvanced, bool bRedraw) ;
EXE_EXPORT bool ExeGetShowTriaAdv( void) ;
EXE_EXPORT bool ExeSetShowSurfBezierTol( double dLinTol, bool bRedraw) ;
EXE_EXPORT double ExeGetShowSurfBezierTol( void) ;
EXE_EXPORT bool ExeSetShowZmap( int nMode, bool bRedraw) ;
EXE_EXPORT int ExeGetShowZmap( void) ;
EXE_EXPORT bool ExeZoomRadius( double dRadius, bool bRedraw) ;
+2 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EgtKeyCodes.h Data : 04.03.25 Versione : 2.7a3
// File : EgtKeyCodes.h Data : 01.08.25 Versione : 2.7h1
// Contenuto : Costanti per codici di protezione librerie di base.
//
//
@@ -26,7 +26,7 @@
//----------------------------------------------------------------------------
const int KEY_BASELIB_PROD = 207 ;
const int KEY_BASELIB_VER = 2704 ;
const int KEY_BASELIB_VER = 2709 ;
const int KEY_BASELIB_LEV = 1 ;
//----------------------------------------------------------------------------
+21
View File
@@ -13,6 +13,8 @@
#pragma once
#include <cmath>
//----------------------------------------------------------------------------
inline
int Clamp( int nVal, int nMin, int nMax)
@@ -34,3 +36,22 @@ bool IsEven( int nVal)
return ( ( nVal % 2) == 0) ;
}
//----------------------------------------------------------------------------
inline
double Pow( double dBase, int nExp)
{
if ( nExp == 0)
return 1 ;
else if ( nExp < 0) {
if ( dBase < -DBL_EPSILON || dBase > DBL_EPSILON)
return Pow( 1 / dBase, -nExp) ;
else
return NAN ;
}
else {
double dVal = 1 ;
for ( int i = 1 ; i <= nExp ; ++ i)
dVal *= dBase ;
return dVal ;
}
}