BRepBuilderAPI_MakeFace -> BRepBuilderAPI_NotPlanar errror

Hi, I'm trying to build a flat face from a set of points, I know for sure that all of my points lie in the same plane, somehow rotated in space, but for some reason BRepBuilderAPI_MakeFake will always give me an error BRepBuilderAPI_NotPlanar ... I suspect that there are some - float rounding errors, my coordinates are initially in float(32 bits), how to normalize my points,  how to align my points in the flat surfce?

Benjamin Bihler's picture

Hi,

Open CASCADE offers a commercial BestFit component, but why not iterate over your points and search three points that define a plane (are not on one line and far away from each other)?

Benjamin