Skip to content

Compose generic adapter cables with independently specified connector ends - #10

Merged
seveibar merged 4 commits into
mainfrom
codex/bullet-adapter-cables-20261006
Oct 7, 2026
Merged

seveibar merged 4 commits into
mainfrom
codex/bullet-adapter-cables-20261006

Conversation

@seveibar

@seveibar seveibar commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Compose independently specified connector ends with adaptercable_a(CONNECTOR)_b(CONNECTOR). For a BLDC motor's three 3.5 mm male outputs and a board's 4 mm male plugs, use adaptercable_a(bullet3_d3.5mm_gfemale)_b(bullet3_d4mm_gfemale). Female board sockets use gmale at B.

The wrapper uses the same connector parser and composition factory for bullet-to-bullet, bullet-to-JST, and JST SH-to-PH adapters. Each connector retains its native dimensions and contact pitch. Wire insulation fits both ends and explicit contact counts must match. A/B and inner named modifiers are order-independent; reject missing or duplicate ends, malformed parentheses, positional parameters, nested cables, and trailing tokens. Remove the unmerged da/db and diameterA/diameterB APIs. Existing cable preset strings and common/bullet snapshots are preserved.

Export parseConnectorString, getAdapterCableDefinition, and canonical connector/cable serializers. The object form is getCableDefinition({ standard: "adaptercable", connectorA, connectorB }), with optional cross-section configuration. Physical interfaces do not imply electrical pin mapping.

Validation: parser/composition rejection and round-trip tests, mixed-family cases in both directions, existing preset regressions, local type checking, and inspected actual 3D adapter meshes. Native CI also checks the package entrypoint, gallery, formatting, and previews. Rendering uses published jscad-electronics@^0.0.210 (merged #427), with compact bundles and smooth fanout within the final 20 mm at each connector. The renderer preview dependency has been replaced with the npm release.

Generic independent-ended adapter cables

Consumers: props #910, circuit-json-to-gltf #239, and core #4416.

Render different-pitch bundles compactly through the middle, with smooth fanout confined to 20 mm at each end (shortened on short routes). The separate adapter snapshot is updated and inspected; existing common and bullet catalogs are unchanged and pass CI.

@seveibar seveibar changed the title Support 3.5 mm to 4 mm bullet adapter cables with named end diameters Compose generic adapter cables with independently specified connector ends Oct 6, 2026
@seveibar
seveibar merged commit 06ee637 into main Oct 7, 2026
6 checks passed
@tscircuitbot

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants