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:
@@ -221,6 +221,12 @@ void StepToTopoDS_TranslateFace::Init
|
|||||||
// Standard_Boolean fautcoudre =
|
// Standard_Boolean fautcoudre =
|
||||||
// ( (NbBnd == 2) && (GeomSurf->IsUClosed() || GeomSurf->IsVClosed()) );
|
// ( (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 ++) {
|
for (Standard_Integer i = 1; i <= NbBnd; i ++) {
|
||||||
|
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
@@ -244,9 +250,11 @@ void StepToTopoDS_TranslateFace::Init
|
|||||||
if (GeomSurf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)) ||
|
if (GeomSurf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)) ||
|
||||||
GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) )
|
GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) )
|
||||||
{
|
{
|
||||||
BRepBuilderAPI_MakeFace mf (GeomSurf, Precision());
|
if (!isExistOuter || FaceBound->IsKind(STANDARD_TYPE(StepShape_FaceOuterBound))) {
|
||||||
for (TopoDS_Iterator it(mf); it.More(); it.Next())
|
BRepBuilderAPI_MakeFace mf (GeomSurf, Precision());
|
||||||
B.Add (F, it.Value());
|
for (TopoDS_Iterator it(mf); it.More(); it.Next())
|
||||||
|
B.Add (F, it.Value());
|
||||||
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
24
tests/bugs/step/bug24601
Normal file
24
tests/bugs/step/bug24601
Normal 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
|
Reference in New Issue
Block a user