UnorientableShape

Hi,

i perform intersection of a body and a plane.
BRepAlgoAPI_Section section(this->getShape ()->Get (), cuttingplane, Standard_False);
section.ComputePCurveOn2 (Standard_True);
section.Build ();
assert (section.IsDone ());
TopoDS_Shape cut = section.Shape ();

Then i retrieve the edges and build a wire (ShapeAnalysis_WireOrder and BRepBuilderAPI_MakeWire).
The wire is closed!

Last i want to construct a Face (BRepBuilderAPI_MakeFace (cuttingplane,wire,true).

The problem is that the area is negative.
When checking the face with BRepCheck_Analyzer I get the error UnorientableShape.

Can anybody help me? What do i wrong?

Patrik Mueller's picture

Hi,

perhaps ShapeFix_Wire can help?

Regards,

Patrik

andi's picture

Hi,

did you ever got an answer to your question "UnorientableShape" or did you solve the problem, I do have exactly the same one (until release 5.1)?

Andreas

Divya's picture

Hi,
can you please help!
how did you close the wire using ShapeAnalysis_WireOrder?
because i got the message:wrong usafe of non-static function.

Fabio Napodano's picture

ShapeAnalysis_WireOrder is not a function: it's a class.

you don't have to call ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder() function, rather you have to create an instance of the ShapeAnalysis_WireOrder class:

ShapeAnalysis_WireOrder myOrderer;
myOrderer.Add(P1,P2);
//some other additions
myOrderer.Perform();

the use a for loop over myOrderer.GetNbCouples() to get the ordered couples with myOrderer.Couple() method