Compare commits
107 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4833024c3e | |||
| ac47b1bf6f | |||
| a1bcc4ff9e | |||
| c0657147bb | |||
| 9bbb8506e9 | |||
| 5045a04dca | |||
| b4f0bc19ce | |||
| f841a7444b | |||
| d481592dfa | |||
| 73fcfd5138 | |||
| 754f2bd12d | |||
| 3ce904e2dd | |||
| cd8bf29916 | |||
| 003ff35da1 | |||
| bf9ea5e644 | |||
| cdc2df5d64 | |||
| 47cdbac0e3 | |||
| 4589358588 | |||
| 1efe9e2395 | |||
| 2c6c6b9e96 | |||
| b54a74726d | |||
| dec994247a | |||
| 71b98a0505 | |||
| 7bace5d80f | |||
| 7084ab34c8 | |||
| ed77709276 | |||
| f3631e973a | |||
| 979d989232 | |||
| a89307aeeb | |||
| 205af03a9b | |||
| d41673218e | |||
| d379137f70 | |||
| 941daabb49 | |||
| 6b7b59ae58 | |||
| ac8b796d10 | |||
| 5b26ab4733 | |||
| df70cef32d | |||
| 02bea83d38 | |||
| 25817a8911 | |||
| 6b59d709f6 | |||
| bb9f7b5fba | |||
| 06d074869d | |||
| fd7873a501 | |||
| 106c053a09 | |||
| d44f31af7f | |||
| 08ddbc9291 | |||
| d213cd0cd6 | |||
| 034cff8431 | |||
| 6a70d13cd9 | |||
| 8fc265c399 | |||
| b311f9f343 | |||
| 229eef8d19 | |||
| eb09b797a0 | |||
| ee9bff2fe9 | |||
| 7cc55217f8 | |||
| dacf041b67 | |||
| 1d43a09141 | |||
| 1655127475 | |||
| 45c642e51a | |||
| 4f79b63f80 | |||
| 69b3f4f555 | |||
| f2d39a98a7 | |||
| a39ea29632 | |||
| 4c6d87389d | |||
| d580b3dacb | |||
| 9472b42520 | |||
| 0fa10b233f | |||
| 658a6a319b | |||
| 3b9501cfdd | |||
| d4d7b75015 | |||
| ef8565ce72 | |||
| c8e73a6f15 | |||
| 7ebf9a6fb0 | |||
| fe9d75c14f | |||
| 809b1a4405 | |||
| 766508b041 | |||
| 1cc997c31a | |||
| 2a91cddd37 | |||
| b1a801ed60 | |||
| 779569644b | |||
| 5b5cc241db | |||
| cb7dbb0e52 | |||
| 5113903eb2 | |||
| df4e8edcef | |||
| 98d2a79026 | |||
| 3d06ce7c60 | |||
| c2032ba0af | |||
| 22681a960d | |||
| e7a6f95012 | |||
| 7b98133ae5 | |||
| 2d430c3fd6 | |||
| b127fca1f3 | |||
| 4b22adfdfa | |||
| 7727db9a8a | |||
| f6caa955e2 | |||
| 2e15fcf59f | |||
| 35ce9e3621 | |||
| 7b7dc44aaf | |||
| 871cd05201 | |||
| 6f7c15cf54 | |||
| b4305fc503 | |||
| ccbbc31395 | |||
| a755677379 | |||
| 8e99498a6b | |||
| 45aa980693 | |||
| bfffbbf37b | |||
| 8da5aeb3a4 |
+5
-3
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2022
|
||||
// EgalTech 2020-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EExBeamConst.h Data : 04.04.22 Versione : 2.4d2
|
||||
// File : EExBeamConst.h Data : 23.01.26 Versione : 3.1a2
|
||||
// Contenuto : Dichiarazione delle costanti per travi e pareti con BTL.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 30.08.20 DS Creazione modulo.
|
||||
// 04.04.22 DS Aggiunto EIBFLAG_TRIM_WITH_OUTLINE.
|
||||
// 23.01.26 DS Aggiunto EIBFLAG_PARTOFFSET.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -22,4 +23,5 @@ enum EImBtlFlag { EIBFLAG_NONE = 0x0000,
|
||||
EIBFLAG_SORT = 0x0010, // ordina i pezzi nel DB in base al nome
|
||||
EIBFLAG_USEUATTR = 0x0020, // utilizza i parametri utente U per modificare la geometria delle features
|
||||
EIBFLAG_OUTL_FLAT_POS = 0x0040, // pezzi secondo outline o di piatto (prevale sui precedenti POS)
|
||||
EIBFLAG_TRIM_WITH_OUTLINE = 0x0080} ; // esegui il trim delle feature con l'outline (se presente)
|
||||
EIBFLAG_TRIM_WITH_OUTLINE = 0x0080, // esegui il trim delle feature con l'outline (se presente)
|
||||
EIBFLAG_PARTOFFSET = 0x0100} ; // gestione geometrica del PARTOFFSET
|
||||
|
||||
+5
-2
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
#include "/EgtDev/Include/EExBeamConst.h"
|
||||
#include "/EgtDev/Include/EgtFunPtrType.h"
|
||||
#include <string>
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
@@ -53,11 +54,13 @@ class __declspec( novtable) IBeamMgr
|
||||
int nCrvId, int nCrv2Id, bool bUpdate = true) = 0 ;
|
||||
virtual bool EraseProcess( int nGeomId, bool bUpdate = true) = 0 ;
|
||||
virtual bool EnableProcess( int nGeomId, bool bEnable, bool bUpdate = true) = 0 ;
|
||||
virtual bool CalcAllSolids( bool bShow, bool bRecalc, pcfProcEvents pFun = nullptr) = 0 ;
|
||||
virtual bool ShowAllSolids( bool bShow, pcfProcEvents pFun = nullptr) = 0 ;
|
||||
virtual bool CalcSolid( int nPartId, bool bRecalc = false) = 0 ;
|
||||
virtual int GetSolid( int nPartId) const = 0 ;
|
||||
virtual bool ShowSolid( int nPartId, bool bShow) = 0 ;
|
||||
virtual bool GetBuildingIsOn( void) const = 0 ;
|
||||
virtual bool ShowBuilding( bool bShow) = 0 ;
|
||||
virtual bool GetBuildingIsOn( int nAssGrpId) const = 0 ;
|
||||
virtual bool ShowBuilding( int nAssGrpId, bool bShow) = 0 ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
#include <vector>
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
@@ -163,3 +164,9 @@ GetLocToLoc( const BBox3d& b3Box, const Frame3d& frOri, const Frame3d& frDest)
|
||||
b3New.LocToLoc( frOri, frDest) ;
|
||||
return b3New ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool Overlaps( const BBox3d& bbA, const Frame3d& frA, const BBox3d& bbB, const Frame3d& frB)
|
||||
{
|
||||
return bbA.Overlaps( GetToLoc( frB, frA), bbB) ;
|
||||
}
|
||||
@@ -33,5 +33,6 @@ EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const IS
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra le due superfici : restituisce true in caso di interferenza.
|
||||
// Se richiesta verifica inclusione se una delle due è chiusa controlla l'inclusione dell'altra.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestSurfTmSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ;
|
||||
EGK_EXPORT bool TestSurfTmSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist, bool bTestEnclosion = false) ;
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ class __declspec( novtable) ICurve : public IGeoObj
|
||||
virtual bool ApproxWithArcsEx( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) const = 0 ;
|
||||
virtual ICurve* CopyParamRange( double dUStart, double dUEnd) const = 0 ;
|
||||
virtual bool Invert( void) = 0 ;
|
||||
virtual bool SimpleOffset( double dDist, int nType = OFF_FILLET) = 0 ;
|
||||
virtual bool SimpleOffset( double dDist, int nType = OFF_FILLET, double dMaxAngExt = ANG_RIGHT) = 0 ;
|
||||
virtual bool SetExtrusion( const Vector3d& vtExtr) = 0 ;
|
||||
virtual bool SetThickness( double dThick) = 0 ;
|
||||
virtual bool ModifyStart( const Point3d& ptNewStart) = 0 ;
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class __declspec( novtable) ICurveArc : public ICurve
|
||||
virtual bool ChangeDeltaN( double dNewDeltaN) = 0 ;
|
||||
virtual bool ChangeAngCenter( double dNewAngCenDeg) = 0 ;
|
||||
virtual bool ChangeStartPoint( double dU) = 0 ;
|
||||
virtual bool ExtendedOffset( double dDist, int nType = OFF_FILLET) = 0 ;
|
||||
virtual bool ExtendedOffset( double dDist) = 0 ;
|
||||
virtual bool ToExplementary( void) = 0 ;
|
||||
virtual bool Flip( void) = 0 ;
|
||||
} ;
|
||||
|
||||
+15
-9
@@ -16,6 +16,9 @@
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
|
||||
class ICurveBezier ;
|
||||
class ICurveLine ;
|
||||
class ICurveArc ;
|
||||
class ICurveComposite ;
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
@@ -47,11 +50,11 @@ struct CNurbsData
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva in una nuova curva di Bezier semplice
|
||||
EGK_EXPORT ICurve* CurveToBezierCurve( const ICurve* pCrv, int nDeg = 3, bool bMakeRatOrNot = true) ;
|
||||
EGK_EXPORT ICurve* CurveToBezierCurve( const ICurve* pCrv, int nDeg = 3, bool bMakeRatOrNot = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una linea in una nuova curva di Bezier semplice
|
||||
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pCrvLine, int nDeg = 3, bool bMakeRatOrNot = true) ;
|
||||
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pCrvLine, int nDeg = 3, bool bMakeRatOrNot = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma un arco in una nuova curva di Bezier semplice o composta
|
||||
@@ -59,11 +62,11 @@ EGK_EXPORT ICurve* ArcToBezierCurve( const ICurveArc* pArc, int nDeg = 3, bool b
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva compo in una nuova curva di Bezier semplice o composta
|
||||
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrv, int nDeg = 3, bool bMakeRatOrNot = true) ;
|
||||
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrv, int nDeg = 3, bool bMakeRatOrNot = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! 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* pCrv, int nDeg = 3, bool bMakeRatOrNot = true, double dTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ICurve* EditBezierCurve( const ICurveBezier* pCrv, int nDeg = 3, bool bMakeRatOrNot = false, double dTol = 10 * EPS_SMALL) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Approssima una bezier con una serie di bezier cubiche
|
||||
@@ -71,15 +74,15 @@ EGK_EXPORT ICurve* ApproxBezierWithCubics( const ICurve* pCrv, double dTol) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Approssima una bezier con una serie di bezier cubiche
|
||||
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurve* pCrv, const Point3d& ptCen) ;
|
||||
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurve* pCrv, const Point3d& ptCen, const Vector3d& vtN) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Campiona una serie di punti dalla curva e li approssima con una o più curve di bezier
|
||||
EGK_EXPORT ICurve* ApproxCurveWithBezier( const ICurve*, double dTol) ;
|
||||
EGK_EXPORT ICurve* ApproxCurveWithBezier( const ICurve* pCrv, double dTol) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Interpola un set di punti e li approssima con una o più curve di bezier cubiche
|
||||
EGK_EXPORT ICurve* InterpolatePointSetWithBezier( const PNTVECTOR& vPnt, double dTol) ;
|
||||
EGK_EXPORT ICurve* InterpolatePointSetWithBezier( const PNTVECTOR& vPnt, double dLinTol, double dMaxLen) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Aumento il grado della curva di Bezier
|
||||
@@ -91,7 +94,7 @@ EGK_EXPORT ICurveBezier* BezierDecreaseDegree( const ICurveBezier* pCrvBezier, d
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Misura l'errore di approsimazione tra la curva originale e quella modificata
|
||||
EGK_EXPORT bool CalcBezierApproxError( const ICurveBezier* pCrvOri, const ICurveBezier* pCrvNew, double& dErr, int nPoints = 20) ;
|
||||
EGK_EXPORT bool CalcApproxError( const ICurve* pCrvOri, const ICurve* pCrvNew, double& dErr, int nPoints = 20) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva in una nuova curva semplice o composta senza archi (solo linee o curve di Bezier)
|
||||
@@ -164,4 +167,7 @@ EGK_EXPORT bool CalcFatOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Resetta l'oggetto voronoi associato alla curva liberandone la memoria
|
||||
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
|
||||
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
|
||||
|
||||
//! fa il join delle curve passate in input
|
||||
EGK_EXPORT bool GetChainedCurves( ICRVCOMPOPOVECTOR& vCrv, double dChainTol = 5 * EPS_SMALL, bool bAllowInvert = false) ;
|
||||
+1
-1
@@ -36,7 +36,7 @@ class CurveByInterp
|
||||
|
||||
public :
|
||||
enum METHOD { BESSEL = 1, AKIMA = 2, AKIMA_CORNER = 3} ;
|
||||
enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2} ;
|
||||
enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2, CUBIC_BEZIERS_LONG = 3} ;
|
||||
|
||||
private :
|
||||
bool CalcAkimaTangents( bool bDetectCorner) ;
|
||||
|
||||
+10
-4
@@ -93,10 +93,16 @@ inline ICurveComposite* ConvertCurveToComposite( IGeoObj* pGObj)
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
}
|
||||
ICurveComposite* pCrvCo = CreateCurveComposite() ;
|
||||
if ( pCrvCo == nullptr) {
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
ICurveComposite* pCrvCo = GetCurveComposite( pGObj) ;
|
||||
if ( pCrvCo != nullptr) {
|
||||
return pCrvCo ;
|
||||
}
|
||||
else {
|
||||
pCrvCo = CreateCurveComposite() ;
|
||||
if ( pCrvCo == nullptr) {
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
}
|
||||
}
|
||||
ICurve* pCrv = static_cast<ICurve*>( pGObj) ;
|
||||
Vector3d vtExtr ;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2018-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgkDistPointSurfBz.cpp Data : 29.10.25 Versione : 2.7j3
|
||||
// Contenuto : Dichiarazione della classe distanza Punto da superficie di Bezier.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 29.10.25 DB Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkSurfBezier.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
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Calcola la distanza tra punto e superficie bezier.
|
||||
// Risultati :
|
||||
// - distanza
|
||||
// - punto sulla superficie a minima distanza
|
||||
// - corrispettivo punto nello spazio parametrico
|
||||
// - normale alla superficie in quel punto
|
||||
// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie ( se chiusa ).
|
||||
// - indicazione se il punto di riferimento è a destra o sinistra della superficie ( se aperta )
|
||||
//----------------------------------------------------------------------------
|
||||
class DistPointSurfBz
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT DistPointSurfBz( const Point3d& ptP, const ISurfBezier& srfBz) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool GetDist( double& dDist) const ;
|
||||
EGK_EXPORT bool IsEpsilon( double dTol) const
|
||||
{ return ( m_dDist >= 0. && ( m_dDist < EPS_ZERO || m_dDist < dTol)) ; }
|
||||
EGK_EXPORT bool IsSmall( void) const
|
||||
{ return IsEpsilon( EPS_SMALL) ; }
|
||||
EGK_EXPORT bool IsZero( void) const
|
||||
{ return IsEpsilon( EPS_ZERO) ; }
|
||||
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ;
|
||||
EGK_EXPORT bool GetParamsAtMinDistPoint( double& dU, double& dV) const ;
|
||||
EGK_EXPORT bool GetNorm( Vector3d& vtN) const ;
|
||||
EGK_EXPORT bool IsPointInside( void) const
|
||||
{ return ( m_bIsInside && m_bIsSurfClosed) ; }
|
||||
EGK_EXPORT bool IsPointOnLeftSide( void) const
|
||||
{ return m_bIsInside ;}
|
||||
|
||||
private :
|
||||
void Calculate( const Point3d& ptP, const ISurfBezier& srfBz) ;
|
||||
|
||||
private :
|
||||
double m_dDist ; // Minima distanza del punto dalla superficie
|
||||
Point3d m_ptMinDistPoint ; // Punto sulla superficie a minima distanza
|
||||
Point3d m_ptParam ; // punto corrispondente nello spazio parametrico (x->U, y->V)
|
||||
Vector3d m_vtN ; // normale alla superficie nel punto a minima distanza
|
||||
bool m_bIsInside ; // Flag per punto interno o esterno alla superficie ( se chiusa )
|
||||
bool m_bIsSurfClosed ; // Flag per superficie aperta o chiusa
|
||||
} ;
|
||||
@@ -47,6 +47,7 @@ class DistPointSurfTm
|
||||
{ return IsEpsilon( EPS_ZERO) ; }
|
||||
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ;
|
||||
EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) const ;
|
||||
EGK_EXPORT bool GetMinDistTriaIndices( INTVECTOR& vMinDistTriaIndex) const ;
|
||||
EGK_EXPORT bool IsPointInside( void) const
|
||||
{ return ( m_bIsInside && m_bIsSurfClosed) ; }
|
||||
EGK_EXPORT bool IsPointOnLeftSide( void) const
|
||||
@@ -56,11 +57,12 @@ class DistPointSurfTm
|
||||
void Calculate( const Point3d& ptP, const ISurfTriMesh& tmSurf) ;
|
||||
|
||||
private :
|
||||
double m_dDist ;
|
||||
Point3d m_ptMinDistPoint ;
|
||||
int m_nMinDistTriaIndex ;
|
||||
bool m_bIsInside ;
|
||||
bool m_bIsSurfClosed ;
|
||||
double m_dDist ; // Minima distanza del punto dalla superficie
|
||||
Point3d m_ptMinDistPoint ; // Punto sulla superficie a minima distanza
|
||||
int m_nMinDistTriaIndex ; // Triangolo utilizzato per calcolare il punto a minima distanza
|
||||
INTVECTOR m_vnMinDistTriaIndex ; // Indici dei triangoli a minima distanza
|
||||
bool m_bIsInside ; // Flag per punto interno o esterno alla superficie ( se chiusa )
|
||||
bool m_bIsSurfClosed ; // Flag per superficie aperta o chiusa
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -50,4 +50,4 @@ EGK_EXPORT const std::string& GetNfeFontDir( void) ;
|
||||
// restituisce il nome del font di default
|
||||
EGK_EXPORT const std::string& GetDefaultFont( void) ;
|
||||
// imposto il gestore eventi
|
||||
EGK_EXPORT bool SetEGkProcessEvents( pfProcEvents pFun) ;
|
||||
EGK_EXPORT bool SetEGkProcessEvents( psfProcEvents pFun) ;
|
||||
|
||||
+2
-1
@@ -34,7 +34,8 @@ enum GdbInsPos { GDB_FIRST_SON = 0,
|
||||
//----------------- Costanti tipo salvataggio del DB geometrico ----------------
|
||||
enum GdbSave { GDB_SV_TXT = 0,
|
||||
GDB_SV_BIN = 1,
|
||||
GDB_SV_CMPTXT = 2} ;
|
||||
GDB_SV_CMPTXT = 2,
|
||||
GDB_SV_CMPBIN = 3} ;
|
||||
|
||||
//----------------- Costanti tipo oggetti del DB geometrico --------------------
|
||||
enum GdbType { GDB_TY_NONE = 0,
|
||||
|
||||
+6
-2
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2019
|
||||
// EgalTech 2013-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkGeoConst.h Data : 23.11.19 Versione : 2.1k5
|
||||
// File : EGkGeoConst.h Data : 22.11.25 Versione : 2.7k4
|
||||
// Contenuto : Costanti generali per calcoli geometrici.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 04.01.12 DS Creazione modulo.
|
||||
// 23.11.19 DS Aggiunta costante EPS_TRIA_H.
|
||||
// 22.11.25 DS Aggiunta costante PREC_SCALE_COEFF.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -59,3 +60,6 @@ const double SQRT2 = 1.41421356237309504880 ;
|
||||
const double SQRT1_2 = 1 / SQRT2 ;
|
||||
const double SQRT3 = 1.73205080756887729353 ;
|
||||
const double SQRT1_3 = 1 / SQRT3 ;
|
||||
|
||||
// coefficiente di scalatura per aumentare precisione dei calcoli
|
||||
const double PREC_SCALE_COEFF = 1024 ;
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkIntersCurvePlane.h Data : 07.11.25 Versione : 2.7k1
|
||||
// Contenuto : Dichiarazione della classe intersezione curva-piano.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 07.11.25 DB Creazione modulo.
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkIntersCurves.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
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tipo di intersezione
|
||||
// nulla
|
||||
// puntiforme
|
||||
// sovrapposizione
|
||||
|
||||
// Costanti per tipo di approccio/allontanamento dall'intersezione
|
||||
const int ICPT_NULL = 0 ; //!< Approccio/allontanamento non definito
|
||||
const int ICPT_IN = 1 ; //!< Approccio/allontanamento interno
|
||||
const int ICPT_OUT = 2 ; //!< Approccio/allontanamento esterno
|
||||
const int ICPT_ON = 3 ; //!< Approccio/allontanamento sovrapposto
|
||||
|
||||
//! dati di intersezione tra una curva e un piano
|
||||
struct IntCrvPlnInfo {
|
||||
bool bOverlap ; //!< intersezione con overlap
|
||||
IntCrvInfo Ici[2] ; //!< Ici[0] intersez. isolata o inizio overlap, Ici[1] fine overlap
|
||||
// costruttore
|
||||
IntCrvPlnInfo( void)
|
||||
: bOverlap( false) {}
|
||||
} ;
|
||||
//! vettore di IntCrvPlnInfo
|
||||
typedef std::vector<IntCrvPlnInfo> ICPIVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//! Classificazione di parti di curva rispetto ad un piano
|
||||
struct CrvPlaneClass {
|
||||
double dParS ;
|
||||
double dParE ;
|
||||
int nClass ;
|
||||
// costruttori
|
||||
CrvPlaneClass( void)
|
||||
: dParS( 0), dParE( 0), nClass( 0) {}
|
||||
CrvPlaneClass( double dPS, double dPE, int nC)
|
||||
: dParS( dPS), dParE( dPE), nClass( nC) {}
|
||||
} ;
|
||||
//! Vettore di CrvPlaneClass
|
||||
typedef std::vector<CrvPlaneClass> CRVPLNCVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Costanti per classe parti di curva rispetto ad un piano
|
||||
const int CRVPLN_NULL = 0 ; //!< Parte di curva non classificabile
|
||||
const int CRVPLN_IN = 1 ; //!< Parte di curva interna ( dal lato negativo della normale)
|
||||
const int CRVPLN_OUT = 2 ; //!< Parte di curva esterna ( dal lato positivo della normale)
|
||||
const int CRVPLN_ON = 3 ; //!< Parte di curva sovrapposta al piano
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//! Classe per calcolo intersezione tra una curve e un piano, nel riferimento locale del piano
|
||||
class IntersCurvePlane
|
||||
{
|
||||
public :
|
||||
//! Le intersezioni sono calcolate nel piano XY locale.<br>
|
||||
EGK_EXPORT IntersCurvePlane( const ICurve& CurveA, const Point3d& ptOrig, const Vector3d& vtN) ;
|
||||
|
||||
public :
|
||||
//! Indica la presenza di intersezioni con sovrapposizioni
|
||||
EGK_EXPORT bool GetOverlaps( void) ;
|
||||
//! Restituisce il numero di intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno)
|
||||
EGK_EXPORT int GetIntersCount( void) ;
|
||||
//! Restituisce informazioni sull'intersezione di indice nInd ( 0 based)
|
||||
EGK_EXPORT bool GetIntCrvPlnInfo( int nInd, IntCrvPlnInfo& aInfo) ;
|
||||
//! Restituisce il punto di intersezione più vicino al punto passato
|
||||
EGK_EXPORT bool GetIntersPointNearTo( const Point3d& ptNear, Point3d& ptI, double& dParam) ;
|
||||
//! Restituisce la classificazione di una curva rispetto al piano
|
||||
EGK_EXPORT bool GetCurveClassification( double dLenMin, CRVPLNCVECTOR& ccClass) ;
|
||||
|
||||
private :
|
||||
IntersCurvePlane( void) ;
|
||||
bool CalcIntersLinePlane( const Plane3d& plPlane, const ICurve& Curve, int nCrv = 0) ;
|
||||
bool IsArcToApprox( const ICurve& Curve) ;
|
||||
bool AdjustIntersParams( bool bAdjCrv) ;
|
||||
bool CalcCurveClassification( const ICurve* pCurve, const ICPIVECTOR& Info, double dLenMin, CRVPLNCVECTOR& ccClass) ;
|
||||
bool CalcCurveInOrOut( const ICurve* pCurve, CRVPLNCVECTOR& ccClass) ;
|
||||
void OrderAndCompleteIntersections() ;
|
||||
|
||||
private :
|
||||
int m_nIntersType ;
|
||||
int m_nIntersCount ;
|
||||
ICPIVECTOR m_Info ;
|
||||
const ICurve* m_pCurve ; // puntatore alla curva
|
||||
Plane3d m_plPlane ;
|
||||
} ;
|
||||
@@ -115,12 +115,16 @@ class IntersCurveCurve
|
||||
EGK_EXPORT bool GetOverlaps( void) ;
|
||||
//! Restituisce il numero di intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno)
|
||||
EGK_EXPORT int GetIntersCount( void) ;
|
||||
//! Restituisce il numero di intersezioni in 3D ( filtrando le intersezioni)
|
||||
EGK_EXPORT int GetInters3DCount( void) ;
|
||||
//! Restituisce il numero di intersezioni in cui la curva si attraversa
|
||||
EGK_EXPORT int GetCrossIntersCount( void) ;
|
||||
//! Restituisce il numero di intersezioni in cui la curva si attraversa o si sovrappone
|
||||
EGK_EXPORT int GetCrossOrOverlapIntersCount( void) ;
|
||||
//! Restituisce informazioni sull'intersezione di indice nInd ( 0 based)
|
||||
EGK_EXPORT bool GetIntCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ;
|
||||
//! Restituisce informazioni sulla i-esima intersezione 3D ( 0 based)
|
||||
EGK_EXPORT bool GetInt3DCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ;
|
||||
//! Restituisce il punto di intersezione più vicino al punto passato
|
||||
EGK_EXPORT bool GetIntersPointNearTo( int nCrv, const Point3d& ptNear, Point3d& ptI) ;
|
||||
//! Restituisce la classificazione di una curva rispetto all'altra ( nCrv=0 -> CurvaA, nCrv=1 -> CurvaB)
|
||||
|
||||
+4
-2
@@ -32,9 +32,11 @@ EGK_EXPORT bool IntersLineBox( const Point3d& ptL, const Vector3d& vtL, double d
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tipo di intersezione linea-box
|
||||
enum IntLineBoxType { ILBT_NONE = 0, // non è intersezione
|
||||
enum IntLineBoxType { ILBT_NONE = 0, // non è intersezione
|
||||
ILBT_IN = 1, // ingresso nel box
|
||||
ILBT_OUT = 2, // uscita dal box
|
||||
ILBT_TG_INI = 3, // ingresso tangente in una faccia del box
|
||||
ILBT_TG_FIN = 4, // uscita tangente da una faccia del box
|
||||
ILBT_TOUCH = 5} ; // contatto su uno spigolo o su un vertice del box
|
||||
ILBT_TOUCH = 5, // contatto su uno spigolo o su un vertice del box
|
||||
ILBT_INSIDE = 6, // contenimento nel box
|
||||
ILBT_TG_INSIDE = 7} ; // contenimento su faccia del box
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : MultiGeomDB.h Data : 22.12.25 Versione : 2.7l3
|
||||
// Contenuto : Dichiarazione delle funzioni tra due GeomDB.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 08.10.25 DB Creazione modulo.
|
||||
// 22.12.25 DS Aggiunta funzione DuplicateGeomDB.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkGeomDB.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
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT int Copy( IGeomDB* pSouGeomDB, int nSouId, IGeomDB* pDestGeomDB, int nDestId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) ;
|
||||
EGK_EXPORT int CopyGlob( IGeomDB* pSouGeomDB, int nSouId, IGeomDB* pDestGeomDB, int nDestId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) ;
|
||||
EGK_EXPORT bool DuplicateGeomDB( IGeomDB* pSouGeomDB, IGeomDB* pDestGeomDB, bool bSkipTemp = false) ;
|
||||
+1
-2
@@ -174,9 +174,8 @@ AreSamePlaneApprox( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline bool
|
||||
AreSamePlaneExact( const Plane3d plPlaneA, const Plane3d& plPlaneB)
|
||||
AreSamePlaneExact( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
|
||||
{
|
||||
return ( AreSameVectorExact( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
|
||||
PointInPlaneExact( plPlaneA.GetPoint(), plPlaneB)) ;
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -108,7 +108,7 @@ class PolyLine
|
||||
EGK_EXPORT bool GetMaxDistanceFromLine( const Point3d& ptLine, const Vector3d& vtLine, double dLen,
|
||||
double& dMaxDist, bool bIsSegment = true) const ;
|
||||
EGK_EXPORT bool AdjustForMaxSegmentLen( double dMaxLen) ;
|
||||
EGK_EXPORT bool RemoveAlignedPoints( double dToler = EPS_SMALL) ;
|
||||
EGK_EXPORT bool RemoveAlignedPoints( double dToler = EPS_SMALL, bool bStartEnd = true) ;
|
||||
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) ;
|
||||
@@ -122,6 +122,11 @@ class PolyLine
|
||||
m_nTempProp[nPropInd] = nProp ; }
|
||||
EGK_EXPORT int GetTempProp( int nPropInd = 0) const
|
||||
{ return (( nPropInd >= 0 && nPropInd < 2) ? m_nTempProp[nPropInd] : 0) ; }
|
||||
EGK_EXPORT bool FromPointVector( const PNTVECTOR& vPnt)
|
||||
{ Clear() ;
|
||||
for ( int i = 0 ; i < std::ssize( vPnt) ; ++i)
|
||||
AddUPoint( i, vPnt[i]) ;
|
||||
return GetPointNbr() > 0 ; }
|
||||
|
||||
private :
|
||||
bool MyChangeStart( int nPos) ;
|
||||
|
||||
+11
-3
@@ -31,17 +31,25 @@ struct Point5ax {
|
||||
Point3d ptP ;
|
||||
Vector3d vtDir1 ;
|
||||
Vector3d vtDir2 ;
|
||||
Vector3d vtDirU ;
|
||||
Vector3d vtDirV ;
|
||||
double dPar ;
|
||||
int nFlag ;
|
||||
Point5ax( void) : ptP(), vtDir1(), vtDir2(), dPar(), nFlag() {} ;
|
||||
Point5ax( void) : ptP(), vtDir1(), vtDir2(), vtDirU(), vtDirV(), dPar(), nFlag() {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2(), dPar( dU), nFlag( nData) {} ;
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2(), vtDirU(), vtDirV(), dPar( dU), nFlag( nData) {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2, double dU, int nData)
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), dPar( dU), nFlag( nData) {} ;
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), vtDirU(), vtDirV(), dPar( dU), nFlag( nData) {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2,
|
||||
const Vector3d& vtDU, const Vector3d& vtDV, double dU, int nData)
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), vtDirU( vtDU), vtDirV( vtDV), dPar( dU), nFlag( nData) {} ;
|
||||
} ;
|
||||
typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Proiezione di una curva su una o più superfici a distanza minima
|
||||
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf,
|
||||
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
|
||||
// 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) ;
|
||||
|
||||
@@ -44,6 +44,7 @@ EGK_EXPORT ISurfBezier* GetSurfBezierByScrewing( const ICurve* pCurve, const Poi
|
||||
//EGK_EXPORT ISurfBezier* GetSurfBezierTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuledGuided( const ICurve* pCurve1, const ICurve* pCurve2, const BIPNTVECTOR& vCrv, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSkinned( const CICURVEPVECTOR& vCrv, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSweptInPlane( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtNorm, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSwept3d( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtNorm, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
|
||||
+9
-7
@@ -74,15 +74,15 @@ class __declspec( novtable) ISurfBezier : public ISurf
|
||||
Vector3d* pvtDerUU = nullptr, Vector3d* pvtDerVV = nullptr, Vector3d* pvtDerUV = nullptr) const = 0 ;
|
||||
virtual ICurveComposite* GetCurveOnU( double dV) const = 0 ;
|
||||
virtual ICurveComposite* GetCurveOnV( double dU) const = 0 ;
|
||||
virtual ICurveComposite* GetLoop( int nLoop) const = 0 ; // nLoop 0-based (1°esterno, successivi interni)
|
||||
virtual ICurveComposite* GetLoop( int nLoop) const = 0 ; // nLoop 0-based (1°esterno, successivi interni)
|
||||
virtual bool GetControlCurveOnU( int nIndV, PolyLine& plCtrlU) const = 0 ;
|
||||
virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ;
|
||||
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
|
||||
virtual const ISurfTriMesh* GetAuxSurfRefined( void) const = 0 ;
|
||||
virtual ISurfTriMesh* GetApproxSurf( double dTol, double dSideMin = 100 * EPS_SMALL) const = 0 ;
|
||||
virtual bool GetLeaves ( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves) const = 0 ;
|
||||
virtual ISurfTriMesh* GetApproxSurf( double dTol, double dSideMin = 10 * EPS_SMALL, bool bUpdateEdges = false) const = 0 ;
|
||||
virtual bool GetLeaves( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves, bool bRefined = false) const = 0 ;
|
||||
virtual bool GetTriangles2D( std::vector<std::tuple<int,Point3d, Point3d, Point3d>>& vTria2D) const = 0 ;
|
||||
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL) const = 0 ;
|
||||
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL = 5) const = 0 ;
|
||||
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL, const Point3d& ptIPrev, bool* bTroughEdge = nullptr) const = 0 ;
|
||||
virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam, const Point3d& ptIPrev, bool* bTroughEdge = nullptr, const Plane3d* plCut = nullptr) const = 0 ;
|
||||
virtual bool UnprojectCurveFromStm( const ICurveComposite* pCC, ICRVCOMPOPVECTOR& vpCC, const Plane3d* pPlCut) const = 0 ;
|
||||
@@ -91,19 +91,21 @@ class __declspec( novtable) ISurfBezier : public ISurf
|
||||
virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ;
|
||||
virtual bool IncreaseUV( double& dU, double dx, bool bUOrV, double* dUVCopy = nullptr, bool bModifyOrig = true) const = 0 ;
|
||||
virtual bool IncreaseUV( Point3d& ptUV, Vector3d vtH , Point3d* ptUVCopy, bool bModifyOrig) const = 0 ;
|
||||
virtual bool GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier, int nEdge = -1) const = 0 ;
|
||||
virtual bool GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier) const = 0 ;
|
||||
virtual ICurveComposite* GetSingleEdge3D( bool bLineOrBezier, int nEdge) const = 0 ;
|
||||
virtual bool IsPlanar( void) const = 0 ;
|
||||
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
|
||||
virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ;
|
||||
virtual bool CreateByExtrusion( const ICurve* pCrv, const Vector3d& vtExtr, bool bDeg3OrDeg2 = false) = 0 ;
|
||||
virtual bool CreateByExtrusion( const ICurve* pCrv, const Vector3d& vtExtr) = 0 ;
|
||||
virtual bool CreateByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, double dMove) = 0 ;
|
||||
virtual bool CreateByPointCurve( const Point3d& pt, const ICurve* pCurve) = 0 ;
|
||||
virtual bool CreateByTwoCurves( const ICurve* pCurve1, const ICurve* pCurve2, int nType) = 0 ;
|
||||
virtual bool CreateBySetOfCurves( const ICURVEPOVECTOR& vCrvBez, bool bReduceToDeg3 = true) = 0 ;
|
||||
virtual bool RemoveCollapsedSpans() = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static const double SBZ_TREG_COEFF = 1024 ;
|
||||
static const double SBZ_TREG_COEFF = PREC_SCALE_COEFF ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline ISurfBezier* CreateSurfBezier( void)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfBzRuledFromStmFaces.h Data : 15.09.25 Versione : 2.7j1
|
||||
// Contenuto : Calcolo di una superficie di Bezier Ruled definita da un sottoinsieme
|
||||
// di facce di una superficie TriMesh
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 15.09.25 RE Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EGkSelection.h"
|
||||
#include "EGkCurveLine.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.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
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool GetBezierEdgeCurvesFromSurfs( const CISURFPVECTOR& vSurf, const SELVECTOR& vSurfFace,
|
||||
double dLinTol, double dAngTol, const BIPNTVECTOR& vBreakingPts,
|
||||
ICRVCOMPOPOVECTOR& vBezierEdges) ;
|
||||
EGK_EXPORT bool GetSyncPointsFromBezierCurves( const ICurveComposite* pEdge0, const ICurveComposite* pEdge1,
|
||||
ICRVLINEPOVECTOR& vLines) ;
|
||||
EGK_EXPORT bool GetAdjStmFacesInTol( const ISurfTriMesh* pStm, const INTVECTOR& vFaceRef, double dAngTol,
|
||||
INTVECTOR& vOtherFaces, double dCurvature) ;
|
||||
@@ -113,6 +113,8 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
|
||||
virtual bool GetEdge( int nInd, int& nV1, int& nV2, int& nFl, int& nFr, double& dAng) const = 0 ;
|
||||
virtual bool GetEdge( int nInd, Point3d& ptP1, Point3d& ptP2, double& dAng) const = 0 ;
|
||||
virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ;
|
||||
virtual bool GetCurvature( int nV,
|
||||
double& dMinK, Vector3d& vtMinK, double& dMaxK, Vector3d& vtMaxK, bool& bPlanar, Vector3d& vtNorm) const = 0 ;
|
||||
virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ;
|
||||
virtual bool GeneralizedCut( const ICurve& cvCurve, bool bSaveOnEq) = 0 ;
|
||||
virtual bool Add( const ISurfTriMesh& Other) = 0 ;
|
||||
|
||||
+3
-1
@@ -25,6 +25,8 @@ 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
|
||||
// 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) ;
|
||||
// Funzione per Creazione superficie Shell
|
||||
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshShell( const ISurfTriMesh* pStm, double dThick, double dLinTol) ;
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgkTrimming.h Data : 15.09.25 Versione : 2.7j1
|
||||
// Contenuto : Calcolo di una superficie di Bezier Ruled definita da un sottoinsieme
|
||||
// di facce di una superficie TriMesh
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 15.09.25 RE Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EGkSelection.h"
|
||||
#include "EGkCurveLine.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.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
|
||||
|
||||
typedef std::vector<ISURFPOVECTOR> ISURFPOMATRIX ;
|
||||
typedef std::vector<ICRVCOMPOPOVECTOR> ICRVCOMPOPOMATRIX ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool GetTrimmingStmAdjTria( const ISurfTriMesh* pStm, int nStartTria, const Point3d& ptStartTria,
|
||||
double dAngTol, double dSize, double dSizeTol, ISurfTriMesh* pStmAdjTria) ;
|
||||
EGK_EXPORT bool GetTrimmingAdjSurfs( const CISURFPVECTOR& vSurf, const CISURFPVECTOR& vOtherSurf, double dLinTol,
|
||||
double dAngTol, double dFaceAngTol,
|
||||
INTVECTOR& vIndOtherSurf) ;
|
||||
EGK_EXPORT bool GetTrimmingRawEdges( const CISURFPVECTOR& vSurf, const SELVECTOR& vSurfFace,
|
||||
double dLinTol, double dAngTol,
|
||||
ICRVCOMPOPOVECTOR& vBezierEdges) ;
|
||||
EGK_EXPORT bool GetTrimmingBezierEdges( ICRVCOMPOPOVECTOR& vCompoRawEdges, double dLinTol, double dAngTol,
|
||||
ICRVCOMPOPOVECTOR& vCompoEdges) ;
|
||||
EGK_EXPORT bool GetTrimmingFinalBorders( ICRVCOMPOPOVECTOR& vCompoBezierEdges, double dLinTol,
|
||||
double dAngTol, BIPNTVECTOR& vBreakingPts, double dThick, double dThickTol) ;
|
||||
EGK_EXPORT bool GetTrimmingFinalBorders( CISURFPVECTOR& vpSurf, const SELVECTOR& vSurfFaces, double dSurfLinTol,
|
||||
double dSurfAngTol, double dLinTol, double dAngTol, double dThick,
|
||||
ICRVCOMPOPOVECTOR& vCompoBezierEdges) ;
|
||||
EGK_EXPORT ISurfBezier* GetTrimmingRuledBezier( const CISURFPVECTOR& vSurf, const ICurve* pCrvEdge1, const ICurve* pCrvEdge2,
|
||||
double dLinTol, const BIPNTVECTOR& vSyncPoints) ;
|
||||
EGK_EXPORT bool GetTrimmingSurfBzSyncPoints( const ICurve* pCrvEdge1, const ICurve* pCrvEdge2,
|
||||
double dLinTol, BIPNTVECTOR& vSyncPoints) ;
|
||||
EGK_EXPORT bool GetTrimmingSyncInterpolation( const ICurve* pCrvEdge1, const ICurve* pCrvEdge2,
|
||||
const ICurve* pSync1, const ICurve* pSync2, double dLinTol,
|
||||
double dAngTol, BIPNTVECTOR& vSyncPoints) ;
|
||||
EGK_EXPORT bool GetTrimmingHoleBorders( const CISURFPVECTOR& vpSurf, const Point3d& ptRef, double dSurfLinTol,
|
||||
double dSurfAngTol, double dEdgeLinTol, double dEdgeAngTol,
|
||||
double dEdgeThick, ICRVCOMPOPOVECTOR& vHoleBorders) ;
|
||||
+25
-25
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkUserObjFactory.h Data : 22.05.15 Versione : 1.6e3
|
||||
// File : EGkUserObjFactory.h Data : 31.10.25 Versione : 2.7k1
|
||||
// Contenuto : Factory della classe IUserObj.
|
||||
//
|
||||
//
|
||||
@@ -32,29 +32,6 @@
|
||||
#define USEROBJ_CREATE( sName) UserObjFactory::Create( sName)
|
||||
#define USEROBJ_GETLIST( vsList) UserObjFactory::GetList( vsList)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
class UserObjRegister
|
||||
{
|
||||
public :
|
||||
static bool DoRegister( const std::string& sName)
|
||||
{ if ( ! UserObjFactory::Register( sName, Create))
|
||||
return false ;
|
||||
GetNamePrivate() = sName ;
|
||||
return true ; }
|
||||
static IUserObj* Create( void)
|
||||
{ return new(nothrow) T ; }
|
||||
static const std::string& GetName( void)
|
||||
{ return GetNamePrivate() ; }
|
||||
|
||||
private :
|
||||
UserObjRegister( void) {}
|
||||
~UserObjRegister( void) {}
|
||||
static std::string& GetNamePrivate( void)
|
||||
{ static std::string s_sName ;
|
||||
return s_sName ; }
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class UserObjFactory
|
||||
{
|
||||
@@ -76,3 +53,26 @@ class UserObjFactory
|
||||
// metodo di accesso alla mappa statica
|
||||
static CreatorMap& GetCreatorMap( void) ;
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
class UserObjRegister
|
||||
{
|
||||
public :
|
||||
static bool DoRegister( const std::string& sName)
|
||||
{ if ( ! UserObjFactory::Register( sName, Create))
|
||||
return false ;
|
||||
GetNamePrivate() = sName ;
|
||||
return true ; }
|
||||
static IUserObj* Create( void)
|
||||
{ return new( std::nothrow) T ; }
|
||||
static const std::string& GetName( void)
|
||||
{ return GetNamePrivate() ; }
|
||||
|
||||
private :
|
||||
UserObjRegister( void) {}
|
||||
~UserObjRegister( void) {}
|
||||
static std::string& GetNamePrivate( void)
|
||||
{ static std::string s_sName ;
|
||||
return s_sName ; }
|
||||
} ;
|
||||
|
||||
+3
-2
@@ -32,7 +32,7 @@ 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, double dExtraBox = 0.) = 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 ;
|
||||
@@ -93,7 +93,8 @@ class __declspec( novtable) IVolZmap : public IGeoObj
|
||||
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 ;
|
||||
virtual bool MakeUniform( double dToler, bool bIsExtensionFirst = true, int nToolNum = 0) = 0 ;
|
||||
virtual bool Offset( double dOffs, int nType) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+4
-2
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2022
|
||||
// EgalTech 2013-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGnFileUtils.h Data : 09.04.22 Versione : 2.4d1
|
||||
// File : EGnFileUtils.h Data : 09.01.26 Versione : 3.1a1
|
||||
// Contenuto : Prototipi funzioni di utilità su file e direttori.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 11.12.13 DS Creazione modulo.
|
||||
// 09.04.22 DS Aggiunta FindAllFiles.
|
||||
// 09.01.26 DS Aggiunta EraseNonEmptyDirectory.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -42,4 +43,5 @@ EGN_EXPORT bool ExistsDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool CreateDirectoryEgt( const std::string& sDir) ;
|
||||
EGN_EXPORT bool EmptyDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool EraseDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool EraseNonEmptyDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool FindAllDirectories( const std::string& sDirSpec, STRVECTOR& vsDirNames) ;
|
||||
|
||||
+39
-4
@@ -101,14 +101,14 @@ GetVal( const std::string& sString, const std::string& sKey, T& Val)
|
||||
inline bool
|
||||
SetValInNotes( const std::string& sKey, const std::string& sVal, std::string& sNotes)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
// verifiche validità chiave
|
||||
if ( ! IsValidKey( sKey) || ! IsValidVal( sVal))
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
std::string sTkey = sKey ;
|
||||
if ( sKey.back() != COLON)
|
||||
sTkey += EQUAL ;
|
||||
// ricerca se già presente
|
||||
// ricerca se già presente
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sNotes, ";", vsTokens) ;
|
||||
bool bFound = false ;
|
||||
@@ -143,7 +143,7 @@ SetValInNotes( const std::string& sKey, T& Val, std::string& sNotes)
|
||||
inline bool
|
||||
GetValInNotes( const std::string& sNotes, const std::string& sKey, std::string& sVal)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
// verifiche validità chiave
|
||||
if ( sNotes.empty() || ! IsValidKey( sKey))
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
@@ -171,11 +171,46 @@ GetValInNotes( const std::string& sNotes, const std::string& sKey, T& Val)
|
||||
return ( GetValInNotes( sNotes, sKey, sVal) && FromString( sVal, Val)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
GetValInNotes( const std::string& sNotes, const std::string& sKey, const std::string& sToken, std::string& sVal)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
if ( sNotes.empty() || ! IsValidKey( sKey))
|
||||
return false ;
|
||||
// verifiche validità del token
|
||||
if ( sToken.empty())
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
std::string sTkey = sKey ;
|
||||
if ( sKey.back() != COLON)
|
||||
sTkey += EQUAL ;
|
||||
// ricerca
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sNotes, sToken, vsTokens) ;
|
||||
for ( const auto& sToken : vsTokens) {
|
||||
if ( FindKey( sToken, sTkey, true)) {
|
||||
sVal = sToken.substr( sTkey.length()) ;
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
inline bool
|
||||
GetValInNotes( const std::string& sNotes, const std::string& sKey, const std::string& sToken, T& Val)
|
||||
{
|
||||
std::string sVal ;
|
||||
return ( GetValInNotes( sNotes, sKey, sToken, sVal) && FromString( sVal, Val)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
RemoveValInNotes( const std::string& sKey, std::string& sNotes)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
// verifiche validità chiave
|
||||
if ( sNotes.empty() || ! IsValidKey( sKey))
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
|
||||
+108
-4
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2014
|
||||
// EgalTech 2013-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGnStringUtils.h Data : 17.03.14 Versione : 1.5c2
|
||||
// File : EGnStringUtils.h Data : 18.09.25 Versione : 2.7i1
|
||||
// Contenuto : Dichiarazione delle funzioni di utilità per le stringhe.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 20.11.13 DS Creazione modulo.
|
||||
// 20.10.15 DS Agg. FromString e ToString per std::array<double,N>.
|
||||
// 18.09.25 DS Agg. FromString e ToString per long long.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -136,6 +137,10 @@ FromString( const std::string& sVal, unsigned int& nVal)
|
||||
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
|
||||
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, long long& nVal)
|
||||
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
|
||||
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, bool& bVal)
|
||||
{ int nTmp ;
|
||||
if ( ! FromString( sVal, nTmp))
|
||||
@@ -184,7 +189,30 @@ EGN_EXPORT bool FromString( const std::string& sVal, DBLVECTOR& vdVal) ;
|
||||
EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGN_EXPORT const std::string ToStringAdv( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
|
||||
inline const std::string
|
||||
ToStringAdv( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 36 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
// verifico lunghezza minima
|
||||
int nLen = (int) strlen( szBuff) ;
|
||||
if ( nLen >= nPrec)
|
||||
return szBuff ;
|
||||
// porto la stringa alla minima lunghezza
|
||||
std::string sBuff( szBuff) ;
|
||||
sBuff.insert( 0, ( nPrec - nLen), '0') ;
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
@@ -205,7 +233,31 @@ ToString( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
*pnErr = 0 ;
|
||||
return szBuff ;
|
||||
}
|
||||
EGN_EXPORT const std::string ToStringAdv( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
|
||||
|
||||
inline const std::string
|
||||
ToStringAdv( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 36 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
// verifico lunghezza minima
|
||||
int nLen = (int) strlen( szBuff) ;
|
||||
if ( nLen >= nPrec)
|
||||
return szBuff ;
|
||||
// porto la stringa alla minima lunghezza
|
||||
std::string sBuff( szBuff) ;
|
||||
sBuff.insert( 0, ( nPrec - nLen), '0') ;
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
@@ -227,6 +279,58 @@ ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullpt
|
||||
return szBuff ;
|
||||
}
|
||||
template <size_t size>
|
||||
const std::string ToString( const unsigned int (&nVal)[size], int nPrec = 1)
|
||||
{ std::string sDest ; sDest.reserve( 8 * size) ;
|
||||
for ( const auto& nV : nVal)
|
||||
sDest += ToString( nV, nPrec) + "," ;
|
||||
sDest.pop_back() ;
|
||||
return sDest ; }
|
||||
|
||||
inline const std::string
|
||||
ToStringAdv( long long nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 68 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
// verifico lunghezza minima
|
||||
int nLen = (int) strlen( szBuff) ;
|
||||
if ( nLen >= nPrec)
|
||||
return szBuff ;
|
||||
// porto la stringa alla minima lunghezza
|
||||
std::string sBuff( szBuff) ;
|
||||
sBuff.insert( 0, ( nPrec - nLen), '0') ;
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( long long nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// se necessario processing avanzato
|
||||
if ( nPrec > 1 || nRadix < 6)
|
||||
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 16 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
return szBuff ;
|
||||
}
|
||||
template <size_t size>
|
||||
const std::string ToString( const int (&nVal)[size], int nPrec = 1)
|
||||
{ std::string sDest ; sDest.reserve( 8 * size) ;
|
||||
for ( const auto& nV : nVal)
|
||||
|
||||
@@ -34,8 +34,8 @@ extern "C" {
|
||||
// General
|
||||
EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* wsLogFile, const wchar_t* wsLogMsg) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtExit( void) ;
|
||||
typedef bool (__stdcall * pfOnTerminateProcess) ( int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOnTerminateProcess( pfOnTerminateProcess pFun) ;
|
||||
typedef bool (__stdcall * psfOnTerminateProcess) ( int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOnTerminateProcess( psfOnTerminateProcess pFun) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetUserLevel( int nUserLev) ;
|
||||
EIN_EXPORT int __stdcall EgtGetUserLevel( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
|
||||
@@ -65,10 +65,10 @@ EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ;
|
||||
typedef int (__stdcall * pfProcEvents) (int, int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( pfProcEvents pFun) ;
|
||||
typedef BOOL (__stdcall * pfOutTextW) (wchar_t*&) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOutText( pfOutTextW pFun) ;
|
||||
typedef int (__stdcall * psfProcEvents) (int, int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( psfProcEvents pFun) ;
|
||||
typedef BOOL (__stdcall * psfOutTextW) (wchar_t*&) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOutText( psfOutTextW pFun) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetTempDir( const wchar_t* wsTempDir) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetTempDir( wchar_t*& wsTempDir) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMainWindowHandle( HWND hMainWnd) ;
|
||||
@@ -103,8 +103,8 @@ EIN_EXPORT BOOL __stdcall EgtNewFile( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtOpenFile( const wchar_t* wsFilePath) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtInsertFile( const wchar_t* wsFilePath) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveFile( const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveObjToFile( int nId, const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveMachGroupToFile( int nMGroupId, const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveObjToFile( int nNumId, const int nIds[], const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveMachGroupToFile( int nMGroupId, int nNumPlusId, const int nPlusIds[], const wchar_t* wsFilePath, int nFlag) ;
|
||||
|
||||
// Exchange
|
||||
EIN_EXPORT int __stdcall EgtGetFileType( const wchar_t* wsFilePath) ;
|
||||
@@ -156,11 +156,13 @@ EIN_EXPORT int __stdcall EgtBeamModifyProcess( int nGeomId, int nGroup, int nPr
|
||||
int nCrvId, int nCrv2Id, BOOL bUpdate) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamEraseProcess( int nGeomId, BOOL bUpdate) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamEnableProcess( int nGeomId, BOOL bEnable, BOOL bUpdate) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamCalcAllSolids( BOOL bShow, BOOL bRecalc) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowAllSolids( BOOL bShow) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamCalcSolid( int nPartId, BOOL bRecalc) ;
|
||||
EIN_EXPORT int __stdcall EgtBeamGetSolid( int nPartId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowSolid( int nPartId, BOOL bShow) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamGetBuildingIsOn( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowBuilding( BOOL bShow) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamGetBuildingIsOn( int nAssGrpId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowBuilding( int nAssGrpId, BOOL bShow) ;
|
||||
|
||||
// Tsc Executor
|
||||
EIN_EXPORT BOOL __stdcall EgtInitTscExec( void) ;
|
||||
@@ -390,7 +392,9 @@ EIN_EXPORT BOOL __stdcall EgtGetBBoxRef( int nId, int nFlag, const double ptOrig
|
||||
const double vtX[3], const double vtY[3], const double vtZ[3],
|
||||
double ptMin[3], double ptMax[3]) ;
|
||||
EIN_EXPORT int __stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT int __stdcall EgtCopyEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT int __stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT int __stdcall EgtCopyGlobEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGroupSwap( int nId1, int nId2, BOOL bSwapRef, BOOL bMark) ;
|
||||
@@ -629,6 +633,7 @@ EIN_EXPORT int __stdcall EgtGetSurfTmSilhouette( int nId, const double vtDir[3]
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ;
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ;
|
||||
EIN_EXPORT int __stdcall EgtCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ;
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfTmTriaLoop( int nId, int nT, int nDestGrpId) ;
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount) ;
|
||||
|
||||
// Geo Snap Vector/Point/Frame
|
||||
@@ -989,6 +994,7 @@ EIN_EXPORT BOOL __stdcall EgtGetAllTablesNames( wchar_t*& wsNames) ;
|
||||
// Machine Calc
|
||||
EIN_EXPORT BOOL __stdcall EgtSetCalcTool( const wchar_t* wsTool, const wchar_t* wsHead, int nExit) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcTool( wchar_t*& wsTool, wchar_t*& wsHead, int* pnExit) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAllCurrAxesNames( wchar_t*& wsAxNames) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcAngles( const double vtDirT[3], const double vtDirA[3],
|
||||
int* pnStat, double* pdAngA1, double* pdAngB1, double* pdAngA2, double* pdAngB2) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcAnglesEx( const double vtDirT[3], const double vtDirA[3],
|
||||
|
||||
+13
-7
@@ -176,10 +176,11 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int GetCurrSetup( void) const = 0 ;
|
||||
virtual bool GetDefaultSetupName( std::string& sName) const = 0 ;
|
||||
virtual bool ImportSetup( const std::string& sName) = 0 ;
|
||||
virtual bool ExistsCurrSetup( void) const = 0 ;
|
||||
virtual bool VerifyCurrSetup( STRVECTOR& vsErrors) = 0 ;
|
||||
virtual bool FindToolInCurrSetup( const std::string& sTool) = 0 ;
|
||||
virtual bool GetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) = 0 ;
|
||||
virtual bool GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) = 0 ;
|
||||
virtual bool FindToolInCurrSetup( const std::string& sTool) const = 0 ;
|
||||
virtual bool GetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) const = 0 ;
|
||||
virtual bool GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) const = 0 ;
|
||||
virtual bool UpdateCurrSetup( void) = 0 ;
|
||||
virtual bool EraseCurrSetup( void) = 0 ;
|
||||
// Machinings DataBase
|
||||
@@ -278,10 +279,13 @@ class __declspec( novtable) IMachMgr
|
||||
virtual bool IsMachiningEmpty( int nEmptyType = 0) const = 0 ;
|
||||
virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ;
|
||||
virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ;
|
||||
virtual bool GetMachiningStartAxes( bool bSkipClimb, DBLVECTOR& vAxVal) const = 0 ;
|
||||
virtual bool GetMachiningEndAxes( bool bSkipRise, DBLVECTOR& vAxVal) const = 0 ;
|
||||
// CL Entities Interrogations
|
||||
virtual bool GetClEntMove( int nEntId, int& nMove) const = 0 ;
|
||||
virtual bool GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const = 0 ;
|
||||
virtual bool GetClEntIndex( int nEntId, int& nIndex) const = 0 ;
|
||||
virtual bool GetClEntFeed( int nEntId, double& dFeed) const = 0 ;
|
||||
virtual bool GetClEntAxesStatus( int nEntId, int& nStatus) const = 0 ;
|
||||
virtual bool GetClEntAxesMask( int nEntId, int& nMask) const = 0 ;
|
||||
virtual bool GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const = 0 ;
|
||||
@@ -304,21 +308,23 @@ class __declspec( novtable) IMachMgr
|
||||
// Machine Calc
|
||||
virtual bool SetCalcTable( const std::string& sTable) = 0 ;
|
||||
virtual bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) = 0 ;
|
||||
virtual bool GetAllCurrAxesNames( STRVECTOR& vAxName) const = 0 ;
|
||||
virtual bool SetCalcSolCh( int nScc, bool bExact) = 0 ;
|
||||
virtual bool SetRotAxisBlock( const std::string& sAxis, double dVal) = 0 ;
|
||||
virtual bool GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const = 0 ;
|
||||
virtual bool GetCalcTable( std::string& sTable) const = 0 ;
|
||||
virtual bool GetCalcTool( std::string& sTool) const = 0 ;
|
||||
virtual bool GetCalcHead( std::string& sHead) const = 0 ;
|
||||
virtual bool GetCalcExit( int& nExit) const = 0 ;
|
||||
virtual bool GetCalcSolCh( int& nScc, bool& bExact) const = 0 ;
|
||||
virtual bool GetAllCurrAxesNames( STRVECTOR& vAxName) const = 0 ;
|
||||
virtual bool GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const = 0 ;
|
||||
virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2) const = 0 ;
|
||||
virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ;
|
||||
virtual bool GetCalcPositions( const Point3d& ptP, double dAngA, double dAngB,
|
||||
int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
|
||||
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 ;
|
||||
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,
|
||||
|
||||
@@ -34,6 +34,7 @@ static std::string MCH_AUXVIEW = "AVIEW" ;
|
||||
static std::string MCH_TABS = "TABS" ;
|
||||
static std::string MCH_PV = "PV" ;
|
||||
static std::string MCH_ST = "ST" ;
|
||||
static std::string MCH_ST_DBL = "STDBL" ;
|
||||
static std::string MCH_CL = "CL" ;
|
||||
static std::string MCH_DBL = "DBL" ;
|
||||
static std::string MCH_PATH = "P" ;
|
||||
@@ -49,6 +50,7 @@ static std::string MCH_CL_AGB_DWN = "AGBD" ;
|
||||
static std::string MCH_CL_AGB_IN = "AGBI" ;
|
||||
static std::string MCH_CL_AGB_OUT = "AGBO" ;
|
||||
static std::string MCH_CL_AGB_UP = "AGBU" ;
|
||||
static std::string MCH_CL_DBP = "DBP" ;
|
||||
// Nomi di entità di preview
|
||||
static std::string MCH_PV_CUT = "CUT" ;
|
||||
static std::string MCH_PV_PRE_CUT = "PRC" ;
|
||||
@@ -116,6 +118,9 @@ static std::string KEY_MAXMAX = "MAXMAX" ;
|
||||
static std::string KEY_DRACEX = "DRACEX" ;
|
||||
// Chiave info in sottogruppo di testa per abilitarne visualizzazione in Preview (0/1 default)
|
||||
static std::string KEY_PREVIEWSHOW = "PreviewShow" ;
|
||||
// Chiavi info in entità di CL e DBL per riferimenti reciproci
|
||||
static std::string KEY_DBL_MAIN = "Main" ;
|
||||
static std::string KEY_CL_DOUBLE = "Double" ;
|
||||
|
||||
//----------------- Costanti posizione per preview utensile in lavorazione ------
|
||||
enum MchToolShow { MCH_TPM_CURR = 0,
|
||||
|
||||
+26
-4
@@ -51,7 +51,6 @@ struct ToolOptm {
|
||||
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 {
|
||||
@@ -81,9 +80,29 @@ struct MachOptm {
|
||||
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) {}
|
||||
MachOptm()
|
||||
: nId( -1), nIdTool( -1), nGroup( -1),
|
||||
dX_Start( 0.), dY_Start( 0.), dZ_Start( 0.),
|
||||
dA_Start( 0.) , dB_Start( 0.), dC_Start( 0.),
|
||||
dX_End( 0.), dY_End( 0.), dZ_End( 0.),
|
||||
dA_End( 0.), dB_End( 0.), dC_End( 0.) {} ;
|
||||
} ;
|
||||
typedef std::vector<MachOptm> MACHOPTMVECTOR ;
|
||||
typedef std::list<MachOptm> MACHOPTMLIST ;
|
||||
typedef std::vector<MACHOPTMVECTOR> MACHOPTMMATRIX ;
|
||||
|
||||
// Definizione struttura per OpenBounds
|
||||
struct OpenBoundOptm {
|
||||
int nGroup ;
|
||||
bool bStartVsEnd ;
|
||||
int nFlag ;
|
||||
double dX ;
|
||||
double dY ;
|
||||
double dZ ;
|
||||
|
||||
OpenBoundOptm( int nOBGroup, bool bOBStartVsEnd, int nOBFlag, double dOBX, double dOBY, double dOBZ )
|
||||
: nGroup( nOBGroup), bStartVsEnd( bOBStartVsEnd), nFlag( nOBFlag), dX( dOBX), dY( dOBY), dZ( dOBZ) {}
|
||||
} ;
|
||||
typedef std::vector<OpenBoundOptm> MACHOPTOPENBOUNDVECTOR ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class __declspec( novtable) IMachOptimization
|
||||
@@ -104,8 +123,11 @@ class __declspec( novtable) IMachOptimization
|
||||
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 ;
|
||||
virtual bool SetOptimizationForGroups( bool bOptForGroups = false) = 0 ;
|
||||
virtual bool SetOpenBound( bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) = 0 ;
|
||||
virtual bool SetOpenBoundForGroups( int nGroup, bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) = 0 ;
|
||||
virtual bool Calculate( INTVECTOR& vIds) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
ENK_EXPORT IMachOptimization* CreateMachOptimization( void) ;
|
||||
ENK_EXPORT IMachOptimization* CreateMachOptimization( void) ;
|
||||
|
||||
+9
-2
@@ -59,7 +59,8 @@ const int RTY_DEFAULT = RTY_LOC ;
|
||||
//----------------- Costanti tipo di interpolazione ----------------------------
|
||||
enum InterpType{ ITT_ARCS = 0, // stima tg Akima, curve risultanti archi
|
||||
ITT_ARCS_CORNER = 1, // stima tg AkimaCorner, curve risultanti archi
|
||||
ITT_CUBICS = 2} ; // stima tg Bessel, curve risultanti Bezier cubiche
|
||||
ITT_CUBICS = 2, // stima tg Bessel, curve risultanti Bezier cubiche
|
||||
ITT_CUBICS_LONG = 3} ; // interpolazione con nurbs, poi convertite in bezier
|
||||
|
||||
//----------------- Costanti tipo di approssimazione di curve ------------------
|
||||
enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD
|
||||
@@ -68,7 +69,8 @@ enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD
|
||||
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} ;
|
||||
APP_ARCS = 3,
|
||||
APP_CUBIC_BEZIER = 4} ;
|
||||
|
||||
//----------------- Costanti tipo punto intersezione Linea Curva ---------------
|
||||
enum CLiType { CLT_NONE = 0,
|
||||
@@ -148,6 +150,11 @@ enum SimHideErr { SHE_NONE = 0, // nessun errore
|
||||
SHE_SPECIAL = 5, // errore speciale/custom
|
||||
SHE_GENERAL = 6} ; // errore generico
|
||||
|
||||
//----------------- Costanti Offset per VolZmap --------------------------------
|
||||
enum VolZmapOffset { FILLET = 0 , // come in VolZmap
|
||||
CHAMFER = 1, // come in VolZmap
|
||||
EXTEND = 2 } ; // come in VolZmap
|
||||
|
||||
//----------------- Costanti per sostituzione direttorio e nome progetto --------------------
|
||||
const std::string SUB_PROJECT_DIR = "%PRJDIR%" ;
|
||||
const std::string SUB_PROJECT_TITLE = "%PRJTITLE%" ;
|
||||
|
||||
+97
-23
@@ -37,7 +37,7 @@ class LuaMgr ;
|
||||
// General
|
||||
EXE_EXPORT bool ExeInit( int nDebug, const std::string& sLogFile, const std::string& sLogMsg) ;
|
||||
EXE_EXPORT bool ExeExit( void) ;
|
||||
EXE_EXPORT bool ExeSetOnTerminateProcess( pfOnTerminateProcess pFun) ;
|
||||
EXE_EXPORT bool ExeSetOnTerminateProcess( psfOnTerminateProcess pFun) ;
|
||||
EXE_EXPORT bool ExeOnTerminateProcess( int nExitCode) ;
|
||||
EXE_EXPORT int ExeGetDebugLevel( void) ;
|
||||
EXE_EXPORT bool ExeSetUserLevel( int nUserLev) ;
|
||||
@@ -72,9 +72,9 @@ EXE_EXPORT bool ExeOutLog( const std::string& sMsg, int nDebugLevel = 0) ;
|
||||
EXE_EXPORT bool ExeSetEnableUI( bool bEnableUI) ;
|
||||
EXE_EXPORT bool ExeGetEnableUI( void) ;
|
||||
EXE_EXPORT int ExeMessageBox( const std::string& sText, const std::string& sTitle, int nType) ;
|
||||
EXE_EXPORT bool ExeSetProcessEvents( pfProcEvents pFun) ;
|
||||
EXE_EXPORT bool ExeSetProcessEvents( psfProcEvents pFun) ;
|
||||
EXE_EXPORT int ExeProcessEvents( int nProg, int nPause) ;
|
||||
EXE_EXPORT bool ExeSetOutText( pfOutText pFun) ;
|
||||
EXE_EXPORT bool ExeSetOutText( psfOutText pFun) ;
|
||||
EXE_EXPORT bool ExeOutText( const std::string& sText) ;
|
||||
EXE_EXPORT bool ExeSetTempDir( const std::string& sTempDir) ;
|
||||
EXE_EXPORT bool ExeGetTempDir( std::string& sTempDir) ;
|
||||
@@ -111,8 +111,8 @@ EXE_EXPORT bool ExeNewFile( void) ;
|
||||
EXE_EXPORT bool ExeOpenFile( const std::string& sFilePath) ;
|
||||
EXE_EXPORT bool ExeInsertFile( const std::string& sFilePath) ;
|
||||
EXE_EXPORT bool ExeSaveFile( const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveObjToFile( int nId, const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveMachGroupToFile( int nMGroupId, const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveObjToFile( const INTVECTOR& vId, const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveMachGroupToFile( int nMGroupId, const INTVECTOR& vPlusId, const std::string& sFilePath, int nFlag) ;
|
||||
|
||||
// Exchange
|
||||
EXE_EXPORT int ExeGetFileType( const std::string& sFilePath) ;
|
||||
@@ -160,11 +160,13 @@ EXE_EXPORT int ExeBeamModifyProcess( int nGeomId, int nGroup, int nProc, int nS
|
||||
int nCrvId, int nCrv2Id, bool bUpdate = true) ;
|
||||
EXE_EXPORT bool ExeBeamEraseProcess( int nGeomId, bool bUpdate = true) ;
|
||||
EXE_EXPORT bool ExeBeamEnableProcess( int nGeomId, bool bEnable, bool bUpdate = true) ;
|
||||
EXE_EXPORT bool ExeBeamCalcAllSolids( bool bShow, bool bRecalc = false) ;
|
||||
EXE_EXPORT bool ExeBeamShowAllSolids( bool bShow) ;
|
||||
EXE_EXPORT bool ExeBeamCalcSolid( int nPartId, bool bRecalc = false) ;
|
||||
EXE_EXPORT int ExeBeamGetSolid( int nPartId) ;
|
||||
EXE_EXPORT bool ExeBeamShowSolid( int nPartId, bool bShow) ;
|
||||
EXE_EXPORT bool ExeBeamGetBuildingIsOn( void) ;
|
||||
EXE_EXPORT bool ExeBeamShowBuilding( bool bShow) ;
|
||||
EXE_EXPORT bool ExeBeamGetBuildingIsOn( int nAssGrpId) ;
|
||||
EXE_EXPORT bool ExeBeamShowBuilding( int nAssGrpId, bool bShow) ;
|
||||
|
||||
// Tsc Executor
|
||||
EXE_EXPORT bool ExeInitTscExec( void) ;
|
||||
@@ -231,7 +233,10 @@ 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) ;
|
||||
EXE_EXPORT bool ExeOptMachSetOptimizationForGroups( bool bOptForGroups) ;
|
||||
EXE_EXPORT bool ExeOptMachSetOpenBound( bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) ;
|
||||
EXE_EXPORT bool ExeOptMachSetOpenBoundForGroups( int nGroup, bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) ;
|
||||
EXE_EXPORT bool ExeOptMachCalculate( INTVECTOR& vIds) ;
|
||||
|
||||
// GeomDB Create
|
||||
EXE_EXPORT int ExeCreateGroup( int nParentId, const Frame3d& frFrame, int nRefType) ;
|
||||
@@ -319,7 +324,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 ExeCreateCurveBezierFromCurve( int nParentId, int nCrvId, bool bRational = true) ;
|
||||
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) ;
|
||||
@@ -397,11 +402,12 @@ 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 ExeCreateSurfShell( int nParentId, int nSurfId, double dThick, double dLinTol) ;
|
||||
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) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false, bool bRefined = false, int* pnCount = nullptr) ;
|
||||
EXE_EXPORT int ExeCreateBezierSphere( int nParentId, const Point3d& ptCenter, double dR, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezierTria2D( int nParentId, int nSurfBzId, int nTextHeight, bool bShowTrim, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByFlatContour( int nParentId, int nCrvId, double dLinTol) ;
|
||||
@@ -418,6 +424,8 @@ EXE_EXPORT int ExeCreateSurfBzByRevolve( int nParentId, int nCrvId,
|
||||
bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByPointCurve( int nParentId, int nCrvId, const Point3d& ptAx, bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzRuled( int nParentId, int nCrvId1, int nCrvId2, int nRuledType, bool bCapEnds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzRuledGuided( int nParentId, int nCrvId1, int nCrvId2, const BIPNTVECTOR& vGuidesCrv,
|
||||
bool bCapEnds, double dLinTol, int nLayGuides = GDB_ID_NULL) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzSkinned( int nParentId, const INTVECTOR& nCrvId1, bool bCapEnds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzSwept( int nParentId, int nSectId, int nGuideId, const Vector3d& vtAx,
|
||||
bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
@@ -428,7 +436,7 @@ EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dD
|
||||
EXE_EXPORT int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX,
|
||||
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 int ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDex, double dExtraBox = 0) ;
|
||||
|
||||
// GeomDB PartLayer
|
||||
EXE_EXPORT bool ExeIsPart( int nPartId) ;
|
||||
@@ -494,7 +502,10 @@ EXE_EXPORT bool ExeGetBBox( int nId, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeGetBBoxGlob( int nId, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeGetBBoxRef( int nId, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ;
|
||||
EXE_EXPORT int ExeCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT int ExeCopyEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT int ExeCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT int ExeCopyGlobEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT bool ExeDuplicateGeomDB( int nSouCtx, int nDestCtx, bool bSkipTemp = false) ;
|
||||
EXE_EXPORT bool ExeRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT bool ExeRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT bool ExeGroupSwap( int nId1, int nId2, bool bSwapRef, bool bMark) ;
|
||||
@@ -509,11 +520,11 @@ EXE_EXPORT bool ExeGeoObjDump( int nId, std::string& sDump) ;
|
||||
|
||||
// GeomDB Obj Attributes
|
||||
EXE_EXPORT bool ExeCopyAttributes( int nSouId, int nDestId) ;
|
||||
EXE_EXPORT bool ExeSetLevel( int nId, int nLevel) ;
|
||||
EXE_EXPORT bool ExeSetLevel( const INTVECTOR& vIds, int nLevel) ;
|
||||
EXE_EXPORT bool ExeRevertLevel( int nId) ;
|
||||
EXE_EXPORT bool ExeGetLevel( int nId, int* pnLevel) ;
|
||||
EXE_EXPORT bool ExeGetCalcLevel( int nId, int* pnLevel) ;
|
||||
EXE_EXPORT bool ExeSetMode( int nId, int nMode) ;
|
||||
EXE_EXPORT bool ExeSetMode( const INTVECTOR& vIds, int nMode) ;
|
||||
EXE_EXPORT bool ExeRevertMode( int nId) ;
|
||||
EXE_EXPORT bool ExeGetMode( int nId, int* pnMode) ;
|
||||
EXE_EXPORT bool ExeGetCalcMode( int nId, int* pnMode) ;
|
||||
@@ -632,6 +643,7 @@ EXE_EXPORT int ExeGetCurveLinearConvexHullXY( int nId, double dLinTol, int nRef
|
||||
EXE_EXPORT bool ExeModifyCircleCP( int nId, const Point3d& ptOn, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyCircle3P( int nId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyArcRadius( int nId, double dRad, bool bKeepCenter = true) ;
|
||||
EXE_EXPORT bool ExeModifyArcAngCenter( int nId, double dAngCenter) ;
|
||||
EXE_EXPORT bool ExeModifyArcC2P( int nId, const Point3d& ptEnd, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyArc3P( int nId, const Point3d& ptMid, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyArcToExplementary( int nId) ;
|
||||
@@ -657,8 +669,10 @@ 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, const INTVECTOR& vnSurfId, const Vector3d& vtProj, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType) ;
|
||||
EXE_EXPORT bool ExeProjectCurveOnSurf( int nCurveId, const INTVECTOR& vnSurfId, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen) ;
|
||||
EXE_EXPORT bool ExeProjectCurveOnSurfDir( int nCurveId, const INTVECTOR& vnSurfId, const Vector3d& vtProj, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType) ;
|
||||
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) ;
|
||||
@@ -732,7 +746,8 @@ EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vecto
|
||||
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) ;
|
||||
EXE_EXPORT bool ExeUniformVolZmap( int nVolZmapId, double dToler, bool bExtensionFirst, int nToolNum) ;
|
||||
EXE_EXPORT bool ExeVolZMapOffset( int nId, double dDist, int nType) ;
|
||||
|
||||
// GeomDB Get
|
||||
EXE_EXPORT bool ExeTextNormVersor( int nId, int nRefId, Vector3d& vtNorm) ;
|
||||
@@ -822,14 +837,17 @@ EXE_EXPORT int ExeGetSurfTmSilhouette( int nId, const Vector3d& vtDir, double d
|
||||
EXE_EXPORT int ExeGetSurfTmParSilhouettes( const INTVECTOR& vIds, const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist,
|
||||
double dToler, int nDestGrpId, int nRefType, int* pnCount) ;
|
||||
EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ;
|
||||
EXE_EXPORT int ExeExtractSurfTmTriaLoop( int nId, int nT, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVert) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetBBox( int nId, int nFacet, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetBBoxGlob( int nId, int nFacet, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetBBoxRef( int nId, int nFacet, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetOutlineInfo( int nId, int nFacet, int nRefId,
|
||||
int& nStatus, BOOLVECTOR& vbOpen, INTVECTOR& vnAdj, DBLVECTOR& vdLen, VCT3DVECTOR& vvtNorm, DBLVECTOR& vdElev) ;
|
||||
int& nStatus, BOOLVECTOR& vbOpen, INTVECTOR& vnAdj, DBLVECTOR& vdLen,
|
||||
PNTVECTOR& vptStart, VCT3DVECTOR& vvtNorm, DBLVECTOR& vdElev) ;
|
||||
EXE_EXPORT int ExeSurfTmGetEdges( int nId, int nDestGrpId, bool bSmoothAng, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetCurvatures( int nId, int nV, double& dK1, Vector3d& vtK1, double& dK2, Vector3d& vtK2) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetPoint( int nSurfId, double dU, double dV, int nRefId, Point3d& ptP) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetPointD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId,
|
||||
Point3d& ptP, Vector3d& vtDerU, Vector3d& vtDerV) ;
|
||||
@@ -837,6 +855,7 @@ EXE_EXPORT bool ExeSurfBezierGetPointNrmD1( int nSurfId, double dU, double dV, i
|
||||
Point3d& ptP, Vector3d& vtN, Vector3d& vtDerU, Vector3d& vtDerV) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetCurveU( int nSurfId, double dV, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetCurveV( int nSurfId, double dU, int nDestGrpId) ;
|
||||
EXE_EXPORT bool ExeSurfBezParamsFromPoint( int nSurfId, const Point3d& ptOnSurf, int nDestGrpId) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetInfo( int nSurfId, int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetControlCurveU( int nSurfId, int nIndV, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetControlCurveV( int nSurfId, int nIndU, int nDestGrpId) ;
|
||||
@@ -899,6 +918,8 @@ EXE_EXPORT bool ExePointCurveDistSide( const Point3d& ptP, int nCurveId, const V
|
||||
double* pdDist, Point3d& ptMin, int* pnSide) ;
|
||||
EXE_EXPORT bool ExePointSurfTmDist( const Point3d& ptP, int nStmId, int nRefType,
|
||||
double* pdDist, Point3d& ptMin, int* pnTria) ;
|
||||
EXE_EXPORT bool ExePointSurfBzDist( const Point3d& ptP, int nSbzId, int nRefType,
|
||||
double* pdDist, Point3d& ptMin, Vector3d& vtN) ;
|
||||
|
||||
// Geo Intersect
|
||||
EXE_EXPORT bool ExeLineCurveInters( const Point3d& ptP, const Vector3d& vtDir, const int nId, const int nRefType,
|
||||
@@ -922,11 +943,12 @@ EXE_EXPORT int ExeParPlanesSurfTmInters( const Point3d& ptOn, const Vector3d& v
|
||||
EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType,
|
||||
int* pnCount) ;
|
||||
EXE_EXPORT int ExeCurveCurveInters( const int nId1, const int nId2, const int nDestGrpId,
|
||||
int* pnPntCount, int* pnCrvCount) ;
|
||||
int* pnPntCount, int* pnCrvCount, bool bOnly3D = false) ;
|
||||
EXE_EXPORT int ExeCurveSurfTmInters( const int nCrvId, const int nStmId, const int nDestGrpId,
|
||||
int* pnPntCount, int* pnCrvCount) ;
|
||||
EXE_EXPORT int ExeSurfTmSurfTmInters( int nId1, int nId2, int nDestGrpId, double dToler,
|
||||
int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ;
|
||||
EXE_EXPORT bool ExeBBoxOverlap( const BBox3d& bboxA, const Frame3d& frA, const BBox3d& bboxB, const Frame3d& frB) ;
|
||||
|
||||
// Collision Detection
|
||||
EXE_EXPORT int ExeCDeBoxSolid( const Frame3d& frBox, const Vector3d& vtDiag, int nSolidId, double dSafeDist, int nRefType) ;
|
||||
@@ -946,7 +968,7 @@ EXE_EXPORT int ExeTestRectPrismoidSurface( const Frame3d& frPrismoid, double dB
|
||||
EXE_EXPORT int ExeTestCylSurface( const Frame3d& frCyl, double dR, double dH, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestConeSurface( const Frame3d& frCone, double dR1, double dR2, double dH, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestSpheSurface( const Point3d& ptCen, double dR, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestSurfaceSurface( int nSurf1Id, int nSurf2Id, double dSafeDist) ;
|
||||
EXE_EXPORT int ExeTestSurfaceSurface( int nSurf1Id, int nSurf2Id, double dSafeDist, bool bTestEnclosion = false) ;
|
||||
|
||||
// Maximum Filler
|
||||
EXE_EXPORT bool ExeMaxFillerStart( void) ;
|
||||
@@ -1162,6 +1184,7 @@ EXE_EXPORT bool ExeTdbImport( const std::string& sFile, const STRVECTOR& vsTools
|
||||
EXE_EXPORT int ExeGetCurrSetup( void) ;
|
||||
EXE_EXPORT bool ExeGetDefaultSetupName( std::string& sName) ;
|
||||
EXE_EXPORT bool ExeImportSetup( const std::string& sName) ;
|
||||
EXE_EXPORT bool ExeExistsCurrSetup( void) ;
|
||||
EXE_EXPORT bool ExeVerifyCurrSetup( STRVECTOR& vsErrors) ;
|
||||
EXE_EXPORT bool ExeFindToolInCurrSetup( const std::string& sTool) ;
|
||||
EXE_EXPORT bool ExeGetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) ;
|
||||
@@ -1260,6 +1283,8 @@ EXE_EXPORT bool ExeGetMachiningSkippedGeometry( SELVECTOR& vIds) ;
|
||||
EXE_EXPORT bool ExeIsMachiningEmpty( int nEmptyType) ;
|
||||
EXE_EXPORT bool ExeGetMachiningStartPoint( Point3d& ptStart) ;
|
||||
EXE_EXPORT bool ExeGetMachiningEndPoint( Point3d& ptEnd) ;
|
||||
EXE_EXPORT bool ExeGetMachiningStartAxes( bool bSkipClimb, DBLVECTOR& vAxVal) ;
|
||||
EXE_EXPORT bool ExeGetMachiningEndAxes( bool bSkipRise, DBLVECTOR& vAxVal) ;
|
||||
EXE_EXPORT bool ExeApplyAllMachinings( bool bRecalc, bool bStopOnFirstErr, std::string& sErrList) ;
|
||||
EXE_EXPORT bool ExeApplyAllMachiningsEx( bool bRecalc, bool bStopOnFirstErr, std::string& sErrList, std::string& sWarnList) ;
|
||||
EXE_EXPORT bool ExeUpdateAllMachinings( bool bStopOnFirstErr, std::string& sErrList) ;
|
||||
@@ -1268,6 +1293,7 @@ EXE_EXPORT bool ExeUpdateAllMachiningsEx( bool bStopOnFirstErr, std::string& sEr
|
||||
EXE_EXPORT bool ExeGetClEntMove( int nEntId, int& nMove) ;
|
||||
EXE_EXPORT bool ExeGetClEntFlag( int nEntId, int& nFlag, int& nFlag2) ;
|
||||
EXE_EXPORT bool ExeGetClEntIndex( int nEntId, int& nIndex) ;
|
||||
EXE_EXPORT bool ExeGetClEntFeed( int nEntId, double& dFeed) ;
|
||||
EXE_EXPORT bool ExeGetClEntAxesStatus( int nEntId, int& nStatus) ;
|
||||
EXE_EXPORT bool ExeGetClEntAxesMask( int nEntId, int& nMask) ;
|
||||
EXE_EXPORT bool ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) ;
|
||||
@@ -1309,9 +1335,11 @@ EXE_EXPORT bool ExeGetAllTcPosNames( STRVECTOR& vNames) ;
|
||||
// Machine Calc
|
||||
EXE_EXPORT bool ExeSetCalcTable( const std::string& sTable) ;
|
||||
EXE_EXPORT bool ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) ;
|
||||
EXE_EXPORT bool ExeSetCalcSolCh( int nScc, bool bExact) ;
|
||||
EXE_EXPORT bool ExeSetRotAxisBlock( const std::string& sAxis, double dVal) ;
|
||||
EXE_EXPORT bool ExeGetCalcTable( std::string& sTable) ;
|
||||
EXE_EXPORT bool ExeGetCalcTool( std::string& sTool, std::string& sHead, int& nExit) ;
|
||||
EXE_EXPORT bool ExeGetCalcSolCh( int& nScc, bool& bExact) ;
|
||||
EXE_EXPORT bool ExeGetAllCurrAxesNames( STRVECTOR& vAxName) ;
|
||||
EXE_EXPORT bool ExeGetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) ;
|
||||
EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
@@ -1319,9 +1347,9 @@ EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA
|
||||
EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, DBLVECTOR& vAng1, DBLVECTOR& vAng2) ;
|
||||
EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, double dAngA, double dAngB,
|
||||
int& nStat, double& dX, double& dY, double& dZ) ;
|
||||
double& dX, double& dY, double& dZ) ;
|
||||
EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng,
|
||||
int& nStat, double& dX, double& dY, double& dZ) ;
|
||||
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,
|
||||
@@ -1362,6 +1390,8 @@ EXE_EXPORT bool ExeSetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLine
|
||||
EXE_EXPORT bool ExeSetGridGeoAdv( double dSnapStep, int nMinLineSstep, int nMajLineSstep,
|
||||
double dXmin, double dXmax, double dYmin, double dYmax) ;
|
||||
EXE_EXPORT bool ExeSetGridColor( Color colMin, Color colMaj) ;
|
||||
EXE_EXPORT bool ExeSetCameraType( bool bOrthoOrPersp, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeSetZoomType( int nMode, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeResize( int nW, int nH) ;
|
||||
EXE_EXPORT bool ExeDraw( void) ;
|
||||
EXE_EXPORT bool ExeSelect( int nWinX, int nWinY, int nSelW, int nSelH, int* pnSel) ;
|
||||
@@ -1421,8 +1451,9 @@ EXE_EXPORT bool ExeGetTextureDimensions( const std::string& sName, double& dDimX
|
||||
EXE_EXPORT bool ExeChangeTextureDimensions( const std::string& sName, double dDimX, double dDimY) ;
|
||||
EXE_EXPORT bool ExeGetImage( int nShowMode, Color colBackTop, Color colBackBottom,
|
||||
int nWidth, int nHeight, const std::string& sFile) ;
|
||||
EXE_EXPORT bool ExeSetCameraType( bool bOrthoOrPersp, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeSetZoomType( int nMode, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeGetImageEx( int nDriver, bool b2Buff, int nColorBits, int nDepthBits,
|
||||
int nShowMode, Color colBackTop, Color colBackBottom,
|
||||
int nCameraDir, int nWidth, int nHeight, const std::string& sFile) ;
|
||||
|
||||
// Image
|
||||
EXE_EXPORT bool ExeGetImagePixels( const std::string& sFile, int& nPixelX, int& nPixelY) ;
|
||||
@@ -1453,3 +1484,46 @@ EXE_EXPORT int ExeAddPicture( int nParentId, const std::string& sName, const st
|
||||
EXE_EXPORT bool ExeLoadMessages( const std::string& sMsgFilePath) ;
|
||||
EXE_EXPORT const std::string& ExeGetLanguage( void) ;
|
||||
EXE_EXPORT const std::string& ExeGetMsg( int nMsg) ;
|
||||
|
||||
// Redis
|
||||
EXE_EXPORT bool ExeRedisConnect( const std::string& sConnection, int& nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisDisconnect( int nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisSetValFromKey( int nIdConnection, const std::string& sKey, const std::string& sVal) ;
|
||||
EXE_EXPORT bool ExeRedisGetValFromKey( int nIdConnection, const std::string& sKey, std::string& sVal) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncConnect( const std::string& sConnection, int& nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncDisconnect( int nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncPublish( int nIdConnection, const std::string& sChannel, const std::string& sMessage) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncSubscribe( int nIdConnection, const std::string& sChannel) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncUnsubscribe( int nIdConnection, const std::string& sChannel) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncSubscribeOneMessage( int nIdConnection, const std::string& sChannel, double dMaxTimeOut, std::string& sMessage) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncGetMessage( int nIdConnection, const std::string& sChannel, int& nCount, std::string& sMessage) ;
|
||||
|
||||
// Base64
|
||||
EXE_EXPORT bool ExeBase64Encode( const std::string& sFile, std::string& sB64Dest) ;
|
||||
EXE_EXPORT bool ExeBase64Decode( const std::string& sB64Sou, const std::string& sFile) ;
|
||||
|
||||
// Trimming
|
||||
EXE_EXPORT int ExeTrimmingGetSurfTmFaceAdj( int nParentId, int nSurfId, int nTria, const Point3d& vPts,
|
||||
double dAngTol, double dSize, double dSizeTol) ;
|
||||
EXE_EXPORT int ExeTrimmingGetSurfTmFromStmFaces( int nParentId, int nSurfId, const INTVECTOR& vFaces) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetAdjSurfs( const INTVECTOR& vSurfId, const INTVECTOR& vOtherSurfId, double dLinTol,
|
||||
double dAngTol, double dAngFaceTol, INTVECTOR& vResId) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetBorders( int nParentId, const SELVECTOR& vIds, double dSurfLinTol, double dSurfAngTol,
|
||||
double dLinTol, double dAngTol, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetBordersByNormals( int nParentId, const SELVECTOR& vIds, double dSurfLinTol,
|
||||
double dSurfAngTol, double dLinTol, double dAngTol,
|
||||
double dThick, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetFinalBorders( int nParentId, const INTVECTOR& vCrvBezierId, double dLinTol, double dAngTol,
|
||||
const PNTVECTOR& vBreakingPts, double dThick, double dThickTol,
|
||||
int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT int ExeTrimmingGetRuledBezier( int nParentId, const INTVECTOR& vIds, int nEdge1Id, int nEdge2Id, double dLinTol,
|
||||
const INTVECTOR& vnLineIds) ;
|
||||
EXE_EXPORT bool ExeTrimmingInterpolateSyncLines( int nParentId, int nSync1Id, int nSync2Id,
|
||||
int nBorder1Id, int nBorder2Id, double dEdgeLinTol,
|
||||
double dEdgeAngTol, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetSurfBzSyncPoints( int nParentId, int nEdge1Id, int nEdge2Id, double dLinTol,
|
||||
double dAngTol, int nLineNbr, bool bShowOnCorners,
|
||||
int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetHoleBorder( int nParentId, const INTVECTOR& vSurfIds, const INTVECTOR& vOtherSurfIds,
|
||||
double dSurfLinTol, double dSurfAngTol, double dEdgeLinTol, double dEdgeAngTol,
|
||||
double dEdgeThick, int& nFirstId, int& nCount) ;
|
||||
|
||||
+9
-5
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2018-2023
|
||||
// EgalTech 2018-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtFunPtrType.h Data : 23.11.23 Versione : 2.5k5
|
||||
// File : EgtFunPtrType.h Data : 12.10.25 Versione : 2.7j25
|
||||
// Contenuto : Dichiarazione tipi puntatori a funzione.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 19.07.18 DS Creazione modulo.
|
||||
// 23.11.23 DS Aggiunta pfOnTerminateProcess.
|
||||
// 12.10.25 DS Aggiunta pfCdeclProcEvents.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -16,6 +17,9 @@
|
||||
#include <string>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
typedef bool (__stdcall * pfOnTerminateProcess) ( int) ;
|
||||
typedef int (__stdcall * pfProcEvents) ( int, int) ;
|
||||
typedef bool (__stdcall * pfOutText) ( const std::string&) ;
|
||||
typedef bool (__stdcall * psfOnTerminateProcess) ( int) ;
|
||||
typedef int (__stdcall * psfProcEvents) ( int, int) ;
|
||||
typedef bool (__stdcall * psfOutText) ( const std::string&) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
typedef int (__cdecl * pcfProcEvents) ( int, int) ;
|
||||
|
||||
+4
-3
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2025
|
||||
// EgalTech 2015-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtKeyCodes.h Data : 01.08.25 Versione : 2.7h1
|
||||
// File : EgtKeyCodes.h Data : 02.01.26 Versione : 3.1a1
|
||||
// Contenuto : Costanti per codici di protezione librerie di base.
|
||||
//
|
||||
//
|
||||
@@ -19,6 +19,7 @@
|
||||
// 01.01.23 DS Passaggio a versione 25.
|
||||
// 16.01.24 DS Passaggio a versione 26.
|
||||
// 07.01.25 DS Passaggio a versione 27.
|
||||
// 02.01.26 DS Passaggio a versione 31.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const int KEY_BASELIB_PROD = 207 ;
|
||||
const int KEY_BASELIB_VER = 2709 ;
|
||||
const int KEY_BASELIB_VER = 3103 ;
|
||||
const int KEY_BASELIB_LEV = 1 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+17
-9
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2019
|
||||
// EgalTech 2014-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtNumCollection.h Data : 07.07.19 Versione : 2.1g1
|
||||
// File : EgtNumCollection.h Data : 21.09.25 Versione : 2.7i2
|
||||
// Contenuto : Raccolte di oggetti numerici semplici.
|
||||
//
|
||||
//
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -28,7 +29,8 @@ typedef std::list<bool> BOOLLIST ; // lista di bool
|
||||
typedef std::vector<int> INTVECTOR ; // vettore di interi
|
||||
typedef std::list<int> INT_LIST ; // lista di interi (con _ per non collidere con Win)
|
||||
typedef std::vector<std::vector<int>> INTMATRIX ; // matrice di interi
|
||||
typedef std::unordered_set<int> INTUNORDSET ; // unordered set di interi
|
||||
typedef std::set<int> INTSET ; // set di interi
|
||||
typedef std::unordered_set<int> INTUNORDSET ; // unordered set di interi
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di interi senza segno
|
||||
@@ -43,12 +45,18 @@ typedef std::vector<std::vector<double>> DBLMATRIX ; // matrice di double
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di coppie integer, integer
|
||||
typedef std::pair<int,int> INTINT ; // coppia di interi
|
||||
typedef std::vector<INTINT> INTINTVECTOR ; // vettore di coppie di interi
|
||||
typedef std::list<INTINT> INTINTLIST ; // lista di coppie di interi
|
||||
typedef std::pair<int,int> INTINT ; // coppia di interi
|
||||
typedef std::vector<INTINT> INTINTVECTOR ; // vettore di coppie di interi
|
||||
typedef std::list<INTINT> INTINTLIST ; // lista di coppie di interi
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di coppie integer, double
|
||||
typedef std::pair<int,double> INTDBL ; // coppia flag, parametro
|
||||
typedef std::vector<INTDBL> INTDBLVECTOR ; // vettore di coppie flag, parametro
|
||||
typedef std::list<INTDBL> INTDBLLIST ; // lista di coppie flag, parametro
|
||||
typedef std::pair<int,double> INTDBL ; // coppia flag, parametro
|
||||
typedef std::vector<INTDBL> INTDBLVECTOR ; // vettore di coppie flag, parametro
|
||||
typedef std::list<INTDBL> INTDBLLIST ; // lista di coppie flag, parametro
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di coppie double, double
|
||||
typedef std::pair<double,double> DBLDBL ; // coppia di double
|
||||
typedef std::vector<DBLDBL> DBLDBLVECTOR ; // vettore di coppie di double
|
||||
typedef std::list<DBLDBL> DBLDBLLIST ; // lista di coppie di double
|
||||
|
||||
Reference in New Issue
Block a user