Slicer Discord
Passing formulas to OpenSCAD modules/functions – Modello 3D stampabile da Thingiverse Thingiverse

Passing formulas to OpenSCAD modules/functions

di arpruss
26 Download
20 Likes
0 Makes
Vai al Modello
This page is mainly for reference. Most users will want this simpler solution which parses strings containing OpenSCAD formulas: http://www.thingiverse.com/thing:2295309

---

One of the features that OpenSCAD is lacking is the ability to pass functions to modules or to functions. This is a quick-and-dirty proof-of-concept solution to the not uncommon problem of wanting to pass a mathematical formula to a module or function: an eval() function that evaluates expressions in a simple LISP-inspired language that supports all of the OpenSCAD mathematical operators. The evaluation is moderately fast: about 10,000 evaluations of the sample formula below per second on my laptop. The downside is that it's pretty inconvenient to write expressions in this language.

Call the function with: `eval(expression, variables)`. Here, `variables` is a table of variable values, where each line of the table has the name of the variable followed by its value, e.g., [["x", 12.3], ["y", 7]].

An `exp
Fonte
Thingiverse
Cosa serve per stampare: Principiante Bassa affidabilità
Pezzo unico
Supporti 1/3
Assemblaggio 0/3
Impostazioni 1/3
Dimensioni piano 0/3
Post-lavorazione 0/3
Stampante
FDM / FFF
Formato file
STL
Materiale
Software
Cura, PrusaSlicer o simile
Stesso designer, più piattaforme

arpruss pubblica anche su

5 modelli aggiuntivi su altre 1 piattaforme

Verificato dalla corrispondenza dei titoli dei modelli tra le piattaforme.
Ancora nessuna valutazione
Ancora nessun commento – sii il primo!

Modelli simili

6 Suggerimenti
Feed Blog Slicer Calcolatore Ricerca per immagine Invia Contatto Discord ☕ Buy me a coffee
DE EN FR ES IT NL

Aggiungi alla collezione