Include :
- aggiornamento interfacce - aggiunto oggetto per gestire curve temporanee passate in locale.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCurveLocal.h Data : 01.02.15 Versione : 1.6b1
|
||||
// Contenuto : Classe gestione curve nel locale desiderato.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 01.02.15 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDEv/Include/EgkGeomDB.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class CurveLocal
|
||||
{
|
||||
public :
|
||||
CurveLocal( IGeomDB* pGeomDB, int nCrvId, const Frame3d& frLoc)
|
||||
: pCrv( nullptr), pCopy( nullptr)
|
||||
{ // verifica dei parametri
|
||||
if ( pGeomDB == nullptr || &frLoc == nullptr)
|
||||
return ;
|
||||
// recupero riferimento della curva
|
||||
Frame3d frCrv ;
|
||||
if ( ! pGeomDB->GetGlobFrame( nCrvId, frCrv))
|
||||
return ;
|
||||
// recupero la curva
|
||||
pCrv = GetCurve( pGeomDB->GetGeoObj( nCrvId)) ;
|
||||
// se i riferimenti coincidono non devo fare altro
|
||||
if ( AreSameFrame( frCrv, frLoc))
|
||||
return ;
|
||||
// copio la curva e la porto in locale
|
||||
pCopy = pCrv->Clone() ;
|
||||
if ( pCopy == nullptr) {
|
||||
pCrv = nullptr ;
|
||||
return ;
|
||||
}
|
||||
pCopy->LocToLoc( frCrv, frLoc) ;
|
||||
pCrv = pCopy ;
|
||||
}
|
||||
~CurveLocal( void)
|
||||
{ // se necessario libero la memoria
|
||||
if ( pCopy != nullptr)
|
||||
delete pCopy ;
|
||||
pCopy = nullptr ;
|
||||
pCrv = nullptr ;
|
||||
}
|
||||
const ICurve* Get( void)
|
||||
{ return pCrv ; }
|
||||
|
||||
private :
|
||||
const ICurve* pCrv ;
|
||||
ICurve* pCopy ;
|
||||
} ;
|
||||
@@ -73,6 +73,7 @@ class __declspec( novtable) IGeomDB
|
||||
virtual bool RelocateGlob( int nId, int nRefId, int nSonBeforeAfter = GDB_SON) = 0 ;
|
||||
virtual bool ChangeId( int nId, int nNewId) = 0 ;
|
||||
virtual bool Erase( int nId) = 0 ;
|
||||
virtual bool EmptyGroup( int nId) = 0 ;
|
||||
virtual bool Translate( int nId, const Vector3d& vtMove) = 0 ;
|
||||
virtual bool TranslateGlob( int nId, const Vector3d& vtMove) = 0 ;
|
||||
virtual bool TranslateGroup( int nId, const Vector3d& vtMove) = 0 ;
|
||||
|
||||
@@ -103,6 +103,7 @@ class PolyLine
|
||||
EGK_EXPORT bool GetMaxDistanceFromLine( double& dMaxDist, const Point3d& ptAx,
|
||||
const Vector3d& vtAx, double dLen, bool bIsSegment = true) const ;
|
||||
EGK_EXPORT bool AdjustForMaxSegmentLen( double& dMaxLen) ;
|
||||
EGK_EXPORT bool Invert( bool bInvertU = true) ;
|
||||
|
||||
private :
|
||||
int m_nRejected ;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkStmFromCurves.h Data : 01.02.15 Versione : 1.6b1
|
||||
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 19.05.14 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EgkCurve.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 ISurfTriMesh* GetSurfTriMeshByContour( const ICurve& Curve, double dLinTol) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByExtrusion( const ICurve& Curve, const Vector3d& vtExtr,
|
||||
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRevolve( const ICurve& Curve, const Point3d& ptAx,
|
||||
const Vector3d& vtAx, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve& Curve, const Point3d& ptAx, const Vector3d& vtAx,
|
||||
double dAngRotDeg, double dMove, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve& Curve1, const ICurve& Curve2, double dLinTol = 10 * EPS_SMALL) ;
|
||||
@@ -144,11 +144,14 @@ EIN_EXPORT int __stdcall EgtCreatePolygonFromSide( int nParentId, int nNumSides
|
||||
// GeomDB Create Surf
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTriMeshByContour( int nParentId, int nCrvId, double dLinTol) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTriMeshByExtrusion( int nParentId, int nCrvId, const double vtExtr[3],
|
||||
double dLinTol, int nRefType) ;
|
||||
BOOL bCapEnds, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTriMeshByRevolve( int nParentId, int nCrvId,
|
||||
const double ptAx[3], const double vtAx[3],
|
||||
BOOL bCapEnds, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTriMeshByScrewing( int nParentId, int nCrvId,
|
||||
const double ptAx[3], const double vtAx[3],
|
||||
double dAngRotDeg, double dMove, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTriMeshRuled( int nParentId, int nCrvId1, int nCrvId2, double dLinTol) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTriMeshRuled( int nParentId, int nCrvId1, int nCrvId2, double dLinTol) ;
|
||||
|
||||
// GeomDB PartLayer
|
||||
EIN_EXPORT int __stdcall EgtGetCurrPart( void) ;
|
||||
@@ -185,6 +188,7 @@ EIN_EXPORT BOOL __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAft
|
||||
EIN_EXPORT BOOL __stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtChangeId( int nId, int nNewId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtErase( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtEmptyGroup( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtGetType( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetTitle( int nId, wchar_t*& wsTitle) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGroupDump( int nId, wchar_t*& wsDump) ;
|
||||
|
||||
Reference in New Issue
Block a user