Skip to content

Instantly share code, notes, and snippets.

circle()
@pentacular
pentacular / script
Created May 30, 2019 00:31
Lego Train Motor Assembly
let motor = microGearMotor({ shaftDiameter: 3.1 }).as('motor');
let rear = cube(3.2 * 4, 16 - 0.2, 15 - 0.2).translate(0).as('rear');
let studSheet = readShape({ path: 'studs3' }, () => lego.studSheet({ width: 16 - 0.2, length: 32 - 0.2 }));
let socketSheet = readShape({ path: 'sockets4' }, () => lego.socketSheet({ width: 16 - 0.2, length: 32 - 0.2, studDiameter: 5.1, play: 0 }));
let bevelGear = readShape({ path: 'bevelGear' }, () => readLDraw({ part: '6589.dat' }));
let gear = assemble(bevelGear.rotateX(90).translate(0, 0, -1),
cylinder(4, 8).translate(0, 0, 0))
.translate(0, 0, 8 * 3)
.as('gear');
This is a test
@pentacular
pentacular / test.txt
Created November 24, 2019 13:33
Zooble
This is a test
@pentacular
pentacular / test.txt
Created November 24, 2019 13:34
Zooble2
This is a test
@pentacular
pentacular / test.txt
Created November 24, 2019 13:34
Zooble2
This is a test
assemble(
Circle(await ask('Radius', 10)),
Square(await ask('Size', 12)).moveX(await ask('Radius')),
Triangle(await ask('Hole Radius', 3)).drop())
.extrude(2)
.material(await ask.forString('Material', 'wood', { choices: ['wood', 'steel'] }));
assemble(
Circle(await ask('Radius', 10)),
Square(await ask('Size', 12)).moveX(await ask('Radius')),
Triangle(await ask('Hole Radius', 3)).drop())
.extrude(2)
.material(await ask.forString('Material', 'wood', { choices: ['wood', 'steel'] }));
assemble(
Circle(await ask('Radius', 10)),
Square(await ask('Size', 12)).moveX(await ask('Radius')),
Triangle(await ask('Hole Radius', 3)).drop())
.extrude(2)
.material(await ask.forString('Material', 'wood', { choices: ['wood', 'steel'] }));
assemble(
Circle(await ask('Radius', 10)),
Square(await ask('Size', 12)).moveX(await ask('Radius')),
Triangle(await ask('Hole Radius', 3)).drop())
.extrude(2)
.material(await ask.forString('Material', 'wood', { choices: ['wood', 'steel'] }));