MantisBT - Community
View Issue Details
0022910Community[OCCT] OCCT:Modeling Datapublic2012-01-17 17:562012-03-29 17:26
Roman Lygin 
bugmaster 
normalminor 
closedfixed 
ALL
[OCCT] 6.5.2 
[OCCT] 6.5.3[OCCT] 6.5.3 
chl 934 P4
0022910: Failure to compute iso-line for NURBS surface
http://www.opencascade.org/org/forum/thread_22600/ [^]

DRAW reproducer:
> pload MODELING
> restore s.rle s
> uiso u s 0.5
An exception was caught 005656AC : Standard_ConstructionError: Geom_BSplineCurve

** Exception ** 005656AC : Standard_ConstructionError: Geom_BSplineCurve


For creating a B-Spline curve the negative weights are supplied what causes an exception.
Tested on OCC 6.5.0 and 6.5.1, Windows, 32 bit.
Also reproduced on 6.5.2
No tags attached.
zip surf.zip (4,257) 2012-01-17 17:56
https://tracker.dev.opencascade.org/
zip GeomLib_Test.zip (6,564) 2012-01-19 21:24
https://tracker.dev.opencascade.org/
? P2 (512) 2012-01-27 12:58
https://tracker.dev.opencascade.org/
? P4 (542) 2012-01-27 12:58
https://tracker.dev.opencascade.org/
Issue History
2012-01-17 17:56Roman LyginNew Issue
2012-01-17 17:56Roman LyginAssigned To => jgv
2012-01-17 17:56Roman LyginFile Added: surf.zip
2012-01-17 21:04Roman LyginNote Added: 0019161
2012-01-17 21:45Roman LyginNote Added: 0019162
2012-01-19 20:43abvNote Added: 0019188
2012-01-19 20:43abvStatusnew => resolved
2012-01-19 21:24Roman LyginFile Added: GeomLib_Test.zip
2012-01-19 21:25Roman LyginNote Added: 0019190
2012-01-20 16:53jgvNote Added: 0019207
2012-01-20 16:53jgvStatusresolved => reviewed
2012-01-27 12:57aanNote Added: 0019284
2012-01-27 12:58aanFile Added: P2
2012-01-27 12:58aanFile Added: P4
2012-01-27 12:58aanAssigned Tojgv => abv
2012-01-27 12:58aanStatusreviewed => assigned
2012-01-27 13:07bugmasterNote Edited: 0019284bug_revision_view_page.php?bugnote_id=19284#r3332
2012-01-27 14:08Roman LyginNote Added: 0019285
2012-01-27 15:57aanTest case number => chl 934 P4
2012-02-02 14:09aanNote Added: 0019358
2012-02-02 14:09aanStatusassigned => feedback
2012-02-02 14:10aanStatusfeedback => reviewed
2012-02-02 14:10aanStatusreviewed => tested
2012-02-03 14:04bugmasterTarget Version => 6.5.3
2012-02-03 15:43bugmasterNote Added: 0019383
2012-02-03 15:43bugmasterStatustested => verified
2012-02-03 15:43bugmasterResolutionopen => fixed
2012-02-03 15:43bugmasterAssigned Toabv => Roman Lygin
2012-03-29 17:26bugmasterChangeset attached => occt master 03976b37

Notes
(0019161)
Roman Lygin   
2012-01-17 21:04   
Please put off analysis of this issue. This can be not a bug as U-range is [1.8,2.8], i.e 0.5 is out of that. The problem comes from BRepMesh which is called from Visualization. So, the problem can be upstream.
(0019162)
Roman Lygin   
2012-01-17 21:45   
Here is a more correct reproducer:
> pload MODELING
> restore s.rle s
> mkface f s
> incmesh f 0.0038476968063336017
# the latter is similar to visualization in shading :
#> vinit
#> vdisplay f
#> vsetdispmode f 1

The problem is in GeomLib::NormEstim() in line 2404:
Instead of:
    Standard_Real par = .5*(bid2-bid1);
it must be:
    Standard_Real par = .5*(bid2+bid1);
to compute average parameter.

With this fix everything works OK.

The surface has a singularity and this is why the buggy code branch in this function is different from one which works most of the time.

Please kindly verify and integrate.
(0019188)
abv   
2012-01-19 20:43   
The fix is put to branch OCC22910, please review
(0019190)
Roman Lygin   
2012-01-19 21:25   
For C++ (QtTestFramework-based) regression test see GeomLib_Test.zip
(0019207)
jgv   
2012-01-20 16:53   
No remarks
(0019284)
aan   
2012-01-27 12:57   
(edited on: 2012-01-27 13:07)
Dear BugMaster,

The fix resolved the problem described in the second post of Roman Lygin. The main problem still unresolved. The exception rises when try to preform uiso command.

I have wrote tests chl 934 P2, which reproduce steps described in a main description - it's Failed.
and test chl 934 P4, which reproduce steps described in a second post - it's OK

Problem was reproduced on Linux platform.

(0019285)
Roman Lygin   
2012-01-27 14:08   
You do NOT need to fix the first issue (uiso 0.5)! The root-cause is in the 2nd issue (wrong computation of an average parameter). With it fixed, you will never get 0.5 and hence be exposed to the first issue.

Therefore the P2 script above is just not required.

Thanks for sharing the non-regression test scripts, by the way! Very educative.
(0019358)
aan   
2012-02-02 14:09   
Dear BugMaster,
Workbench KAS:dev:aan-OCC22910-occt from SVN branch http://svn/svn/occt/branches/OCC22910 [^]
(and aan-OCC22910-products from trunk) was successfully compiled on Linux and Windows platforms, and tested on Linux and Windows platforms.

Test for this fix is chl 934 P4. It's OK.

There are not regressions in aan-OCC22910-products regarding to KAS:dev:products-20120127-opt

See results in /QADisk/occttests/results/KAS/dev/aan-OCC22910-products_24012012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120120-opt_20012012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification [^]
(0019383)
bugmaster   
2012-02-03 15:43   
Integrated into trunk of occt repository

Date: 2012-02-03 15:29:01 +0400 (Fri, 03 Feb 2012)
New Revision: 10295

Modified:
   trunk/src/GeomLib/GeomLib.cxx