Hi
I managed to get the rhinocommons working and can now do some stuff from c#. But can’t get the most important functions to work:
-
I want to extrude a shape along a curve.
-
The end points of the curve should be on the surface of an object I click (my is click always return the coordinates on the XY plane).
-
I want to make boolean differences of the objects I create. Do the objects have to be meshed (Brep?) to do this?
At the moment I just make the objects like below:
Rhino.Geometry.Line line1 = new Line(pt1, pt2);
doc.Objects.AddLine(line1);
Rhino.Geometry.Curve curve1 = Curve.CreateArcBlend(
pt1, new Vector3d(1, 1, 0),
pt2, new Vector3d(0, 2, 0),
1);
doc.Objects.AddCurve(curve1);
Extrusion extrusion = Extrusion.Create(curve1, 5, true);
doc.Objects.AddExtrusion(extrusion);
Cylinder cylExt = new Cylinder(new Circle(new Point3d(0, 0, 0), 0.3), 20);
Extrusion extrusion = Extrusion.CreateCylinderExtrusion(cylExt, true, true);
doc.Objects.AddExtrusion(extrusion);
doc.Views.Redraw();