Include :

- aggiornamenti vari.
This commit is contained in:
Dario Sassi
2015-04-16 06:56:18 +00:00
parent 80d151dfc9
commit b3c5ae8b0d
12 changed files with 242 additions and 56 deletions
+2
View File
@@ -65,11 +65,13 @@ class EGK_EXPORT BBox3d
const Point3d& GetMax( void) const
{ return m_ptMax ; }
bool GetMinMax( Point3d& ptMin, Point3d& ptMax) const ;
bool GetMinDim( Point3d& ptMin, double& dDimX, double& dDimY, double& dDimZ) const ;
bool GetCenterExtent( Point3d& ptCenter, Vector3d& vtExtent) const ;
bool GetCenter( Point3d& ptCenter) const ;
bool GetRadius( double& dRad) const ;
bool ToGlob( const Frame3d& frRef) ;
bool ToLoc( const Frame3d& frRef) ;
bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ;
bool Encloses( const Point3d& ptP) const ;
bool EnclosesXY( const Point3d& ptP) const ;
bool Overlaps( const BBox3d& b3B) const ;
+1
View File
@@ -64,6 +64,7 @@ class __declspec( novtable) ICurve : public IGeoObj
virtual bool IsPointOn( const Point3d& ptP, double dTol = EPS_SMALL) const = 0 ;
virtual bool GetParamAtPoint( const Point3d& ptP, double& dPar, double dTol = EPS_SMALL) const = 0 ;
virtual bool GetLengthAtPoint( const Point3d& ptP, double& dLen, double dTol = EPS_SMALL) const = 0 ;
virtual bool GetAreaXY( double& dArea) const = 0 ;
virtual bool ApproxWithLines( double dLinTol, double dAngTolDeg, PolyLine& PL) const = 0 ;
virtual bool ApproxWithArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) const = 0 ;
virtual ICurve* CopyParamRange( double dUStart, double dUEnd) const = 0 ;
+1
View File
@@ -23,6 +23,7 @@ class __declspec( novtable) ICurveComposite : public ICurve
virtual bool Clear( void) = 0 ;
virtual bool AddCurve( const ICurve& cCrv, bool bEndOrStart = true, double dLinTol = EPS_SMALL) = 0 ;
virtual bool AddCurve( ICurve* pCrv, bool bEndOrStart = true, double dLinTol = EPS_SMALL) = 0 ;
virtual bool Close( void) = 0 ;
virtual bool FromSplit( const ICurve& cCrv, int nParts) = 0 ;
virtual bool FromPolyLine( const PolyLine& PL) = 0 ;
virtual bool FromPolyArc( const PolyArc& PA) = 0 ;
+10 -3
View File
@@ -13,6 +13,8 @@
#pragma once
#include <string>
//----------------- Costanti generali ------------------------------------------
const int GDB_ID_ROOT = 0 ;
@@ -65,6 +67,11 @@ const int GDB_MT_NULL = GDB_MT_PARENT ;
//----------------- Costanti flag di BBox --------------------------------------
enum BBoxFlag { BBF_STANDARD = 0,
BBF_ONLY_VISIBLE = 1,
BBF_IGNORE_TEXT = 2,
BBF_IGNORE_DIM = 4,
BBF_EXACT = 8} ;
BBF_EXACT = 2,
BBF_IGNORE_TEXT = 4,
BBF_IGNORE_DIM = 8} ;
//----------------- Costanti per Info di Sistema -------------------------------
const std::string GDB_SI_SOURCE = "!SOU" ;
const std::string GDB_SI_BASE = "!BAS" ;
const std::string GDB_SI_LIST = "!LST" ;
+16
View File
@@ -39,6 +39,22 @@ class __declspec( novtable) IGdbIterator
virtual bool GoToPrev( void) = 0 ;
virtual bool EraseAndGoToNext( void) = 0 ;
virtual bool EraseAndGoToPrev( void) = 0 ;
virtual bool GoToFirstNameInGroup( int nIdGroup, const std::string& sName) ;
virtual bool GoToFirstNameInGroup( const IGdbIterator& iIter, const std::string& sName) ;
virtual bool GoToNextName( const std::string& sName) ;
virtual bool GoToLastNameInGroup( int nIdGroup, const std::string& sName) ;
virtual bool GoToLastNameInGroup( const IGdbIterator& iIter, const std::string& sName) ;
virtual bool GoToPrevName( const std::string& sName) ;
virtual bool EraseAndGoToNextName( const std::string& sName) ;
virtual bool EraseAndGoToPrevName( const std::string& sName) ;
virtual bool GoToFirstGroupInGroup( int nIdGroup) = 0 ;
virtual bool GoToFirstGroupInGroup( const IGdbIterator& iIter) = 0 ;
virtual bool GoToNextGroup( void) = 0 ;
virtual bool GoToLastGroupInGroup( int nIdGroup) = 0 ;
virtual bool GoToLastGroupInGroup( const IGdbIterator& iIter) = 0 ;
virtual bool GoToPrevGroup( void) = 0 ;
virtual bool EraseAndGoToNextGroup( void) = 0 ;
virtual bool EraseAndGoToPrevGroup( void) = 0 ;
virtual int GetGdbType( void) const = 0 ;
virtual int GetGeoType( void) const = 0 ;
+13 -1
View File
@@ -20,7 +20,8 @@
#include "/EgtDev/Include/EGkGeoFrame3d.h"
#include "/EgtDev/Include/EGkGeoObj.h"
#include "/EgtDev/Include/EGkMaterial.h"
#include "/EgtDev/Include/EGtILogger.h"
#include "/EgtDev/Include/EgtNumCollection.h"
#include "/EgtDev/Include/EgtILogger.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
@@ -49,6 +50,10 @@ class __declspec( novtable) IGeomDB
virtual int GetNext( int nId) const = 0 ;
virtual int GetLastInGroup( int nIdGroup) const = 0 ;
virtual int GetPrev( int nId) const = 0 ;
virtual int GetFirstNameInGroup( int nGroupId, const std::string& sName) const = 0 ;
virtual int GetNextName( int nId, const std::string& sName) const = 0 ;
virtual int GetLastNameInGroup( int nGroupId, const std::string& sName) const = 0 ;
virtual int GetPrevName( int nId, const std::string& sName) const = 0 ;
virtual int GetFirstGroupInGroup( int nIdGroup) const = 0 ;
virtual int GetNextGroup( int nId) const = 0 ;
virtual int GetLastGroupInGroup( int nIdGroup) const = 0 ;
@@ -71,6 +76,7 @@ class __declspec( novtable) IGeomDB
virtual int CopyGlob( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) = 0 ;
virtual bool Relocate( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) = 0 ;
virtual bool RelocateGlob( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) = 0 ;
virtual bool GroupSwap( int nId1, int nId2, bool bSwapRef, bool bMark = false) = 0 ;
virtual bool ChangeId( int nId, int nNewId) = 0 ;
virtual bool Erase( int nId) = 0 ;
virtual bool EmptyGroup( int nId) = 0 ;
@@ -144,14 +150,20 @@ class __declspec( novtable) IGeomDB
virtual bool SetInfo( int nId, const std::string& sKey, double dInfo) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const Point3d& ptInfo) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const Vector3d& vtInfo) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const BBox3d& b3Info) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const Frame3d& frInfo) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const INTVECTOR& vnInfo) = 0 ;
virtual bool SetInfo( int nId, const std::string& sKey, const DBLVECTOR& vdInfo) = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, std::string& sInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, bool& bInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, int& nInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, double& dInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, Point3d& ptInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, Vector3d& vtInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, BBox3d& b3Info) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, Frame3d& frInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, INTVECTOR& vnInfo) const = 0 ;
virtual bool GetInfo( int nId, const std::string& sKey, DBLVECTOR& vdInfo) const = 0 ;
virtual bool ExistsInfo( int nId, const std::string& sKey) const = 0 ;
virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ;
// Material library
+63 -32
View File
@@ -15,6 +15,7 @@
#include "/EgtDev/Include/EGkVector3d.h"
#include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkFrame3d.h"
#include "/EgtDev/Include/EGkBBox3d.h"
#include "/EgtDev/Include/EGkColor.h"
#include "/EgtDev/Include/EGkGeoCollection.h"
#include "/EgtDev/Include/EgnLuaAux.h"
@@ -107,6 +108,34 @@ LuaGetParam( lua_State* L, int nInd, Frame3d& frPar)
return frPar.Set( ptOrig, vtDirX, vtDirY, vtDirZ) ;
}
//----------------------------------------------------------------------------
inline bool
LuaGetParam( lua_State* L, int nInd, BBox3d& b3Par)
{
if ( ! lua_istable( L, nInd))
return false ;
// recupero il minimo
lua_rawgeti( L, nInd, 1) ;
Point3d ptMin ;
if ( ! LuaGetParam( L, -1, ptMin))
return false ;
lua_pop( L, 1) ;
// recupero il massimo
lua_rawgeti( L, nInd, 2) ;
Point3d ptMax ;
if ( ! LuaGetParam( L, -1, ptMax))
return false ;
lua_pop( L, 1) ;
// assegno il box
if ( ptMin.x < ( ptMax.x + EPS_SMALL) &&
ptMin.y < ( ptMax.y + EPS_SMALL) &&
ptMin.z < ( ptMax.z + EPS_SMALL))
b3Par.Set( ptMin, ptMax) ;
else
b3Par.Reset() ;
return true ;
}
//----------------------------------------------------------------------------
inline bool
LuaGetParam( lua_State* L, int nInd, Color& colPar)
@@ -134,38 +163,6 @@ LuaGetParam( lua_State* L, int nInd, Color& colPar)
return true ;
}
//----------------------------------------------------------------------------
inline bool
LuaGetParam( lua_State* L, int nInd, INTVECTOR& vPar)
{
vPar.clear() ;
if ( lua_isnumber( L, nInd)) {
int nVal = int( lua_tointeger( L, nInd)) ;
vPar.push_back( nVal) ;
return true ;
}
else if ( lua_istable( L, nInd)) {
// lunghezza della tavola
lua_len( L, nInd) ;
if ( ! lua_isnumber( L, -1))
return false ;
int nLen = int( lua_tointeger( L, -1)) ;
lua_pop( L, 1) ;
vPar.reserve( nLen) ;
for ( int i = 1 ; i <= nLen ; ++ i) {
lua_rawgeti( L, nInd, i) ;
if ( ! lua_isnumber( L, -1))
return false ;
int nVal = int( lua_tointeger( L, -1)) ;
vPar.push_back( nVal) ;
lua_pop( L, 1) ;
}
return true ;
}
else
return false ;
}
//----------------------------------------------------------------------------
inline bool
LuaGetParam( lua_State* L, int nInd, PNTVECTOR& vPar)
@@ -318,6 +315,40 @@ LuaSetReturn( lua_State* L, const Frame3d& frPar)
return true ;
}
//-------------------------------------------------------------------------------
inline bool
LuaSetReturn( lua_State* L, const BBox3d& b3Par)
{
try {
// creo tavola per bbox
lua_createtable( L, 2, 0) ;
// creo tavola per minimo
lua_createtable( L, 3, 0) ;
lua_pushnumber( L, b3Par.GetMin().x) ;
lua_rawseti( L, -2, 1) ;
lua_pushnumber( L, b3Par.GetMin().y) ;
lua_rawseti( L, -2, 2) ;
lua_pushnumber( L, b3Par.GetMin().z) ;
lua_rawseti( L, -2, 3) ;
// la metto nel frame
lua_rawseti( L, -2, 1) ;
// creo tavola per massimo
lua_createtable( L, 3, 0) ;
lua_pushnumber( L, b3Par.GetMax().x) ;
lua_rawseti( L, -2, 1) ;
lua_pushnumber( L, b3Par.GetMax().y) ;
lua_rawseti( L, -2, 2) ;
lua_pushnumber( L, b3Par.GetMax().z) ;
lua_rawseti( L, -2, 3) ;
// la metto nel frame
lua_rawseti( L, -2, 2) ;
}
catch( ...) {
return false ;
}
return true ;
}
//-------------------------------------------------------------------------------
inline bool
LuaSetReturn( lua_State* L, const Color& colPar)
+18
View File
@@ -14,6 +14,7 @@
#pragma once
#include "/EgtDev/Include/EGnStringUtils.h"
#include "/EgtDev/Include/EGkBBox3d.h"
#include "/EgtDev/Include/EGkFrame3d.h"
#include "/EgtDev/Include/EGkColor.h"
@@ -31,6 +32,7 @@ inline bool FromString( const std::string& sVal, Vector3d& vtVal)
inline bool FromString( const std::string& sVal, Point3d& ptVal)
{ return FromString( sVal, ptVal.v) ; }
EGK_EXPORT bool FromString( const std::string& sVal, Point3d& ptVal, double& dW) ;
EGK_EXPORT bool FromString( const std::string& sVal, BBox3d& b3Box) ;
EGK_EXPORT bool FromString( const std::string& sVal, Frame3d& frFrame) ;
EGK_EXPORT bool FromString( const std::string& sVal, Color& cCol) ;
inline const std::string
@@ -66,6 +68,22 @@ ToString( const Point3d& ptVal, double dW, int nPrecP = 6, int nPrecW = 9)
sBuff += ToString( dW, nPrecW) ;
return sBuff ; }
inline const std::string
ToString( const BBox3d& b3B, int nPrecP = 6)
{ std::string sBuff ;
sBuff.reserve( 128) ;
sBuff += ToString( b3B.GetMin().x, nPrecP) ;
sBuff += ',' ;
sBuff += ToString( b3B.GetMin().y, nPrecP) ;
sBuff += ',' ;
sBuff += ToString( b3B.GetMin().z, nPrecP) ;
sBuff += ',' ;
sBuff += ToString( b3B.GetMax().x, nPrecP) ;
sBuff += ',' ;
sBuff += ToString( b3B.GetMax().y, nPrecP) ;
sBuff += ',' ;
sBuff += ToString( b3B.GetMax().z, nPrecP) ;
return sBuff ; }
inline const std::string
ToString( const Frame3d& frF, int nPrecP = 6, int nPrecV = 9)
{ std::string sBuff ;
sBuff.reserve( 256) ;
+53 -1
View File
@@ -12,10 +12,12 @@
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "/EgtDev/Include/EgtNumCollection.h"
#include "/EgtDev/Extern/Lua/Include/lua.hpp"
//----------------------------------------------------------------------------
#define LuaCheckParam(L,I,P) { if ( ! LuaGetParam(L,I,P)) return luaL_error( L, " Invalid Parameter # " #I) ;}
#define LuaCheckParam(L,I,P) { if ( ! LuaGetParam(L,I,P)) return luaL_error( L, " Invalid Parameter # " #I) ;}
#define LuaCheckParamDef(L,I,P,D) { if ( ! LuaGetParam(L,I,P)) (P) = (D) ; }
//----------------------------------------------------------------------------
inline bool
@@ -58,6 +60,38 @@ LuaGetParam( lua_State* L, int nInd, std::string& sPar)
return true ;
}
//----------------------------------------------------------------------------
inline bool
LuaGetParam( lua_State* L, int nInd, INTVECTOR& vPar)
{
vPar.clear() ;
if ( lua_isnumber( L, nInd)) {
int nVal = int( lua_tointeger( L, nInd)) ;
vPar.push_back( nVal) ;
return true ;
}
else if ( lua_istable( L, nInd)) {
// lunghezza della tavola
lua_len( L, nInd) ;
if ( ! lua_isnumber( L, -1))
return false ;
int nLen = int( lua_tointeger( L, -1)) ;
lua_pop( L, 1) ;
vPar.reserve( nLen) ;
for ( int i = 1 ; i <= nLen ; ++ i) {
lua_rawgeti( L, nInd, i) ;
if ( ! lua_isnumber( L, -1))
return false ;
int nVal = int( lua_tointeger( L, -1)) ;
vPar.push_back( nVal) ;
lua_pop( L, 1) ;
}
return true ;
}
else
return false ;
}
//----------------------------------------------------------------------------
inline bool
LuaClearStack( lua_State* L)
@@ -132,3 +166,21 @@ LuaSetReturn( lua_State* L, const std::string& sPar)
}
return true ;
}
//----------------------------------------------------------------------------
inline bool
LuaSetReturn( lua_State* L, const INTVECTOR& vPar)
{
try {
int nSize = int( vPar.size()) ;
lua_createtable( L, nSize, 0) ;
for ( int i = 1 ; i <= nSize ; ++ i) {
lua_pushnumber( L, vPar[i-1]) ;
lua_rawseti( L, -2, i) ;
}
}
catch( ...) {
return false ;
}
return true ;
}
+5
View File
@@ -15,6 +15,7 @@
#include <algorithm>
#include "/EgtDev/Include/EgnStringBase.h"
#include "/EgtDev/Include/EgtNumCollection.h"
//----------------------- Macro per import/export -----------------------------
#undef EGN_EXPORT
@@ -134,6 +135,8 @@ bool FromString( const std::string& sVal, double (&dVal)[size])
}
return ( errno == 0) ;
}
EGN_EXPORT bool FromString( const std::string& sVal, INTVECTOR& vnVal) ;
EGN_EXPORT bool FromString( const std::string& sVal, DBLVECTOR& vdVal) ;
//----------------------------------------------------------------------------
inline const std::string
@@ -160,6 +163,8 @@ inline const std::string
ToString( bool bVal)
{ return std::string( ( bVal ? "1" : "0")) ; }
EGN_EXPORT const std::string ToString( double dVal, int nPrec = 6) ;
EGN_EXPORT const std::string ToString( const INTVECTOR& vnVal, int nPrec = 1) ;
EGN_EXPORT const std::string ToString( const DBLVECTOR& vdVal, int nPrec = 6) ;
//----------------------------------------------------------------------------
EGN_EXPORT void Split( const std::string& sString, const std::string& sSeparator, bool bFirstVsLast,
+26 -13
View File
@@ -165,6 +165,7 @@ 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 EgtCreateSurfTmBBox( int nParentId, const double ptMin[3], const double ptMax[3], int nRefType) ;
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],
@@ -188,7 +189,7 @@ 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 nPntOrCrvId1, int nCrvId2, double dLinTol) ;
EIN_EXPORT BOOL __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
EIN_EXPORT int __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) ;
// GeomDB PartLayer
@@ -221,6 +222,9 @@ EIN_EXPORT int __stdcall EgtGetLastGroupInGroup( int nGroupId) ;
EIN_EXPORT int __stdcall EgtGetPrevGroup( int nId) ;
EIN_EXPORT BOOL __stdcall EgtGetBBox( int nId, int nFlag, double ptMin[3], double ptMax[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetBBoxGlob( int nId, int nFlag, double ptMin[3], double ptMax[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetBBoxRef( int nId, int nFlag, const double ptOrig[3],
const double vtX[3], const double vtY[3], const double vtZ[3],
double ptMin[3], double ptMax[3]) ;
EIN_EXPORT int __stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT int __stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT BOOL __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
@@ -289,8 +293,8 @@ EIN_EXPORT BOOL __stdcall EgtModifyText( int nId, const wchar_t* wsNewText) ;
EIN_EXPORT BOOL __stdcall EgtChangeTextFont( int nId, const wchar_t* wsNewFont) ;
EIN_EXPORT BOOL __stdcall EgtFlipText( int nId) ;
EIN_EXPORT BOOL __stdcall EgtMirrorText( int nId, BOOL bOnL) ;
EIN_EXPORT BOOL __stdcall EgtExplodeText( int nId) ;
EIN_EXPORT BOOL __stdcall EgtSplitText( int nId) ;
EIN_EXPORT int __stdcall EgtExplodeText( int nId, int* pnCount) ;
EIN_EXPORT int __stdcall EgtSplitText( int nId, int* pnCount) ;
// GeomDb Curve Modify
EIN_EXPORT BOOL __stdcall EgtInvertCurve( int nId) ;
@@ -307,19 +311,19 @@ EIN_EXPORT BOOL __stdcall EgtTrimCurveStartEndAtParam( int nId, double dParS, do
EIN_EXPORT BOOL __stdcall EgtExtendCurveStartByLen( int nId, double dLen) ;
EIN_EXPORT BOOL __stdcall EgtExtendCurveEndByLen( int nId, double dLen) ;
EIN_EXPORT BOOL __stdcall EgtTrimExtendCurveByLen( int nId, double dLen, const double ptNear[3], int nRefType) ;
EIN_EXPORT BOOL __stdcall EgtSplitCurve( int nId, int nParts) ;
EIN_EXPORT BOOL __stdcall EgtSplitCurveAtPoint( int nId, double ptOn[3], int nRefType) ;
EIN_EXPORT int __stdcall EgtSplitCurve( int nId, int nParts) ;
EIN_EXPORT int __stdcall EgtSplitCurveAtPoint( int nId, double ptOn[3], int nRefType) ;
EIN_EXPORT BOOL __stdcall EgtOffsetCurve( int nId, double dDist, int nType) ;
EIN_EXPORT BOOL __stdcall EgtModifyCurveCircleCPN( int nId, const double ptOn[3], int nRefType) ;
EIN_EXPORT BOOL __stdcall EgtModifyCurveArcRadius( int nId, double dRad) ;
EIN_EXPORT BOOL __stdcall EgtModifyCurveArcC2PN( int nId, const double ptEnd[3], int nRefType) ;
EIN_EXPORT BOOL __stdcall EgtModifyCurveArc3P( int nId, const double ptMid[3], int nRefType) ;
EIN_EXPORT BOOL __stdcall EgtExplodeCurveCompo( int nId) ;
EIN_EXPORT BOOL __stdcall EgtExplodeCurveBezier( int nId, BOOL bArcsVsLines, double dLinTol) ;
EIN_EXPORT int __stdcall EgtExplodeCurveCompo( int nId, int* pnCount) ;
EIN_EXPORT int __stdcall EgtExplodeCurveBezier( int nId, BOOL bArcsVsLines, double dLinTol) ;
// GeomDb Surf Modify
EIN_EXPORT BOOL __stdcall EgtInvertSurface( int nId) ;
EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId) ;
EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ;
// Geo Snap Vector/Point/Frame
EIN_EXPORT BOOL __stdcall EgtStartPoint( int nId, int nRefId, double ptP[3]) ;
@@ -381,13 +385,15 @@ EIN_EXPORT BOOL __stdcall EgtShearGroup( int nId, const double vPnt[3], const do
// Machining
EIN_EXPORT BOOL __stdcall EgtInitMachMgr( void) ;
EIN_EXPORT int __stdcall EgtGetMachGroupNbr( 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) ;
EIN_EXPORT BOOL __stdcall EgtRemoveMachGroup( int nMGroupInd) ;
EIN_EXPORT BOOL __stdcall EgtGetMachGroupName( int nMGroupInd, wchar_t*& wsName) ;
EIN_EXPORT BOOL __stdcall EgtGetMachGroupInd( const wchar_t* wsName, int* pnInd) ;
EIN_EXPORT BOOL __stdcall EgtSetCurrMachGroup( int nMGroupInd) ;
EIN_EXPORT BOOL __stdcall EgtRemoveMachGroup( int nMGroupId) ;
EIN_EXPORT BOOL __stdcall EgtGetMachGroupName( int nMGroupId, wchar_t*& wsName) ;
EIN_EXPORT int __stdcall EgtGetMachGroupId( const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtSetCurrMachGroup( int nMGroupId) ;
EIN_EXPORT BOOL __stdcall EgtResetCurrMachGroup( void) ;
EIN_EXPORT BOOL __stdcall EgtGetCurrMachGroup( int* pnInd) ;
EIN_EXPORT int __stdcall EgtGetCurrMachGroup( void) ;
// Scene
EIN_EXPORT BOOL __stdcall EgtInitScene( HWND hWnd, int nDriver, int b2Buff, int nColorBits, int nDepthBits) ;
@@ -494,6 +500,13 @@ EIN_EXPORT BOOL __stdcall EgtFrameToLoc( double ptOrig[3], double vtX[3], double
EIN_EXPORT BOOL __stdcall EgtFrameLocToLoc( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3],
const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3]) ;
EIN_EXPORT BOOL __stdcall EgtBBoxToGlob( double ptMin[3], double ptMax[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3]) ;
EIN_EXPORT BOOL __stdcall EgtBBoxToLoc( double ptMin[3], double ptMax[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3]) ;
EIN_EXPORT BOOL __stdcall EgtBBoxLocToLoc( double ptMin[3], double ptMax[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3],
const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3]) ;
// Messages
EIN_EXPORT BOOL __stdcall EgtLoadMessages( const wchar_t* wsMsgFilePath) ;
+34 -6
View File
@@ -34,19 +34,47 @@ class __declspec( novtable) IMachMgr
virtual bool Insert( int nInsGrp) = 0 ;
// MachGroup
virtual int GetMachGroupNbr( void) const = 0 ;
virtual int GetFirstMachGroup( void) const = 0 ;
virtual int GetNextMachGroup( int nId) const = 0 ;
virtual bool GetMachGroupNewName( std::string& sName) const = 0 ;
virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) = 0 ;
virtual bool RemoveMachGroup( int nMGroup) = 0 ;
virtual bool GetMachGroupName( int nMGroup, std::string& sName) const = 0 ;
virtual bool GetMachGroupInd( const std::string& sName, int& nMGroup) const = 0 ;
virtual bool SetCurrMachGroup( int nMGroup) = 0 ;
virtual bool RemoveMachGroup( int nId) = 0 ;
virtual std::string GetMachGroupName( int nId) const = 0 ;
virtual int GetMachGroupId( const std::string& sName) const = 0 ;
virtual bool SetCurrMachGroup( int nId) = 0 ;
virtual bool ResetCurrMachGroup( void) = 0 ;
virtual bool GetCurrMachGroup( int& nMGroup) const ;
virtual int GetCurrMachGroup( void) const = 0 ;
// RawPart & Part
virtual int AddRawPart( const Point3d& ptOrig, double dWidth, double dLen, double dHeight, Color cCol) = 0 ;
virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ;
virtual bool AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId) = 0 ;
virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ;
virtual bool RemoveRawPart( int nRawId) = 0 ;
virtual bool TranslateRawPart( int nRawId, const Vector3d& vtMove) = 0 ;
virtual bool RotateRawPart( int nRawId, const Vector3d& vtAx, double dAngRotDeg) = 0 ;
virtual bool MoveToCornerRawPart( int nRawId, const Point3d& ptCorner, int nFlag) = 0 ;
virtual bool MoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag) = 0 ;
virtual bool RemovePartFromRawPart( int nPartId) ;
virtual bool TranslatePartInRawPart( int nPartId, const Vector3d& vtMove) = 0 ;
virtual bool RotatePartInRawPart( int nPartId, const Vector3d& vtAx, double dAngRotDeg) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EMK_EXPORT IMachMgr* CreateMachMgr(void) ;
}
}
//------------------------ Costanti per flag MoveToCorner ---------------------
// indica la posizione del corner rispetto al grezzo
enum RawPartCornerPos { RPCR_TL = 1, // top left
RPCR_TR = 2, // top right
RPCR_BL = 3, // bottom left
RPCR_BR = 4} ; // bottom right
//------------------------ Costanti per flag MoveToCenter ---------------------
// indica la posizione del centro rispetto al grezzo
enum RawPartCenterPos { RPCE_TC = 1, // top center
RPCE_ML = 2, // middle left
RPCE_MR = 3, // middle right
RPCE_BC = 4, // bottom center
RPCE_MC = 5} ; // middle center under