Skip to main content

Material

Kind: Class
Domain: Assembly
Canonical import: from cadflow import Material

Signature

class Material(material_id: 'str', name: 'Optional[str]' = None, density: 'Optional[float]' = None, density_unit: 'Optional[str]' = None, color: 'Optional[Vec3]' = None, _metadata: 'Dict[str, Any]' = <factory>, _runtime: 'Dict[str, Any]' = <factory>) -> None

Description

Material definition assigned to a Part through assign_material_rpart.

Other public imports

  • from cadflow.assembly import Material

Parameters

NameTypeRequiredDefaultSource description
material_id'str'yes-Not explicitly described in the source docstring.
name'Optional[str]'noNoneNot explicitly described in the source docstring.
density'Optional[float]'noNoneNot explicitly described in the source docstring.
density_unit'Optional[str]'noNoneNot explicitly described in the source docstring.
color'Optional[Vec3]'noNoneNot explicitly described in the source docstring.
_metadata'Dict[str, Any]'no&lt;factory&gt;Not explicitly described in the source docstring.
_runtime'Dict[str, Any]'no&lt;factory&gt;Not explicitly described in the source docstring.

Returns

Type: None

The source docstring does not declare additional return semantics.

Errors

The source docstring does not declare a narrower exception contract. Invalid types, values, ownership, paths, or backend state may still raise the corresponding public error.

Data fields

NameTypeDefault
material_id'str'required
name'Optional[str]'None
density'Optional[float]'None
density_unit'Optional[str]'None
color'Optional[Vec3]'None
_metadata'Dict[str, Any]'factory
_runtime'Dict[str, Any]'factory

Public members

MemberKindSignatureDescription
to_dictmethod(self) -&gt; 'Dict[str, Any]'See the member signature.

Behavior and constraints

  • Instances are immutable dataclass values; update workflows return a replacement value.

Import check

from cadflow import Material

See also