Include :

- spostate le funzioni di offset di categoria.
- aggiunta la funzione per l'offset 3d delle curve.
This commit is contained in:
Daniele Bariletti
2026-06-15 08:40:52 +02:00
parent ce08e8b327
commit 216173ca33
2 changed files with 63 additions and 5 deletions
+57
View File
@@ -0,0 +1,57 @@
//----------------------------------------------------------------------------
// EgalTech 2026
//----------------------------------------------------------------------------
// File : EGkOffsetCurve3d.h Data : 10.06.26 Versione : 3.1f1
// Contenuto : Dichiarazione classe per offset di ICurve, per curve 3d.
//
//
// Modifiche : 10.06.26 DB Creazione modulo.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkVector3d.h"
#include "/EgtDev/Include/EGkPolyLine.h"
#include "/EgtDev/Include/EGkCurve.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
//----------------------------------------------------------------------------
class OffsetCurve3d
{
public :
enum AngType { ANG_STR = 1 , // angolo piatto ( quindi tratto in continuità col precedente)
ANG_CVEX = 2 , // su angolo convesso
ANG_CONC = 3 , // in angolo concavo
ANG_BEFORE_CONC = 4 , // adiacente ad angolo concavo
ANG_AFTER_CONC = 5 , // adiacente ad angolo concavo
ANG_SMOOTH_CONC = 6 // zona concava curva, senza spigolo netto
};
public :
EGK_EXPORT OffsetCurve3d(): m_dLinTol( 10 * EPS_SMALL) {} ;
EGK_EXPORT OffsetCurve3d( double dLinTol) : m_dLinTol( dLinTol) {} ;
EGK_EXPORT ~OffsetCurve3d( void) ;
public :
EGK_EXPORT bool Reset( void) ;
EGK_EXPORT bool Make( const PolyLine& PL, const VCT3DVECTOR& vOffDir, double dDist, int nType) ;
EGK_EXPORT int GetCurveCount( void) { return int( m_CrvLst.size()) ; }
EGK_EXPORT ICurve* GetCurve( void) ;
EGK_EXPORT ICurve* GetLongerCurve( void) ;
EGK_EXPORT ICurve* GetShorterCurve( void) ;
EGK_EXPORT double GetLinTol( void) const { return m_dLinTol ; }
EGK_EXPORT void SetLinTol( double dTol) { m_dLinTol = dTol ; }
private :
ICURVEPLIST m_CrvLst ;
double m_dLinTol ;
} ;
+6 -5
View File
@@ -351,6 +351,9 @@ EXE_EXPORT int ExeCreatePolygonFromSide( int nParentId, int nNumSides, const Po
const Point3d& ptFin, int nRefType) ;
EXE_EXPORT int ExeCreateCirclesAlongCurve( int nParentId, int nCrvId, double dOffset, double dOverlap,
double dStartAdd, double dEndAdd, double dDiam, int* pnCount) ;
EXE_EXPORT int ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount, double dLinTol = 10 * EPS_SMALL) ;
EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ;
EXE_EXPORT int ExeOffsetCurve3d( int nId, int nSurfId, double dDist, int nType, int* pnCount, double dLinTol = 10 * EPS_SMALL) ;
// GeomDB Create Surf
EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) ;
@@ -613,8 +616,6 @@ EXE_EXPORT int ExeSplitText( int nId, int* pnCount) ;
// GeomDb Curve Modify
EXE_EXPORT bool ExeInvertCurve( const INTVECTOR& vIds) ;
EXE_EXPORT bool ExeOffsetCurve( int nId, double dDist, int nType) ;
EXE_EXPORT int ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount, double dLinTol = 10 * EPS_SMALL) ;
EXE_EXPORT int ExeCurveMedialAxis( int nId) ;
EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol, double dMaxSegmLen = INFINITO) ;
EXE_EXPORT bool ExeProjectCurveOnPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ;
EXE_EXPORT bool ExeChangeClosedCurveStart( int nId, double dU) ;
@@ -676,9 +677,6 @@ EXE_EXPORT bool ExeProjectCurveOnSurfDir( int nCurveId, const INTVECTOR& vnSurfI
double dLinTol, double dMaxSegmLen, bool bDirFromProj, bool bFromVsTo, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfExt( int nCurveId, const INTVECTOR& vnSurfId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide, bool bFromVsTo) ;
EXE_EXPORT int ExeCurveGetVoronoi( const INTVECTOR& vIds, int nDestGrpId, int nBound, int* pnCount) ;
EXE_EXPORT int ExeCurveGetMedialAxis( const INTVECTOR& vIds, int nDestGrpId, int nSide, int* pnCount) ;
EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ;
EXE_EXPORT bool ExeCurveBezierIncreaseDegree( int nCrvId) ;
EXE_EXPORT bool ExeCurveBezierDecreaseDegree( int nCrvId, double dTol = 100) ;
EXE_EXPORT bool ExeCurveBezierApproxToNonRat( int nCrvId, double dTol = 10 * EPS_SMALL) ;
@@ -800,6 +798,9 @@ EXE_EXPORT bool ExeCurveCompoGetTempParam( int nId, DBLVECTOR& vParam, int nPara
EXE_EXPORT int ExeShowCurveBezierControlPoints( int nCrvId, int nDestGrpId, int* pnCount) ;
EXE_EXPORT int ExeCopyCompoSubCurve( int nCrvId, int nSubCrvToCopy, int nDestGrpId) ;
EXE_EXPORT int ExeCopyParamRange( int nCrvId, double dUStart, double dUEnd, int nDestGrpId) ;
EXE_EXPORT int ExeCurveGetVoronoi( const INTVECTOR& vIds, int nDestGrpId, int nBound, int* pnCount) ;
EXE_EXPORT int ExeCurveMedialAxis( int nId) ;
EXE_EXPORT int ExeCurveGetMedialAxis( const INTVECTOR& vIds, int nDestGrpId, int nSide, int* pnCount) ;
// GeomDb Surf Get
EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ;