Utilities
- class pyvcad.MaterialDefs
Class representing material definitions that translates between material names, colors, and ids.
- __init__(self: pyvcad.pyvcad.MaterialDefs, arg0: str) None
Constructor that takes a string as the path to the material configuration file.
- color(*args, **kwargs)
Overloaded function.
color(self: pyvcad.pyvcad.MaterialDefs, arg0: typing.SupportsInt) -> pyvcad.pyvcad.Vec4
Returns the color of the material given the id.
color(self: pyvcad.pyvcad.MaterialDefs, arg0: str) -> pyvcad.pyvcad.Vec4
Returns the color of the material given the name.
- contains(self: pyvcad.pyvcad.MaterialDefs, arg0: str) bool
Returns true if the material exists given the name.
- id(*args, **kwargs)
Overloaded function.
id(self: pyvcad.pyvcad.MaterialDefs, arg0: str) -> int
Returns the id of the material given the name.
id(self: pyvcad.pyvcad.MaterialDefs, arg0: pyvcad.pyvcad.Vec4) -> int
Returns the id of the material given the color.
- name(self: pyvcad.pyvcad.MaterialDefs, arg0: SupportsInt) str
Returns the name of the material given the id.
- num_materials(self: pyvcad.pyvcad.MaterialDefs) int
Returns the number of materials.
- palette(self: pyvcad.pyvcad.MaterialDefs) list[pyvcad.pyvcad.Vec4]
Returns a list of colors that are in the floating point range [0, 1]. The list contains 4-component colors (RGBA).
- prescaled_color_list(self: pyvcad.pyvcad.MaterialDefs) list[pyvcad.pyvcad.Vec4]
Returns a list of colors that are prescaled to the range [0, 255]. The list contains 4-component colors (RGBA).
- update_color(self: pyvcad.pyvcad.MaterialDefs, arg0: SupportsInt, arg1: pyvcad.pyvcad.Vec4) None
Updates the color of the material given the id. The new color of the material is specified as a 4-component color (RGBA).
- pyvcad.evaluate_fill(node: pyvcad.pyvcad.Node, buffer: Annotated[numpy.typing.ArrayLike, numpy.float64], start: pyvcad.pyvcad.Vec3, nx: SupportsInt, ny: SupportsInt, nz: SupportsInt, voxel_size: pyvcad.pyvcad.Vec3) None