Face from a circle

Technical discussions
Post Reply
Fei Liao
Posts: 2
Joined: Thu Aug 18, 2022 6:02 am

Face from a circle

Post by Fei Liao »

Hello
I am just starting with this software.
I hope somebody can save me time looking for a way to construct a face from a circle in brep geometry type. I has to be exportable to iges.
Thank you

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: Face from a circle

Post by Prashant Kande »

Hello Fei

Code: Select all

IModel_DG iModel = m_dgkc.GetModel();
IObjectGenerator_DG gen = iModel.As<IObjectGenerator_DG>();

IBRepWire_DG iWire = gen.Create<IBRepWire_DG>();

IBRepEdge_DG iEdge = iWire.CloseWire();

ICircle_DG iCircle = gen.Create<ICircle_DG>();       // At the origin by default

iCircle.AxisDirection = new VectDg(0, 1, 0);
iCircle.Radius = 20;

iEdgeProfile.SetCurve(iCircle.As<ICurve_DG>());

IBRepBuilder_DG iBuilder = gen.Create<IBRepBuilder_DG>();

IBRepFace_DG iFace = iBuilder.CreateFace(iWire);
This is an extract from Surfaces C# sample. See SurfacesForm.CreatePipe(). Other languages are similar.

Good luck

Fei Liao
Posts: 2
Joined: Thu Aug 18, 2022 6:02 am

Re: Face from a circle

Post by Fei Liao »

Thank you Prashant

Post Reply