Expand description
Parameters: the named values a program’s design is given by —
numbers, tables of variants, the part’s colour and what it is made of.
A parameter is defined once, in the program, and read by name wherever
a number is typed (NumericInput):
a sketch dimension of width / 2, a number parameter of 2 * wall. A
table is a family of variants — screw sizes, say — of which one row is
selected: screw.diameter is that row’s value in the column
diameter.
What a parameter is defined as is the program’s own, in a step of it —
a number in crate::parameters::steps::DefineParameters, a table in a
crate::parameters::steps::LookupTable of its own; what it is built with may be set
by a program placing the part, by the same name: the run’s input of
that name (see geop_core_program::values::Settings). So a placed screw is made M5 by the
program placing it, without touching the screw’s own file.
Structs§
- Material
- What a part is made of: a name, and its density in kg/m³ — what its
mass and inertia are computed with (see
geop-ops-inspect). Lengths are millimetres, so a part ofVmm³ weighsdensity · V · 1e-9kg. - Number
Parameter - A number parameter, as its
crate::parameters::steps::DefineParametersstep holds it: a formula of the parameters defined before it —12,width / 2.minandmaxare what a slider offers when the part is placed, not what is valid. - Parameter
- A named parameter.
- Parameters
- A program’s parameters and properties, as an editor lists and edits them
together: the part’s colour and material, what it is called and ordered
as (
crate::parameters::steps::PartProperties), and the values it is designed with (crate::parameters::steps::DefineParameters), in order. - Row
- One row of a table (
ParameterKind::Table,crate::parameters::steps::LookupTableArgs): a variant, by name, with a value per column.
Enums§
- Parameter
Kind - What a parameter of a program is, as an editor lists them all: a number
its
crate::parameters::steps::DefineParametersstep defines, or a table acrate::parameters::steps::LookupTablestep of its own looks up.
Constants§
- COLOR
- The name the part’s colour is set by.
- CONFIGURATION
- The parameter a program’s configurations are looked up by: the table of
its configurations is the one looked up by it (see
crate::parameters::configurations).
Functions§
- validate_
color - Whether
coloris a colour,#rrggbb. - validate_
name - Whether
namecan name a parameter: a letter or_, then letters, digits and_— so that a formula reads it as one, andname.columnnames a table’s column without ambiguity.