View Issue Details

IDProjectCategoryView StatusLast Update
0023943CommunityOCCT:Modeling Algorithmspublic2013-12-19 13:55
ReporterRoman Lygin Assigned ToRoman Lygin  
Status closedResolutionfixed 
Product Version6.5.4 
Target Version6.7.0Fixed in Version6.7.0 
Summary0023943: OCC fails to work with offset surfaces with singularities
DescriptionUnlike other types of surfaces, offsets throw an exception Geom_UndefinedValue (or _UndefinedDerivative) when trying to compute values near their singularities.

Therefore algorithms that do not expect surface evaluation to throw exception eventually produce incorrect results when working with such geometries.

The fix addresses two cases trying to improve robustness of OCC:
1. singularity is now recognized in Geom_OscullatingSurface if the derivative is below the tolerance (regardless that it should be greater than 1e-12 threshold used before)
2. ShapeAnalysis_Surface::ValueOf() now avoids going beyond the surface range for offset surfaces.

1. In 0000001 additionally the debug output in Geom_OscullatingSurface.cxx has been suppressed in production version as otherwise it severely contaminates the log.
Suppression is done by adding another macro which could be defined only in OCC development environment. OCC team is free to modify the name as sees fit.
2. In 0000002 it would probably be good to prevent going beyond surface range for all types of (non-periodic?) surfaces. However to minimize fix impact it has been limited to offsets only.
Steps To ReproduceSee two independent reproducers attached.
TagsNo tags attached.
Test case numberbugs moddata_3(013) bug23943_1, bug23943_2, bug23943_3, bug23943_4

Attached Files

  • (499,784 bytes)
  • (227,155 bytes)


related to 0024008 closedbugmaster ShapeAnalysis_Surface causes exception in Geom_OffsetSurface 


Roman Lygin

2013-05-03 18:18

developer (499,784 bytes)

Roman Lygin

2013-05-03 18:18

developer (227,155 bytes)

Roman Lygin

2013-05-03 18:25

developer   ~0024308

The fix pushed to the git repository


2013-05-06 18:30

developer   ~0024316

The first part of correction (elimination of TolMin from test of singular point) seems to be Ok.
The second part of correction (ShapeAnalysis_Surface::ValueOf()) can be consider as temporal solution for following reasons:
the going beyond surface domain is not "fatal" problem for practically all types of not periodic surface including offset surface because these surfaces can be analytically extended. Of course, extension must not be too large.
Sometimes going beyong surface happens by "natural" way, for example, while getting pcurve by projection of 3d curve, which is near surface boundary.
Problem of given offset surface is that basis surface is singular and osculating surface is built for Umax, but derivative are calculated for u > Umax. Perhaps, the correct fix of bug must solve problem of extension of osculating surface, if it exists for u > Umax.
So problem requires additional investigations.


2013-05-23 11:13

tester   ~0024481

Dear BugMaster,

Branch CR23943 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: b3113a1c9303200f58d7317a076b2c4fd8de0263

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 64 (64 on master)

No regressions

No improvements

Testing cases:
bugs moddata_3(013) bug23943_1, bug23943_2, bug23943_3, bug23943_4 - OK

Testing on Linux:
Total MEMORY difference: 365857352 / 365850136
Total CPU difference: 41145.37000000122 / 45786.650000001355

Testing on Windows:
Total MEMORY difference: 415969780 / 418014292
Total CPU difference: 38610.796875 / 29305.09375

There are not differences in images found by testdiff.


2013-05-28 14:33

administrator   ~0024534

Fix has been integrated into master of occt repository

Issue History

Date Modified Username Field Change
2013-05-03 18:18 Roman Lygin New Issue
2013-05-03 18:18 Roman Lygin Assigned To => jgv
2013-05-03 18:18 Roman Lygin File Added:
2013-05-03 18:18 Roman Lygin File Added:
2013-05-03 18:25 Roman Lygin Note Added: 0024308
2013-05-03 18:25 Roman Lygin Status new => resolved
2013-05-06 12:03 jgv Assigned To jgv => ifv
2013-05-06 18:30 ifv Note Added: 0024316
2013-05-06 18:30 ifv Status resolved => reviewed
2013-05-23 11:13 mkv Note Added: 0024481
2013-05-23 11:14 mkv Test case number => bugs moddata_3(013) bug23943_1, bug23943_2, bug23943_3, bug23943_4
2013-05-23 11:14 mkv Assigned To ifv => bugmaster
2013-05-23 11:14 mkv Status reviewed => tested
2013-05-23 12:39 bugmaster Target Version => 6.7.0
2013-05-28 14:33 bugmaster Note Added: 0024534
2013-05-28 14:33 bugmaster Status tested => verified
2013-05-28 14:33 bugmaster Resolution open => fixed
2013-05-28 14:33 bugmaster Assigned To bugmaster => Roman Lygin
2013-06-02 15:56 abv Relationship added related to 0024008
2013-12-19 13:53 bugmaster Status verified => closed
2013-12-19 13:55 bugmaster Fixed in Version => 6.7.0