Direction constants¶
- bosl2.constants.INCH: float = 25.4¶
The number of millimeters in an inch.
- bosl2.constants.IDENT: list[list[float]] = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]¶
Identity transformation matrix for three-dimensional transforms. Equal to ident(4).
- class bosl2.constants.Vec3(iterable=(), /)[source]¶
Bases:
listA 3-element list that supports elementwise +/-/* like a vector.
Plain Python lists use + for concatenation and * for repetition, but BOSL2-style code combines direction constants with idioms like anchor=TOP+LEFT expecting elementwise vector addition ([0,0,1]+[-1,0,0] -> [-1,0,1]), not concatenation. Subclassing list (rather than using a plain tuple or a numpy array) keeps every other list behavior – indexing, iteration, equality with plain lists, and crossing the osuse()/PyOpenSCAD FFI boundary – unchanged. (Duplicated from base_bgtk.py’s Vec3 rather than imported, since this package is deliberately independent of base_bgtk.py.)
- bosl2.constants.SEGMENT: list[bool] = [True, True]¶
Treat a line as a segment.
- bosl2.constants.RAY: list[bool] = [True, False]¶
Treat a line as a ray, based at the first point.
- bosl2.constants.LINE: list[bool] = [False, False]¶
Treat a line as an unbounded line.