Doblo factory version 1

The educational technology and digital learning wiki
Jump to navigation Jump to search

Draft

This article or section is currently under construction

In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")

Introduction

Doblo Factory is the name of a set of OpenScad modules we wrote to generate duplo-compatible structures and bricks. These modules are based on parametric lego duplo, prior work by by Domonoky.

Soon available on Thingyverse.

See also: Lego Dacta

Usage

The positioning framework

Doblo uses a grid like a chessboard. Origin is in the middle like in most 3D representation languages.

  • Column = left to right (x axis)
  • Row = forward to backward (y axis)
  • up = upwards (z axis)

All blocks, except the doblo block has the origin in the upper left. Since one only uses the doblo block once for the base plate, it has is x,y origin in the middle.

Parameter names used

  • col: the x axis (left-to-right)
  • row: the y axis (forward to backward)
  • up: the z axis (down to up), each block has relative z = 0.. I.e. a block of up=1 would sit on a block of height=1.
  • width: length on the x-axis. Except for the doblo block whose origin is inthe middle, origin is upper left
  • length: length on the y-axis, Except for the doblo block whose origin is in the middle, origin is upper left

Units

  • Units for columns, rows, with and length: 1 unit = 16mm
  • Units for height: 1 unit = 4.8 mm
  • Units for rotation angles around z-axis: Only 0, 90, 180, 270

Using openscad doblo modules

To create your own more complex custom shapes, there are several modules (functions). All of these use the same position system.

doblo brick

Creates a typical duplo-compatible brick. Typical use is to create a Doblo base on which you then can add other structures. You also can pile up (union) these bricks, but that may lead to a waste of processing time and plastic. Doblo bricks are just like Duplo bricks, however you can make the nibbles on top optional.

Syntax
doblo (col, row, up, width,length,height,nibbles_on_off)

doblo light

Same as above, but with a grid instead of nibbles undederneath. Faster to generate and to print (probably).

Syntax
doblo_light (col, row, up, width,length,height,nibbles_on_off)

Merge STL files

Positions an stl file, you may have to find out by trial and error what z offset to use. Tip: embed the STL into a doblo or a block.

Syntax
merge_stl (file, col, row, stl_z_offset_mm)

Block

Creates a building block for larger structures with x,y,z positioning. A block does not have nibbles underneath and may or may not have nibbles on top. Also could be used to print a base plate.

Syntax
block (col, row, up, width,length,height,nibbles_on_off)

Nibbles

To insert nibbles on some spots of a nibble-less block or an imported STL. For use in larger structures.

Syntax
nibbles (col, row, up, width, length)

Bottom nibbles

To insert underneath an imported STL. Not very usefull I think, I'd rather stick a doblo block to the feet of an imported object.

Syntax
bottom_nibbles (col, row, up, width, length, N_height)

Support triangles

Support triangles are used in larger structures to support a roof.

  • Thickness = 1 doblo width, e.g. = PART_WIDTH.
  • Sometimes you may want rational numbers. E.g. 1.5
  • Height/length proportion is 4.8/4 (i.e. typical Lego proportions).
  • Only use angle arg of 0,90,180,270 !!

WARNING: You may want to have these bricks overlap a bit, e.g. if 2 corners are just touching, the model will be not be "simple" and can't be exported as STL. In other words, make them a bit higher and position a bit off (embed into the block that you will put on the back and embed the back in a side block). See the stronghold example included.

Syntax
support (col,row,up,height,rotation_angle,thickness)

ramp

ramp is the opposite of the support triangle, but with a flatter angle. Can be used to anchor a high and slim block or also to build a real ramp (then you might place 2-4 next to each other.

  • Height/length proportion is 4.8/16 (i.e. typical Lego proportions)

Syntax:

ramp (col,row,up,height,rotation_angle)

Notice: I'll have to add width to this one

Cylinder

cylinder is like a block, but round.

  • Can have nibbles on top.

Syntax:

cyl_block (col, row, up, bottom_r, top_r, height, nibbles_on_off)

Simple mashup blocks

module merge_brick ()

Syntax
merge_brick ()

Allows to create a mashup brick with a duplo-compatible block at the bottom, a "presentation brick" in between and an imported .STL file on top. Not very powerful, but a quick way to create new kinds of Duplo persona for example.

Usage: Edit the first section of the merge_brick module and change the parameters below.

// BASE PLATE PARAMETERS

// 1 = standard doblo with (i.e. 16mm on the x axis)
    doblo_width = 2;           	 

// 1 =  standard 4x4 doblo length (i.e. 16mm on the y axis)
    doblo_length= 2;          

// 1 =   minimal doblo height (i.e. 4.8 mm on the z axis), 4 = typical brick
    doblo_height = 2;          

// true or false - not needed if presentation block is same size
    doblo_nibbles = false;      
    
// STL file PARAMETERS
    
// filename (a string), middle of object should be x,y ~ 0 !!
    stl_file = "duck.stl";     
    
// mm - how much move the STL up/down with respect to the presentation block - TRY !

 // if the STL sits on z=0 then about half height. Just try until it's ok ;)
    stl_lift = 0;            
                             
// Positioning - moves STL and support block right and forward/backward by columns and rows. 
// pos in N doblo_width/2.  0 = left border of base plate
    STL_col = 0;             
// pos in N doblo_length/2. 0 = upper border of base plate
    STL_row = 0;             
    
// Size of the block underneath the STL
// height of the presentation block in terms of doblo_height, can be 0
    block_height = 3;        
// width of presentation block in N doblo_width, e.g. 2 means 2 nibbles
    block_width = 2;         
// length of presentation block in N doblo_ width, e.g. 2 means 2 nibbles
    block_length = 2;

Parameters

Parameters are made for Duplo blocks. To get Lego (not yet tested!) divide by half.

// doblo size
PART_WIDTH   = 16;
PART_HEIGHT  = 4.8 ;

// nibble size definitions
NO =  PART_WIDTH / 2; //nibbleoffset
NBO = PART_WIDTH;     // nibble bottom offset
NH  = 4.5;            // height of normal nibble

// walls - might be a bit fatter. Depends also on your print settings
DOBLOWALL = 1.55;	
INSETS   = 1.35; //little inset walls to make it stick

// Sizes of a standard 2x2 square brick, normal height
// Not used, but are pratical in your custom modules
DOBLOWIDTH  = PART_WIDTH * 2;
DOBLOHEIGHT = PART_HEIGHT * 4;

Examples

Doblo structure

The following structure was my first creation and it did have some design flaws. But it did print.

Strong-hold in progress
Module name
stronghold ()
Stronghold - version 2 as seen in Netfab

Some mashups

In the following picture you can see two kinds of mashups:

  • Larger STL models put on top of bricks. I actually did these with Meshlab before I learnt how to use OpenScad.
  • Doblo bricks with webdings on top. Produced with either OpenScad alone or with Netfabb Studio. The basic version of Netfabb does have a 3D text. The pro version can directly export a mashup. Users of Netfabb Studio basic should also use either OpenScad or Meshlab for merging.
Some Doblo bricks (Duplo compatible)