From 4a81b0fc94a9ac8251bdccd590c4f98c1ec7e8a2 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Mon, 18 Sep 2023 10:43:11 +0200 Subject: [PATCH 01/12] Include : - aggiunte coordinate U e V ai vertici delle TriMesh. --- EGkStmFromTriangleSoup.h | 6 ++++-- EGkSurfTriMesh.h | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/EGkStmFromTriangleSoup.h b/EGkStmFromTriangleSoup.h index 354e90a..f417910 100644 --- a/EGkStmFromTriangleSoup.h +++ b/EGkStmFromTriangleSoup.h @@ -35,13 +35,15 @@ class StmFromTriangleSoup EGK_EXPORT ~StmFromTriangleSoup( void) ; EGK_EXPORT bool Start( int nBuckets = GRID_STD_BUCKETS) ; EGK_EXPORT bool AddTriangle( const Triangle3d& Tria) ; - EGK_EXPORT bool AddTriangle( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2) ; + EGK_EXPORT bool AddTriangle( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2, + const double dU0 = -1, const double dV0 = -1, const double dU1 = -1, const double dV1 = -1, + const double dU2 = -1, const double dV2 = -1) ; EGK_EXPORT bool AddSurfTriMesh( const ISurfTriMesh& stmSource) ; EGK_EXPORT bool End( void) ; EGK_EXPORT ISurfTriMesh* GetSurf( void) ; private : - inline int AddVertex( const Point3d& ptP) ; + inline int AddVertex( const Point3d& ptP, const double dU = -1, const double dV = -1) ; private : ISurfTriMesh* m_pSTM ; diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index e37521a..94c1f9f 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -43,7 +43,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual void SetLinearTolerance( double dLinTol) = 0 ; virtual void SetBoundaryAngle( double dBoundaryAngDeg) = 0 ; virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ; - virtual int AddVertex( const Point3d& ptVert) = 0 ; + virtual int AddVertex( const Point3d& ptVert, const double dU = -1, const double dV = -1) = 0 ; virtual bool MoveVertex( int nInd, const Point3d& ptNewVert) = 0 ; virtual int AddTriangle( const int nIdVert[3], int nTFlag = 0) = 0 ; virtual bool RemoveTriangle( int nId) = 0 ; @@ -68,8 +68,11 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual double GetLinearTolerance( void) const = 0 ; virtual double GetSmoothAngle( void) const = 0 ; virtual bool GetVertex( int nId, Point3d& ptP) const = 0 ; + virtual bool GetVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetFirstVertex( Point3d& ptP) const = 0 ; + virtual int GetFirstVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ; + virtual int GetNextVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ; virtual int GetFirstTriangle( int nIdVert[3]) const = 0 ; virtual int GetNextTriangle( int nId, int nIdVert[3]) const = 0 ; From 29c292b075745dd143bf62795d1fe9e3f8a3cce0 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 8 Feb 2024 12:05:33 +0100 Subject: [PATCH 02/12] Include : - aggiunta intersezione tra linea e superficie di Bezier. --- EgkIntersLineSurfBez.h | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 EgkIntersLineSurfBez.h diff --git a/EgkIntersLineSurfBez.h b/EgkIntersLineSurfBez.h new file mode 100644 index 0000000..168ac9c --- /dev/null +++ b/EgkIntersLineSurfBez.h @@ -0,0 +1,66 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024 +//---------------------------------------------------------------------------- +// File : EGkIntersLineSurfBez.h Data : 06.02.24 Versione : 2.6b1 +// Contenuto : Dichiarazione della classe intersezione Linea/SurfTriMesh. +// +// +// +// Modifiche : 06.02.24 DB Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkSurfTriMesh.h" +#include "/EgtDev/Include/EGkIntersLineTria.h" +#include "/EgtDev/Include/EGkHashGrids2d.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 + +//----------------------------------------------------------------------------- +//! dati di intersezione linea - superficie trimesh +struct IntLinSbzInfo { + int nILTT ; //!< tipo di intersezione linea-triangolo + double dU ; //!< parametro sulla linea + double dU2 ; //!< secondo parametro sulla linea + int nT ; //!< indice del triangolo della superficie trimesh + double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo + Point3d ptI ; //!< punto di intersezione + Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto) + Point3d ptUV ; //!< coordinate del punto nello spazio parametrico + Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico + // costruttori + IntLinSbzInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){} + IntLinSbzInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP) + : nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {} + IntLinSbzInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2) + : nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {} +} ; +//! vettore di IntLinSbzInfo +typedef std::vector ILSBIVECTOR ; + +//----------------------------------------------------------------------------- +EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier& SBz, + ILSBIVECTOR& vInfo, bool bFinite = true) ; + +//----------------------------------------------------------------------------- +class IntersParLinesSurfBz +{ +public : + EGK_EXPORT IntersParLinesSurfBz( const Frame3d& frLines, const ISurfBezier& SBz) ; + EGK_EXPORT bool GetInters( const Point3d& ptL, double dLen, ILSBIVECTOR& vInfo, bool bFinite = true) const ; + +private : + bool m_bOk ; + const Frame3d m_frLines ; + const ISurfBezier* m_pSBz ; + HashGrids2d m_HGrids ; +} ; From 93b180b1293c0d641b0648f2f8a6e1ab6c23c11e Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Mon, 12 Feb 2024 12:55:59 +0100 Subject: [PATCH 03/12] Include : - aggiunti i comandi per la chiamata da CAM dell'intersezione linea sup. Bezier. --- EGkSurfTriMesh.h | 2 -- EXeExecutor.h | 2 ++ EgkIntersLineSurfBez.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 11744ea..3510e12 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -70,9 +70,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool GetVertex( int nId, Point3d& ptP) const = 0 ; virtual bool GetVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetFirstVertex( Point3d& ptP) const = 0 ; - virtual int GetFirstVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ; - virtual int GetNextVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ; virtual int GetFirstTriangle( int nIdVert[3]) const = 0 ; virtual int GetNextTriangle( int nId, int nIdVert[3]) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 633161d..3338e72 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -807,6 +807,8 @@ EXE_EXPORT bool ExeLineBoxInters( const Point3d& ptP, const Vector3d& vtDir, con INTDBLVECTOR& vInters) ; EXE_EXPORT bool ExeLineSurfTmInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, INTDBLVECTOR& vInters) ; +EXE_EXPORT bool ExeLineSurfBzInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, + INTDBLVECTOR& vInters) ; EXE_EXPORT bool ExeLineVolZmapInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, INTDBLVECTOR& vInters) ; EXE_EXPORT int ExePlaneCurveInters( const Point3d& ptOn, const Vector3d& vtN, const int nId, const int nDestGrpId, const int nRefType, diff --git a/EgkIntersLineSurfBez.h b/EgkIntersLineSurfBez.h index 168ac9c..69ef158 100644 --- a/EgkIntersLineSurfBez.h +++ b/EgkIntersLineSurfBez.h @@ -16,6 +16,7 @@ #include "/EgtDev/Include/EGkSurfTriMesh.h" #include "/EgtDev/Include/EGkIntersLineTria.h" #include "/EgtDev/Include/EGkHashGrids2d.h" +#include "/EgtDev/Include/EGkSurfBezier.h" //----------------------- Macro per import/export ---------------------------- #undef EGK_EXPORT @@ -48,7 +49,7 @@ struct IntLinSbzInfo { typedef std::vector ILSBIVECTOR ; //----------------------------------------------------------------------------- -EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier& SBz, +EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier* pSBz, ILSBIVECTOR& vInfo, bool bFinite = true) ; //----------------------------------------------------------------------------- From c5da2d52f51b1345d5d22ae2227fd09b84e2f9ca Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 14 Feb 2024 14:41:45 +0100 Subject: [PATCH 04/12] Include : - aggiunta funzione per creazione di una sfera come superficie bezier. --- EXeExecutor.h | 1 + EgkSbzStandard.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 EgkSbzStandard.h diff --git a/EXeExecutor.h b/EXeExecutor.h index 27d24a2..aa19439 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -363,6 +363,7 @@ EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) 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 ExeCreateBezierSphere( int nParentId, const Point3d& ptCenter, double dR, int nRefType) ; // GeomDB Create Volume EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, diff --git a/EgkSbzStandard.h b/EgkSbzStandard.h new file mode 100644 index 0000000..1192156 --- /dev/null +++ b/EgkSbzStandard.h @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024 +//---------------------------------------------------------------------------- +// File : EGkSbzStandard.h Data : 14.02.24 Versione : 2.6b2 +// Contenuto : Dichiarazione funzioni per creazione superfici Sbz +// standard : Box, Pyramid, Cylinder, Sphere, Cone. +// +// +// Modifiche : 14.02.24 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 + +//---------------------------------------------------------------------------- +EGK_EXPORT ISurfBezier* CreateBezierSphere( const Point3d& ptCenter, double dR) ; \ No newline at end of file From 22c4c89a5bf9586cef8fb47fdec4736324b42cf6 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 20 Feb 2024 12:29:50 +0100 Subject: [PATCH 05/12] Include : - aggiunta funzione per tagliare una superficie bezier con un piano. --- EGkSurfBezier.h | 7 ++++++- EXeExecutor.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index 6ebf797..1fed870 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -36,7 +36,7 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ; virtual bool SetControlPoint( int nIndU, int nIndV, const Point3d& ptCtrl, double dW) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ; - virtual bool SetTrimRegion( const ISurfFlatRegion& sfrTrimReg) = 0 ; + virtual bool SetTrimRegion( ISurfFlatRegion& sfrTrimReg, bool bIntersectOrSubtrct = true) = 0 ; virtual ISurfFlatRegion* GetTrimRegion( void) const = 0 ; virtual bool GetInfo( int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) const = 0 ; virtual const Point3d& GetControlPoint( int nIndU, int nIndV, bool* pbOk) const = 0 ; @@ -59,6 +59,11 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ; virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ; virtual bool GetLeaves ( std::vector>& vLeaves) const = 0 ; + virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL) const = 0 ; + virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam) const = 0 ; + virtual ICurveComposite* UnprojectCurveFromStm( const ICurveComposite* pCC) const = 0 ; + virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; // taglio la parte della superficie dalla parte positiva del versore del piano. + // Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio } ; //----------------------------------------------------------------------------- diff --git a/EXeExecutor.h b/EXeExecutor.h index 0c3b990..a45d2a9 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -616,6 +616,7 @@ EXE_EXPORT bool ExeSurfTmRemoveFacet( int nId, int nFacet) ; EXE_EXPORT bool ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2) ; EXE_EXPORT bool ExeSurfTmRemovePart( int nId, int nPart) ; EXE_EXPORT bool ExeCutSurfTmPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ; +EXE_EXPORT bool ExeCutSurfBzPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ; EXE_EXPORT bool ExeCutSurfTmClosedCurve( int nSurfId, int nCurveId, bool bSaveOnEq) ; EXE_EXPORT bool ExeSurfTmAdd( int nId1, int nId2, bool bTwoColors = false) ; EXE_EXPORT bool ExeSurfTmSubtract( int nId1, int nId2, bool bTwoColors = false) ; From 7a364827874997ca3ba72a80a2a5fd2fd3e87391 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 27 Feb 2024 16:38:02 +0100 Subject: [PATCH 06/12] Include : - aggiunta della funzione per il calcolo dei poli nelle sup di Bezier - aggiunta la funzione per disegnare i triangoli nello spazio parametrico di una superficie Bezier. --- EGkSurfBezier.h | 3 +++ EXeExecutor.h | 1 + 2 files changed, 4 insertions(+) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index 1fed870..a164d63 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -59,11 +59,14 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ; virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ; virtual bool GetLeaves ( std::vector>& vLeaves) const = 0 ; + virtual bool GetTriangles2D( std::vector>& 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, const Point3d& ptIPrevint, int nTPrev = -1 ) const = 0 ; virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam) const = 0 ; virtual ICurveComposite* UnprojectCurveFromStm( const ICurveComposite* pCC) const = 0 ; virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; // taglio la parte della superficie dalla parte positiva del versore del piano. // Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio + virtual bool CalcPoles( void) ; // funzione da chiamare per calcolare i poli della superficie. NECESSARIO se si vuole tagliare la superficie con un piano } ; //----------------------------------------------------------------------------- diff --git a/EXeExecutor.h b/EXeExecutor.h index a45d2a9..238a49b 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -364,6 +364,7 @@ EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nS 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 ExeCreateBezierSphere( int nParentId, const Point3d& ptCenter, double dR, int nRefType) ; +EXE_EXPORT int ExeCreateSurfBezierTria2D( int nParentId, int nSurfBzId, int nTextHeight, bool bShowTrim, int* pnCount) ; // GeomDB Create Volume EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, From b90644dcd21117cf6276cb0e394f077209877bd5 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 28 Feb 2024 10:32:41 +0100 Subject: [PATCH 07/12] Include : - aggiornamento prototipi. --- EgkIntersLineSurfBez.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/EgkIntersLineSurfBez.h b/EgkIntersLineSurfBez.h index 69ef158..a6322d0 100644 --- a/EgkIntersLineSurfBez.h +++ b/EgkIntersLineSurfBez.h @@ -48,6 +48,15 @@ struct IntLinSbzInfo { //! vettore di IntLinSbzInfo typedef std::vector ILSBIVECTOR ; +//----------------------------------------------------------------------------- +// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio +enum LSBiType { LSBT_NONE = 0, + LSBT_IN = 1, + LSBT_OUT = 2, + LSBT_TG_INI = 3, + LSBT_TG_FIN = 4, + LSBT_TOUCH = 5} ; + //----------------------------------------------------------------------------- EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier* pSBz, ILSBIVECTOR& vInfo, bool bFinite = true) ; @@ -65,3 +74,6 @@ private : const ISurfBezier* m_pSBz ; HashGrids2d m_HGrids ; } ; + +//----------------------------------------------------------------------------- +EGK_EXPORT bool FilterLineSurfBzInters( const ILSBIVECTOR& vInfo, INTDBLVECTOR& vInters) ; \ No newline at end of file From a488d0248c53cc7df822bcd3f28a33a27f868b3d Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 5 Mar 2024 17:18:28 +0100 Subject: [PATCH 08/12] Include : - aggiunta di funzioni per il recupero della controimmagine di punti e curve su una superficie di Bezier. --- EGkSurfBezier.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index a164d63..0ef4418 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -14,6 +14,7 @@ #pragma once #include "/EgtDev/Include/EGkSurf.h" +#include "/EgtDev/Include/EGkCurveComposite.h" #include "/EgtDev/Include/EgtPointerOwner.h" class PolyLine ; @@ -61,12 +62,13 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool GetLeaves ( std::vector>& vLeaves) const = 0 ; virtual bool GetTriangles2D( std::vector>& 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, const Point3d& ptIPrevint, int nTPrev = -1 ) const = 0 ; - virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam) const = 0 ; - virtual ICurveComposite* UnprojectCurveFromStm( const ICurveComposite* pCC) 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 = 0 ; + virtual bool UnprojectCurveFromStm( const ICurveComposite* pCC, ICRVCOMPOPVECTOR& vpCC) const = 0 ; virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; // taglio la parte della superficie dalla parte positiva del versore del piano. // Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio virtual bool CalcPoles( void) ; // funzione da chiamare per calcolare i poli della superficie. NECESSARIO se si vuole tagliare la superficie con un piano + virtual bool IncreaseUV( double& dU, double dx, bool bUOrV) const = 0 ; } ; //----------------------------------------------------------------------------- From 3f86c9f33367d4353bc8a3f07445816df4b76d22 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 8 Mar 2024 16:35:01 +0100 Subject: [PATCH 09/12] Include : - migliorate le funzioni per il recupero delle coordinate parametriche di un punto su una sup di bezier. --- EGkSurfBezier.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index 0ef4418..dcba8a0 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -63,12 +63,15 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool GetTriangles2D( std::vector>& 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, const Point3d& ptIPrev, bool* bTroughEdge = nullptr) const = 0 ; - virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam, const Point3d& ptIPrev, bool* bTroughEdge = nullptr) const = 0 ; - virtual bool UnprojectCurveFromStm( const ICurveComposite* pCC, ICRVCOMPOPVECTOR& vpCC) const = 0 ; - virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; // taglio la parte della superficie dalla parte positiva del versore del piano. - // Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio - virtual bool CalcPoles( void) ; // funzione da chiamare per calcolare i poli della superficie. NECESSARIO se si vuole tagliare la superficie con un piano - virtual bool IncreaseUV( double& dU, double dx, bool bUOrV) 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 ; + // taglio la parte della superficie dalla parte positiva del versore del piano. + // Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio + virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; + // funzione da chiamare per calcolare i poli della superficie. NECESSARIO se si vuole tagliare la superficie con un piano + virtual bool CalcPoles( void) ; + 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 ; } ; //----------------------------------------------------------------------------- From 6cb8988822837647131877ff405deca0f732869b Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 14 Mar 2024 10:05:25 +0100 Subject: [PATCH 10/12] Include : - aggiunta la funzione getEdges3D per le sup di Bezier. --- EGkSurfBezier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index dcba8a0..46594cc 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -69,9 +69,10 @@ class __declspec( novtable) ISurfBezier : public ISurf // Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; // funzione da chiamare per calcolare i poli della superficie. NECESSARIO se si vuole tagliare la superficie con un piano - virtual bool CalcPoles( void) ; + virtual bool CalcPoles( void) ; 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 GetEdges3D( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier, int nEdge = -1) const = 0 ; } ; //----------------------------------------------------------------------------- From c709b90c745a406f318b229dcd4b6cd623291cd8 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 14 Mar 2024 18:02:56 +0100 Subject: [PATCH 11/12] Include : - aggiunto il caso delle curve compo degeneri, composte da un solo punto. --- EGkCurveComposite.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EGkCurveComposite.h b/EGkCurveComposite.h index a8d55b3..b0b47d7 100644 --- a/EGkCurveComposite.h +++ b/EGkCurveComposite.h @@ -70,6 +70,8 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual bool GetCurveTempProp( int nCrv, int& nProp, int nPropInd = 0) const = 0 ; virtual bool SetCurveTempParam( int nCrv, double dParam, int nParamInd = 0) = 0 ; virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const = 0 ; + virtual bool FromPoint( Point3d& ptStart) = 0 ; + virtual bool GetOnlyPoint( Point3d& ptStart) const = 0 ; } ; //----------------------------------------------------------------------------- From e4d75803ce8b3faf64f3d7ac9518b7dc2fca1605 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 21 Mar 2024 15:02:17 +0100 Subject: [PATCH 12/12] Include : - modificato il nome di una funzione per le Bezier. --- EGkSurfBezier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index 46594cc..eaffd02 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -72,7 +72,7 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool CalcPoles( void) ; 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 GetEdges3D( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier, int nEdge = -1) const = 0 ; + virtual bool GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier, int nEdge = -1) const = 0 ; } ; //-----------------------------------------------------------------------------