Slicer Discord
Function parser for OpenSCAD and parametric curve grapher – Modèle 3D imprimable de Thingiverse Thingiverse
Function parser for OpenSCAD and parametric curve grapher – Bild 1 Function parser for OpenSCAD and parametric curve grapher – Bild 2
Learning

Function parser for OpenSCAD and parametric curve grapher

par arpruss · Learning
65 Téléchargements
54 Likes
0 Makes
Voir le modèle
One of the OpenSCAD limitations is the inability to pass functions to functions or modules.
This library lets you define mathematical functions in a string, using all of the OpenSCAD mathematical operators (and a bit more). This string is then compiled to an optimized representation which can be evaluated fairly quickly. For instance:

use ;
f = "pow(x,3)*y-x*cos(y)+y";
fc = compileFunction(f);
echo(eval(fc, [["x", 12], ["y", -5]]));

will evaluate the function at x=12 and y=-5.

Parsing the string is not fast, but if you evaluate the compiled function for different variable values, the evaluated function should be fairly fast (in my test, about 10,000 `eval()`s per second).

There are three public functions provided:
* `compileFunction(f)`: takes a function string `f` and returns an optimized compiled representation; the representation is described here: http://www.thingiverse.com/thing:2289738
There may be some bugs in the optimization. If you run into p
Catégorie
Learning
Source
Thingiverse
Publié
Ce qu'il faut pour imprimer: Débutant Confiance faible
Monobloc
Supports 1/3
Assemblage 0/3
Réglages 1/3
Taille du plateau 0/3
Post-traitement 0/3
Imprimante
FDM / FFF
Format de fichier
STL
Matériau
Logiciel
Cura, PrusaSlicer ou similaire
Même créateur, plus de plateformes

arpruss publie également sur

5 modèles supplémentaires sur 1 autres plateformes

Vérifié par correspondance des titres de modèles entre plateformes.
Pas encore d'évaluations
Pas encore de commentaires – soyez le premier !

Modèles similaires

6 Suggestions
Feed Blog Slicer Calculateur Recherche par image Soumettre Contact Discord ☕ Buy me a coffee
DE EN FR ES IT NL

Ajouter à la collection