Page 1 of 1

Face from a circle

Posted: Thu Aug 18, 2022 6:05 am
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

Re: Face from a circle

Posted: Fri Aug 19, 2022 12:01 am
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

Re: Face from a circle

Posted: Mon Aug 22, 2022 2:09 am
by Fei Liao
Thank you Prashant