View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0027279  Community  OCCT:Modeling Algorithms  public  20160317 16:01  20230801 15:08 
Reporter  Markus  Assigned To  
Priority  normal  Severity  minor  
Status  assigned  Resolution  open  
Product Version  6.9.0  
Target Version  Unscheduled  
Summary  0027279: BRepOffsetAPI_NormalProjection fails to project an edge on a face  
Description  For a specific case BRepOffsetAPI_NormalProjection fails. A wire consisting of 3 edges should be projected on a face. The result is a compound with a single edge. The projection of the two other edges failed. For other, similar cases it works (see #25894).  
Steps To Reproduce  restore diff.brep d whatis d explode d whatis d_1 whatis d_2 checkshape d_1 checkshape d_2 tolerance d_1 tolerance d_2 vinit vdisplay d vfit nproject r d_2 d_1 whatis r explode r whatis r_1 vclear vdisplay r_1  
Tags  No tags attached.  
Test case number  

diff.brep (343,848 bytes) 

input data.png (5,161 bytes) 

result.png (3,183 bytes) 

Unfortunately, the fix for 27135 does not help with this bug. 

I want to provide still some input from our own investigations. We create the surface used for projection by BrepOffsetAPI_ThruSections. The sections are distributed unequally, but the resulting surface seems to be parameterized equally. At one end of the surface the sections are especially dense (see appended screenshot). If we use less sections there, the problem does not occur. If we use more sections there, the problem occurs. Maybe the surface starts to oscillate a little bit so that the normals get bad and the projection fails. This is just an idea. 

diffuser many dense sections  failing.png (39,397 bytes) 

The problem was analyzed by OCC in April 2016: Reason of algorithm failure is problem of projecting two edges (d_2_1 and d_2_3) of wire d_2, see picture. Projection of any curve point on surface is performed by using Newton iterations from appropriate starting point for solving pair of equations: (PS(u,v))*dS/du = 0, (PS(u,v))*dS/dv = 0, P = C(t) is curve point for fixed parameter t, S(u,v) is point on surface for any surface parameters u, v. These equations are condition of the perpendicular projection of point on surface. It is possible to see class ProjLib_PrjResolve for details. At the beginning of each curve there are parametrical areas (approximate interval 0 ~ 0.0004) where Newton process convergences to “wrong” point, which is on surface boundary, see Picture. For example, projection of point of d_2_1 with parameter 0.0003 (red cross) is end of yellow arrow. Convergence of Newton process depends on local properties of surface near the starting points and for correct convergence we need some conditions for derivatives (see for example Kantorovich theorem). Sometimes these condition are not correct and Newton process cannot get correct roots of equations. It is difficult to define, are there small oscillations on surface or not and are the oscillation real reasons of bad projection, it is necessary to perform quite timeconsuming mathematical research. Area of possible surface oscillations is rather large, and covered large parametric range of curve, see Picture. But for t > 0.0004 projections of curve points are quite valid, on picture projection of point for t=0.001 is shown To solve this problem it is necessary: 1. To design and develop some algorithms for diagnosing such kind of problems; 2. To find out alternative methods for getting projection of point on surface, for example by minimization of distance between point and surface. Taking in account, that fast minimization methods use likeNewton iteration processes, we can meet the same problems. So, to solve the problem it is necessary to perform quite timeconsuming mathematical research. 

wrong projection at parameter 0,0003.png (48,627 bytes) 
Date Modified  Username  Field  Change 

20160317 16:01  Timo  New Issue  
20160317 16:01  Timo  Assigned To  => msv 
20160317 16:01  Timo  File Added: diff.brep  
20160317 16:01  Timo  File Added: input data.png  
20160317 16:01  Timo  File Added: result.png  
20160317 17:32 

Note Added: 0051758  
20160415 15:05 

Assigned To  msv => ifv 
20160415 15:05 

Status  new => assigned 
20161028 11:54 

Target Version  7.1.0 => 7.2.0 
20170316 18:13  Timo  Relationship added  related to 0028562 
20170321 11:11  Timo  Note Added: 0064571  
20170321 11:12  Timo  File Added: diffuser many dense sections  failing.png  
20170321 11:14  Timo  Note Added: 0064572  
20170321 11:17  Timo  File Added: wrong projection at parameter 0,0003.png  
20170531 15:33  Timo  Reporter  Timo => Markus 
20170721 11:16 

Target Version  7.2.0 => 7.3.0 
20171205 17:09 

Target Version  7.3.0 => 7.4.0 
20190812 16:44 

Target Version  7.4.0 => 7.5.0 
20200914 22:55 

Target Version  7.5.0 => 7.6.0 
20210829 18:52 

Target Version  7.6.0 => 7.7.0 
20221024 10:42  szy  Target Version  7.7.0 => 7.8.0 
20230801 15:08  dpasukhi  Target Version  7.8.0 => Unscheduled 