Lego-compatible icon kit: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
mNo edit summary
Line 7: Line 7:
* [[Doblo factory]]
* [[Doblo factory]]


== Preparation of the dxf with InkScape ==
== Procedure ==
 
In a nutshell, SVG shapes must be transformed into shapes composed of (very small) lines. The procedure is described in [http://repraprip.blogspot.com/2011/05/inkscape-to-openscad-dxf-tutorial.html Repraprip Blog] (2011) and also in our [[:en:OpenScad_beginners_tutorial#Import_and_extrude_2D_graphics_from_SVG|OpenSCAD beginners tutorial]].
 
=== Preparation of the dxf with InkScape ===


# Set the right size, e.g. 40 x 40 mm of the object: CTRL-A, setting the lock,
# Set the right size, e.g. 40 x 40 mm of the object: CTRL-A, setting the lock,
Line 14: Line 18:
# Group the elements,  
# Group the elements,  
# then position the group in the center of the document
# then position the group in the center of the document
# (Optional) Clean the document: File -> Clean document
# (Optional) Set strokes and fills, Make sure that "black" is black and not undefined.
# Ungroup and unlayer everything (verify this, it is maybe not necessary anymore)


[[image:icon-kit-1.svg|thumb|600px|none|Size and positioning in InkScape]]
[[image:icon-kit-1.svg|thumb|600px|none|Size and positioning in InkScape]]
=== Export as DXF ===
To transform Bezier curves to series of straight lines.
* Select all objects (CTRL-A)
* Use Extensions -> Modify Path -> Flatten Beziers Select a value of 0.1 or lower.
* Save as Desktop Cutting Plotter v12 (dxf).
=== Import to OpenScad ===
* Choose the size and scale of Lego compatible, e.g., for a 3x3 Duplo block:
width = 3
height =3
scale = DOBLO
* Select height. Minimum height is HALF. Default is FULL. E.g. the smallest height do:
height=HALF
* Start by importing the shape "as is" and then adjust positions
<syntaxhightlight lang="C">
icon_brick ("noto-mono-smiling-face-with-sunglasses-segments-2.dxf", x_off=0, y_off=0, out=true, d_scale=1, d_height=2, text="COOL", text_x=13, text_size=7, width=3, length=3, scale=DOBLO);
</syntaxhighlight>

Revision as of 18:26, 20 January 2021

Introduction

This page describes a kit to create Lego-compatible icon bricks (mini, Lego, Duplo and Quatro size)


See also:

Procedure

In a nutshell, SVG shapes must be transformed into shapes composed of (very small) lines. The procedure is described in Repraprip Blog (2011) and also in our OpenSCAD beginners tutorial.

Preparation of the dxf with InkScape

  1. Set the right size, e.g. 40 x 40 mm of the object: CTRL-A, setting the lock,
  2. then use the W or H on top (whatever is bigger).
  3. Set the document size to this size plus a 1mm margin (this way re-usability will be better):
  4. Group the elements,
  5. then position the group in the center of the document
  6. (Optional) Clean the document: File -> Clean document
  7. (Optional) Set strokes and fills, Make sure that "black" is black and not undefined.
  8. Ungroup and unlayer everything (verify this, it is maybe not necessary anymore)
Size and positioning in InkScape

Export as DXF

To transform Bezier curves to series of straight lines.

  • Select all objects (CTRL-A)
  • Use Extensions -> Modify Path -> Flatten Beziers Select a value of 0.1 or lower.
  • Save as Desktop Cutting Plotter v12 (dxf).

Import to OpenScad

  • Choose the size and scale of Lego compatible, e.g., for a 3x3 Duplo block:
width = 3
height =3
scale = DOBLO
  • Select height. Minimum height is HALF. Default is FULL. E.g. the smallest height do:
height=HALF
  • Start by importing the shape "as is" and then adjust positions

<syntaxhightlight lang="C">

icon_brick ("noto-mono-smiling-face-with-sunglasses-segments-2.dxf", x_off=0, y_off=0, out=true, d_scale=1, d_height=2, text="COOL", text_x=13, text_size=7, width=3, length=3, scale=DOBLO);

</syntaxhighlight>