Skip to content

exit_openings

Python reference for nagasim.appearance.exit_openings. Provisional: it may change between minor versions, see Appearance.

The gaps a piece's side exits cut in its guides, which the file never stores.

One gap per divert, on its side, and one per merge, on the side its feeder ends (by the feeder's end point, else its heading). Each is centred on the exit's point and as long as the exit crosses the side: the piece's own width for a divert, the feeder's for a merge, over the sine of their angle. Draw the guides with look_of's openings plus these.

Parameters:

Name Type Description Default
document ModelDocument

The model, ModelDocument.load(path).

required
name str

The CONVEYOR block's name.

required

Returns:

Type Description
list of dict

{"side", "start", "end"} in metres along the piece's path; [] for a missing block, a block that is not a conveyor or a piece not on the floor. A feeder not on the floor cuts nothing.

See Also

nagasim.appearance.look_of : The stored openings and the rest of the look. nagasim.appearance.guide_runs : The guide runs between the openings.

Examples:

>>> from nagasim.appearance import exit_openings
>>> from nagasim.appearance import ModelDocument
>>> exit_openings(ModelDocument(), "missing")
[]