Modification to create natural bounds for face based on the spherical and Bspline surface and having only one bound represented by Vertex loop was made.
According to the specification of ISO-10303 part 42:
"If the face has only one bound and this is of type vertex_loop, then the interior of the face is the domain of the face_surface.face_geometry. In such a case the underlying surface shall be closed (e.g. a spherical_surface.)"
- natural bounds are applied only in case if VertexLoop is only the one
defined face bound.
Update of test-cases according to the new behavior
Test-case for issue #24595
// 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
if (GeomSurf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)) ||
GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) )
{
- if (!isExistOuter || FaceBound->IsKind(STANDARD_TYPE(StepShape_FaceOuterBound))) {
+ if (NbBnd ==1 || 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;
+ }
}
if (//GeomSurf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
--- /dev/null
+puts "================"
+puts "OCC24595"
+puts "================"
+puts ""
+#######################################################################################
+# STEP import missing surfaces
+#######################################################################################
+
+set BugNumber OCC24595
+stepread [locate_data_file bug24595_281390.stp] a *
+explode a_1 f
+set mlog [nbshapes a_1_3]
+
+set status 1
+
+if (![regexp {WIRE[ ]+: 1} $mlog]) {
+ set status 0
+}
+
+set mlog [bounding a_1_3]
+if (![regexp {(-7.26623440743389) (-8.0984932752388978) (-150.09849327523889) (7.2662344074338865) (8.0984932752388978) (-141.90150672476111)} $mlog]) {
+ set status 0
+}
+
+if {$status == 1} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
\ No newline at end of file
# !!!! This file is generated automatically, do not edit manually! See end script
-
set filename trj9_b2-ai-214.stp
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
-TPSTAT : Faulties = 0 ( 0 ) Warnings = 8 ( 38 ) Summary = 8 ( 38 )
-CHECKSHAPE : Wires = 1 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
-NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 221 ( 221 ) Summary = 1465 ( 1463 )
-STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 221 ( 221 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 610 ( 610 )
-TOLERANCE : MaxTol = 0.004950186716 ( 0.004950186717 ) AvgTol = 0.0003553188051 ( 0.0003621212346 )
+TPSTAT : Faulties = 0 ( 0 ) Warnings = 7 ( 38 ) Summary = 7 ( 38 )
+CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
+NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 221 ( 221 ) Summary = 1460 ( 1459 )
+STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 221 ( 221 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 608 ( 608 )
+TOLERANCE : MaxTol = 0.004950137219 ( 0.004950137216 ) AvgTol = 0.0003566630364 ( 0.0003615446964 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 1 ( 1 ) Volume = 1 ( 1 ) Area = 1 ( 1 )
NCOLORS : NColors = 1 ( 1 )