From 82a68d3a72cc01c82dd0aaaaa3b2eb5f9b28ac26 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 18 Aug 2015 07:41:21 +0000 Subject: [PATCH] Include : - aggiunti prototipi per creazione Regioni - aggiornamenti vari. --- EGkCurve.h | 6 +++-- EGkCurveAux.h | 5 +++++ EGkCurveByApprox.h | 1 + EGkCurveComposite.h | 2 +- EGkGeomDB.h | 1 + EGkIntersCurves.h | 19 +++++++--------- EGkIntervals.h | 5 ++++- EGkPlane3d.h | 6 +++-- EGkSfrCreate.h | 55 +++++++++++++++++++++++++++++++++++++++++++++ EGkStmFromCurves.h | 4 ++-- EGkSurfFlatRegion.h | 11 +++++---- EGkSurfTriMesh.h | 6 ++--- EInAPI.h | 13 ++++++----- EMkMachMgr.h | 6 ++--- EXeExecutor.h | 26 ++++++++++++--------- 15 files changed, 122 insertions(+), 44 deletions(-) create mode 100644 EGkSfrCreate.h diff --git a/EGkCurve.h b/EGkCurve.h index 03ba6c4..53a3e3f 100644 --- a/EGkCurve.h +++ b/EGkCurve.h @@ -71,6 +71,7 @@ class __declspec( novtable) ICurve : public IGeoObj virtual bool GetLengthAtPoint( const Point3d& ptP, double& dLen, double dTol = EPS_SMALL) const = 0 ; virtual bool GetNearestExtremityToPoint( const Point3d& ptP, bool& bStart) const = 0 ; virtual bool GetAreaXY( double& dArea) const = 0 ; + virtual bool GetArea( Plane3d& plPlane, double& dArea) const = 0 ; virtual bool ApproxWithLines( double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const = 0 ; virtual bool ApproxWithArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) const = 0 ; virtual bool ApproxWithArcsEx( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) const = 0 ; @@ -102,5 +103,6 @@ inline ICurve* GetCurve( IGeoObj* pGObj) //---------------------------------------------------------------------------- // Raccolte di puntatori a ICurve -typedef std::vector ICURVEPVECTOR ; // vettore di puntatori a ICurve -typedef std::list ICURVEPLIST ; // lista di puntatori a ICurve +typedef std::vector CICURVEPVECTOR ; // vettore di puntatori a const ICurve +typedef std::vector ICURVEPVECTOR ; // vettore di puntatori a ICurve +typedef std::list ICURVEPLIST ; // lista di puntatori a ICurve diff --git a/EGkCurveAux.h b/EGkCurveAux.h index c25ea95..bdab858 100644 --- a/EGkCurveAux.h +++ b/EGkCurveAux.h @@ -59,3 +59,8 @@ EGK_EXPORT bool NurbsCurveCanonicalize( CNurbsData& cnData) ; //---------------------------------------------------------------------------- //! Trasforma una curva Nurbs standard in una nuova curva di Bezier semplice o composta EGK_EXPORT ICurve* NurbsToBezierCurve( const CNurbsData& cnData) ; + +//---------------------------------------------------------------------------- +//! Proietta la curva sul piano indicato +EGK_EXPORT ICurve* ProjectCurveOnPlane( const ICurve& crCrv, const Plane3d& plPlane) ; + diff --git a/EGkCurveByApprox.h b/EGkCurveByApprox.h index c038d12..83d92ef 100644 --- a/EGkCurveByApprox.h +++ b/EGkCurveByApprox.h @@ -41,6 +41,7 @@ class CurveByApprox EGK_EXPORT enum TYPE { ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ; private : + bool CalcParameterization( void) ; bool CalcAkimaTangents( bool bCorner) ; bool CalcBesselTangents( void) ; bool CalcSplitPoints( double dLinTol, double dAngTolDeg, double dLinFea) ; diff --git a/EGkCurveComposite.h b/EGkCurveComposite.h index 45a1540..0cf4e04 100644 --- a/EGkCurveComposite.h +++ b/EGkCurveComposite.h @@ -30,7 +30,7 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual bool PolygonCenterCorner( int nSides, const Point3d& ptCen, const Point3d& ptCorner, const Vector3d& vtN) = 0 ; virtual bool PolygonCenterMidSide( int nSides, const Point3d& ptCen, const Point3d& ptMidSide, const Vector3d& vtN) = 0 ; virtual bool PolygonSide( int nSides, const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN) = 0 ; - virtual int GetCurveNumber( void) const = 0 ; + virtual int GetCurveCount( void) const = 0 ; virtual const ICurve* GetCurve( int nCrv) const = 0 ; virtual const ICurve* GetFirstCurve( void) const = 0 ; virtual const ICurve* GetNextCurve( void) const = 0 ; diff --git a/EGkGeomDB.h b/EGkGeomDB.h index 6097dc9..6903908 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -133,6 +133,7 @@ class __declspec( novtable) IGeomDB virtual bool ResetMark( int nId) = 0 ; virtual bool GetMark( int nId, int& nMark) const = 0 ; virtual bool GetCalcMark( int nId, int& nMark) const = 0 ; + virtual bool CopyMaterial( int nIdSou, int nIdDest) = 0 ; virtual bool SetDefaultMaterial( Color cCol) = 0 ; virtual bool GetDefaultMaterial( Color& cCol) const = 0 ; virtual bool SetMaterial( int nId, int nMat) = 0 ; diff --git a/EGkIntersCurves.h b/EGkIntersCurves.h index 6133710..eee98b2 100644 --- a/EGkIntersCurves.h +++ b/EGkIntersCurves.h @@ -16,7 +16,6 @@ #include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkCurve.h" -#include "/EgtDev/Include/EgtPointerOwner.h" //----------------------- Macro per import/export ---------------------------- #undef EGK_EXPORT @@ -124,6 +123,7 @@ class IntersCurveCurve void CrvCompoLineCalculate( const ICurve& CurveA, const ICurve& CurveB) ; void CrvCompoArcCalculate( const ICurve& CurveA, const ICurve& CurveB) ; void CrvCompoCrvCompoCalculate( const ICurve& CurveA, const ICurve& CurveB) ; + bool AdjustIntersParams( bool bAdjCrvA, bool bAdjCrvB) ; bool SwapInfoAB( ICCIVECTOR& Info, int IndCrvOrd) ; bool CalcCurveClassification( const ICurve* pCurve, const ICCIVECTOR& Info, CRVCVECTOR& ccClass) ; bool CalcCurveInOrOut( const ICurve* pCurveA, const ICurve* pCurveB, CRVCVECTOR& ccClass) ; @@ -133,9 +133,7 @@ class IntersCurveCurve bool m_bOverlaps ; int m_nNumInters ; ICCIVECTOR m_Info ; - const ICurve* m_pOriCrv[2] ; // puntatori alle curve originali - const ICurve* m_pCurve[2] ; // puntatori alle curve usate nei calcoli (originali o temporanee) - PtrOwner m_pTmpCrv[2] ; // eventuale esplosione temporanea delle curve + const ICurve* m_pCurve[2] ; // puntatori alle curve } ; //----------------------------------------------------------------------------- @@ -150,9 +148,9 @@ class SelfIntersCurve //! Indica la presenza di intersezioni con sovrapposizioni EGK_EXPORT bool GetOverlaps( void) ; //! Restituisce il numero di auto-intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno) - EGK_EXPORT int GetNumInters( void) ; + EGK_EXPORT int GetIntersCount( void) ; //! Restituisce il numero di auto-intersezioni in cui la curva si attraversa (intersezioni doppie coincidenti e sovrapposte contano uno) - EGK_EXPORT int GetNumCrossInters( void) ; + EGK_EXPORT int GetCrossIntersCount( void) ; //! Restituisce informazioni sull'auto-intersezione di indice nInd ( 0 based) EGK_EXPORT bool GetIntCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ; //! Restituisce il punto di auto-intersezione pių vicino al punto passato @@ -161,14 +159,13 @@ class SelfIntersCurve private : SelfIntersCurve( void) ; bool IsArcToApprox( const ICurve& Curve) ; - void CrvCompoCrvCompoCalculate( const ICurve& CurveA, const ICurve& CurveB) ; + bool GetCurveParamFromApproxParam( double& dU, const ICurve* pCalcCrv, const DBLVECTOR& vCalcPar) ; + bool AdjustIntersParams( bool bAdjCrv, const ICurve* pCalcCrv, const DBLVECTOR& vCalcPar) ; bool SwapInfoAB( ICCIVECTOR& Info, int IndCrvOrd) ; private : bool m_bOverlaps ; - int m_nNumInters ; + int m_nIntersCount ; ICCIVECTOR m_Info ; - const ICurve* m_pOriCrv ; // puntatore alla curva originale - const ICurve* m_pCurve ; // puntatore alla curva usata nei calcoli (originale o temporanea) - PtrOwner m_pTmpCrv ; // eventuale esplosione temporanea della curva + const ICurve* m_pCurve ; // puntatore alla curva originale } ; diff --git a/EGkIntervals.h b/EGkIntervals.h index aaa598f..44781c5 100644 --- a/EGkIntervals.h +++ b/EGkIntervals.h @@ -35,9 +35,12 @@ class Intervals EGK_EXPORT void Set( double dMin, double dMax) ; EGK_EXPORT void Add( double dMin, double dMax) ; EGK_EXPORT void Remove( double dMin, double dMax) ; + EGK_EXPORT void Union( const Intervals& Other) ; + EGK_EXPORT void Intersection( const Intervals& Other) ; + EGK_EXPORT void Difference( const Intervals& Other) ; EGK_EXPORT bool IsEmpty( void) const { return m_lInts.empty() ; } - EGK_EXPORT int GetNumbers( void) const + EGK_EXPORT int GetCount( void) const { return int( m_lInts.size()) ; } EGK_EXPORT bool GetMinMax( double& dMin, double& dMax) ; EGK_EXPORT bool GetFirst( double& dMin, double& dMax) ; diff --git a/EGkPlane3d.h b/EGkPlane3d.h index f55ac9e..3f49888 100644 --- a/EGkPlane3d.h +++ b/EGkPlane3d.h @@ -27,12 +27,14 @@ class Plane3d { Point3d ptP = ORIG + dDist * vtN ; if ( ! ptP.ToGlob( frRef) || ! vtN.ToGlob( frRef)) return false ; - dDist = ( ptP - ORIG) * vtN ; } + dDist = ( ptP - ORIG) * vtN ; + return true ; } bool ToLoc( const Frame3d& frRef) { Point3d ptP = ORIG + dDist * vtN ; if ( ! ptP.ToLoc( frRef) || ! vtN.ToLoc( frRef)) return false ; - dDist = ( ptP - ORIG) * vtN ; } + dDist = ( ptP - ORIG) * vtN ; + return true ; } bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) { if ( AreSameFrame( frOri, frDest)) return true ; diff --git a/EGkSfrCreate.h b/EGkSfrCreate.h new file mode 100644 index 0000000..bff3ef4 --- /dev/null +++ b/EGkSfrCreate.h @@ -0,0 +1,55 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkSfrCreate.h Data : 10.08.15 Versione : 1.6h3 +// Contenuto : Dichiarazione funzioni per creazione superfici Sfr : +// Rectangle, Disk, FromCurves. +// +// +// Modifiche : 10.08.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkSurfFlatRegion.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 ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dLen) ; +EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ; +EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ; + +//---------------------------------------------------------------------------- +class SurfFlatRegionByContours +{ + public : + EGK_EXPORT SurfFlatRegionByContours( bool bAllowedMore = true, bool bAllowedMultiChunk = true) + : m_bAllowedMore( bAllowedMore), m_bAllowedMultiChunk( bAllowedMultiChunk), m_bFirst( true) {} + EGK_EXPORT ~SurfFlatRegionByContours( void) ; + EGK_EXPORT bool AddCurve( ICurve* pCrv) ; + EGK_EXPORT ISurfFlatRegion* GetSurf( void) ; + EGK_EXPORT bool AllCurvesUsed( void) ; + + private : + bool Prepare( void) ; + + private : + typedef std::pair INDAREA ; // coppia indice, area + typedef std::vector INDAREAVECTOR ; // vettore di coppie indice, area + + private : + bool m_bAllowedMore ; // ammesse pių regioni + bool m_bAllowedMultiChunk ; // ammesse regioni con pių componenti disgiunti (chunk) + bool m_bFirst ; // flag per prima superficie non ancora richiesta + ICURVEPVECTOR m_vpCrv ; // vettore di puntatori a curve, l'oggetto ne č possessore + INDAREAVECTOR m_vArea ; // vettore indice + area di ogni curva +} ; \ No newline at end of file diff --git a/EGkStmFromCurves.h b/EGkStmFromCurves.h index 4abec3b..d5520be 100644 --- a/EGkStmFromCurves.h +++ b/EGkStmFromCurves.h @@ -26,10 +26,10 @@ //---------------------------------------------------------------------------- EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByFlatContour( const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ; -EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRegion( const ICURVEPVECTOR& vpCurve, double dLinTol = 10 * EPS_SMALL) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRegion( const CICURVEPVECTOR& vpCurve, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByExtrusion( const ICurve* pCurve, const Vector3d& vtExtr, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; -EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRegionExtrusion( const ICURVEPVECTOR& vpCurve, const Vector3d& vtExtr, +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRegionExtrusion( const CICURVEPVECTOR& vpCurve, const Vector3d& vtExtr, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRevolve( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; diff --git a/EGkSurfFlatRegion.h b/EGkSurfFlatRegion.h index 03bc8c1..ce41ee4 100644 --- a/EGkSurfFlatRegion.h +++ b/EGkSurfFlatRegion.h @@ -24,13 +24,16 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf public : virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ; virtual bool Clear( void) ; - virtual bool SetExtLoop( const ICurve& cCrv) = 0 ; - virtual bool SetExtLoop( ICurve* pCrv) = 0 ; + virtual bool AddExtLoop( const ICurve& cCrv) = 0 ; + virtual bool AddExtLoop( ICurve* pCrv) = 0 ; virtual bool AddIntLoop( const ICurve& cCrv) = 0 ; virtual bool AddIntLoop( ICurve* pCrv) = 0 ; - virtual ICurve* GetLoop( int nLoop) const = 0 ; // nLoop=0 esterno, successivi interni - virtual int GetIntLoopNumber( void) const = 0 ; + virtual const Vector3d& GetNormVersor( void) const = 0 ; + virtual int GetChunkCount( void) const = 0 ; + virtual int GetLoopCount( int nChunk) const = 0 ; + virtual ICurve* GetLoop( int nChunk, int nLoop) const = 0 ; // nChunk 0-based, nLoop 0-based (1°esterno, successivi interni) virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ; + virtual ISurfFlatRegion* CloneChunk( int nChunk) const = 0 ; virtual bool GetCurveClassification( const ICurve& Crv, CRVCVECTOR& ccClass) const = 0 ; } ; diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 9bbb854..b5c1ec5 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -44,8 +44,8 @@ class __declspec( novtable) ISurfTriMesh : public ISurf double dAngRot, double dStepRot, double dMove) = 0 ; virtual bool DoCompacting( void) = 0 ; virtual bool DoSewing( const ISurfTriMesh& stmOther, const Frame3d& frOther = GLOB_FRM) = 0 ; - virtual int GetVertexNum( void) const = 0 ; - virtual int GetTriangleNum( void) const = 0 ; + virtual int GetVertexCount( void) const = 0 ; + virtual int GetTriangleCount( void) const = 0 ; virtual int GetVertexSize( void) const = 0 ; virtual int GetTriangleSize( void) const = 0 ; virtual double GetLinearTolerance( void) = 0 ; @@ -63,7 +63,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool GetVertexSmoothNormal( int nV, int nT, Vector3d& vtN) const = 0 ; virtual bool GetTriangleBoundaryEdges( int nId, TriFlags3d& TFlags) const = 0 ; virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ; - virtual int GetFacetNum( void) const = 0 ; + virtual int GetFacetCount( void) const = 0 ; virtual int GetFacetSize( void) const = 0 ; virtual int GetFacetFromTria( int nT) const = 0 ; virtual bool GetAllTriaInFacet( int nF, INTVECTOR& vT) const = 0 ; diff --git a/EInAPI.h b/EInAPI.h index 03a5ba6..f9f42f9 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -224,7 +224,7 @@ EIN_EXPORT int __stdcall EgtGetCurrPart( void) ; EIN_EXPORT int __stdcall EgtGetCurrLayer( void) ; EIN_EXPORT BOOL __stdcall EgtSetCurrPartLayer( int nPartId, int nLayerId) ; EIN_EXPORT BOOL __stdcall EgtResetCurrPartLayer( void) ; -EIN_EXPORT int __stdcall EgtGetPartNbr( BOOL bOnlyVisible) ; +EIN_EXPORT int __stdcall EgtGetPartCount( BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetFirstPart( BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetNextPart( int nId, BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetLastPart( BOOL bOnlyVisible) ; @@ -312,7 +312,7 @@ EIN_EXPORT BOOL __stdcall EgtDeselectAll( void) ; EIN_EXPORT BOOL __stdcall EgtSelectGroupObjs( int nGroupId) ; EIN_EXPORT BOOL __stdcall EgtDeselectGroupObjs( int nGroupId) ; EIN_EXPORT BOOL __stdcall EgtIsSelectedObj( int nId) ; -EIN_EXPORT int __stdcall EgtGetSelectedObjNbr( void) ; +EIN_EXPORT int __stdcall EgtGetSelectedObjCount( void) ; EIN_EXPORT int __stdcall EgtGetFirstSelectedObj( void) ; EIN_EXPORT int __stdcall EgtGetNextSelectedObj( void) ; EIN_EXPORT int __stdcall EgtGetLastSelectedObj( void) ; @@ -356,8 +356,9 @@ EIN_EXPORT int __stdcall EgtExplodeCurveCompo( int nId, int* pnCount) ; // GeomDb Surf Modify EIN_EXPORT BOOL __stdcall EgtInvertSurface( int nId) ; +EIN_EXPORT int __stdcall EgtExplodeSurface( int nId, int* pnCount) ; +EIN_EXPORT int __stdcall EgtExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; -EIN_EXPORT int __stdcall EgtExplodeSurfTm( int nId, int* pnCount) ; // Geo Snap Vector/Point/Frame EIN_EXPORT BOOL __stdcall EgtStartPoint( int nId, int nRefId, double ptP[3]) ; @@ -388,7 +389,9 @@ EIN_EXPORT BOOL __stdcall EgtArcAngCenter( int nId, double* pdAngDeg) ; EIN_EXPORT BOOL __stdcall EgtArcDeltaN( int nId, double* pdDeltaN) ; EIN_EXPORT BOOL __stdcall EgtArcNormVersor( int nId, int nRefId, double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3]) ; -EIN_EXPORT int __stdcall EgtSurfTmFacetNbr( int nId) ; +EIN_EXPORT BOOL __stdcall EgtSurfFrNormVersor( int nId, int nRefId, double vtNorm[3]) ; +EIN_EXPORT int __stdcall EgtSurfFrChunkCount( int nId) ; +EIN_EXPORT int __stdcall EgtSurfTmFacetCount( int nId) ; EIN_EXPORT int __stdcall EgtSurfTmFacetFromTria( int nId, int nT) ; EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNearestEndPoint( int nId, int nFacet, const double ptNear[3], int nRefId, double ptEnd[3], double vtNorm[3]) ; @@ -426,7 +429,7 @@ EIN_EXPORT BOOL __stdcall EgtPackPart( int nId, double dXmax, double dOffs) ; // Machining EIN_EXPORT BOOL __stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir) ; -EIN_EXPORT int __stdcall EgtGetMachGroupNbr( void) ; +EIN_EXPORT int __stdcall EgtGetMachGroupCount( void) ; EIN_EXPORT int __stdcall EgtGetFirstMachGroup( void) ; EIN_EXPORT int __stdcall EgtGetNextMachGroup( int nId) ; EIN_EXPORT int __stdcall EgtAddMachGroup( const wchar_t* wsName, const wchar_t* wsMachineName) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index e2cf614..83f62a9 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -35,7 +35,7 @@ class __declspec( novtable) IMachMgr virtual bool Update( void) = 0 ; virtual bool Insert( int nInsGrp) = 0 ; // MachGroups - virtual int GetMachGroupNbr( void) const = 0 ; + virtual int GetMachGroupCount( void) const = 0 ; virtual int GetFirstMachGroup( void) const = 0 ; virtual int GetNextMachGroup( int nId) const = 0 ; virtual bool GetMachGroupNewName( std::string& sName) const = 0 ; @@ -47,7 +47,7 @@ class __declspec( novtable) IMachMgr virtual bool ResetCurrMachGroup( void) = 0 ; virtual int GetCurrMachGroup( void) const = 0 ; // RawParts - virtual int GetRawPartNbr( void) const = 0 ; + virtual int GetRawPartCount( void) const = 0 ; virtual int GetFirstRawPart( void) const = 0 ; virtual int GetNextRawPart( int nId) const = 0 ; virtual int AddRawPart( const Point3d& ptOrig, double dWidth, double dLen, double dHeight, Color cCol) = 0 ; @@ -59,7 +59,7 @@ class __declspec( novtable) IMachMgr virtual bool MoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag) = 0 ; virtual bool MoveRawPart( int nRawId, const Vector3d& vtMove) = 0 ; // Parts - virtual int GetPartInRawPartNbr( int nRawId) const = 0 ; + virtual int GetPartInRawPartCount( int nRawId) const = 0 ; virtual int GetFirstPartInRawPart( int nRawId) const = 0 ; virtual int GetNextPartInRawPart( int nId) const = 0 ; virtual bool AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId) = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index be9c7b9..1fb4d5f 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -190,7 +190,10 @@ EXE_EXPORT int ExeCreatePolygonFromApothem( int nParentId, int nNumSides, const EXE_EXPORT int ExeCreatePolygonFromSide( int nParentId, int nNumSides, const Point3d& ptIni, const Point3d& ptFin, int nRefType) ; // GeomDB Create Surf -EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, INTVECTOR& vCrvIds) ; +EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, INTVECTOR& vCrvIds, int* pnCount) ; +EXE_EXPORT int ExeCreateSurfFrRectangle( int nParentId, const Point3d& ptIni, const Point3d& ptCross, int nRefType) ; +EXE_EXPORT int ExeCreateSurfFrStadium( int nParentId, const Point3d& ptIni, const Point3d& ptCross, int nRefType) ; +EXE_EXPORT int ExeCreateSurfFrDisk( int nParentId, const Point3d& ptOrig, double dRad, int nRefType) ; EXE_EXPORT int ExeCreateSurfTmBBox( int nParentId, const BBox3d& b3Box, int nRefType) ; EXE_EXPORT int ExeCreateSurfTmBox( int nParentId, const Point3d& ptIni, const Point3d& ptCross, const Point3d& ptDir, double dHeight, int nRefType) ; @@ -225,7 +228,7 @@ EXE_EXPORT int ExeGetCurrPart( void) ; EXE_EXPORT int ExeGetCurrLayer( void) ; EXE_EXPORT bool ExeSetCurrPartLayer( int nPartId, int nLayerId) ; EXE_EXPORT bool ExeResetCurrPartLayer( void) ; -EXE_EXPORT int ExeGetPartNbr( bool bOnlyVisible) ; +EXE_EXPORT int ExeGetPartCount( bool bOnlyVisible) ; EXE_EXPORT int ExeGetFirstPart( bool bOnlyVisible) ; EXE_EXPORT int ExeGetNextPart( int nId, bool bOnlyVisible) ; EXE_EXPORT int ExeGetLastPart( bool bOnlyVisible) ; @@ -316,7 +319,7 @@ EXE_EXPORT bool ExeDeselectAll( void) ; EXE_EXPORT bool ExeSelectGroupObjs( int nGroupId) ; EXE_EXPORT bool ExeDeselectGroupObjs( int nGroupId) ; EXE_EXPORT bool ExeIsSelectedObj( int nId) ; -EXE_EXPORT int ExeGetSelectedObjNbr( void) ; +EXE_EXPORT int ExeGetSelectedObjCount( void) ; EXE_EXPORT int ExeGetFirstSelectedObj( void) ; EXE_EXPORT int ExeGetNextSelectedObj( void) ; EXE_EXPORT int ExeGetLastSelectedObj( void) ; @@ -336,6 +339,7 @@ EXE_EXPORT int ExeSplitText( int nId, int* pnCount) ; EXE_EXPORT bool ExeInvertCurve( const INTVECTOR& vIds) ; EXE_EXPORT bool ExeOffsetCurve( int nId, double dDist, int nType) ; EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol) ; +EXE_EXPORT bool ExeProjectCurveOnPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ; EXE_EXPORT bool ExeChangeClosedCurveStartPoint( int nId, const Point3d& ptP, int nRefType) ; EXE_EXPORT bool ExeModifyCurveStartPoint( int nId, const Point3d& ptP, int nRefType) ; EXE_EXPORT bool ExeModifyCurveEndPoint( int nId, const Point3d& ptP, int nRefType) ; @@ -364,9 +368,9 @@ EXE_EXPORT bool ExeMergeCurvesInCurveCompo( int nId, double dLinTol) ; // GeomDb Surf Modify EXE_EXPORT bool ExeInvertSurface( const INTVECTOR& vIds) ; -EXE_EXPORT int ExeExtractSurfFrLoop( int nId, int nLoop, int nDestGrpId) ; +EXE_EXPORT int ExeExplodeSurface( int nId, int* pnCount) ; +EXE_EXPORT int ExeExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ; EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; -EXE_EXPORT int ExeExplodeSurfTm( int nId, int* pnCount) ; // Geo Snap Vector/Point/Frame EXE_EXPORT bool ExeStartPoint( int nId, int nRefId, Point3d& ptP) ; @@ -388,7 +392,7 @@ EXE_EXPORT bool ExeCurveLengthAtPoint( int nId, const Point3d& ptOn, double dExt EXE_EXPORT bool ExeCurveNearestExtremityToPoint( int nId, const Point3d& ptP, bool& bStart) ; EXE_EXPORT bool ExeCurveExtrusion( int nId, int nRefId, Vector3d& vtExtr) ; EXE_EXPORT bool ExeCurveThickness( int nId, double* pdThick) ; -EXE_EXPORT bool ExeCurveSelfIntersNbr( int nId, int* pnCount) ; +EXE_EXPORT bool ExeCurveSelfIntersCount( int nId, int* pnCount) ; EXE_EXPORT bool ExeGetMinDistPointCurve( const Point3d& ptP, int nId, double* pdDist, double* pdU) ; EXE_EXPORT bool ExeGetMinDistPntSidePointCurve( const Point3d& ptP, int nId, const Vector3d& vtN, double* pdDist, Point3d& ptMin, int* pnSide) ; @@ -397,7 +401,9 @@ EXE_EXPORT bool ExeArcAngCenter( int nId, double* pdAngDeg) ; EXE_EXPORT bool ExeArcDeltaN( int nId, double* pdDeltaN) ; EXE_EXPORT bool ExeArcNormVersor( int nId, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeCurveCompoCenter( int nId, int nSimpCrv, int nRefId, Point3d& ptCen) ; -EXE_EXPORT int ExeSurfTmFacetNbr( int nId) ; +EXE_EXPORT bool ExeSurfFrNormVersor( int nId, int nRefId, Vector3d& vtNorm) ; +EXE_EXPORT int ExeSurfFrChunkCount( int nId) ; +EXE_EXPORT int ExeSurfTmFacetCount( int nId) ; EXE_EXPORT int ExeSurfTmFacetFromTria( int nId, int nT) ; EXE_EXPORT bool ExeSurfTmFacetNearestEndPoint( int nId, int nFacet, const Point3d& ptNear, int nRefId, Point3d& ptEnd, Vector3d& vtN) ; @@ -435,7 +441,7 @@ EXE_EXPORT bool ExePackPart( int nId, double dXmax, double dOffs) ; EXE_EXPORT bool ExeInitMachMgr( const std::string& sMachinesDir) ; EXE_EXPORT bool ExeUpdateMachMgr( void) ; EXE_EXPORT bool ExeInsertMachMgr( int nInsGrp) ; -EXE_EXPORT int ExeGetMachGroupNbr( void) ; +EXE_EXPORT int ExeGetMachGroupCount( void) ; EXE_EXPORT int ExeGetFirstMachGroup( void) ; EXE_EXPORT int ExeGetNextMachGroup( int nId) ; EXE_EXPORT int ExeAddMachGroup( const std::string& sName, const std::string& sMachineName) ; @@ -445,7 +451,7 @@ EXE_EXPORT int ExeGetMachGroupId( const std::string& sName) ; EXE_EXPORT bool ExeSetCurrMachGroup( int nMGroupId) ; EXE_EXPORT bool ExeResetCurrMachGroup( void) ; EXE_EXPORT int ExeGetCurrMachGroup( void) ; -EXE_EXPORT int ExeGetRawPartNbr( void) ; +EXE_EXPORT int ExeGetRawPartCount( void) ; EXE_EXPORT int ExeGetFirstRawPart( void) ; EXE_EXPORT int ExeGetNextRawPart( int nRawId) ; EXE_EXPORT int ExeAddRawPart( Point3d ptOrig, double dWidth, double dLength, double dHeight, Color cCol) ; @@ -456,7 +462,7 @@ EXE_EXPORT bool ExeRotateRawPart( int nRawId, const Vector3d& vtAx, double dAngR EXE_EXPORT bool ExeMoveToCornerRawPart( int nRawId, const Point3d& ptCorner, int nFlag) ; EXE_EXPORT bool ExeMoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag) ; EXE_EXPORT bool ExeMoveRawPart( int nRawId, const Vector3d& vtMove) ; -EXE_EXPORT int ExeGetPartInRawPartNbr( int nRawId) ; +EXE_EXPORT int ExeGetPartInRawPartCount( int nRawId) ; EXE_EXPORT int ExeGetFirstPartInRawPart( int nRawId) ; EXE_EXPORT int ExeGetNextPartInRawPart( int nPartId) ; EXE_EXPORT bool ExeAddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId) ;