View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031974 | Community | OCCT:Modeling Algorithms | public | 2020-12-03 12:21 | 2021-02-21 11:44 |
Reporter | geuzaine | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Mac | OS | OS | ||
Product Version | 7.5.0 | ||||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP | ||||
Description | Dear OCCT team, I obtain strange results when I apply boolean operations between the two solids (an ellipsoid and a cube) contained in the attached BREP file (test.brep). Could you check on your side if the BREP is somehow incorrect (inverted solid?...)? What's puzzling is that if the ellipsoid is moved to another location, everything behaves as expected. Here are two screenshots of the behavior of BRepAlgoAPI_Cut applied to the cube and the ellipsoid: https://gmsh.info/beta/before_cut.png https://gmsh.info/beta/after_cut.png Somehow the cutting leaves the imprint of the ellipsoid in the cube, but does not carve out the part. Thanks, Christophe | ||||
Steps To Reproduce | restore test.brep t explode t bclearobjects bcleartools baddobjects t_1 baddtools t_2 bfillds bbuild r | ||||
Tags | No tags attached. | ||||
Test case number | bugs/modalg_7/bug31974 | ||||
|
test.brep (62,609 bytes) |
|
Eugene, can you please have a look at this issue? |
|
For some reason bounding box of one of the splits of the ellipsoid face is invalid, it does not contain the face. Here is the Draw script to reproduce (picture is attached):restore test.brep t explode t bclearobjects bcleartools baddobjects t_1 baddtools t_2 bfillds bbuild r explode t_2 f bopim t_2_1 explode t_2_1_im copy t_2_1_im_3 fx donly fx bounding fx -shape bb vdisplay fx bb To be investigated further. |
2020-12-03 17:06 developer |
AABB_inv.png (5,244 bytes) |
2020-12-04 08:29 developer |
fx.brep (9,312 bytes) |
|
Igor, could you please take a look why AABB is wrong? Face is attached. |
|
Bounding box is correct and built according to poles of surface. See attached picture aabb.jpg |
|
Have you checked it on the attached face? Could you please attach the Bounding box itself? |
|
Dear emv, I was wrong, it is bug in BndBox algorithm, I will write my considerations soon. |
|
Bug is caused by wrong defining restricted subset of poles, which is used for bounding box calculation if surface is periodic. There are some ways to fix this bug: 1. Two "fast" ways, which required only few lines of code: 1.1 Using default algorithm, based on point grid NbUsamples*NbVsamples for periodic surfaces; such approach can cause bad performance for surfaces with big degree and number of knots, because NbSamples depends on these variables. 1.2 It is possible to make not periodic surface from periodic one and use it for calculation bounding box. 2. Right way - correction of bug in algorithm of selection of poles for periodic surfaces - demands some time for the study theory of splines. |
|
I think, that problem for periodical surfaces is caused by restricting calculated maximal pole number in method ComputePolesIndexes(...): theOutMaxIdx = Min(theOutMaxIdx - 2 + theDegree + 1 - theShiftCoeff, theMaxIdx); theMaxIdx is maximal possible pole number. It is correct for not periodic case, but for periodic one it is necessary to make periodic continuation, for example, if theOutMaxIdx = theMaxIdx + 1, it means that 1-st pole must be added in bounding box too. By the way, code must be refined, because everywhere we meet using S.BSpline()->, for example: anUFlatKnotsCount = S.BSpline()->NbUPoles() + S.BSpline()->UDegree() + 1; But calling S.Bspline() uses transforming of object for BRepAdaptor_Surface: Handle(Geom_BSplineSurface) BRepAdaptor_Surface::BSpline() const { return Handle(Geom_BSplineSurface)::DownCast (mySurf.BSpline()->Transformed(myTrsf)); } It necessary to replace S.BSpline()->Degree(),..., by S.Degree()... |
|
Branch CR31974 has been created by ifv. SHA-1: e258998aea320bec0a883c1bd35bb2eb50c33ba7 Detailed log of new commits: Author: ifv Date: Wed Dec 9 17:28:37 2020 +0300 0031974: Strange behavior of boolean operations on this BREP |
|
Branch CR31974 has been updated forcibly by ifv. SHA-1: a0364abdb4947ff955c0fd09fc8e575fc7877795 |
|
Branch CR31974 has been updated forcibly by ifv. SHA-1: 3f841c6ccc34f266130744120dd092b2a868ad38 |
|
Branch CR31974 has been updated forcibly by ifv. SHA-1: 906b3356d15b66c6a246e25a96444992764aa61e |
|
The fix for 0031995 seems to solve the issue, so I think you can close this one as well. For future reference, here's the original issue in Gmsh: https://gitlab.onelab.info/gmsh/gmsh/-/issues/1086 Many thanks! |
|
Dear emv, bug is not reproduced now because of fix for 0031995. I suggest to close this issue. |
|
Test case has to be added before closing the issue. If you can add the test case, please do it, if not, I'll take care of it. |
|
Dear emv, add the test by yourself please. |
|
Branch CR31974_1 has been created by emv. SHA-1: 454b4f330cae86cd1890d0c03733ea1d619ded28 Detailed log of new commits: Author: emv Date: Thu Jan 28 12:34:19 2021 +0300 0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP Problem is fixed by 0031995. Integrating test case only. |
|
Dear Sergey, please review git branch CR31974_1 Test results: http://occt-tests/CR31974-master-emv-OCCT/Debian80-64/bugs/modalg_7/bug31974.html http://occt-tests/CR31974-master-emv-OCCT/Windows-64-VC14/bugs/modalg_7/bug31974.html |
|
Test case integration |
|
Review it, please. |
|
Please raise CR31974_1 into occt. |
|
Combination - OCCT branch : IR-2021-02-12 master SHA - fb68dbdbd6810ee27f9398c749c5740b7bea7818 a87b7ddc8cb44606b91e3f37113847c3f5f50fdc Products branch : IR-2021-02-12 SHA - 94205f40e685a70c77e547147d90c09e0a21c461 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 17805.430000000237 / 17802.420000000013 [+0.02%] Products Total CPU difference: 11513.250000000124 / 11523.070000000105 [-0.09%] Windows-64-VC14: OCCT Total CPU difference: 19375.296875 / 19372.265625 [+0.02%] Products Total CPU difference: 12857.265625 / 12882.921875 [-0.20%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR31974_1 has been deleted by inv. SHA-1: 454b4f330cae86cd1890d0c03733ea1d619ded28 |
|
Branch CR31974 has been deleted by inv. SHA-1: 906b3356d15b66c6a246e25a96444992764aa61e |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-12-03 12:21 | geuzaine | New Issue | |
2020-12-03 12:21 | geuzaine | Assigned To | => Andrey GOLODAEV |
2020-12-03 12:21 | geuzaine | File Added: test.brep | |
2020-12-03 12:26 | kgv | Assigned To | Andrey GOLODAEV => msv |
2020-12-03 12:26 | kgv | Target Version | => 7.6.0 |
2020-12-03 13:07 |
|
Assigned To | msv => emv |
2020-12-03 13:07 |
|
Note Added: 0097270 | |
2020-12-03 16:08 |
|
Status | new => assigned |
2020-12-03 17:06 |
|
Note Added: 0097275 | |
2020-12-03 17:06 |
|
File Added: AABB_inv.png | |
2020-12-04 08:29 |
|
File Added: fx.brep | |
2020-12-04 08:30 |
|
Note Added: 0097294 | |
2020-12-04 08:31 |
|
Assigned To | emv => ifv |
2020-12-04 12:19 |
|
File Added: aabb.jpg | |
2020-12-04 12:22 |
|
Note Added: 0097309 | |
2020-12-04 12:22 |
|
Assigned To | ifv => emv |
2020-12-04 12:22 |
|
Status | assigned => feedback |
2020-12-04 12:23 |
|
Note Edited: 0097309 | |
2020-12-04 12:34 |
|
Note Added: 0097311 | |
2020-12-04 14:39 |
|
Note Added: 0097319 | |
2020-12-04 18:31 |
|
Note Added: 0097332 | |
2020-12-07 09:12 |
|
Note Added: 0097403 | |
2020-12-07 09:14 |
|
Note Edited: 0097403 | |
2020-12-07 09:27 |
|
Note Edited: 0097403 | |
2020-12-07 09:50 |
|
Assigned To | emv => ifv |
2020-12-07 09:50 |
|
Status | feedback => assigned |
2020-12-09 17:28 | git | Note Added: 0097445 | |
2020-12-10 17:14 | git | Note Added: 0097473 | |
2020-12-10 17:16 | kgv | Summary | Strange behavior of boolean operations on this BREP => Modeling Algorithms - Strange behavior of boolean operations on this BREP |
2020-12-11 14:54 | git | Note Added: 0097486 | |
2020-12-12 21:17 | git | Note Added: 0097553 | |
2020-12-14 09:50 |
|
File Added: bug31974.brep | |
2020-12-14 09:50 |
|
File Deleted: aabb.jpg | |
2020-12-14 12:25 |
|
Relationship added | parent of 0031995 |
2020-12-14 12:35 |
|
File Deleted: bug31974.brep | |
2021-01-19 10:18 | geuzaine | Note Added: 0098190 | |
2021-01-19 11:15 |
|
Note Added: 0098193 | |
2021-01-19 11:15 |
|
Assigned To | ifv => emv |
2021-01-19 11:15 |
|
Status | assigned => resolved |
2021-01-19 11:15 |
|
Steps to Reproduce Updated | |
2021-01-19 11:44 |
|
Note Added: 0098194 | |
2021-01-19 11:49 |
|
Note Added: 0098196 | |
2021-01-28 12:35 | git | Note Added: 0098470 | |
2021-01-28 13:06 |
|
Status | resolved => assigned |
2021-01-28 13:07 |
|
Note Added: 0098472 | |
2021-01-28 13:07 |
|
Assigned To | emv => szy |
2021-01-28 13:07 |
|
Status | assigned => resolved |
2021-01-28 14:40 |
|
Note Added: 0098480 | |
2021-02-10 09:55 |
|
Note Added: 0098805 | |
2021-02-10 09:55 |
|
Assigned To | szy => msv |
2021-02-10 09:55 |
|
Status | resolved => assigned |
2021-02-10 10:13 | kgv | Status | assigned => resolved |
2021-02-10 10:27 |
|
Note Added: 0098806 | |
2021-02-10 10:27 |
|
Assigned To | msv => bugmaster |
2021-02-10 10:27 |
|
Status | resolved => reviewed |
2021-02-13 11:10 | bugmaster | Note Added: 0098861 | |
2021-02-13 11:10 | bugmaster | Status | reviewed => tested |
2021-02-13 11:16 | bugmaster | Test case number | => bugs/modalg_7/bug31974 |
2021-02-13 11:29 | bugmaster | Changeset attached | => occt master 8d55cb22 |
2021-02-13 11:29 | bugmaster | Status | tested => verified |
2021-02-13 11:29 | bugmaster | Resolution | open => fixed |
2021-02-21 11:44 | git | Note Added: 0099048 | |
2021-02-21 11:44 | git | Note Added: 0099054 |