Overview#

The resolver package sits above raw AttributeModifier wiring. You register available conversion edges, then ask the resolver to adapt a design so that a target set of attributes is present on the output tree.

Typical roles include:

  • Design-intent preservation – keep the model authored in attributes such as density or shore hardness, then derive fabrication-facing attributes only when needed.

  • Automatic path solving – find the shortest valid conversion chain from the attributes already present on the design to the requested output.

  • Module-based material knowledge – package empirical conversion data into reusable registration helpers for material families or machine backends.

The public entry points are documented under Core API; bundled registration helpers live under Built-in Modules.

Automatic attribute-conversion chains for OpenVCAD designs.

Register the conversions you have (each turns one named attribute into another through a pyvcad attribute converter), then call adapt() with the attributes a compiler needs. The resolver finds the shortest chain of registered conversions from the attributes the design already has and wraps the design in the matching AttributeModifier nodes.

The bundled modules register conversions for foaming filaments, J750 Shore hardness and modulus/toughness, Stratasys RadioMatrix HU calibration, generic RGB and RGBA color, and vector components.

Example

>>> import pyvcad as pv
>>> import pyvcad_attribute_resolver as par
>>> par.register_j750_shore_hardness_conversions()
>>> printable = par.adapt(design, [pv.DefaultAttributes.VOLUME_FRACTIONS])