View Issue Details

IDProjectCategoryView StatusLast Update
0027279CommunityOCCT:Modeling Algorithmspublic2023-08-01 15:08
ReporterMarkus Assigned Toifv 
Status assignedResolutionopen 
Product Version6.9.0 
Target VersionUnscheduled 
Summary0027279: BRepOffsetAPI_NormalProjection fails to project an edge on a face
DescriptionFor 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 Reproducerestore 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


vdisplay d


nproject r d_2 d_1

whatis r

explode r

whatis r_1


vdisplay r_1

TagsNo tags attached.
Test case number

Attached Files

  • diff.brep (343,848 bytes)
  • input data.png (5,161 bytes)
  • result.png (3,183 bytes)
  • diffuser many dense sections - failing.png (39,397 bytes)
  • wrong projection at parameter 0,0003.png (48,627 bytes)


related to 0028562 closedbugmaster Open CASCADE Replacement of old Boolean operations (BRepAlgo) with new ones (BRepAlgoAPI) in BRepAlgo_NormalProjection 



2016-03-17 16:01


diff.brep (343,848 bytes)


2016-03-17 16:01


input data.png (5,161 bytes)


2016-03-17 16:01


result.png (3,183 bytes)


2016-03-17 17:32

developer   ~0051758

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


2017-03-21 11:11

developer   ~0064571

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.


2017-03-21 11:12


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


2017-03-21 11:14

developer   ~0064572

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:
(P-S(u,v))*dS/du = 0, (P-S(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 time-consuming 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 like-Newton iteration processes, we can meet the same problems.

So, to solve the problem it is necessary to perform quite time-consuming mathematical research.


2017-03-21 11:17


wrong projection at parameter 0,0003.png (48,627 bytes)

Issue History

Date Modified Username Field Change
2016-03-17 16:01 Timo New Issue
2016-03-17 16:01 Timo Assigned To => msv
2016-03-17 16:01 Timo File Added: diff.brep
2016-03-17 16:01 Timo File Added: input data.png
2016-03-17 16:01 Timo File Added: result.png
2016-03-17 17:32 msv Note Added: 0051758
2016-04-15 15:05 ifv Assigned To msv => ifv
2016-04-15 15:05 ifv Status new => assigned
2016-10-28 11:54 msv Target Version 7.1.0 => 7.2.0
2017-03-16 18:13 Timo Relationship added related to 0028562
2017-03-21 11:11 Timo Note Added: 0064571
2017-03-21 11:12 Timo File Added: diffuser many dense sections - failing.png
2017-03-21 11:14 Timo Note Added: 0064572
2017-03-21 11:17 Timo File Added: wrong projection at parameter 0,0003.png
2017-05-31 15:33 Timo Reporter Timo => Markus
2017-07-21 11:16 msv Target Version 7.2.0 => 7.3.0
2017-12-05 17:09 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:44 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:55 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:52 msv Target Version 7.6.0 => 7.7.0
2022-10-24 10:42 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:08 dpasukhi Target Version 7.8.0 => Unscheduled