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

Search the Forums
See All Topics
 

Problems with BRepProj_Projection

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

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?

regards
Joachim
Forum supervisor 2011/12/08 08:53
Dear Joachim,
Could you provide additional information (shapes, script, scenario...) necessary for the problem reproducing?
Regards
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);
interpol1.Perform();

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;
for(....)
{
myThruSection.Add(wire)
}
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.

regards
Joachim


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.
Regards
Joachim Greiner 2011/12/08 15:37
Hi

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

Regards
Joachim
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 :
BRepCheck_No3DCurve
On Shape faulty_2 :
BRepCheck_No3DCurve
On Shape faulty_3 :
BRepCheck_No3DCurve
On Shape faulty_4 :
BRepCheck_No3DCurve
On Shape faulty_5 :
BRepCheck_UnorientableShape
Shape faulty_1 on shape faulty_5 :
BRepCheck_NoCurveOnSurface
Shape faulty_2 on shape faulty_5 :
BRepCheck_NoCurveOnSurface
Shape faulty_3 on shape faulty_5 :
BRepCheck_NoCurveOnSurface
Shape faulty_4 on shape faulty_5 :
BRepCheck_NoCurveOnSurface

Faulty shapes in variables faulty_1 to faulty_5

Use <fixshape> to fix it.
Regards
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:
- http://www.opencascade.org/org/forum/thread_19788/
- http://www.opencascade.org/org/forum/thread_24058/
- http://www.opencascade.org/org/forum/thread_22309/
It is not welcomed by Forum rules - http://www.opencascade.org/org/forum/thread_1 .
Please avoid it in the future.

If you need our professional support you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
We will try to find a solution/workaround acceptable for you.
Training and e-learning courses are also at your disposal - http://www.opencascade.org/support/training/.
Regards
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.

Regards,
Ankit
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

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