Page 1 of 1

Face from curves (wires)

Posted: Mon Jul 15, 2024 5:17 am
by Salman
Hi,

I have the following situation. I load some points which describes closed curves. I give the points to the IBSplineCurve_DG.InitFromPoints() algorithm to get the curve. Then I create edges and wires from the b spline curves. That works fine.

And now the important question for me. I want to create a face (and later a solid) from these curves, the first step is to create a face which are limited by two of such closed curves. The IBRepBuilder_DG.CreateFace7() algorithm doesn't work because it works with planar edges.
SO, how can create a face from two given closed b spline curves?

Best regards

Re: Face from curves (wires)

Posted: Mon Jul 15, 2024 8:50 pm
by gerard12
Hello Salman

You need to define surface for the face you need. When the wire is flat, the plane is an obvious option. Otherwise, there is no good default. A minimal area surface could be the one, but this might not be the desired one for your application.

An easier way to build a solid, is to modify one of the standard objects box, sphere etc. Or use some operations like extrusion demoed in Solids sample.

If you need to build the face from ground up at the low level, it is better to start with the surface, otherwise it is hard to ensure that the curves lie exactly on the face.

When you have a surface, you can define your edges using curves in the uv 2D parametric plane (IBRepEdge_DG.SetPCurve()). Its 3D mapping (3d curves of the edge) will be defined automatically.

Regards