static void Main(string[] args) { Console.WriteLine(Environment.CurrentDirectory); IGESControl_Controller.Init(); var writer = new IGESControl_Writer("MM", 0); var face = Toolkit.FromEdges( new Line3D(new Vector3D(0, 0, 0), new Vector3D(10, 0, 0)), new Line3D(new Vector3D(0, 10, 0), new Vector3D(30, 10, 0))); writer.AddShape(face); writer.AddShape(face.Offset(5, new Vector3D(0, 0, 1))); writer.AddShape(face.Offset(15, new Vector3D(0, 0, -1))); var tr = new gp_Trsf(); tr.SetScale(new gp_Pnt(0, 0, 0), .5); writer.AddShape(new BRepBuilderAPI_Transform(face, tr, true).Shape()); writer.ComputeModel(); writer.Write("MyFile.igs"); Process.Start(AppDomain.CurrentDomain.BaseDirectory); }
static void Main(string[] args) { IGESControl_Controller.Init(); var writer = new IGESControl_Writer("MM", 0); var face1 = Toolkit.FromEdges( new Line3D(new Vector3D(-10, 0, 0), new Vector3D(20, 0, 0)), new Line3D(new Vector3D(-10, 10, 0), new Vector3D(20, 10, 15))); writer.AddShape(face1); var face2 = Toolkit.FromEdges( new Line3D(new Vector3D(7.5, -5, -5), new Vector3D(7.5, 15, -5)), new Line3D(new Vector3D(7.5, -5, 15), new Vector3D(7.5, 15, 15))); writer.AddShape(face2); var iLine = face1.IntersectLine(face2, 1e-1); Console.WriteLine($"Intersection line = {iLine.IntersectionLine}"); writer.AddGeom(iLine.Curve.This()); writer.ComputeModel(); writer.Write("MyFile.igs"); Process.Start(AppDomain.CurrentDomain.BaseDirectory); }