Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b87b53d43 |
Binary file not shown.
+7
-7
@@ -23,19 +23,19 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{d1a76918-1e81-4851-9b6f-2b1db0efb2a4}</ProjectGuid>
|
||||
<RootNamespace>EgtExch3dm</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -104,7 +104,7 @@
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -133,7 +133,7 @@ copy $(TargetPath) \EgtProg\DllD32</Command>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<OpenMPSupport>false</OpenMPSupport>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
@@ -165,7 +165,7 @@ copy $(TargetPath) \EgtProg\Dll32</Command>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -192,7 +192,7 @@ copy $(TargetPath) \EgtProg\DllD64</Command>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
||||
+72
-136
@@ -15,20 +15,30 @@
|
||||
#include "stdafx.h"
|
||||
#include "Export3dm.h"
|
||||
#include "DllMain.h"
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EE3DllMain.h"
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EGkCurveLine.h"
|
||||
#include "/EgtDev/Include/EGkCurveArc.h"
|
||||
#include "/EgtDev/Include/EGkCurveBezier.h"
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EGkGdbIterator.h"
|
||||
#include "/EgtDev/Include/EGkGeoObjType.h"
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/SELkKeyProc.h"
|
||||
#include "/EgtDev/Include/EgtKeyCodes.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
#include "/EgtDev/Include/EGkExtDimension.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EgtNumUtils.h"
|
||||
#include "/EgtDev/Include/EgtKeyCodes.h"
|
||||
#include "/EgtDev/Extern/opennurbs/Include/opennurbs.h"
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
|
||||
using namespace std ;
|
||||
//N.B.:
|
||||
@@ -287,16 +297,11 @@ Export3dm::AddObjectToModel( const IGdbIterator& iIter, ON_Object* onObject, con
|
||||
if ( pOnAttr == nullptr)
|
||||
pOnAttr = new ON_3dmObjectAttributes() ;
|
||||
pOnAttr->m_layer_index = nLayer ;
|
||||
int nType = iIter.GetGeoType() ;
|
||||
string sCompleteName = sName ;
|
||||
if ( nType == EXT_DIMENSION) {
|
||||
sCompleteName = "dim_" + sCompleteName ;
|
||||
}
|
||||
pOnAttr->m_name = ConvertString( sCompleteName).c_str() ;
|
||||
pOnAttr->m_name = ConvertString( sName).c_str() ;
|
||||
pOnAttr->SetColorSource( ON::color_from_object) ;
|
||||
//N.B. RHINO ha i valori di Alpha invertiti rispetto ai nostri, oltre che su una scala diversa! per loro 0 = opaco e 255 = trasparente
|
||||
// per noi invece 0 = trasparente, 100 = opaco
|
||||
ON_Color onCol( cCol.GetIntRed(), cCol.GetIntGreen(), cCol.GetIntBlue(), Clamp( 255 - lround( cCol.GetIntAlpha() * 2.55), 0, 255)) ;
|
||||
ON_Color onCol( cCol.GetIntRed(), cCol.GetIntGreen(), cCol.GetIntBlue(), abs( int( cCol.GetIntAlpha() * 2.55) - 255)) ;
|
||||
pOnAttr->m_color = onCol ;
|
||||
// se è una mesh aggiungo il materiale
|
||||
if ( const ON_Mesh* onMesh = ON_Mesh::Cast( onObject)) {
|
||||
@@ -310,7 +315,6 @@ Export3dm::AddObjectToModel( const IGdbIterator& iIter, ON_Object* onObject, con
|
||||
onMat->SetDiffuse( onCol) ;
|
||||
onMat->SetAmbient( onCAmb) ;
|
||||
onMat->SetReflectivity( 0) ;
|
||||
onMat->SetTransparency( Clamp( 255 - lround( cCol.GetIntAlpha() * 2.55), 0, 255)) ;
|
||||
ON_ModelComponentReference mcr = m_model.AddManagedModelComponent( onMat) ;
|
||||
int nIndex = mcr.ModelComponentIndex() ;
|
||||
m_mMaterial.insert( pair< std::string, int>( sCol, nIndex)) ;
|
||||
@@ -507,29 +511,16 @@ Export3dm::ExportSTM( const string& sName, const IGdbIterator& iIter, const Fram
|
||||
// lo porto nel frame globale
|
||||
pSrfTm->ToGlob( frFrame) ;
|
||||
|
||||
int nVertices = pSrfTm->GetVertexSize() ;
|
||||
int nTriangles = pSrfTm->GetTriangleSize() ;
|
||||
int nVertices = pSrfTm->GetVertexCount() ;
|
||||
int nTriangles = pSrfTm->GetTriangleCount() ;
|
||||
ON_Mesh* onMesh = new ON_Mesh ;
|
||||
|
||||
bool bOk = true ;
|
||||
for ( int v = 0 ; v < nVertices ; ++v) {
|
||||
Point3d pt ; pSrfTm->GetVertex( v, pt) ;
|
||||
bOk = onMesh->SetVertex( v, ConvertPoint( pt)) ;
|
||||
if ( ! bOk) {
|
||||
LOG_ERROR( GetEE3Logger(), "Export3dm SurfTm: Error adding vertex")
|
||||
bOk = true ;
|
||||
}
|
||||
onMesh->SetVertex( v, ConvertPoint( pt)) ;
|
||||
}
|
||||
bOk = true ;
|
||||
for ( int t = 0 ; t < nTriangles ; ++t) {
|
||||
int nIdVert[3] ;
|
||||
if ( ! pSrfTm->GetTriangle( t, nIdVert))
|
||||
continue ;
|
||||
bOk = onMesh->SetTriangle( t, nIdVert[0], nIdVert[1], nIdVert[2]) ;
|
||||
if ( ! bOk) {
|
||||
LOG_ERROR( GetEE3Logger(), "Export3dm SurfTm: Error adding triangle")
|
||||
bOk = true ;
|
||||
}
|
||||
int nIdVert[3] ; pSrfTm->GetTriangle( t, nIdVert) ;
|
||||
onMesh->SetTriangle( t, nIdVert[0], nIdVert[1], nIdVert[2]) ;
|
||||
}
|
||||
ON_MeshVertexFaceMap onMeshVertMap ;
|
||||
onMeshVertMap.SetFromMesh( onMesh, false) ;
|
||||
@@ -751,44 +742,23 @@ Export3dm::ExportCrvLine( const string& sName, const IGdbIterator& iIter, const
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ON_Text*
|
||||
Export3dm::ConvertText( const IExtText* pText, const Frame3d& frDim)
|
||||
std::vector<ON_PolyCurve*>
|
||||
Export3dm::ConvertText( const IExtText* pText)
|
||||
{
|
||||
string sText = pText->GetText() ;
|
||||
wstring wText = wstring(sText.begin(), sText.end());
|
||||
const wchar_t* wcText = wText.c_str();
|
||||
ON_Text* ontText = new ON_Text() ;
|
||||
double dHeight = pText->GetHeight() ;
|
||||
// controllo se esiste già un dim style con quell'altezza sennò lo creo
|
||||
ON_DimStyle onDimStyle = ON_DimStyle::SystemDimstyleFromIndex( -1) ; // default
|
||||
const ON_DimStyle* onDimStyleNew = nullptr ;
|
||||
ONX_ModelComponentIterator component_iterator_ds( m_model, ON_ModelComponent::Type::DimStyle) ;
|
||||
bool bFound = false ;
|
||||
for ( const ON_ModelComponent* mc = component_iterator_ds.FirstComponent() ; mc != nullptr ; mc = component_iterator_ds.NextComponent()) {
|
||||
const ON_DimStyle* onDim = ON_DimStyle::Cast( mc) ;
|
||||
double dTextHeight = onDim->TextHeight() ;
|
||||
if ( abs( dHeight - dTextHeight) < 0.1 ) {
|
||||
onDimStyle = *onDim ;
|
||||
bFound = true ;
|
||||
break ;
|
||||
}
|
||||
// tolleranza lineare standard
|
||||
const double LIN_TOL_STD = 0.1 ;
|
||||
// deviazione angolare standard (in gradi)
|
||||
const double ANG_TOL_STD_DEG = 15 ;
|
||||
POLYLINELIST lPl ;
|
||||
pText->ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, lPl) ;
|
||||
vector<ON_PolyCurve*> vOnPolyCrv ;
|
||||
for ( PolyLine pl : lPl) {
|
||||
PtrOwner<ICurveComposite> pCC( CreateCurveComposite()) ;
|
||||
pCC->FromPolyLine( pl) ;
|
||||
ON_PolyCurve* onPolyCrv = ConvertCrvCompo( pCC) ;
|
||||
vOnPolyCrv.push_back( onPolyCrv) ;
|
||||
}
|
||||
if ( ! bFound) {
|
||||
ON_DimStyle onDimStyleOver = onDimStyle.CreateOverrideCandidate() ;
|
||||
onDimStyleOver.SetFieldOverride( ON_DimStyle::field::TextHeight, true) ;
|
||||
onDimStyleOver.SetTextHeight( dHeight) ;
|
||||
ON_ModelComponentReference mcr = m_model.AddModelComponent( onDimStyleOver, true) ;
|
||||
onDimStyleNew = ON_DimStyle::FromModelComponentRef( mcr, nullptr) ;
|
||||
}
|
||||
// il punto di riferimento di rhino è in alto a sinistra, mentre il nostro è in basso a sinistra
|
||||
Point3d pt ; pText->GetOverStartPoint( pt) ;
|
||||
ON_Plane onPlane( ConvertPoint( pt), ConvertVector(frDim.VersX()), ConvertVector(frDim.VersY())) ;
|
||||
BBox3d bbox3d ; pText->GetBBox( GLOB_FRM, bbox3d, 0) ;
|
||||
if ( onDimStyleNew != nullptr)
|
||||
ontText->Create( wcText, onDimStyleNew, onPlane, true, bbox3d.GetDimX() * 10, 0.) ;
|
||||
else
|
||||
ontText->Create( wcText, &onDimStyle, onPlane, true, bbox3d.GetDimX() * 10, 0.) ;
|
||||
return ontText ;
|
||||
return vOnPolyCrv ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -805,76 +775,35 @@ Export3dm::ExportText( const string& sName, const IGdbIterator& iIter, const Fra
|
||||
return false ;
|
||||
// lo porto nel frame globale
|
||||
pText->ToGlob( frFrame) ;
|
||||
|
||||
ON_Text* onText = ConvertText( pText, frFrame) ;
|
||||
|
||||
return AddObjectToModel( iIter, onText, nLayer, sName, cCol) ;
|
||||
vector<ON_PolyCurve*> vOnPolyCrv = ConvertText( pText) ;
|
||||
// aggiungo l'oggetto al modello
|
||||
bool bOk = true ;
|
||||
for ( ON_PolyCurve* onPolyCrv : vOnPolyCrv) {
|
||||
bOk = bOk && AddObjectToModel( iIter, onPolyCrv, nLayer, sName, cCol) ;
|
||||
if ( ! bOk)
|
||||
break ;
|
||||
}
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ON_Dimension*
|
||||
Export3dm::ConvertExtDimension( const IExtDimension* pExtDim, const Frame3d& frDim)
|
||||
std::vector<ON_PolyCurve*>
|
||||
Export3dm::ConvertExtDimension( const IExtDimension* pExtDim)
|
||||
{
|
||||
const ON_DimStyle onDimStyle = ON_DimStyle::DimStyleOrDefault( nullptr) ;
|
||||
ON_UUID onIdDim = onDimStyle.Id() ;
|
||||
// versione con le classi di Rhino
|
||||
string sSubType = pExtDim->GetSubType() ;
|
||||
if ( sSubType == "Linear") {
|
||||
ON_Plane onPlane(ConvertPoint( frDim.Orig()), ConvertVector( frDim.VersX()), ConvertVector( frDim.VersY())) ;
|
||||
ON_DimLinear* onDimLinear( new ON_DimLinear()) ;
|
||||
ON_3dPoint onPt1 = ConvertPoint( pExtDim->GetStart()) ;
|
||||
ON_3dPoint onPt2 = ConvertPoint( pExtDim->GetEnd()) ;
|
||||
ON_3dPoint onPtDim = ConvertPoint( pExtDim->GetPosition()) ;
|
||||
Vector3d vtDir = pExtDim->GetDirVersor() ;
|
||||
|
||||
// aligned
|
||||
if ( ! AreSameVectorApprox( vtDir, X_AX) && ! AreSameVectorApprox( vtDir, Y_AX))
|
||||
ON_DimLinear::CreateAligned( onPt1, onPt2, onPtDim, ConvertVector( frDim.VersZ()), onIdDim, onDimLinear) ;
|
||||
//horizontal o vertical
|
||||
else {
|
||||
ON_3dPoint onPtDim2 = onPtDim + ConvertVector( vtDir) ;
|
||||
ON_DimLinear::CreateRotated( onPt1, onPt2, ON_Line( onPtDim, onPtDim2), ConvertVector( frDim.VersZ()), onIdDim, onDimLinear) ;
|
||||
}
|
||||
|
||||
return onDimLinear ;
|
||||
// tolleranza lineare standard
|
||||
const double LIN_TOL_STD = 0.1 ;
|
||||
// deviazione angolare standard (in gradi)
|
||||
const double ANG_TOL_STD_DEG = 15 ;
|
||||
POLYLINELIST lPl ;
|
||||
pExtDim->ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, lPl) ;
|
||||
vector<ON_PolyCurve*> vOnPolyCrv ;
|
||||
for ( PolyLine pl : lPl) {
|
||||
PtrOwner<ICurveComposite> pCC( CreateCurveComposite()) ;
|
||||
pCC->FromPolyLine( pl) ;
|
||||
ON_PolyCurve* onPolyCrv = ConvertCrvCompo( pCC) ;
|
||||
vOnPolyCrv.push_back( onPolyCrv) ;
|
||||
}
|
||||
else if ( sSubType == "Radial" || sSubType == "Diametral") {
|
||||
ON_Plane onPlane(ConvertPoint( frDim.Orig()), ConvertVector( frDim.VersX()), ConvertVector( frDim.VersY())) ;
|
||||
ON_DimRadial* onDimRadial( new ON_DimRadial()) ;
|
||||
ON_3dPoint onPtV = ConvertPoint( pExtDim->GetStart()) ;
|
||||
ON_3dPoint onPtPos = ConvertPoint( pExtDim->GetEnd()) ;
|
||||
//ON_3dPoint onPtDim = ConvertPoint( pExtDim->GetPosition()) ;
|
||||
Vector3d vtDir = pExtDim->GetDirVersor() ;
|
||||
ON_3dPoint onPtDim = onPtPos + ConvertVector( vtDir) * ( onPtPos - onPtV).Length() / 10. ; // allontano la misura dall'arco di un decimo del raggio
|
||||
double dRot = 0 ;
|
||||
if ( ! AreSameVectorApprox( vtDir, X_AX))
|
||||
X_AX.GetAngleXY(vtDir, dRot) ;
|
||||
if ( sSubType == "Radial")
|
||||
onDimRadial->Create( ON::AnnotationType::Radius, onIdDim, onPlane, onPtV, onPtPos, onPtDim) ;
|
||||
else if ( sSubType == "Diametral")
|
||||
onDimRadial->Create( ON::AnnotationType::Diameter, onIdDim, onPlane, onPtV, onPtPos, onPtDim) ;
|
||||
return onDimRadial ;
|
||||
}
|
||||
else if ( sSubType == "Angular") {
|
||||
ON_Plane onPlane(ConvertPoint( frDim.Orig()), ConvertVector( frDim.VersX()), ConvertVector( frDim.VersY())) ;
|
||||
ON_DimAngular* onDimAngular( new ON_DimAngular()) ;
|
||||
ON_3dPoint onPtV = ConvertPoint( pExtDim->GetStart()) ;
|
||||
ON_3dPoint onPt1 = ConvertPoint( pExtDim->GetOverStart()) ;
|
||||
ON_3dPoint onPt2 = ConvertPoint( pExtDim->GetOverEnd()) ;
|
||||
ON_3dPoint onPtDim = ConvertPoint( pExtDim->GetPosition()) ;
|
||||
Vector3d vtDir = pExtDim->GetDirVersor() ;
|
||||
double dRot = 0 ;
|
||||
if ( ! AreSameVectorApprox( vtDir, X_AX))
|
||||
X_AX.GetAngleXY(vtDir, dRot) ;
|
||||
// per arco
|
||||
//onDimAngular->Create( onIdDim, onPlane, ConvertVector( frDim.VersX()), onPtV, onPt1, onPt2, onPtDim) ;
|
||||
|
||||
// con linee prolungate fino al vertice
|
||||
onDimAngular->Create( onIdDim, onPlane, ConvertVector( frDim.VersX()), onPtV, onPtV, onPt1, onPt2, onPtDim) ;
|
||||
return onDimAngular ;
|
||||
}
|
||||
|
||||
return nullptr ;
|
||||
return vOnPolyCrv ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -891,8 +820,15 @@ Export3dm::ExportDimension( const string& sName, const IGdbIterator& iIter, cons
|
||||
return false ;
|
||||
// lo porto nel frame globale
|
||||
pExtDim->ToGlob( frFrame) ;
|
||||
|
||||
return AddObjectToModel( iIter, ConvertExtDimension( pExtDim, frFrame), nLayer, sName, cCol) ;
|
||||
vector<ON_PolyCurve*> vOnPolyCrv = ConvertExtDimension( pExtDim) ;
|
||||
// aggiungo l'oggetto al modello
|
||||
bool bOk = true ;
|
||||
for ( ON_PolyCurve* onPolyCrv : vOnPolyCrv) {
|
||||
bOk = bOk && AddObjectToModel( iIter, onPolyCrv, nLayer, sName, cCol) ;
|
||||
if ( ! bOk)
|
||||
break ;
|
||||
}
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+4
-2
@@ -16,6 +16,7 @@
|
||||
#define NOMINMAX
|
||||
|
||||
#include "/EgtDev/Include/EE3Export3dm.h"
|
||||
#include "/EgtDev/Include/EGnWriter.h"
|
||||
#include "/EgtDev/Include/EGkGeoObj.h"
|
||||
#include "/EgtDev/Include/EGkGdbIterator.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
@@ -57,8 +58,8 @@ class Export3dm : public IExport3dm
|
||||
ON_ArcCurve* ConvertCrvArc( const ICurveArc* pCrvArc) ;
|
||||
ON_LineCurve* ConvertCrvLine( const ICurveLine* pCrvL) ;
|
||||
ON_PolyCurve* ConvertCrvCompo( const ICurveComposite* pCC) ;
|
||||
ON_Text* ConvertText( const IExtText* pText, const Frame3d& frDim) ;
|
||||
ON_Dimension* ConvertExtDimension( const IExtDimension* pExtDim, const Frame3d& frDim) ;
|
||||
VONPOLYCRV ConvertText( const IExtText* pCrvL) ;
|
||||
VONPOLYCRV ConvertExtDimension( const IExtDimension* pExtDim) ;
|
||||
bool ExportPnt( const std::string& sName, const IGdbIterator& iIter, const Frame3d& frFrame, const Color& cCol, const int& nLayer) ;
|
||||
bool ExportSrfBz( const std::string& sName, const IGdbIterator& iIter, const Frame3d& frFrame, const Color& cCol, const int& nLayer) ;
|
||||
bool ExportSTM( const std::string& sName, const IGdbIterator& iIter, const Frame3d& frFrame, const Color& cCol, const int& nLayer) ;
|
||||
@@ -73,6 +74,7 @@ class Export3dm : public IExport3dm
|
||||
private :
|
||||
int m_nFilter ; // filtro su livello, modo e stato, se l'oggeto da valutare è un oggetto geometrico
|
||||
int m_nGroupFilter ; // filtro su livello, modo e stato, se l'oggetto da valutare è un gruppo
|
||||
Writer m_Writer ; // scrittore di file di testo
|
||||
ONX_Model m_model ; // modello opennurbs
|
||||
std::map<int,int> m_mLayer ; // mappa dei layer <indice layer nge, indice del componente layer nel modello 3dm>
|
||||
std::map<std::string,int> m_mMaterial ; // mappa dei materiali <stringa del colore ( R,G,B), indice del componente material nel modello 3dm>
|
||||
|
||||
+364
-492
File diff suppressed because it is too large
Load Diff
+4
-6
@@ -13,8 +13,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
|
||||
#include "/EgtDev/Include/EE3Import3dm.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
@@ -47,20 +45,20 @@ class Import3dm : public IImport3dm
|
||||
Vector3d ConvertVector( const ON_2dVector& onVector)
|
||||
{ return Vector3d( onVector.x, onVector.y, 0) ; } ;
|
||||
ICurve* ConvertCurve( const ON_Curve* onCurve) ;
|
||||
ISurf* ConvertSurface( const ON_Surface* onSurf, DBLVECTOR* vU = nullptr, DBLVECTOR* vV = nullptr) ;
|
||||
ISURFPOVECTOR ConvertExtrusion( const ON_Extrusion* onExtrusion) ;
|
||||
ISurf* ConvertSurface( const ON_Surface* onSurf) ;
|
||||
ISurfTriMesh* ConvertExtrusion( const ON_Extrusion* onExtrusion) ;
|
||||
ISurfTriMesh* ConvertMesh( const ON_Mesh* onMesh) ;
|
||||
std::vector<PtrOwner<IGeoObj>> ConvertAnnotation( const ON_Annotation* onAnnot, const ON_DimStyle* onDimStyle, double dTextHeight, double dExtLine, double dArrLen, double dTextDist,
|
||||
bool bLenIsMM, int nDecDig, std::string sFont) ;
|
||||
ISURFPOVECTOR ConvertBrep( const ON_Brep* onBrep, const bool bForceTriMesh) ;
|
||||
ICurve* ConvertBrepLoop( const ON_BrepLoop* onBrepLoop) ;
|
||||
ICurveComposite* ApproxTrim( ICurve* pCrv) ;
|
||||
bool MakeUniform( ISurfFlatRegion** sfr, ON_NurbsSurface onNurbsSurface, double dScaleU, double dScaleV, bool& bRescaled, bool bRetry = false) ;
|
||||
bool ConvertCurveParam( const ON_RevSurface* onRevSurf, ICurve** pCrv) ;
|
||||
std::string ConvertONwStringToString( ON_wString ON_wString) ;
|
||||
|
||||
private :
|
||||
IGeomDB* m_pGDB ;
|
||||
int m_nIdGroup ;
|
||||
std::map< int, std::tuple<const ON_Layer*, ON_UUID, int, int, int>> m_mLayer ; // mappa dei layer con id nel GDB e l'uuid nel modello 3dm, un int per l'indice del layer nel model, un int che indica la profondità del layer ( Root = 0, Part = 1, layer = 2), un int che è l'indice del layer ausiliario se avevo un Part senza layer ( lo aggiungo io e finché non l'ho aggiunto questo int è settato a -1)
|
||||
std::map< int, std::tuple<const ON_Layer*, ON_UUID, int, bool>> m_mLayer ; // mappa dei layer con id nel GDB e l'uuid nel modello 3dm, un int per l'indice del layer nel model e un bool che indica la presenza di sottolayer
|
||||
std::map< std::string, int> m_mError_count ;
|
||||
} ;
|
||||
Reference in New Issue
Block a user