Space Engineers

Space Engineers

Otillräckligt med betyg
3D Lathe
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
Uppdaterades
1.115 MB
16 maj, 2021 @ 10:27
17 maj, 2021 @ 8:54
2 ändringsnotiser ( visa )

Abonnera för att ladda ner
3D Lathe

Beskrivning
***This is not a printer for your blueprints, although it's a "printer" in a general sense.***

General info
This device allows you to create structures defined at "runtime", i.e. not defined in a blueprint.
The video should explain the printing process, so let's focus on the data.
The "blueprint" to build is passed to the programmable block as an argument in the form of a base64 encoded bit vector, where ones define a solid block.
The working area of the lathe is 16xHx16 where H is height and is currently set to 11.
Therefore, a single slice of your model occupies 256 bits (32 bytes). Base64 encoding balloons that by a third, making a 16x11x16 blueprint occupy ~470 bytes. This is palatable enough.

Notes
It is up to you to ensure model interconnection, both from the origin and inbetween slices. The former can be achieved by adding a frame, the latter - by thickening ranges (if generating model procedurally)
A primer for printing is just a 16x1x16 light armor plate. It does not have to be either of those. Results are as expected. The only requirement is a connection to projector.

Extensibility
Increasing maximum height of the working area is done with minimal changes to the code. Structural solutions are up to you. Those 4 pistons in the base version don't seem to be very happy.
Increasing base size of the lathe is more work, but using powers of 2 should make things somewhat simpler. Note that a piston is *not* exactly 2 blocks, thanks to the top, so a margin must be honored.

Potential improvements
Data-aware welding (estimate row welding time based on interconnection).

Known issues
Pistons jitter may cause some unwanted blocks welded. Easing could be applied.
Last slice may not be printed if structure is turning out heavy (increasing piston force could help).


Sample python code for generating arguments


import array;
import numpy as np; # not sure if numpy is included in base python
import base64;
import BitVector as bv; # nonstandard module, pip install BitVector

a = np.zeros((11, 16, 16), np.uint8);

# <fill a with your model data>

b = bv.BitVector(bitlist = a.flatten());
bsize = int(len(b) / 8);

# !! replace curly braces with square brackets in the next line; Steam forum parser breaks otherwise
result = { b{ (i * 8):(i + 1) * 8 }.int_val() for i in range(0, bsize) };
b = array.array("B", result);
s = base64.b64encode(b);
print(s);

Argument strings used in the video
checkerboard pattern
////////////////////////////////////////////6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqv//qqr//6qq//+qqg==

hollow sphere
//////////////////////////////////////////8AAAAAAAAAAAPgB/AP+A/4D/gP+A/4B/AD4AAAAAAAAAAAAAAAAAPgD/gP+BwcHBwcHBwcHBwP+A/4A+AAAAAAAAAAAAPgB/AP+BwcOA44DjgOOA44DhwcD/gH8APgAAAAAAAAB/AP+BwcOA4wBjAGMAYwBjAGOA4cHA/4B/AAAAAAAAAH8A/4HBw4DjAGMAYwBjAGMAY4DhwcD/gH8AAAAAAAgAfwD/gcHDgOMAYwBnAHMAYwBjgOHBwP+AfwAIAAAAAAB/AP+BwcOA4wBjAGMAYwBjAGOA4cHA/4B/AAAAAAAAAH8A/4HBw4DjAGMAYwBjAGMAY4DhwcD/gH8AAAAAAAAAPgB/AP+BwcOA44DjgOOA44DhwcD/gH8APgAAAAAAAAAAAD4A/4D/gcHBwcHBwcHBwcD/gP+APgAAAAAA==

wireframe sphere
////////4AfgB+AH4AfgB+AH4AfgB+AH4Af///////8AAAAAAcABwAAAAAAAADAGMAYwBgAAAAAAAAHAAcAAAAAAAAABwAHAAAAAAAAAMAYwBjAGAAAAAAAAAcABwAAAAAAAAAHAAcABwAAAAAA4DjgOOA4AAAAAAcABwAHAAAAAAAAAAAABwAHAAcAAABwcHBwcHAAAAcABwAHAAAAAAAAAAAAAAAAAAcABwAHAD/gP+A/4AcABwAHAAAAAAAAAAAAAAAAAAAAAAAHAAcAH8AfwB/ABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==


all code is CC-BY-NC 4.0