Beispiel #1
0
        public void CameraToGH(FVector vector)
        {
            var pt = vector.ToRhino();

            using (var args = new Rhino.Runtime.NamedParametersEventArgs())
            {
                args.Set("point", new Rhino.Geometry.Point(pt));
                Rhino.Runtime.HostUtils.ExecuteNamedCallback("ToGrasshopper", args);
            }
        }
Beispiel #2
0
 // This function will be called from a component in Grasshopper
 void FromGrasshopper(object sender, Rhino.Runtime.NamedParametersEventArgs args)
 {
     Rhino.Geometry.GeometryBase[] values;
     if (args.TryGetGeometry("mesh", out values))
     {
         mesh = values[0] as Rhino.Geometry.Mesh;
         mesh.Faces.ConvertQuadsToTriangles();
         mesh.Flip(true, true, true);
     }
 }