Cant display 2d spline
Posted: Sun Feb 09, 2020 2:08 am
Hello gents
I am having problem displaying a 2d spline. A simplified snipped is this:
I do not get any errors. Just an empty screen. The same code works if I do everything in 3D using IBSplineCurve_DG
I would appreciate any ideas
Thank you
I am having problem displaying a 2d spline. A simplified snipped is this:
Code: Select all
I2DPointArray_DG iArrPnt = myGenerator.Create("2DPointArray_DG") as I2DPointArray_DG;
iArrPnt.SetCount(3);
iArrPnt.SetPoint(0, 0, 0);
iArrPnt.SetPoint(1, 1., 2.);
iArrPnt.SetPoint(2, 2., 1.5);
IBSplineCurve2d_DG iCurveBS = myGenerator.Create("BSplineCurve2d_DG") as IBSplineCurve2d_DG;
iCurveBS.InitFromPoints(iArrPnt, 3, 8, Continuity_DG.eCont_C2, 1e-3);
IBRepShape_DG iShape = m_myGenerator.Create1("BRepEdge_DG", iCurveBS) as IBRepShape_DG;
IEntity_DG entity = m_iModel.AddBRepShape(iShape);
var view = myDgkControl.GetView() as IView_DG;
view.Reset(true, true);
I would appreciate any ideas
Thank you