I am having an exception on the last line in this code:
Code: Select all
_modl = _kernCAD.GetModel() as IModel_DG;
_iGener = _modl as IObjectGenerator_DG;
_iBuilder = _iGener.Create("BRepBuilder_DG") as IBRepBuilder_DG;
Point_DG p0 = new Point_DG() { x = new double[] { 0, 0, 0 } };
Point_DG p1 = new Point_DG() { x = new double[] { 1, 0, 0 } };
Point_DG p2 = new Point_DG() { x = new double[] { 0, 1, 0 } };
var wire = _iBuilder.CreateWire2(p0, p1, p2, true);
Thanks