My trim Face doesn't work on Shading Mode

Hi body,
I use "BRepBuilderAPI_MakeFace aTrimFace(FaceSur,aWire,Standard_True)" to create my trimmed surface, the shanding is ok if the wire is simple, but, if the wire is a little complex (ex: the wire contains 8 edges, and some connection is not tangency and the included angle maybe is 96 deg), the shanding doesn't work. But, wirefram mode is ok. I ever doubt the trimmed face direction, so I make the front and back ot the trimmed face have different material, for simple wire is ok, but for complex wire is not ok. Who can help my?

PS: I am sure my range of the wire is not out of the Face.


Francois Lauzon's picture

Hi Angel,
Usually, when the wireframe is ok but there is no shading, it's because there is a problem with the wire on your face. It might be different things that are not build properly (pcurve, edge order in wire, gap between edge,...), you might want to try to fix your shape using ShapeFix_Shape algorythm and see if it correct your problem. Have a look at the shapehealing pdf and class, it might also hint you on what might be the problem.

Good Luck,