1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024601: Unwanted spheres shown after Step-Import

Add check for outer boundary before creating wire from Vertex Loop on spheres.
Test case for issue CR24601
This commit is contained in:
ika
2015-02-05 16:24:46 +03:00
committed by bugmaster
parent a4d5c9abcc
commit 0769561063
2 changed files with 35 additions and 3 deletions

View File

@@ -221,6 +221,12 @@ void StepToTopoDS_TranslateFace::Init
// Standard_Boolean fautcoudre =
// ( (NbBnd == 2) && (GeomSurf->IsUClosed() || GeomSurf->IsVClosed()) );
Standard_Boolean isExistOuter = Standard_False;
for (Standard_Integer i = 1; i <= NbBnd; i++) {
FaceBound = FS->BoundsValue(i);
if (FaceBound->IsKind(STANDARD_TYPE(StepShape_FaceOuterBound)))
isExistOuter = Standard_True;
}
for (Standard_Integer i = 1; i <= NbBnd; i ++) {
#ifdef OCCT_DEBUG
@@ -244,9 +250,11 @@ void StepToTopoDS_TranslateFace::Init
if (GeomSurf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)) ||
GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) )
{
BRepBuilderAPI_MakeFace mf (GeomSurf, Precision());
for (TopoDS_Iterator it(mf); it.More(); it.Next())
B.Add (F, it.Value());
if (!isExistOuter || FaceBound->IsKind(STANDARD_TYPE(StepShape_FaceOuterBound))) {
BRepBuilderAPI_MakeFace mf (GeomSurf, Precision());
for (TopoDS_Iterator it(mf); it.More(); it.Next())
B.Add (F, it.Value());
}
continue;
}

24
tests/bugs/step/bug24601 Normal file
View File

@@ -0,0 +1,24 @@
puts "============"
puts "OCC24601"
puts "============"
puts ""
#####################################################
# Unwanted spheres shown after Step-Import
#####################################################
stepread [locate_data_file bug24601_216523_2_03.stp] a *
tpcompound result
set square 38563.2
set nb_v_good 150
set nb_e_good 228
set nb_w_good 135
set nb_f_good 105
set nb_sh_good 2
set nb_sol_good 2
set nb_compsol_good 0
set nb_compound_good 2
set nb_shape_good 624
set 3dviewer 1