Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Please code a parametric keychain with extruded text and a hanging loop in OpenSCAD for…
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Please code a parametric keychain with extruded text and a hanging loop in OpenSCAD for 3D printing
- Assistant
Sure! Here's an example code for a parametric keychain with extruded text and a hanging loop in OpenSCAD:
// keychain parameters keychain_thickness = 3; // overall thickness of keychain text_thickness = 1; // thickness of extruded text text_height = 5; // height of extruded text text_size = 12; // font size of text loop_radius = 10; // radius of hanging loop loop_thickness = 1; // thickness of hanging loop keychain_width = 30; // width of keychain // create the hanging loop module hanging_loop() { difference() { cylinder(r = loop_radius, h = loop_thickness, center = true); cylinder(r = loop_radius - loop_thickness, h = loop_thickness + 0.1, center = true); } } // create the keychain with extruded text and hanging loop module keychain() { difference() { // create the keychain shape cube([keychain_width, keychain_width, keychain_thickness]); // extrude the text and position it on the keychain translate([keychain_width/2 - text_size/2, keychain_width/2 - text_size/2, keychain_thickness]) linear_extrude(height = text_height, convexity = 10) text("Hello, World!", size = text_size); // position the hanging loop at the top of the keychain translate([keychain_width/2, keychain_width/2, keychain_thickness - loop_thickness]) hanging_loop(); } } // generate the keychain keychain();
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.