Skip to content

Assemblies: ungrounding a part says nothing when its joint can't place it #12869

Closed

Description

@kaievns

What users see

You unground a part to let its joint place it. The joint's origin face no longer
exists, so the solve leaves the joint out. The part doesn't move. The status
line and Messages stay empty. occurrence.ground answers
{"grounded": false, "occurrence": 43} and nothing else.

You see a part that didn't move and no reason why.

When ungrounding works, the part snaps to its joint. The reply still doesn't say
what moved.

Steps

The test design has 3 components. Bin has a 6 x 5 grid of pockets and 1,956
faces. Tab and Cover are plain parts. Build it with the script below:
python3 make_bin.py bin.json.

A joint whose origin is gone

Append these steps to bin.json's commands, then run
solidcraft-cli run bin.json --results --quiet:

{"command": "component.activate", "params": {"component": "Tab"}},
{"command": "solid.box", "params": {"length": 26, "width": 2, "height": 1,
  "corner": [214, 0, -1], "operation": "join", "name": "Foot"}},
{"command": "component.activate", "params": {"component": "root"}},
{"command": "occurrence.ground", "params": {"occurrence": "Bin:1", "grounded": true}},
{"command": "occurrence.ground", "params": {"occurrence": "Tab:1", "grounded": true}},
{"command": "joint.create", "params": {"type": "rigid", "name": "Tab slot",
  "a": {"occurrence": "Bin", "face": [17, 17, 5]},
  "b": {"occurrence": "Tab", "face": [227, 1, -1]}}},
{"command": "timeline.suppress", "params": {"feature": "Foot"}},
{"command": "occurrence.ground", "params": {"occurrence": "Tab:1", "grounded": false}},
{"command": "joint.list", "params": {"quiet": true}}

"Tab slot" joins a 1 mm foot under Tab to a pocket floor. Suppressing the foot
removes the joint's Tab-side face.

In the app, save the result with --save bin-grid.sc and stop before the last 2
steps. Open the file, right-click Tab:1 in the browser and choose
Unground.

make_bin.py: the test design
"""make_bin.py OUT.json: a 6 x 5 grid of 27 mm pockets at a 30 mm pitch, with rounded
corners and floor edges and a 4 x 4 grid of counterbored holes in each floor. Tab and
Cover are separate parts."""
import json, sys
NX, NY, P, C, M = 6, 5, 30.0, 27.0, 3.5
L, W, H, FLOOR = M * 2 + P * (NX - 1) + C, M * 2 + P * (NY - 1) + C, 40.0, 5.0
HOLES = [(6 + 5 * i, 6 + 5 * j) for i in range(4) for j in range(4)]
cmds = []
def add(c, **p): cmds.append({"command": c, "params": p})
add("component.create", name="Bin", parent="root")
add("solid.box", length=L, width=W, height=H, corner=[0, 0, 0], operation="new", body_name="Bin")
add("solid.box", length=C, width=C, height=H, corner=[M, M, FLOOR], operation="new", body_name="Cell")
add("solid.fillet", edges=[[M + dx, M + dy, 20] for dx in (0, C) for dy in (0, C)], radius=4)
add("solid.fillet", edges=[[M + C / 2, M, FLOOR]], radius=2)
pins = []
for n, (hx, hy) in enumerate(HOLES):
    add("solid.cylinder", diameter=2, height=FLOOR + 1, base=[M + hx, M + hy, -0.5], operation="new", body_name=f"Pin{n}")
    add("solid.cylinder", diameter=4, height=2.5, base=[M + hx, M + hy, -0.5], operation="new", body_name=f"Bore{n}")
    pins += [f"Pin{n}", f"Bore{n}"]
add("solid.combine", target="Cell", tools=pins, operation="join")
add("solid.pattern.rectangular", bodies=["Cell"], dir1=[1, 0, 0], count1=NX, spacing1=P, dir2=[0, 1, 0], count2=NY, spacing2=P)
add("solid.combine", target="Bin", tools=["Cell"] + [f"Cell ({k})" for k in range(2, NX * NY + 1)], operation="cut")
add("component.create", name="Tab", parent="root")
add("solid.box", length=C - 1, width=2, height=30, corner=[L + 30, 0, 0], operation="new", body_name="Tab")
add("component.create", name="Cover", parent="root")
add("solid.box", length=L, width=W, height=3, corner=[0, W + 30, 0], operation="new", body_name="Cover")
add("solid.box", length=L - 7.4, width=W - 7.4, height=2, corner=[3.7, W + 33.7, 3], operation="join")
add("component.activate", component="root")
json.dump({"commands": cmds}, open(sys.argv[1], "w"), indent=1)

Expected

  • Tab stays, and the status line says why: "Tab slot doesn't place Tab:1: joint
    origin: the face F49:-z no longer exists (edit the joint to pick again)".
    The reply lists the joint the solve skipped.
  • The reply says what the solve moved and where the part is now.

Actual

On upstream/main 871014f:

  • occurrence.ground answers {"grounded": false, "occurrence": 43}. Tab
    stays. The status line and Messages are empty. joint.list alone shows the
    reason, under errors: "joint origin: the face F49:-z no longer exists
    (edit the joint to pick again)".

Mechanism

  1. occurrence.ground flips the flag and replies
    (crates/engine/src/cmd/component.rs:795, :797). It doesn't solve.
  2. The refresh after the command solves the joints (Session::solve_joints,
    crates/engine/src/lib.rs:1329, :1337). That is why a freed part snaps.
    Its Solution is discarded.
  3. A joint whose origin doesn't resolve goes to Solution.errors and is left
    out (crates/doc/src/joints.rs:2035). Nothing on the ground path reads those
    errors.

Activity

  1. added
    area:doc
    needs-triage
    in progress
    on Nov 7, 2026
  2. github-actions commented on Nov 7, 2026

    @github-actions
    Contributor

    Claimed by @kaievns through #12870. The claim lapses after 14 days without pushes.

  3. removed
    in progress
    on Nov 16, 2026
  4. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor

    No draft PR showed up within 72 h, so this one is free again. Anyone can /claim it.

  5. cfaulkingham commented on Nov 16, 2026

    @cfaulkingham
    Contributor

    /claim

  6. added
    in progress
    on Nov 16, 2026
  7. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor

    Claimed by @cfaulkingham. Please open a draft PR referencing #12869 within 72 h; the claim lapses otherwise. /unclaim releases it.

  8. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:docin progressneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions