View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025024 | Community | OCCT:Foundation Classes | public | 2014-06-18 22:31 | 2014-11-11 12:59 |
Reporter | khlebnikov | Assigned To | bugmaster | ||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2013 | ||
Product Version | 6.7.1 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0025024: BSplCLib::PrepareInsertKnots reports incorrect number of poles | ||||
Description | When using GeomFill_SectionGenerator I came across a problem which would lead to an exception or incorrect results. This seems to be due to a bug in BSplCLib::PrepareInsertKnots which returns incorrect number of poles if one of the inserted knots coincides with the last knot of the periodic spline in which the new knots are being inserted to. It seems that there was some code regarding this problem, but it is commented out. If I uncomment it - the problem still persists. However if I replace the line 1744 (sigma += amult - mult;) with the following snippet - it works OK in my cases. --- Line 1706: (add) Standard_Integer lastKnotMult = Mults(Knots.Upper()); --- Line 1744: (replace sigma += amult - mult;) if (k == Knots.Upper() && Periodic) { lastKnotMult = Min(Degree, mult + 2 * (amult - mult)); sigma += 2 * lastKnotMult - 2 * Mults(Knots.Lower()); } else { sigma += amult - mult; } --- Line 1782: (replace NbPoles = sigma - Mults(Knots.Upper());) NbPoles = sigma - lastKnotMult; --- In the attachment is a minimal example for the problem (only three simple wires - an ellipse and 2 circles in BSpline form) which when put into the GeomFill_SectionGenerator with AddCurve(BRep_Tool::Curve(edge, first, last)) would fail without and work with my changes. I'm not sure whether my solution is correct, but it seems to work on many other more complex cases. | ||||
Steps To Reproduce | Load the wires from the attached files Add them into GeomFill_SectionGenerator Call GeomFill_SectionGenerator::Perform(1e-5) | ||||
Tags | No tags attached. | ||||
Test case number | bugs fclasses(002) bug25024 | ||||
|
PrepareInsertKnots_Bug.zip (3,066 bytes) |
|
BSplCLib.cxx (137,104 bytes) |
|
I have added a more proper bugfix - it seems to work flawlessly for me - the fix I proposed originally doesn't work correctly in some cases. The attached file contains the necessary modifications both to PrepareInsertKnots and to InsertKnots. I didn't check it for the case where the "Add" flag is specified as it is of no interest for me now. The fix should be similar to the Add == false case. |
|
DRAW reproducer: restore bug25024_wires.brep w explode w thrusections r 0 0 w_1 w_2 Note that the problem is caused by wire w_1 when thusection works in "ruled" mode; the command works fine if w_3 is added, but fails again if second '0' is changed to '1' (ruled mode). Another problem with w_1 is that it cannot be displayed in axo viewer, perhaps because of edge range shifted w.r.t. the basis curve range. |
2014-08-12 10:01 manager |
bug25024_wires.brep (7,156 bytes) |
|
Branch CR25024 has been created by abv. SHA-1: 658ec7243cc0e3b070d33534b03a2396a175b8f8 This branch includes the following new commits: new 658ec72 0025024: BSplCLib::PrepareInsertKnots reports incorrect number of poles Detailed log of new commits: commit 658ec7243cc0e3b070d33534b03a2396a175b8f8 Author: abv Date: Tue Aug 12 13:20:08 2014 +0400 0025024: BSplCLib::PrepareInsertKnots reports incorrect number of poles |
|
Proposed fix pushed to CR25024, please review |
|
Branch CR25024 has been updated by abv. SHA-1: c5e8cbdab010f8cb9e92b9275d8c8e0e4a97e78f from 658ec72 0025024: BSplCLib::PrepareInsertKnots reports incorrect number of poles new c5e8cbd Added test bugs fclasses bug25024 Detailed log of new commits: commit c5e8cbdab010f8cb9e92b9275d8c8e0e4a97e78f Author: abv Date: Wed Aug 13 13:03:25 2014 +0400 Added test bugs fclasses bug25024 |
|
I have run complete tests with this fix (vc10 x64); no regressions are reported |
|
Ok |
|
Branch CR25024 has been updated forcibly by mkv. SHA-1: 3da1afd014d2a672ffe7a4d6a32971918e253f72 |
|
Dear BugMaster, Branch CR25024 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested. SHA-1: 3da1afd014d2a672ffe7a4d6a32971918e253f72 Number of compiler warnings: occt component : Linux: 15 (15 on master) Windows: 0 (0 on master) products component : Linux: 11 (11 on master) Windows: 1 (1 on master) Regressions/Differences: No regressions/differences Testing cases: http://occt-tests/CR25024-master-occt/Windows-32-VC10/bugs/fclasses/bug25024.html bugs fclasses(002) bug25024: OK Testing on Linux: Total MEMORY difference: 351937856 / 351893124 Total CPU difference: 47990.08999999982 / 45953.80000000014 Testing on Windows: Total MEMORY difference: 239618288 / 239728968 Total CPU difference: 33844.015625 / 32650.4375 There are no differences in images found by testdiff. |
|
Branch CR25024 has been updated by mkv. SHA-1: f9b9c242cfadf6065cc1064ef1f7d95c3e1975b4 from 3da1afd Added test bugs fclasses bug25024 new f9b9c24 Test case for issue CR25024 Detailed log of new commits: commit f9b9c242cfadf6065cc1064ef1f7d95c3e1975b4 Author: mkv Date: Mon Aug 18 15:30:01 2014 +0400 Test case for issue CR25024 |
|
Branch CR25024 has been deleted by inv. SHA-1: f9b9c242cfadf6065cc1064ef1f7d95c3e1975b4 |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-06-18 22:31 | khlebnikov | New Issue | |
2014-06-18 22:31 | khlebnikov | Assigned To | => abv |
2014-06-18 22:31 | khlebnikov | File Added: PrepareInsertKnots_Bug.zip | |
2014-07-29 16:40 | khlebnikov | File Added: BSplCLib.cxx | |
2014-07-29 16:42 | khlebnikov | Note Added: 0030474 | |
2014-08-12 10:00 |
|
Note Added: 0030668 | |
2014-08-12 10:00 |
|
Status | new => assigned |
2014-08-12 10:00 |
|
Target Version | => 6.8.0 |
2014-08-12 10:01 |
|
File Added: bug25024_wires.brep | |
2014-08-12 10:01 |
|
Note Edited: 0030668 | |
2014-08-12 13:20 | git | Note Added: 0030675 | |
2014-08-12 13:21 |
|
Note Added: 0030676 | |
2014-08-12 13:21 |
|
Assigned To | abv => ifv |
2014-08-12 13:21 |
|
Status | assigned => resolved |
2014-08-13 13:03 | git | Note Added: 0030713 | |
2014-08-13 13:04 |
|
Note Added: 0030714 | |
2014-08-14 11:55 |
|
Note Added: 0030744 | |
2014-08-14 11:55 |
|
Status | resolved => reviewed |
2014-08-15 12:00 |
|
Assigned To | ifv => mkv |
2014-08-15 12:31 | git | Note Added: 0030773 | |
2014-08-18 15:32 |
|
Note Added: 0030838 | |
2014-08-18 15:32 | git | Note Added: 0030839 | |
2014-08-18 15:32 |
|
Test case number | => bugs fclasses(002) bug25024 |
2014-08-18 15:32 |
|
Assigned To | mkv => bugmaster |
2014-08-18 15:32 |
|
Status | reviewed => tested |
2014-08-28 17:45 | bugmaster | Assigned To | bugmaster => abv |
2014-08-28 17:45 | bugmaster | Status | tested => feedback |
2014-09-19 19:32 |
|
Assigned To | abv => bugmaster |
2014-09-19 19:32 |
|
Status | feedback => tested |
2014-09-26 14:49 | bugmaster | Changeset attached | => occt master c1c03615 |
2014-09-26 14:49 | bugmaster | Status | tested => verified |
2014-09-26 14:49 | bugmaster | Resolution | open => fixed |
2014-09-30 11:36 | git | Note Added: 0032412 | |
2014-11-11 12:44 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:59 |
|
Status | verified => closed |