Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Forums / Usage issues / Problems with BRepProj_Projection

Problems with BRepProj_Projection

Problems with BRepProj_Projection
Joachim Greiner 2011/12/07 18:24

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 2011/12/08 08:53
Dear Joachim,
Could you provide additional information (shapes, script, scenario...) necessary for the problem reproducing?
Joachim Greiner 2011/12/08 14:38
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.


You have to be logged in to download the attached file
Forum supervisor 2011/12/08 15:07
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 2011/12/08 15:37

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

You have to be logged in to download the attached file
Forum supervisor 2011/12/09 14:15
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 <fixshape> to fix it.
Joachim Greiner 2011/12/12 17:03
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 2012/11/22 13:17
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 2012/11/22 14:14
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 2012/11/25 11:10
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.

Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map