shaperef-lineage

Debug and fix ShapeRef resolution failures in brepjs parametric CAD edits.

77|7|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/andymai/brepjs --skill shaperef-lineage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shaperef-lineage
Source: https://github.com/andymai/brepjs/tree/main/.claude/skills/shaperef-lineage
Command: npx skills add https://github.com/andymai/brepjs --skill shaperef-lineage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves common issues with brepjs's stable reference (topological naming) system and history replay functionality, which cause geometry selections to break after model edits, references to resolve to incorrect or missing entities, and parametric edits to target the wrong shape features.

Core Features & Use Cases

  • Debug ShapeRef resolution failures: Fix issues where references return not-found, ambiguous, or incorrect geometry, including BrokenRef errors for fillet and chamfer faces.
  • Extend the stable reference system: Add new custom reference kinds to the topological naming framework following the established dispatch and export patterns.
  • Troubleshoot history replay: Resolve issues where selections are lost or re-targeted after editing upstream parameters in parametric CAD workflows.
  • Use Case: A developer working on a brepjs-based parametric enclosure tool can use this Skill to fix a bug where fillet face references break after adjusting the base box height, by correcting the role table update path and using geometric fallback resolution for derived faces.

Quick Start

Use the shaperef-lineage skill to debug a ShapeRef that returns not-found for a filleted edge after editing an upstream parameter by verifying the role table was updated across the edit operation and the ref uses the correct geometric fallback resolution path for derived geometry.

Frequently Asked Questions about shaperef-lineage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do shape references break in brepjs after editing upstream parameters?

To fix BrokenRef errors for fillet and chamfer faces in brepjs, verify the role table was updated across the edit operation and ensure the reference uses the correct geometric fallback resolution path for derived geometry.

How do I add a new reference kind to the brepjs topological naming framework?

History replay errors in parametric CAD workflows occur when role tables fail to propagate correctly during edits, causing selections to be lost or re-targeted to incorrect shape features after upstream parameters change.

How do I debug ShapeRef instances returning not-found or ambiguous geometry?

Debug ShapeRef resolution failures by verifying role table propagation across edit operations, checking reference kind dispatch logic, and implementing geometric fallback resolution for derived geometry like fillets and chamfers.

Can I use geometric fallback resolution for derived geometry references in brepjs?

Geometric fallback resolution for derived geometry references in brepjs can be used to recover fillet and chamfer face selections that return BrokenRef errors after base model edits, ensuring stable topological naming persists.