View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023820 | Community | OCCT:Modeling Algorithms | public | 2013-03-07 14:46 | 2023-03-19 18:54 |
Reporter | sneeraj | Assigned To | |||
Priority | high | Severity | major | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.5.4 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.6.2 | ||
Summary | 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces | ||||
Description | Wrong result of projection algorithm ["BrepAlgo_NormalProjection” and “ProjLib_CompProjectedCurve”] when a polygon geometry is projected on a set of multiple faces [TopoDS_Compound of the multiple TopoDS_Face]. The polygon geometry is given by set of ordered points in 3D space. It is required to find the projection of this polygon on to the given set of connected faces in normal direction. Edges are constructed using the points of polygon and BrepAlgo_NormalProjection is used to project on the TopoDS_Compound of the multiple TopoDS_Face entities. Internally, ProjLib_CompProjectedCurve::Init() is called, in which the step size for identifying the projection points in the edges is constant. Because of this some of the smaller faces in the TopoDS_Compound get missed out. The fix for the defect is proposed to use the parametric space of the edges for identifying the step size. | ||||
Steps To Reproduce | Please refer the uploaded document NormalProjection_Defect.pdf | ||||
Tags | No tags attached. | ||||
Test case number | bugs/modalg_5/bug23820_2, bug23820_1 | ||||
|
NormalProjection_Defect.pdf (246,941 bytes) |
|
NormalProjection_DefectTestSourceCode.zip (187,206 bytes) |
|
code committed to brnach CR23820. Branch pushed to remote repo. |
|
http://git.dev.opencascade.org/gitweb/?p=occt.git;a=shortlog;h=refs/heads/CR23820 |
|
Dear sneeraj, Concerning your contribution on the isssue 23820: In ProjLib_CompProjectedCurve.cxx: 1. Why do you think that the value of <SearchStep> depending on first derivative of curve in its first point is better than current one? In your version I see: SearchStep = Min(10*MinStep, 0.1/VD1); I think that you really mean 0.1*VD1, not 0.1/VD1. But nevertheless, the step is also constant along the curve and can become too small if the derivative in first point is small. 2. The approach for avoiding of undesirable results by "try-catch" is not good in the loop of iterations: it is better to analyze the reasons of failure and do something depending on the situation, without call of methods leading to exceptions. It also applies to your changes in BRepAlgo_NormalProjection.cxx. |
|
Dear jgv, Please find my response below: [Answer 1] 1. The steps 0.01 and 0.1 are arbitrary 2. If the line segment is long, then it is possible that containment will be missed (as it happens here). 3. If we consider the parametric distance covered and relate it to the tangent length. E.g. u' = u + delta(u) delta(u) is chosen here per unit length in object space (some factor: 0.1/0.01)/ (dc/du). Of course, this is also not correct way as well, the better way is to 1. Find extrema (Use ExtremaDS) 2. Use extreme points (inside/outside) as a start point to create curve segments. What do you suggest? [Answer 2] I agree with you on try-catch. It should be analyzed further. I will request you not to consider it. Regards, Neeraj |
|
Branch CR23820 has been updated forcibly by AndreyLA. SHA-1: 6aea6c1565214014daac9fea08dd3872a167e6af |
|
Branch CR23820 has been updated forcibly by azv. SHA-1: a75cc0b3bdebca846f69a97f5515b57a624165b1 |
|
Branch CR23820 has been updated by AndreyLA. SHA-1: 3d3bb578a0b5d0d07cfae2de42a0f27a4887fd98 Detailed log of new commits: Author: Andrei LATYSHEV Date: Wed Feb 16 10:26:22 2022 +0300 Merge branch 'CR23820' of ssh://git.dev.opencascade.org/occt into CR23820_1 Author: abv Date: Thu Mar 14 07:45:25 2013 +0400 Added test case for exception on non-planar face Author: sneeraj Date: Thu Mar 7 20:49:23 2013 +0530 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces |
|
The actual result of projection algorithm on the attached model is correct. In general case this algorithm has three parameters: 1. the projected shape S 2. the shape P to project on 3. the maximum distance D between S and its projection S' The output shapes are stored in compound R The example of DRAW command: nproject R S P -d D It works in the following way: each edge of S is projected on each face of P and if the projection output (edge or vertex) is not empty it is added into resulting compound R. One edge may produce several projection entities (they can be disconnected) if P has several faces. The parameter D of this operation is maximum distance threshold that is equal to -1 by default or is set by user. The value D = -1 (or a negative number in general) indicates that all the projected entities are to be included into result. If D is a positive number then all the projection shapes with distance Dprj > D from the corresponding edges of S are filtered and are not included into result. Here is an explanation for the attached case. Each edge E of S (wire of 4 edges) is projected on each face F of P (shell that consists of 7 faces). If the normal from any point on a 3D curve of E to current face F exists the projection shape E' can be built and then E' is added to the compound R. The distance from E to E' does not matter because the default value of D = -1 is used in this case. This means that completely all E' are added into R. This output may contradict with intuition but it is caused by the properties of input data (its fragmentation and complexity). Call of the function is the following: nproject R S P Related picture is Proj_D_-1.png The solution for this case and other similar cases is to vary the parameter D to find out some fitted value D* to get the expected result. For example, the value of the maximum distance D* = 2 leads to a simple and clear result for the current model. The improved call is: nproject R S P -d 2 Related picture is Proj_D_2.png |
|
Proj_D_2.png (24,268 bytes) Proj_D_-1.png (23,947 bytes) |
|
Please add the last attached model into the list of .brep models to maintain tests compatibility |
|
bug23820_non_planar.brep (96,375 bytes) |
|
Branch CR23820_2 has been created by AndreyLA. SHA-1: ab91189a3db575220d5db88869bcd135d7719cbb Detailed log of new commits: Author: Andrei LATYSHEV Date: Sat Mar 5 15:28:11 2022 +0300 0028320: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The result of projection algorithm was not clear for user. The explanation is added into the bug description (notes section) and the tests are added to verify the correctness of the projection algorithm's work. |
|
The shape has been added to the data repository. |
|
Branch CR23820_2 has been updated forcibly by AndreyLA. SHA-1: 013237463ade9c5c79de46336ff9c62a654be4ee |
|
|
|
Branch CR23820_2 has been updated by AndreyLA. SHA-1: e95c8214f4bda9746994ce88c316544969c6b616 Detailed log of new commits: Author: Andrei LATYSHEV Date: Thu Mar 17 10:21:54 2022 +0300 Merge branch 'CR23820_2' of ssh://git.dev.opencascade.org/occt into CR23820_2 Author: Andrei LATYSHEV Date: Sat Mar 5 15:28:11 2022 +0300 0028320: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The tests are added to verify the correctness of the projection algorithm's work in two cases. |
|
Branch CR23820_2 has been updated by AndreyLA. SHA-1: b1bb9062973aa0801a19fdb7f0cc9f4ee852cba6 Detailed log of new commits: Author: Andrei LATYSHEV Date: Thu Mar 17 13:19:32 2022 +0300 Merge branch 'CR23820_2' of ssh://git.dev.opencascade.org/occt into CR23820_2 Author: Andrei LATYSHEV Date: Sat Mar 5 15:28:11 2022 +0300 0028320: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The tests are added to verify the correctness of the projection algorithm's work in two cases. |
|
Branch CR23820_2 has been deleted by AndreyLA. SHA-1: b1bb9062973aa0801a19fdb7f0cc9f4ee852cba6 |
|
Branch CR23820_2 has been created by AndreyLA. SHA-1: acce2c1448254a2e57cc940dc479a795dcc3f5f0 No new revisions were added by this update. |
|
Branch CR23820_2 has been updated by AndreyLA. SHA-1: b8ec1feadcd5b533635f0465927f3f564f29846b Detailed log of new commits: Author: Andrei LATYSHEV Date: Thu Mar 17 15:10:01 2022 +0300 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The tests are added to verify the correctness of the projection algorithm's work in two cases. |
|
|
|
Branches to process: OCCT: CR23820_2 Products: NOT |
|
Combination - OCCT branch : IR-2022-03-25 master SHA - e4753a7d1658331a79025964d1c55f2a6d999c6c 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2022-03-25 SHA - 303106116fcb5c01a598ea01cc5174a45aae8f18 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: 18507.51000000038 / 18488.570000000385 [+0.10%] Products Total CPU difference: 11703.320000000122 / 11709.530000000132 [-0.05%] Windows-64-VC14: OCCT Total CPU difference: 20451.96875 / 20413.53125 [+0.19%] Products Total CPU difference: 13191.96875 / 13181.65625 [+0.08%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR23820 has been deleted by mnt. SHA-1: 3d3bb578a0b5d0d07cfae2de42a0f27a4887fd98 |
|
Branch CR23820_2 has been deleted by mnt. SHA-1: b8ec1feadcd5b533635f0465927f3f564f29846b |
occt: master 3425e83f 2022-03-17 15:10:01 AndreiLA Committer: |
0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The tests are added to verify the correctness of the projection algorithm's work in two cases. |
Affected Issues 0023820 |
|
add - tests/bugs/modalg_5/bug23820_1 | Diff File | ||
add - tests/bugs/modalg_5/bug23820_2 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-03-07 14:46 | sneeraj | New Issue | |
2013-03-07 14:46 | sneeraj | Assigned To | => jgv |
2013-03-07 14:48 | sneeraj | Priority | normal => high |
2013-03-07 14:48 | sneeraj | Severity | minor => major |
2013-03-07 14:48 | sneeraj | Reproducibility | have not tried => always |
2013-03-07 14:48 | sneeraj | Product Version | => 6.5.4 |
2013-03-07 14:48 | sneeraj | Target Version | => 6.6.0 |
2013-03-07 14:48 | sneeraj | Description Updated | |
2013-03-07 14:48 | sneeraj | Steps to Reproduce Updated | |
2013-03-07 14:48 | sneeraj | File Added: NormalProjection_Defect.pdf | |
2013-03-07 16:10 | sneeraj | File Added: NormalProjection_DefectTestSourceCode.zip | |
2013-03-07 16:17 | sneeraj | Assigned To | jgv => sneeraj |
2013-03-07 19:23 | sneeraj | Note Added: 0023635 | |
2013-03-07 19:23 | sneeraj | Status | new => resolved |
2013-03-07 19:28 | sneeraj | Note Added: 0023636 | |
2013-03-07 19:30 | sneeraj | Assigned To | sneeraj => jgv |
2013-03-12 17:13 |
|
Note Added: 0023682 | |
2013-03-12 17:13 |
|
Status | resolved => assigned |
2013-03-12 17:14 |
|
Assigned To | jgv => sneeraj |
2013-03-18 20:04 | sneeraj | Note Added: 0023785 | |
2013-03-18 20:04 | sneeraj | Assigned To | sneeraj => |
2013-03-18 20:05 | sneeraj | Assigned To | => jgv |
2013-04-19 16:19 |
|
Assigned To | jgv => ifv |
2013-04-19 16:19 |
|
Target Version | 6.6.0 => 6.7.0 |
2013-12-21 10:21 |
|
Target Version | 6.7.0 => 6.7.1 |
2014-04-04 18:19 |
|
Target Version | 6.7.1 => 6.8.0 |
2014-09-26 10:29 |
|
Target Version | 6.8.0 => 7.1.0 |
2016-10-28 11:54 |
|
Target Version | 7.1.0 => 7.2.0 |
2017-07-21 11:34 |
|
Target Version | 7.2.0 => 7.3.0 |
2017-12-05 17:09 |
|
Target Version | 7.3.0 => 7.4.0 |
2019-08-12 16:44 |
|
Target Version | 7.4.0 => 7.5.0 |
2020-09-14 22:55 |
|
Target Version | 7.5.0 => 7.6.0 |
2021-08-29 18:52 |
|
Target Version | 7.6.0 => 7.7.0 |
2022-02-14 16:28 |
|
Assigned To | ifv => AndreyLA |
2022-02-15 13:50 | git | Note Added: 0106905 | |
2022-02-16 09:20 | git | Note Added: 0106914 | |
2022-02-16 10:26 | git | Note Added: 0106916 | |
2022-03-05 11:23 |
|
Note Added: 0107192 | |
2022-03-05 11:23 |
|
File Added: Projection_D_-1.png | |
2022-03-05 11:23 |
|
File Added: Projection_D_2.png | |
2022-03-05 12:32 |
|
Note Edited: 0107192 | |
2022-03-05 12:50 |
|
File Deleted: Projection_D_-1.png | |
2022-03-05 12:50 |
|
File Deleted: Projection_D_2.png | |
2022-03-05 12:50 |
|
Note Edited: 0107192 | |
2022-03-05 12:51 |
|
Note Added: 0107193 | |
2022-03-05 12:51 |
|
File Added: Proj_D_2.png | |
2022-03-05 12:51 |
|
File Added: Proj_D_-1.png | |
2022-03-05 14:52 |
|
Assigned To | AndreyLA => sneeraj |
2022-03-05 14:54 |
|
Assigned To | sneeraj => bugmaster |
2022-03-05 14:54 |
|
Status | assigned => feedback |
2022-03-05 14:54 |
|
Note Added: 0107196 | |
2022-03-05 14:55 |
|
Note Added: 0107197 | |
2022-03-05 14:55 |
|
File Added: bug23820_non_planar.brep | |
2022-03-05 15:28 | git | Note Added: 0107198 | |
2022-03-11 23:05 |
|
Assigned To | bugmaster => azv |
2022-03-14 11:37 |
|
Assigned To | azv => AndreyLA |
2022-03-14 11:37 |
|
Status | feedback => assigned |
2022-03-14 11:37 |
|
Note Added: 0107273 | |
2022-03-14 17:42 | git | Note Added: 0107283 | |
2022-03-16 17:39 |
|
Note Added: 0107308 | |
2022-03-17 10:22 | git | Note Added: 0107317 | |
2022-03-17 13:19 | git | Note Added: 0107320 | |
2022-03-17 13:57 | git | Note Added: 0107322 | |
2022-03-17 14:30 | git | Note Added: 0107328 | |
2022-03-17 15:10 | git | Note Added: 0107329 | |
2022-03-18 14:31 |
|
Assigned To | AndreyLA => azv |
2022-03-18 21:47 |
|
Status | assigned => resolved |
2022-03-18 21:47 |
|
Steps to Reproduce Updated | |
2022-03-18 21:47 |
|
Note Added: 0107354 | |
2022-03-18 21:52 |
|
Assigned To | azv => bugmaster |
2022-03-18 21:52 |
|
Status | resolved => reviewed |
2022-03-18 21:52 |
|
Note Added: 0107355 | |
2022-03-27 10:45 |
|
Status | reviewed => tested |
2022-03-27 10:45 |
|
Note Added: 0107434 | |
2022-03-27 10:47 |
|
Test case number | => bugs/modalg_5/bug23820_2, bug23820_1 |
2022-03-27 12:32 |
|
Changeset attached | => occt master 3425e83f |
2022-03-27 12:32 |
|
Assigned To | bugmaster => smoskvin |
2022-03-27 12:32 |
|
Status | tested => verified |
2022-03-27 12:32 |
|
Resolution | open => fixed |
2022-04-02 19:34 | git | Note Added: 0107559 | |
2022-04-02 19:34 | git | Note Added: 0107560 | |
2023-03-19 18:54 | vglukhik | Status | verified => closed |
2023-03-19 18:54 | vglukhik | Fixed in Version | => 7.6.2 |