From d18c7e6dad2ce2584097124d7b833269ff6fb744 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 31 Mar 2026 17:44:41 +0200 Subject: [PATCH] =?UTF-8?q?EgtExch3dm=20:=20-=20aumentata=20tolleranza=20p?= =?UTF-8?q?er=20superfici=20non=20disegnate=20perch=C3=A9=20troppo=20picco?= =?UTF-8?q?le.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Import3dm.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Import3dm.cpp b/Import3dm.cpp index 731870a..e07d2ba 100644 --- a/Import3dm.cpp +++ b/Import3dm.cpp @@ -195,6 +195,14 @@ Import3dm::Import( const string& sFile, IGeomDB* pGDB, int nIdGroup, int nId ; for( const ON_ModelComponent* mc = component_iterator.FirstComponent() ; mc != nullptr ; mc = component_iterator.NextComponent()) { + //debug + if (ON_nEntity < 11962) { + ++ ON_nEntity ; + continue ; + } + else if ( ON_nEntity > 11962) + break ; + const ON_ModelGeometryComponent* mgc = ON_ModelGeometryComponent::Cast( mc) ; ON_wString onwStrName ; mgc->GetName( onwStrName) ; @@ -463,6 +471,8 @@ Import3dm::ConvertGeometry( const ON_Object* oGeometry, vector return true ; } +//bool bSkip = true ; + //---------------------------------------------------------------------------- bool Import3dm::ConvertInstanceReference( const ON_InstanceRef* onInstRef, const ON_Xform& onXForm, vector>& vpGeoObj) @@ -478,6 +488,16 @@ Import3dm::ConvertInstanceReference( const ON_InstanceRef* onInstRef, const ON_X const int geometry_id_count = geometry_id_list.Count() ; if ( geometry_id_count > 0) { for ( int i = 0; i < geometry_id_count; i++) { + //if (geometry_id_count == 225 && i == 101) { + // bSkip = false ; + //} + + //if ( bSkip) + // continue ; + + string sOut = "Importing instRef: GeoC = " + ToString( geometry_id_count) + " i = " + ToString( i) ; + LOG_ERROR( GetEE3Logger(), sOut.c_str()) ; + const ON_ModelComponentReference& model_component_ref = m_model.ComponentFromId(ON_ModelComponent::Type::ModelGeometry, geometry_id_list[i]) ; const ON_ModelGeometryComponent* model_geometry = ON_ModelGeometryComponent::Cast(model_component_ref.ModelComponent()) ; if ( nullptr != model_geometry) { @@ -943,12 +963,11 @@ Import3dm::ConvertBrep( const ON_Brep* onBrep, const bool bForceTriMesh) pCrvCompo->MergeCurves(LIN_TOL_FINE, ANG_TOL_FINE) ; #if SAVETRIMLOOP - if ( false) - SaveGeoObj( pCrvCompo->Clone(), "D:\\Temp\\bezier\\import3dm\\import_trim\\loop" + ToString(k) + ".nge") ; + SaveGeoObj( pCrvCompo->Clone(), "D:\\Temp\\bezier\\import3dm\\import_trim\\loop" + ToString(k) + ".nge") ; #endif double dArea = 0 ; pCrvCompo->GetArea( plane, dArea) ; - if ( nLoopCount == 1 && dArea <= 0) + if ( nLoopCount == 1 && dArea <= 10 * EPS_SMALL) bTooSmallOnlyLoop = true ; if ( ! SfrCntr.AddCurve( Release( pCrvCompo))) ++ nFailedBTrim ;