EgtGeomKernel 1.5i4 :
- tolto controllo antidebug da release per VB.NET - aggiunti metodi CurveArc::Set2PNRS e SetC2PN - aggiunta scrittura MachineId come commento in NGE di testo.
This commit is contained in:
@@ -378,6 +378,29 @@ CurveArc::Set2PRS( const Point3d& ptStart, const Point3d& ptEnd, double dRad, bo
|
||||
return Validate() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Set per arco di circonferenza in un piano generico con ptStart, ptEnd, vtN, dRad, bCCW
|
||||
// ( si suppone |dAngCenDeg| <= 180deg)
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CurveArc::Set2PNRS( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN, double dRad, bool bCCW)
|
||||
{
|
||||
// calcolo il riferimento OCS derivato da vtN
|
||||
Frame3d frOcs ;
|
||||
if ( ! frOcs.Set( ORIG, vtN))
|
||||
return false ;
|
||||
// porto i punti in questo riferimento
|
||||
Point3d ptSloc = ptStart ;
|
||||
ptSloc.ToLoc( frOcs) ;
|
||||
Point3d ptEloc = ptEnd ;
|
||||
ptEloc.ToLoc( frOcs) ;
|
||||
// calcolo l'arco in questo piano
|
||||
if ( ! Set2PRS( ptSloc, ptEloc, dRad, bCCW))
|
||||
return false ;
|
||||
// riporto l'arco nel riferimento naturale
|
||||
return ToGlob( frOcs) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Set per arco di circonferenza nel piano XY con ptCen, ptStart, ptNearEnd
|
||||
// ( si suppone |dAngCenDeg| <= 180deg)
|
||||
@@ -412,6 +435,31 @@ CurveArc::SetC2P( const Point3d& ptCen, const Point3d& ptStart, const Point3d& p
|
||||
return Validate() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Set per arco di circonferenza in un piano generico con ptCen, ptStart, ptNearEnd, vtN
|
||||
// ( si suppone |dAngCenDeg| <= 180deg)
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CurveArc::SetC2PN( const Point3d& ptCen, const Point3d& ptStart, const Point3d& ptNearEnd, const Vector3d& vtN)
|
||||
{
|
||||
// calcolo il riferimento OCS derivato da vtN
|
||||
Frame3d frOcs ;
|
||||
if ( ! frOcs.Set( ORIG, vtN))
|
||||
return false ;
|
||||
// porto i punti in questo riferimento
|
||||
Point3d ptCloc = ptCen ;
|
||||
ptCloc.ToLoc( frOcs) ;
|
||||
Point3d ptSloc = ptStart ;
|
||||
ptSloc.ToLoc( frOcs) ;
|
||||
Point3d ptNEloc = ptNearEnd ;
|
||||
ptNEloc.ToLoc( frOcs) ;
|
||||
// calcolo l'arco in questo piano
|
||||
if ( ! SetC2P( ptCloc, ptSloc, ptNEloc))
|
||||
return false ;
|
||||
// riporto l'arco nel riferimento naturale
|
||||
return ToGlob( frOcs) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
CurveArc*
|
||||
CurveArc::Clone( void) const
|
||||
|
||||
@@ -117,7 +117,9 @@ class CurveArc : public ICurveArc, public IGeoObjRW
|
||||
virtual bool Set2PNB( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN, double dBulge) ;
|
||||
virtual bool Set2PD( const Point3d& ptStart, const Point3d& ptEnd, double dDirStartDeg) ;
|
||||
virtual bool Set2PRS( const Point3d& ptStart, const Point3d& ptEnd, double dRad, bool bCCW = true) ;
|
||||
virtual bool Set2PNRS( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN, double dRad, bool bCCW = true) ;
|
||||
virtual bool SetC2P( const Point3d& ptCen, const Point3d& ptStart, const Point3d& ptNearEnd) ;
|
||||
virtual bool SetC2PN( const Point3d& ptCen, const Point3d& ptStart, const Point3d& ptNearEnd, const Vector3d& vtN) ;
|
||||
virtual bool IsFlat( double dToler = EPS_SMALL) const
|
||||
{ return ( fabs( m_dDeltaN) < dToler) ; }
|
||||
virtual bool IsACircle( void) const
|
||||
|
||||
+7
-6
@@ -45,12 +45,13 @@ DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
|
||||
if ( dwReason == DLL_PROCESS_ATTACH) {
|
||||
#if defined( NDEBUG)
|
||||
BOOL IsDbgPresent = FALSE ;
|
||||
CheckRemoteDebuggerPresent( GetCurrentProcess(), &IsDbgPresent) ;
|
||||
if ( IsDbgPresent)
|
||||
return 0 ;
|
||||
#endif
|
||||
// Controllo commentato per problemi con VB.NET
|
||||
//#if defined( NDEBUG)
|
||||
// BOOL IsDbgPresent = FALSE ;
|
||||
// CheckRemoteDebuggerPresent( GetCurrentProcess(), &IsDbgPresent) ;
|
||||
// if ( IsDbgPresent)
|
||||
// return 0 ;
|
||||
//#endif
|
||||
s_hModule = hModule ;
|
||||
EGT_TRACE( "EgtGeomKernel.dll Initializing!\n") ;
|
||||
}
|
||||
|
||||
Binary file not shown.
+10
@@ -23,6 +23,7 @@
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EgnStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
#include "/EgtDev/Include/SELkMachineId.h"
|
||||
#include "/EgtDev/Include/SELkKeyProc.h"
|
||||
#include <new>
|
||||
|
||||
@@ -257,6 +258,15 @@ GeomDB::SaveHeader( NgeWriter& ngeOut) const
|
||||
if ( ! ngeOut.WriteInt( NGE_VER_LAST, ";", true))
|
||||
return false ;
|
||||
|
||||
// MachineId del sistema come commento
|
||||
string sMachineId ;
|
||||
if ( ! GetMachineId( sMachineId)) {
|
||||
LOG_ERROR( GetEGkLogger(), "Error on Key (1)")
|
||||
return false ;
|
||||
}
|
||||
if ( ! ngeOut.WriteRemark( "LWR=" + sMachineId))
|
||||
return false ;
|
||||
|
||||
// materiale di default come colore
|
||||
Color colDef( 0, 0, 0, 0) ;
|
||||
GetDefaultMaterial( colDef) ;
|
||||
|
||||
@@ -274,3 +274,14 @@ NgeWriter::WriteCol( const Color& cCol, const char* szSep, bool bEndL)
|
||||
return WriteStringOutTxt( m_OutTxtFile, ToString( cCol).c_str(), szSep, bEndL) ;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
NgeWriter::WriteRemark( const string& sVal)
|
||||
{
|
||||
if ( m_bBinary)
|
||||
return true ;
|
||||
else
|
||||
return ( WriteStringOutTxt( m_OutTxtFile, "//", nullptr, false) &&
|
||||
WriteStringOutTxt( m_OutTxtFile, sVal.c_str(), nullptr, true)) ;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class NgeWriter
|
||||
bool WriteString( const std::string& sVal, const char* szSep, bool bEndL = false) ;
|
||||
bool WriteKey( int nKey /* bEndL = true*/) ;
|
||||
bool WriteCol( const Color& cCol, const char* szSep, bool bEndL = false) ;
|
||||
bool WriteRemark( const std::string& sVal /* bEndL = true*/) ;
|
||||
|
||||
private :
|
||||
bool m_bBinary ;
|
||||
|
||||
Reference in New Issue
Block a user