Face from curves (wires)

Everything DG Kernel: Technical discussions and issues
Post Reply
Salman
Posts: 1
Joined: Mon Jul 15, 2024 5:09 am

Face from curves (wires)

Post 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
gerard12
Posts: 20
Joined: Tue Jun 18, 2024 6:09 am

Re: Face from curves (wires)

Post 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
Post Reply