From f9d5958260bb6168faeea051ba0f901a9fe1824c Mon Sep 17 00:00:00 2001 From: Elena of Valhalla'' Grandi Date: Sun, 22 Jun 2014 10:46:28 +0200 Subject: New source layout; added d6 and pips faces --- Makefile | 27 ++++++++++++ conf/dice.ini | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/dice.scad | 20 +++++++++ lib/faces/empty.scad | 4 ++ 4 files changed, 165 insertions(+) create mode 100644 Makefile create mode 100644 conf/dice.ini create mode 100644 lib/dice.scad create mode 100644 lib/faces/empty.scad diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..943c209 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ + +BUILDDIR = build +CONFDIR = conf +SRCDIR = designs + +SLIC3R = ~/opt/Slic3r/bin/slic3r + +VPATH = $(SRCDIR):$(BUILDDIR) + +STL_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.stl,$(wildcard $(SRCDIR)/*.scad)) +GCODE_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.gcode,$(wildcard $(SRCDIR)/*.scad)) + +.PHONY: all gcode clean +all: $(STL_TARGETS) + +gcode: $(GCODE_TARGETS) + +$(BUILDDIR)/%.stl: %.scad + mkdir -p ${BUILDDIR} + openscad -o $@ $^ + +$(BUILDDIR)/%.gcode: %.stl + ${SLIC3R} --load ${CONFDIR}/dice.ini $^ + +clean: + rm -f ${BUILDDIR}/*.stl ${BUILDDIR}/*.gcode + diff --git a/conf/dice.ini b/conf/dice.ini new file mode 100644 index 0000000..224b55f --- /dev/null +++ b/conf/dice.ini @@ -0,0 +1,114 @@ +# generated by Slic3r 0.9.10b on Sun Jun 22 10:44:47 2014 +avoid_crossing_perimeters = 1 +bed_size = 200,200 +bed_temperature = 0 +bottom_solid_layers = 3 +bridge_acceleration = 0 +bridge_fan_speed = 100 +bridge_flow_ratio = 1 +bridge_speed = 60 +brim_width = 0 +complete_objects = +cooling = 1 +default_acceleration = 0 +disable_fan_first_layers = 1 +duplicate = 1 +duplicate_distance = 6 +duplicate_grid = 1,1 +end_gcode = M104 S0 ; turn off temperature\nG28 X0 ; home X axis\nM84 ; disable motors +external_perimeter_speed = 70% +external_perimeters_first = 0 +extra_perimeters = 1 +extruder_clearance_height = 40 +extruder_clearance_radius = 40 +extruder_offset = 0x0 +extrusion_axis = E +extrusion_multiplier = 1 +extrusion_width = 0 +fan_always_on = 0 +fan_below_layer_time = 60 +filament_diameter = 3 +fill_angle = 45 +fill_density = 0.4 +fill_pattern = rectilinear +first_layer_bed_temperature = 0 +first_layer_extrusion_width = 200% +first_layer_height = 0.25 +first_layer_speed = 50% +first_layer_temperature = 205 +g0 = 0 +gap_fill_speed = 20 +gcode_arcs = 0 +gcode_comments = 0 +gcode_flavor = reprap +infill_acceleration = 0 +infill_every_layers = 1 +infill_extruder = 1 +infill_extrusion_width = 0 +infill_first = 0 +infill_only_where_needed = +infill_speed = 60 +layer_gcode = +layer_height = 0.25 +max_fan_speed = 100 +min_fan_speed = 35 +min_print_speed = 4 +min_skirt_length = 0 +notes = +nozzle_diameter = 0.5 +only_retract_when_crossing_perimeters = +output_filename_format = [input_filename_base].gcode +perimeter_acceleration = 0 +perimeter_extruder = 1 +perimeter_extrusion_width = 100% +perimeter_speed = 30 +perimeters = 3 +post_process = +print_center = 100,100 +raft_layers = 0 +randomize_start = 0 +resolution = 0 +retract_before_travel = 2 +retract_layer_change = 1 +retract_length = 2 +retract_length_toolchange = 10 +retract_lift = 0 +retract_restart_extra = 0 +retract_restart_extra_toolchange = 0 +retract_speed = 30 +rotate = 0 +scale = 1 +skirt_distance = 6 +skirt_height = 1 +skirts = 4 +slowdown_below_layer_time = 30 +small_perimeter_speed = 30 +solid_fill_pattern = rectilinear +solid_infill_below_area = 70 +solid_infill_every_layers = 0 +solid_infill_extrusion_width = 0 +solid_infill_speed = 60 +spiral_vase = 0 +start_gcode = G28 ; home all axes\nG1 Z5 F5000 ; lift nozzle +support_material = +support_material_angle = 0 +support_material_enforce_layers = 1 +support_material_extruder = 1 +support_material_extrusion_width = 0 +support_material_interface_layers = 0 +support_material_interface_spacing = 0 +support_material_pattern = rectilinear +support_material_spacing = 2.5 +support_material_speed = 60 +support_material_threshold = 0 +temperature = 195 +threads = 2 +toolchange_gcode = +top_infill_extrusion_width = 100% +top_solid_infill_speed = 40 +top_solid_layers = 5 +travel_speed = 130 +use_relative_e_distances = 0 +vibration_limit = 0 +wipe = 1 +z_offset = -0.4 diff --git a/lib/dice.scad b/lib/dice.scad new file mode 100644 index 0000000..c3cab85 --- /dev/null +++ b/lib/dice.scad @@ -0,0 +1,20 @@ +module d6(side=false, size=false) { + l = side ? side : size; + if (l == false) { + echo("ERROR: d6: one of side or size should be defined"); + } + echo(l); + difference() { + intersection() { + cube(l, center=true); + sphere(l*0.79); + } + translate([0, 0, l/2]) child(0); + rotate([90, 0, 0]) translate([0, 0, l/2]) child(1); + rotate([0, 90, 0]) translate([0, 0, l/2]) child(2); + rotate([-90, 0, 0]) translate([0, 0, l/2]) child(3); + rotate([0, -90, 0]) translate([0, 0, l/2]) child(4); + rotate([180, 0, 0]) translate([0, 0, l/2]) child(5); + } +} + diff --git a/lib/faces/empty.scad b/lib/faces/empty.scad new file mode 100644 index 0000000..8725dee --- /dev/null +++ b/lib/faces/empty.scad @@ -0,0 +1,4 @@ + +module empty(l) { + translate([0, 0, 10]) sphere(1); +} -- cgit v1.2.3