mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0022492: Scaled sphere (Solid with BSplineSurface) is wrongly exported in STEP.
This commit is contained in:
@@ -675,7 +675,8 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_FaceBasedSurfaceModel)&
|
||||
// ============================================================================
|
||||
//:i6 abv 17 Sep 98: ProSTEP TR9 r0601-ct.stp: to be able read GS: GeometricCurveSet -> GeometricSet
|
||||
|
||||
static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf)
|
||||
static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf,
|
||||
const Standard_Real TolDegen)
|
||||
{
|
||||
TopoDS_Face res;
|
||||
|
||||
@@ -684,7 +685,7 @@ static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf)
|
||||
!theSurf->IsKind(STANDARD_TYPE(Geom_BoundedSurface))) return res;
|
||||
|
||||
//gka 11.01.99 file PRO7755.stp entity #2018 surface #1895: error BRepLib_MakeFace func IsDegenerated
|
||||
BRepBuilderAPI_MakeFace myMkFace(theSurf);
|
||||
BRepBuilderAPI_MakeFace myMkFace(theSurf, TolDegen);
|
||||
return myMkFace.Face();
|
||||
}
|
||||
|
||||
@@ -790,13 +791,13 @@ void StepToTopoDS_Builder::Init
|
||||
for ( Standard_Integer ii=1; ii <= nbi; ii++ )
|
||||
for ( Standard_Integer j=1; j <= nbj; j++ ) {
|
||||
Handle(StepGeom_SurfacePatch) patch = RCS->SegmentsValue ( ii, j );
|
||||
TopoDS_Face f = TranslateBoundedSurf ( patch->ParentSurface() );
|
||||
TopoDS_Face f = TranslateBoundedSurf (patch->ParentSurface(), preci);
|
||||
if ( ! f.IsNull() ) B.Add ( C, f );
|
||||
}
|
||||
res = C;
|
||||
}
|
||||
// try other surfs
|
||||
else res = TranslateBoundedSurf ( aSurf );
|
||||
else res = TranslateBoundedSurf (aSurf, preci);
|
||||
}
|
||||
else TP->AddWarning (ent," Entity is not a Curve, Point or Surface");
|
||||
if ( ! res.IsNull() ) {
|
||||
|
@@ -90,7 +90,7 @@ Standard_Boolean StepToTopoDS_TranslateCurveBoundedSurface::Init (
|
||||
// add natural bound if implicit
|
||||
if ( CBS->ImplicitOuter() ) {
|
||||
if ( Surf->IsKind(STANDARD_TYPE(Geom_BoundedSurface)) ) {
|
||||
BRepBuilderAPI_MakeFace mf (Surf);
|
||||
BRepBuilderAPI_MakeFace mf (Surf, Precision::Confusion());
|
||||
myFace = mf.Face();
|
||||
}
|
||||
else TP->AddWarning ( CBS, "Cannot make natural bounds on infinite surface" );
|
||||
|
@@ -229,11 +229,14 @@ void StepToTopoDS_TranslateFace::Init
|
||||
Handle(StepShape_VertexLoop) VL = Handle(StepShape_VertexLoop)::DownCast(Loop);
|
||||
|
||||
// abv 10.07.00 pr1sy.stp: vertex_loop can be wrong; so just make natural bounds
|
||||
if (GeomSurf->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
|
||||
BRepBuilderAPI_MakeFace mf (GeomSurf);
|
||||
for (TopoDS_Iterator it(mf); it.More(); it.Next() )
|
||||
B.Add ( F, it.Value() );
|
||||
continue;
|
||||
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());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (//GeomSurf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
|
||||
|
Reference in New Issue
Block a user