From 80d151dfc95e7fece9ecf301d6721bee50c1bd9d Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 3 Apr 2015 07:36:08 +0000 Subject: [PATCH] Include : - aggiunti prototipi per creazione solidi standard - aggiornamenti vari. --- EGkStmFromCurves.h | 1 + EGkStmStandard.h | 32 ++++++++++++++++++++++++++++++++ EGkSurfTriMesh.h | 1 + EInAPI.h | 12 +++++++++++- EMkMachMgr.h | 4 ++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 EGkStmStandard.h diff --git a/EGkStmFromCurves.h b/EGkStmFromCurves.h index 911b8bf..4abec3b 100644 --- a/EGkStmFromCurves.h +++ b/EGkStmFromCurves.h @@ -35,4 +35,5 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRevolve( const ICurve* pCurve, const Po const Vector3d& vtAx, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, double dMove, double dLinTol = 10 * EPS_SMALL) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, double dLinTol = 10 * EPS_SMALL) ; diff --git a/EGkStmStandard.h b/EGkStmStandard.h new file mode 100644 index 0000000..9aabb75 --- /dev/null +++ b/EGkStmStandard.h @@ -0,0 +1,32 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkStmStandard.h Data : 31.03.15 Versione : 1.6c7 +// Contenuto : Dichiarazione funzioni per creazione superfici Stm +// standard : Box, Pyramid, Cylinder, Sphere, Cone. +// +// +// Modifiche : 31.03.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#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 ISurfTriMesh* GetSurfTriMeshBox( double dWidth, double dLen, double dHeight) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramid( double dWidth, double dLen, double dHeight) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCylinder( double dRadius, double dHeight, double dLinTol) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCone( double dRadius, double dHeight, double dLinTol) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSphere( double dRadius, double dLinTol) ; + diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 5886dab..5c2269c 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -36,6 +36,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ; virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ; virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ; + virtual bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) = 0 ; virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2) = 0 ; virtual bool CreateByRevolution( const PolyLine& PL, const Point3d& ptAx, const Vector3d& vtAx, double dAngRot, double dStepRot) = 0 ; diff --git a/EInAPI.h b/EInAPI.h index 2b87b0c..79756f9 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -165,6 +165,16 @@ EIN_EXPORT int __stdcall EgtCreatePolygonFromSide( int nParentId, int nNumSides const double ptFin[3], const double vtN[3], int nRefType) ; // GeomDB Create Surf +EIN_EXPORT int __stdcall EgtCreateSurfTmBox( int nParentId, const double ptIni[3], const double ptCross[3], + const double ptDir[3], double dHeight, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmPyramid( int nParentId, const double ptIni[3], const double ptCross[3], + const double ptDir[3], double dHeight, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmCylinder( int nParentId, const double ptOrig[3], const double vtN[3], + double dRad, double dHeight, double dLinTol, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmCone( int nParentId, const double ptOrig[3], const double vtN[3], + double dRad, double dHeight, double dLinTol, int nRefType) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmSphere( int nParentId, const double ptOrig[3], + double dRad, double dLinTol, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateSurfTmByFlatContour( int nParentId, int nCrvId, double dLinTol) ; EIN_EXPORT int __stdcall EgtCreateSurfTmByRegion( int nParentId, int nNumId, const int nCrvIds[], double dLinTol) ; EIN_EXPORT int __stdcall EgtCreateSurfTmByExtrusion( int nParentId, int nNumId, const int nCrvIds[], @@ -177,7 +187,7 @@ EIN_EXPORT int __stdcall EgtCreateSurfTmByRevolve( int nParentId, int nCrvId, EIN_EXPORT int __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId, const double ptAx[3], const double vtAx[3], double dAngRotDeg, double dMove, double dLinTol, int nRefType) ; -EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nCrvId1, int nCrvId2, double dLinTol) ; +EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, double dLinTol) ; EIN_EXPORT BOOL __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ; EIN_EXPORT int __stdcall EgtCreateSurfTmBySewing( int nParentId, int nNumId, const int nIds[], BOOL bErase) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index 5f6ec93..9b5f72e 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -27,10 +27,12 @@ class __declspec( novtable) IMachMgr { public : + // General virtual ~IMachMgr( void) {} virtual bool Init( IGeomDB* pGeomDB) = 0 ; virtual bool Update( void) = 0 ; virtual bool Insert( int nInsGrp) = 0 ; + // MachGroup virtual int GetMachGroupNbr( void) const = 0 ; virtual bool GetMachGroupNewName( std::string& sName) const = 0 ; virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) = 0 ; @@ -40,6 +42,8 @@ class __declspec( novtable) IMachMgr virtual bool SetCurrMachGroup( int nMGroup) = 0 ; virtual bool ResetCurrMachGroup( void) = 0 ; virtual bool GetCurrMachGroup( int& nMGroup) const ; + // RawPart & Part + virtual int AddRawPart( const Point3d& ptOrig, double dWidth, double dLen, double dHeight, Color cCol) = 0 ; } ; //-----------------------------------------------------------------------------