annotations¶
Text notes and frames drawn behind blocks on the canvas; ignored by the engine.
In the model file this key holds a list of entries.
Typical uses¶
These sections organise a model and leave notes for people. submodels are reusable definitions that SUBMODEL blocks instantiate. info holds the description and author. annotations and background draw notes, frames and a floor plan on the canvas, and building declares the floor plan itself: rooms, wall openings and labels in metres. cranes and stockpiles say how playback draws lifts and stores on that plan. view remembers where the editor was. Only submodels changes what a run does.
Behaviour and rules¶
A submodel definition holds parameters, inner blocks, links and named ports. Before a run, every instance is replaced by a copy of the definition's blocks, named <instance>/<inner>, and the links are rewired through the ports. A definition may be reused with different arguments, and a definition that contains itself is an error.
The engine ignores annotations, background, building, cranes, stockpiles, view and info, apart from showing info in the report header. They never change a result. A background image has a position, a scale, an opacity, a lock and a real-world scale. A building's walls are not stored: they are the outlines of its rooms with walls true, merged per wall line and cut by its openings. The editor writes view on every save.
A crane's lift is any traced move with a duration between two blocks it serves. Playback splits that move into phases (the hook travels empty, lowers, carries the load, sets it down) without changing its start or its length. A stockpiles area draws its block's entities as slabs on a few piles instead of a queue row. Each entity's pile comes from keys, one per entity created at source, in creation order. Past max_layers a pile stops growing and its label counts.
Fields¶
| Field | Type | Required | Default | Unit | Description |
|---|---|---|---|---|---|
id |
string | yes | The note's identifier, unique among the annotations. | ||
kind |
choice | yes | "text" is a note, "frame" a titled box around part of the canvas. One of text, frame. |
||
position |
point | The canvas point of a text note. | |||
rect |
list of number | A frame's [x, y, width, height] on the canvas. | |||
text |
string | The note's text. | |||
title |
string | The frame's title. | |||
color |
string | The note's or frame's colour, as a hex string. | |||
font_size |
number | The text size, in canvas units. | |||
opacity |
number | How opaque the note or frame is, from 0 (clear) to 1 (solid). |
A field of a nested object is described in the JSON Schema (naga schema).
Example¶
{"annotations": [{"id": "note_1", "kind": "text", "position": [0, 100], "text": "Check the rates"}]}
In the Python builder the section is a keyword of Model:
from nagasim import build as nb
m = nb.Model(annotations=[{'id': 'note_1', 'kind': 'text', 'position': [0, 100], 'text': 'Check the rates'}])
Used in¶
Guides: Model file format, Submodels, Semantic diff.