/* Wooden Toy Train Connector for OpenSCAD mailing list. Target Shape: A gym dumbbell Model Version v3 2024-01-05 Error Messages: OpenSCAD-2024.01.03.ai18006-x86_64.AppImage WARNING: Warning: mesh is not closed! WARNING: Warning: mesh is not closed! ERROR: Rendering cancelled by exception Unauthorized intersections of constraints OpenSCAD-2023.03.05.ai13734-x86_64.AppImage WARNING: Warning: mesh is not closed! WARNING: Warning: mesh is not closed! [fast-csg] Performing safer but slower nef operation instead of corefinement because operands share some vertices. (can override with fast-csg-trust-corefinement) ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /usr/include/CGAL/Nef_S2/SM_const_decorator.h Line: 329 WARNING: No top level geometry to render */ total_length=34.25; mysquare=5.75; mycircle=11.0; total_height=11.95; $fn=100; module basic_shape_2d(){ translate([total_length/2-mycircle/2,0]) circle(d=mycircle); translate([-total_length/2+mycircle/2,0]) circle(d=mycircle); square([total_length-mycircle,mysquare],center=true); } intersection(){ //bounding box cube([total_length,mycircle,total_height],center=true); //dumbell with roof() exceeding its bounding box union(){ translate([0,0,total_height/2*0.8]) roof() basic_shape_2d(); translate([0,0,-total_height/2*0.8]) linear_extrude(total_height*0.8) basic_shape_2d(); translate([0,0,-total_height/2*0.8]) mirror([0,0,1]) roof() basic_shape_2d(); } }