A dynamic multi-STL, multi-process OpenSCAD build system with autoplating support

Overview

scad-build

This is a multi-STL OpenSCAD build system based around GNU make. It supports dynamic build targets, intelligent previews with user-defined part layouts, and autoplating to efficiently send the maximum number of objects that will fit your 3D printer build plate to your slicer, reducing the amount of work that goes into printing complex projects.

Requirements

  • OpenSCAD 2021.01 or newer
  • GNU make
  • Python 3.9.x or newer and the command line version of prusa-slicer (only for autoplating)

Using scad-build

This repository is intended to be a template to base new projects off of; existing projects without a build system can be adapted to use scad-build too. The files in this repository expect to be copied into the root of your OpenSCAD project.

Importing

Once you have installed scad-build into the root of your project, import it into any SCAD file you want to export multiple STLs from with import <./build.scad>. Modify the path if build.scad is not in the same directory as your SCAD file.

Using build(id)

build() is a module that designates its children as a separate build unit; this will cause make to output an STL at out/scad_file/build_id.stl containing only the children in scope for the build(build_id) module in the file scad_file.scad. build modules exist at runtime, so they can be nested under other modules if desired, or generated dynamically. Note that for scad-build to work properly, everything that renders during a build should be scoped under a build() module. See the section on previewing below for information on how to render multiple items while designing.

While scad-build is running under make, the function building() will return true, and building(build_id) will return true if the current build unit for the openscad process has been called to handle build(build_id).

Children of build() can access the current build ID via the $build_id variable. If there is no build() parent, $build_id is the empty string.

scad-build only pays attention to the first build() module in a render tree; any instances of build() inside of build() will not be picked up by the build system.

Previewing

scad-build has three distinctive modes for the OpenSCAD runtime. The first is build() module discovery, which is an implementation detail. The second is build mode, where make calls openscad with a single build_id selected. The third mode is preview mode, the default mode when scad-build projects are accessed outside of make -- most relevantly, in OpenSCAD's UI for preview.

While previewing, the function previewing() returns true. This can be used to define modules that will render all of your STLs in the same view while you are designing them without interfering with building. See the preview_row() and preview_column() modules in build.scad for ready-to-go preview layout utilites that demonstrate how to use previewing() to generate your own layout.

Note that preview modules disable layouts and call children() when not previewing, because they expect to only render children wrapped in build(), and only the child matching the build_id will be rendered when not previewing.

Building (rendering)

Type make to start a build. Your STLs will end up in the out directory, in subdirectories named after the SCAD file used to build the STL. Each STL is named after the argument to its parent build() module.

Multi-process rendering

scad-build supports the standard make mechanism for multi-process/multi-core builds: specify -j# as an argument to make, where # is the number of processes (build units) you want to render simultaneously.

Autoplating

Ideal for complex 3D printing projects with many discrete parts, autoplating tries to pack the maximum number of STL files into your build volume. It requires Python 3.9.x and the command line version of prusa-slicer to be accessible.

Configuring

Autoplating requires you to create a .plateconfig file in your project root; this file should be added to your .gitignore, since it is specific to your 3D printer. Its contents should look like:

[plate]
size_x = 
   
    
size_y = 
    
     
spacing = 
     

     
    
   

Running the autoplater

Type make autoplate. If you have written a .plateconfig and have all of the necessary dependencies, this should build your STL files if necessary, then populate out/autoplate with subdirectories representing each prepared build plate. Each subdirectory contains the STLs on that plate (more specifically, symbolic links to already built STLs to save space).

To slice a whole plate based off of the autoplater's suggestion, call your slicer like: prusa-slicer out/autoplater/plate0/*.stl, changing this command as needed if slicing other plate numbers or using Cura or another slicer.

You might also like...
Separate handling of protected media in Django, with X-Sendfile support

Django Protected Media Django Protected Media is a Django app that manages media that are considered sensitive in a protected fashion. Not only does t

Colin O'Flynn's Hacakday talk at Remoticon 2021 support repo.

Hardware Hacking Resources This repo holds some of the examples used in Colin's Hardware Hacking talk at Remoticon 2021. You can see the very sketchy

An advanced multi-threaded, multi-client python reverse shell for hacking linux systems
An advanced multi-threaded, multi-client python reverse shell for hacking linux systems

PwnLnX An advanced multi-threaded, multi-client python reverse shell for hacking linux systems. There's still more work to do so feel free to help out

The Modern Hash Identification System
The Modern Hash Identification System

🔗 Don't know what type of hash it is? Name That Hash will name that hash type! 🤖 Identify MD5, SHA256 and 3000+ other hashes ☄ Comes with a neat web app 🔥

A honey token manager and alert system for AWS.
A honey token manager and alert system for AWS.

SpaceSiren SpaceSiren is a honey token manager and alert system for AWS. With this fully serverless application, you can create and manage honey token

Backdoor is a term that refers to the access of the software or hardware of a computer system without being detected.
Backdoor is a term that refers to the access of the software or hardware of a computer system without being detected.

This program is an non-object oriented opensource, hidden and undetectable backdoor/reverse shell/RAT for Windows made in Python 3 which contains many features such as multi-client support and cross-platform server.

Fetch Chrome, Firefox, WiFi password and system info

DISCLAIMER : OUR TOOLS ARE FOR EDUCATIONAL PURPOSES ONLY. DON'T USE THEM FOR ILLEGAL ACTIVITIES. YOU ARE THE ONLY RESPONSABLE FOR YOUR ACTIONS! OUR TO

We protect the privacy of the data on your computer by using the camera of your Debian based Pardus operating system. 🕵️

Pardus Lookout We protect the privacy of the data on your computer by using the camera of your Debian based Pardus operating system. The application i

Security System using OpenCV

Security-System Security System using OpenCV Files in this Repository: email_send.py - This file contains python code to send an email when something

Owner
Jordan Mulcahey
Jordan Mulcahey
Multi-Process Vulnerability Tool

Multi-Process Vulnerability Tool

Baris Dincer 1 Dec 22, 2021
AIL LeakFeeder: A Module for AIL Framework that automate the process to feed leaked files automatically to AIL

AIL LeakFeeder: A Module for AIL Framework that automates the process to feed leaked files automatically to AIL, So basically this feeder will help you ingest AIL with your leaked files automatically.

ail project 8 May 3, 2022
A Burp Suite extension made to automate the process of finding reverse proxy path based SSRF.

TProxer A Burp Suite extension made to automate the process of finding reverse proxy path based SSRF. How • Install • Todo • Join Discord How it works

Krypt0mux 162 Nov 25, 2022
IPscan - This Script is Framework To automate IP process large scope For Bug Hunting

IPscan This Script is Framework To automate IP process large scope For Bug Hunti

0xd2rdir 8 Mar 12, 2022
RapiDAST provides a framework for continuous, proactive and fully automated dynamic scanning against web apps/API.

RapiDAST RapiDAST provides a framework for continuous, proactive and fully automated dynamic scanning against web apps/API. Its core engine is OWASP Z

Red Hat Product Security 17 Nov 11, 2022
:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)

privacyIDEA privacyIDEA is an open solution for strong two-factor authentication like OTP tokens, SMS, smartphones or SSH keys. Using privacyIDEA you

null 1.3k Jan 3, 2023
Used to build an XSS platform on the command line.

pyXSSPlatform Used to build an XSS platform on the command line. Usage: 1.generate the cert file You can use openssl like this: openssl req -new -x509

null 70 Jun 21, 2022
BoobSnail allows generating Excel 4.0 XLM macro. Its purpose is to support the RedTeam and BlueTeam in XLM macro generation.

Follow us on Twitter! BoobSnail BoobSnail allows generating XLM (Excel 4.0) macro. Its purpose is to support the RedTeam and BlueTeam in XLM macro gen

STM Cyber 232 Nov 21, 2022
HatSploit native powerful payload generation and shellcode injection tool that provides support for common platforms and architectures.

HatVenom HatSploit native powerful payload generation and shellcode injection tool that provides support for common platforms and architectures. Featu

EntySec 100 Dec 23, 2022