EgtExch3dm :

- aumentata tolleranza per superfici non disegnate perché troppo piccole.
This commit is contained in:
Daniele Bariletti
2026-03-31 17:44:41 +02:00
parent bf572634ee
commit d18c7e6dad
+22 -3
View File
@@ -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<PtrOwner<IGeoObj>
return true ;
}
//bool bSkip = true ;
//----------------------------------------------------------------------------
bool
Import3dm::ConvertInstanceReference( const ON_InstanceRef* onInstRef, const ON_Xform& onXForm, vector<PtrOwner<IGeoObj>>& 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 ;