Skip to content

openagents_sdk::labs::cad

Local CAD previews use the same portable rules as the server. Measurements must describe the proposed content; the server rebuilds it independently.

ItemWhat it does
apply fnApplies a change to a CAD version and returns the draft the server would accept.
check fnChecks CAD content against its measurements with the server's rules.

apply

pub fn apply(
    base: &Version,
    change: &Change,
    summary: &str,
    measurements: &Measurements,
) -> Result<Draft, Refusal>

Applies a change to a CAD version and returns the draft the server would accept.

check

pub fn check(content: &Value, measurements: &Measurements) -> Result<Report, Refusal>

Checks CAD content against its measurements with the server's rules.

Re-exported from other crates

  • DEFAULT_MATERIAL from cad::doc
  • new_part from cad::doc
  • Cad from cad::lab
  • Intent from cad::lab
  • changed_content from cad::lab
  • measurements from cad::lab