Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stem_inset is cutting off the bottom of the keycap outer profile #216

Open
edwardbrowncross opened this issue Feb 11, 2025 · 1 comment
Open

Comments

@edwardbrowncross
Copy link

What version of OpenSCAD are you on?

2025.02.07 (+Manifold)

Describe the bug

Keys with positive $stem_inset (e.g OEM, ASA) seem to be hovering above the x-y plane. I believe they are not translated, but rather missing the bottom of the outer profile, which currently ends where the stem does. If I understand this parameter correctly, the keycap should continue past the end of the stem

Image

Setting the inset to 0 makes the keycap lengthen to reach the x-y plane (and the stem along with it).

To Reproduce

Render key_profile("asa", 1) key();

Compare This with key_profile("asa", 1) inset(0) key();

@edwardbrowncross
Copy link
Author

The behaviour changes to what I expect if I remove the $stem_inset from the dished module in src/key.scad:

module dished(depth_difference = 0, inverted = false) {
  intersection() {
    children();
    difference(){
      union() {
        // envelope is needed to "fill in" the rest of the keycap. intersections with small objects are much faster than differences with large objects
-       envelope(depth_difference, $stem_inset);
+       envelope(depth_difference);
        if (inverted) top_placement(depth_difference) color($secondary_color) _dish(inverted);
      }
      if (!inverted) top_placement(depth_difference) color($secondary_color) _dish(inverted);
      // %top_placement(depth_difference) _dish();
    }
  }
}

But I don't understand the code enough to say whether this is correct or what the side-effects might be

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

No branches or pull requests

1 participant