mix monty_cad.gen.policy (ExMontyCad v0.2.0)

Copy Markdown View Source

Writes a motor policy into the current project.

mix monty_cad.gen.policy follow_chamfers

Two files: lib/<app>/plugins/follow_chamfers.ex — the callbacks Monty.Frameworks.Models.MotorPolicies.MotorPolicy requires, and the describe/0 a cluster asks for — and a test that asserts both. call/6 raises until the decision is written, on purpose: a generated body that looks like an answer is a decision nobody made.

The policy is :owner_only, because a policy over a CAD part reads a B-rep handle and that cannot leave the node that opened it. A policy over something else changes the description and says why.