specs
uCAD script language
Call this FIRST in every session, before writing any uCAD script, even if you have notes or a skill about uCAD from before: the language (a small Python: every function, its arguments and the objects it returns, with the rules), how this service works, the reference examples, what is new. The language is at spec version ad65f6b97f now; a copy with another version is out of date.
無需輸入參數。
example
Read a reference example
The script of one of the reference examples listed by specs (by its id): a finished model built carefully in uCAD's language, to learn from before building something like it.
輸入參數id必填
run_script
Build: run a uCAD script
Run a whole uCAD script on a drawing in the user's account (a new drawing when `drawing` is left out) and keep the result there. Returns the report (every solid with its size and place, warnings, print() output, or the error with its line), the drawing's id and link, and pictures of it. Each run replaces what the drawing's previous run made. The language is at spec version ad65f6b97f: if what you know of it is another version (or none), call specs first.
輸入參數code必填nameviewswidthheightdrawingspec_version
Pictures of a drawing as it is now (with anything the user changed by hand), from the sides asked for.
輸入參數viewswidthheightdrawing
scene
What a drawing holds
What is in a drawing now: its solids and objects with sizes and places, flat shapes drawn by hand, and its script with line numbers.
輸入參數drawing
share
A link anyone can open
A link to a drawing that anyone can open, with no uCAD account: they see the drawing as it is now (and as it changes later) in uCAD, and can turn it around, measure it, cut sections, download it and edit a copy of their own; its script isn't in it. Use it when the user wants to show or send the model to someone else, or post it: the drawing's own link (?d=) opens only for the user, signed in. Each drawing has one such link: asked again, share gives the same one.
輸入參數actiondrawing
drawings
The account's drawings
The drawings kept in the user's uCAD account, newest first: id, name, when changed, link (and the link anyone can open, for those shared).
無需輸入參數。