example009.scad 1.1 KB

123456789101112131415161718192021222324252627282930
  1. bodywidth = dxf_dim(file = "example009.dxf", name = "bodywidth");
  2. fanwidth = dxf_dim(file = "example009.dxf", name = "fanwidth");
  3. platewidth = dxf_dim(file = "example009.dxf", name = "platewidth");
  4. fan_side_center = dxf_cross(file = "example009.dxf", layer = "fan_side_center");
  5. fanrot = dxf_dim(file = "example009.dxf", name = "fanrot");
  6. % linear_extrude(height = bodywidth, center = true, convexity = 10)
  7. import(file = "example009.dxf", layer = "body");
  8. % for (z = [+(bodywidth/2 + platewidth/2),
  9. -(bodywidth/2 + platewidth/2)])
  10. {
  11. translate([0, 0, z])
  12. linear_extrude(height = platewidth, center = true, convexity = 10)
  13. import(file = "example009.dxf", layer = "plate");
  14. }
  15. intersection()
  16. {
  17. linear_extrude(height = fanwidth, center = true, convexity = 10, twist = -fanrot)
  18. import(file = "example009.dxf", layer = "fan_top");
  19. // NB! We have to use the deprecated module here since the "fan_side"
  20. // layer contains an open polyline, which is not yet supported
  21. // by the import() module.
  22. rotate_extrude(file = "example009.dxf", layer = "fan_side",
  23. origin = fan_side_center, convexity = 10);
  24. }