MantisBT - Community
View Issue Details
0023820Community[OCCT] OCCT:Modeling Algorithmspublic2013-03-07 14:462020-09-14 22:55
sneeraj 
ifv 
highmajor 
assignedopen 
[OCCT] 6.5.4 
[OCCT] 7.6.0* 
0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces
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.
Please rfer the uploaded document NormalProjection_Defect.pdf
No tags attached.
pdf NormalProjection_Defect.pdf (246,941) 2013-03-07 14:48
https://tracker.dev.opencascade.org/
zip NormalProjection_DefectTestSourceCode.zip (187,206) 2013-03-07 16:10
https://tracker.dev.opencascade.org/
Issue History
2013-03-07 14:46sneerajNew Issue
2013-03-07 14:46sneerajAssigned To => jgv
2013-03-07 14:48sneerajPrioritynormal => high
2013-03-07 14:48sneerajSeverityminor => major
2013-03-07 14:48sneerajReproducibilityhave not tried => always
2013-03-07 14:48sneerajProduct Version => 6.5.4
2013-03-07 14:48sneerajTarget Version => 6.6.0
2013-03-07 14:48sneerajDescription Updatedbug_revision_view_page.php?rev_id=5136#r5136
2013-03-07 14:48sneerajSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5138#r5138
2013-03-07 14:48sneerajFile Added: NormalProjection_Defect.pdf
2013-03-07 16:10sneerajFile Added: NormalProjection_DefectTestSourceCode.zip
2013-03-07 16:17sneerajAssigned Tojgv => sneeraj
2013-03-07 19:23sneerajNote Added: 0023635
2013-03-07 19:23sneerajStatusnew => resolved
2013-03-07 19:28sneerajNote Added: 0023636
2013-03-07 19:30sneerajAssigned Tosneeraj => jgv
2013-03-12 17:13jgvNote Added: 0023682
2013-03-12 17:13jgvStatusresolved => assigned
2013-03-12 17:14jgvAssigned Tojgv => sneeraj
2013-03-18 20:04sneerajNote Added: 0023785
2013-03-18 20:04sneerajAssigned Tosneeraj =>
2013-03-18 20:05sneerajAssigned To => jgv
2013-04-19 16:19abvAssigned Tojgv => ifv
2013-04-19 16:19abvTarget Version6.6.0 => 6.7.0
2013-12-21 10:21abvTarget Version6.7.0 => 6.7.1
2014-04-04 18:19abvTarget Version6.7.1 => 6.8.0
2014-09-26 10:29abvTarget Version6.8.0 => 7.1.0
2016-10-28 11:54msvTarget Version7.1.0 => 7.2.0
2017-07-21 11:34msvTarget Version7.2.0 => 7.3.0
2017-12-05 17:09msvTarget Version7.3.0 => 7.4.0
2019-08-12 16:44msvTarget Version7.4.0 => 7.5.0
2020-09-14 22:55msvTarget Version7.5.0 => 7.6.0*

Notes
(0023635)
sneeraj   
2013-03-07 19:23   
code committed to brnach CR23820. Branch pushed to remote repo.
(0023636)
sneeraj   
2013-03-07 19:28   
http://git.dev.opencascade.org/gitweb/?p=occt.git;a=shortlog;h=refs/heads/CR23820 [^]
(0023682)
jgv   
2013-03-12 17:13   
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.
(0023785)
sneeraj   
2013-03-18 20:04   
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