Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031402Community[OCCT] OCCT:Modeling Datapublic2020-03-04 10:502020-09-15 12:27
Assigned Tomsv 
PlatformOSOS Version
Product Version[OCCT] 7.4.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0031402: Geom_BSplineSurface::Segment produces wrong result
DescriptionUsing Geom_BSplineSurface::Segment on the attached surface, with the parameters

surface->Segment(0., 1., 0.49999999999999988898, 0.66666666666666662966);

does not trim the surface correctly. surface->Bounds reports the following bounds after trimming:

(0.0, 1.0, 0.3333333333333333, 0.6666666666666666)

Expected bounds would be:
(0.0, 1.0, 0.5, 0.66666667)

I suppose a tolerance issue in the knot insertion algorithm.
Steps To ReproduceBRep_Builder b;
TopoDS_Shape s;
BRepTools::Read(s, "surface.brep", b);

auto surface = Handle(Geom_BSplineSurface)::DownCast(BRep_Tool::Surface(TopoDS::Face(s)));

surface->Segment(0., 1., 0.49999999999999988898, 0.66666666666666662966);

double u1, u2, v1, v2;
surface->Bounds(u1, u2, v1, v2);
TagsNo tags attached.
Test case number
Attached Files? file icon surface.brep (4,352 bytes) 2020-03-04 10:50

- Relationships

-  Notes
martinsiggel (developer)
2020-03-04 11:38

I tried to track the error down:
The v-knot insertion of 0.499999999... is almost at v=0.5, which is a knot of the surface. As this is within the knot insertion tolerance, the a knew knot is not inserted but the multiplicity of 0.5 is increased. The knot vector's size does not change. Fine so far.

The problem seems to lie in BSplCLib::LocateParameter. Here, the value of v is just outside the tolerance to the next knot (difference to the next knot is 1.1e-16, tolerance (eps) is 5.6e-17).

Conclusion: The tolerances of knot insertion and parameter location do not match and must be adapted.

- Issue History
Date Modified Username Field Change
2020-03-04 10:50 martinsiggel New Issue
2020-03-04 10:50 martinsiggel Assigned To => msv
2020-03-04 10:50 martinsiggel File Added: surface.brep
2020-03-04 11:38 martinsiggel Note Added: 0090808
2020-09-15 12:27 msv Product Version 7.5.0 => 7.4.0
2020-09-15 12:27 msv Target Version 7.5.0 => 7.6.0*

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker