For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Problems with BRepProj_Projection

Joachim Greiner's picture


I´ve created a face with BRepOffsetAPI_ThurSections with about 20 section. On the resulting face, i want to project a wire. Sometimes the resulkt of the projection is very strange. The length of the projected wire is much longer than the original one.

I guess there muts bie something wrong with the face.

Has anyone an idea or a hint?


Forum supervisor's picture

Dear Joachim,
Could you provide additional information (shapes, script, scenario...) necessary for the problem reproducing?

Joachim Greiner's picture

I want to create a surface through about 20 wires. (See the attached image).
These wires are computed of points in the following way:
I have an array with points and calculate a Geom_Curve

GeomAPI_Interpolate interpol1(point_harray,Standard_False,0.000001);

Handle(Geom_Curve) section1;
if (interpol1.IsDone() == Standard_True)
section1 = interpol1.Curve();

TopoDS_Edge section_edge = BRepBuilderAPI_MakeEdge(section1);
TopoDS_Wire section_wire = BRepBuilderAPI_MakeWire(section_edge);

I add all the wires to my BrepOffsetAPI_ThruSections Object
BRepOffsetAPI_ThruSections myThruSections;
TopoDS_Shape myShape = myThurSections.Shape();

If I project a wire on this surface for example (with BRepProj_Projections), sometimes there are wrong results and I can´t explain that.


Forum supervisor's picture

Dera Joachim,
Save, please the specified surface (myShape) and the wire in an external file, for example in .brep format (see BRepTools::Write() method) and attach to the post.
We will try to check the problem.

Joachim Greiner's picture


attached you will find the Shape an the wire taht I wnat to project on the surface


Forum supervisor's picture

Dear Joachim,
Very probably that the obtained result sufficiently depends on direction of the projection and curvature of the surface.
I suggest you to use API of normal projection (BRepOffsetAPI_NormalProjection).
I hope it will help you.
At least in Draw the specified effect is not reproduced:
pload ALL
restore myShape.brep s
restore wire.brep w
nproject r w s
whatis r
explo r
mkcurve cr r_1
length cr
## The length cr is 276.95483736784843
whatis w
explo w
mkcurve wr w_1
length wr
##The length wr is 276.94516948518498

So, wr & cr are ~ equal.

Besides take into account, please that your initial face is not valid:
Draw[130]> checkshape s
On Shape faulty_1 :
On Shape faulty_2 :
On Shape faulty_3 :
On Shape faulty_4 :
On Shape faulty_5 :
Shape faulty_1 on shape faulty_5 :
Shape faulty_2 on shape faulty_5 :
Shape faulty_3 on shape faulty_5 :
Shape faulty_4 on shape faulty_5 :

Faulty shapes in variables faulty_1 to faulty_5

Use to fix it.

Joachim Greiner's picture

Thank you very much for your help!

I found out, that the wires, the surface ist made of should have the same length. If I make sure tehy all have the same length. The Surface ist valid an the problem does not occur.

Ankit Sowle's picture

Dear Forum supervisor,
I want to do parallel projection of a polygon wire on a shape(a sewed shape from more than one faces) and get a projected shape/face out of it.

I used BRepProj_Projection but it did not work for me.

Can you suggest something??

Forum supervisor's picture

Dear Ankit,
You are duplicating the same post many times:
It is not welcomed by Forum rules - .
Please avoid it in the future.

If you need our professional support you may contact us via the Contact Form
We will try to find a solution/workaround acceptable for you.
Training and e-learning courses are also at your disposal -

Ankit Sowle's picture

I will definitely do the same. Actually i needed that solution ASAP so was trying to put
more posts. I was not aware of the contact list. Thanks for providing the info.


Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.