write a script for rhino to displace surface by curves
- User
write a script for rhino to displace surface by curves
- Assistant
Here is a simple script for Rhino that displaces a surface using curves:
javascript!rhino3d // Get the surface and curves from the user Surface surface = Rhino.GetObject("Select surface to displace", 8, false, false); Curve[] curves = Rhino.GetObjects("Select curves to use for displacement", 4, false, false); // Check if the user selected a surface and curves if (surface == null || curves == null || curves.Length == 0) { Rhino.Print("No surface or curves selected. Exiting script."); return; } // Create a new surface by displacing the original surface along the curves Surface[] displacedSurfaces = new Surface[curves.Length]; for (int i = 0; i < curves.Length; i++) { displacedSurfaces[i] = Surface.CreateDisplacement(surface, curves[i]); } // Display the displaced surfaces for (int i = 0; i < displacedSurfaces.Length; i++) { Rhino.AddObject(displacedSurfaces[i]); }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.