View Issue Details

IDProjectCategoryView StatusLast Update
0033187Open CASCADEOCCT:Modeling Algorithmspublic2022-12-05 00:25
Reporteratereshi Assigned Toatereshi  
PrioritynormalSeverityminor 
Status verifiedResolutionfixed 
Product Version7.7.0 
Target Version7.8.0 
Summary0033187: Modeling Algorithms - Crash in postprocessing of imported shape
DescriptionFile Office.x_t from issue 0030459 can't be imported with enabled shape healing, exception arrises.
Problem is in GeomAdaptor_Curve::NbIntervals and GeomAdaptor_Curve::Intervals functions.
First of them calculates number of intervals, then array is created and second of them fills the array.
The number of intervals (array size) is less than need for filling.
Desynchronization of function behavior.
Small part of initial file were localized to "brep" for test purposes.
Steps To Reproducepload MODELING
restore [locate_data bug33187.brep] s
fixshape r s
TagsNo tags attached.
Test case number

Attached Files

  • bug33187.brep (702,632 bytes)
  • bc (238 bytes)

Activities

atereshi

2022-10-31 14:20

developer   ~0111802

git

2022-10-31 15:53

administrator   ~0111804

Branch CR33187 has been created by atereshi.

SHA-1: cd9a3877f2feadbf9d6cf7c28146548d2731462b


Detailed log of new commits:

Author: atereshi
Date: Wed Oct 26 16:59:54 2022 +0300

    0033187: Modeling Algorithms - Crash in postprocessing of imported shape
    
    Problem: Desynchronization of behaviors of GeomAdaptor_Curve::NbIntervals and
     GeomAdaptor_Curve::Intervals functions. First calculates number of intervals, then
     array is created and second fills the array. In some cases the size of array
     is less than need for filling.
    
    Change:
    1. Added function BSplCLib::Intervals that calculates number of interval and fills
     the array with its (if needed).
    2. Simplified the algorithm of intervals calculation.
    3. GeomAdaptor_Curve::NbIntervals/Intervals and Geom2dAdaptor_Curve::NbIntervals/Intervals
     use BSplCLib::Intervals.
    4. Test for problem shape was created: bugs modalg_8 bug33187.
    
    Result: The new approach eliminates the problem of writing outside the array bounds.

atereshi

2022-10-31 15:55

developer   ~0111805

atereshi

2022-10-31 16:09

developer   ~0111806

bug33187.brep (702,632 bytes)

git

2022-10-31 16:10

administrator   ~0111808

Branch CR33187 has been updated forcibly by atereshi.

SHA-1: c7348a817e4646bb144ff11e781b8b713aad8eb5

ifv

2022-11-01 14:07

developer   ~0111812

Last edited: 2022-11-01 14:14

Results for offset curve, based on attached bspline curve bc seem to be wrong:
OCC29745 bc 2 -1 9
NbIntervals: 5; -1 1 3.0943951023932001 5.1887902047863896 7.2831853071795898 9
offset obc bc 1 0 0 1
OCC29745 obc 1 -1 9
NbIntervals: 4; -1 1 3.0943951023932001 5.1887902047863896 9

Intervals C1 for offset curve and C2 for base curve must be the same.

This problem exists for current master too.

ifv

2022-11-01 14:08

developer   ~0111813

bc (238 bytes)

git

2022-11-01 16:05

administrator   ~0111817

Branch CR33187 has been updated by atereshi.

SHA-1: 811b74e94367d7d44d1ea0224adda1fe0e79b902


Detailed log of new commits:

Author: atereshi
Date: Tue Nov 1 16:05:36 2022 +0300

    # fix offset curve adaptor boundaries

atereshi

2022-11-02 10:21

developer   ~0111830

Last edited: 2022-11-02 10:24

Issue with offset curve has been fixed.

Draw[72]> pload QAcommands MODELING
Draw[73]> restore [locate_data bc] bc
bc
Draw[74]> OCC29745 bc 2 -1 9
NbIntervals: 5; -1 1 3.0943951023932001 5.1887902047863896 7.2831853071795898 9
Draw[75]> offset obc bc 1 0 0 1
Draw[76]> OCC29745 obc 1 -1 9
NbIntervals: 5; -1 1 3.0943951023932001 5.1887902047863896 7.2831853071795898 9

All tests are passed.
http://jenkins-test-occt.nnov.opencascade.com/view/CR33187-master-atereshi/view/COMPARE/

ifv

2022-11-02 10:37

developer   ~0111831

Dear @atereshi, join all commits in one commit with correct header and description of shanges.

git

2022-11-02 11:30

administrator   ~0111836

Branch CR33187 has been updated forcibly by atereshi.

SHA-1: fd4e12cfeae7d62531519f9315d40155656d938f

atereshi

2022-11-02 11:36

developer   ~0111837

Commits were squashed. Changes about offset curve were added to commit description.

ifv

2022-11-02 12:21

developer   ~0111839

Branch CR33187 seems to be valid

git

2022-11-02 16:46

administrator   ~0111891

Branch CR33187 has been updated forcibly by atereshi.

SHA-1: d625153e798b6041014ef42a410e05ef83324cdb

git

2022-11-03 10:19

administrator   ~0111897

Branch CR33187 has been updated forcibly by atereshi.

SHA-1: 80ce7eeaa515834b3427e0bdad9191e01622047b

Related Changesets

occt: master f9990707

2022-10-26 16:59:54

atereshi


Committer: vglukhik Details Diff
0033187: Modeling Algorithms - Crash in postprocessing of imported shape

Problem: Desynchronization of behaviors of GeomAdaptor_Curve::NbIntervals and
GeomAdaptor_Curve::Intervals functions. First calculates number of intervals, then
array is created and second fills the array. In some cases the size of array
is less than need for filling.

Change:
1. Added function BSplCLib::Intervals that calculates number of interval and fills
the array with its (if needed).
2. Simplified the algorithm of intervals calculation.
3. GeomAdaptor_Curve::NbIntervals/Intervals and Geom2dAdaptor_Curve::NbIntervals/Intervals
use BSplCLib::Intervals.
4. When creating an adapter for the base curve, the boundaries of the adapter for the offset curve are applied.
5. Test for problem shape was created: bugs modalg_8 bug33187.

Result: The new approach eliminates the problem of writing outside the array bounds.
Affected Issues
0033187
mod - src/BSplCLib/BSplCLib.cxx Diff File
mod - src/BSplCLib/BSplCLib.hxx Diff File
mod - src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx Diff File
mod - src/GeomAdaptor/GeomAdaptor_Curve.cxx Diff File
add - tests/bugs/modalg_8/bug33187 Diff File
mod - tests/hlr/poly_hlr/A1 Diff File
mod - tests/hlr/poly_hlr/A2 Diff File
mod - tests/hlr/poly_hlr/A3 Diff File
mod - tests/hlr/poly_hlr/A4 Diff File
mod - tests/hlr/poly_hlr/A5 Diff File
mod - tests/hlr/poly_hlr/A6 Diff File
mod - tests/hlr/poly_hlr/A7 Diff File

Issue History

Date Modified Username Field Change
2022-10-31 14:19 atereshi New Issue
2022-10-31 14:19 atereshi Assigned To => atereshi
2022-10-31 14:20 atereshi Note Added: 0111802
2022-10-31 14:20 atereshi File Added: office_901.brep
2022-10-31 15:53 git Note Added: 0111804
2022-10-31 15:54 atereshi File Deleted: office_901.brep
2022-10-31 15:55 atereshi Note Added: 0111805
2022-10-31 15:55 atereshi File Added: 0033187.brep
2022-10-31 15:57 atereshi Description Updated
2022-10-31 15:57 atereshi Steps to Reproduce Updated
2022-10-31 15:59 atereshi Assigned To atereshi => ifv
2022-10-31 15:59 atereshi Status new => resolved
2022-10-31 16:08 atereshi File Deleted: 0033187.brep
2022-10-31 16:09 atereshi Note Added: 0111806
2022-10-31 16:09 atereshi File Added: bug33187.brep
2022-10-31 16:10 git Note Added: 0111808
2022-11-01 14:07 ifv Assigned To ifv => atereshi
2022-11-01 14:07 ifv Status resolved => assigned
2022-11-01 14:07 ifv Note Added: 0111812
2022-11-01 14:08 ifv Note Added: 0111813
2022-11-01 14:08 ifv File Added: bc
2022-11-01 14:10 ifv Note Edited: 0111812
2022-11-01 14:14 ifv Note Edited: 0111812
2022-11-01 16:05 git Note Added: 0111817
2022-11-02 10:21 atereshi Note Added: 0111830
2022-11-02 10:24 atereshi Note Edited: 0111830
2022-11-02 10:25 atereshi Assigned To atereshi => ifv
2022-11-02 10:25 atereshi Status assigned => resolved
2022-11-02 10:25 atereshi Steps to Reproduce Updated
2022-11-02 10:37 ifv Assigned To ifv => atereshi
2022-11-02 10:37 ifv Status resolved => assigned
2022-11-02 10:37 ifv Note Added: 0111831
2022-11-02 11:30 git Note Added: 0111836
2022-11-02 11:36 atereshi Note Added: 0111837
2022-11-02 11:36 atereshi Assigned To atereshi => ifv
2022-11-02 11:36 atereshi Status assigned => resolved
2022-11-02 12:21 ifv Assigned To ifv => bugmaster
2022-11-02 12:21 ifv Status resolved => reviewed
2022-11-02 12:21 ifv Note Added: 0111839
2022-11-02 16:46 git Note Added: 0111891
2022-11-03 10:19 git Note Added: 0111897
2022-12-04 13:29 smoskvin Status reviewed => tested
2022-12-05 00:25 vglukhik Changeset attached => occt master f9990707
2022-12-05 00:25 atereshi Assigned To bugmaster => atereshi
2022-12-05 00:25 atereshi Status tested => verified
2022-12-05 00:25 atereshi Resolution open => fixed