Repository navigation
simplecadapi 2.2.6.post1
2.2.6.post1 Update Notes
A hotfix for the editor's parameter panel, and a round of speed work on the notebook cache
and on use, measured on the desktop six-axis arm.
scad.var(name=..., default=...) is a parameter again
The editor found a parameter's default only as the second positional argument of
scad.var. A declaration written with keywords —
J1 = scad.var(name="j1", default=0.0, comment="Joint 1")— was skipped: no slider, no commit back to the file. Both forms are read now, and
committing a value rewrites the right argument in either.
What a cached run costs
| desktop arm | before | now |
|---|---|---|
| cold run | 80.5 s | 34.6 s |
| nothing changed | 23.6 s | 4.0 s |
| one joint angle edited | 18.2 s | 3.0 s |
| a link length edited | 35.1 s | 19 s |
| cache on disk | 1.7 GB | 96 MB |
- Restoring is cheaper. A restored shape is built when something first uses it, so a
cached value no running cell reads costs nothing; the tag caches are rebuilt once, not
once per ancestor. The cache no longer stores a cell's private (_name) values and
compresses what it writes; entries from before are still read. - Parameters are keyed by value. A cell that reads one
scad.varis not redone because a
neighbour defined in the same cell changed. - A name, not a file.
from lib.dims import Adepends on the definition ofA. useis followed one call at a time. A cell that uses a notebook by a literal path
depends on that notebook (its text, the modules it imports, the notebooks it uses): editing
one child redoes the cell that uses it, not its siblings. The editor kernel caches such
cells too.usecalls run side by side. Theusecalls a cell is about to make are started in
worker processes (threads would not help: OpenCASCADE keeps the interpreter lock) and the
cell finds them built.SCA_JOBSsets the number (default: the smaller of 4 and the
cores;1turns it off). Workers are started only when that saves more than they take to
start, and a notebook is locked between processes while it runs.- Editor sliders. A drag is sent when it pauses (250 ms) or ends, not step by step.