Skip to content

Commit

Permalink
We're only processing one component here - remove the iteration.
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Dec 13, 2023
1 parent 7e72844 commit 0d1543f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/librt/primitives/brep/brep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2398,11 +2398,9 @@ rt_brep_adjust(struct bu_vls *logstr, struct rt_db_internal *intern, int argc, c
bu_vls_printf(logstr, "%s", ON_String(wonstr).Array());

ONX_ModelComponentIterator it(model, ON_ModelComponent::Type::ModelGeometry);
for (ON_ModelComponentReference cr = it.FirstComponentReference(); false == cr.IsEmpty(); cr = it.NextComponentReference()) {
std::cout << cr.ModelComponent()->Name();
const ON_ModelGeometryComponent *mo = ON_ModelGeometryComponent::Cast(cr.ModelComponent());
bi->brep = ON_Brep::New(*ON_Brep::Cast(mo->Geometry(nullptr)));
}
ON_ModelComponentReference cr = it.FirstComponentReference();
const ON_ModelGeometryComponent *mo = ON_ModelGeometryComponent::Cast(cr.ModelComponent());
bi->brep = ON_Brep::New(*ON_Brep::Cast(mo->Geometry(nullptr)));
}
return BRLCAD_OK;
}
Expand Down

0 comments on commit 0d1543f

Please sign in to comment.