MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023820Community[OCCT] OCCT:Modeling Algorithmspublic2013-03-07 14:462017-12-05 17:09
Reportersneeraj 
Assigned Toifv 
PriorityhighSeveritymajor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.5.4 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces
DescriptionWrong 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 ReproducePlease rfer the uploaded document NormalProjection_Defect.pdf
TagsNo tags attached.
Test case number
Attached Filespdf file icon NormalProjection_Defect.pdf (246,941 bytes) 2013-03-07 14:48
zip file icon NormalProjection_DefectTestSourceCode.zip (187,206 bytes) 2013-03-07 16:10

- Relationships

-  Notes
(0023635)
sneeraj (developer)
2013-03-07 19:23

code committed to brnach CR23820. Branch pushed to remote repo.
(0023636)
sneeraj (developer)
2013-03-07 19:28

http://git.dev.opencascade.org/gitweb/?p=occt.git;a=shortlog;h=refs/heads/CR23820 [^]
(0023682)
jgv (developer)
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 (developer)
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

- Issue History
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 View Revisions
2013-03-07 14:48 sneeraj Steps to Reproduce Updated View Revisions
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 jgv Note Added: 0023682
2013-03-12 17:13 jgv Status resolved => assigned
2013-03-12 17:14 jgv 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 abv Assigned To jgv => ifv
2013-04-19 16:19 abv Target Version 6.6.0 => 6.7.0
2013-12-21 10:21 abv Target Version 6.7.0 => 6.7.1
2014-04-04 18:19 abv Target Version 6.7.1 => 6.8.0
2014-09-26 10:29 abv Target Version 6.8.0 => 7.1.0
2016-10-28 11:54 msv Target Version 7.1.0 => 7.2.0
2017-07-21 11:34 msv Target Version 7.2.0 => 7.3.0
2017-12-05 17:09 msv Target Version 7.3.0 => 7.4.0*


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker