Problem with BRepOffsetAPI_Sewing

Hi,

After an applying of BRepOffsetAPI_Sewing on a set of faces, some of them are not visible, when the resultant sewed shell is displayed.
Did I do something wrong?

Is it just question of triangulation or the geometry is damaged too?
Can I use such shell for the next operations: sectioning, offsetting...?

Greetings,
Adrian

DU's picture

Hi,

if you apply the BRepOffsetAPI_Sewing method, you have to determine to have common edges in the sewing shapes. in other words, the coherent edges should be in the range of tolerance predefined by OCC. I think, you can check your code and try it from this way.

Otherwise, you can also try to utilize the functions in the ShapeHealing package (e.g., ShapeFix_Shape) to fix your building errors.

Regards,

Du

a-helcman's picture

Hi Du,

Thank you for your response.

Here is my original code. I tried some things (upgrading, healing, ...), but with invisible faces as a result. Can you see some bugs there? The first problem I have met was, how to set the precision. It is a kind of alchemy, isn't it.

Best regards,
Adrian
=================================================
//...
double d_prec = 1e-2;
BRepOffsetAPI_Sewing o_sewing_algo (d_prec, false);

TopTools_ListIteratorOfListOfShape o_faces_iterator (o_list_of_faces);

try
{
for(; o_faces_iterator.More(); o_faces_iterator.Next())
{
TopoDS_Face &o_surface = TopoDS::Face (o_faces_iterator.Value());

ShapeFix_Shape o_fix (o_surface);
o_fix.SetPrecision(d_prec);
o_surface = TopoDS::Face (o_fix.Shape ());

o_sewing_algo.Add (o_surface);
}

o_sewing_algo.Perform();
}
catch (...)
{
return false;
}

oSewedTopoShape = o_sewing_algo.SewedShape();

ShapeUpgrade_ShellSewing o_upgrade_shelling;

oSewedTopoShape = o_upgrade_shelling.ApplySewing (oSewedTopoShape, d_prec);

ShapeFix_Shape o_fix (oSewedTopoShape);

o_fix.Perform ();

oSewedTopoShape = o_fix.Shape ();

//...
=================================================

Andre Helcman's picture

Adrian,
You are the only other person that I know with the last name of Helcman. Can you tell me a little background, where is your ancestral heritage from, are there others with the Helcman name.
Thanks

Billy's picture

I have the same problem. Some surfaces are almost transparent!

Also the resulting object is not a solid, although all edges are sewed together.