rsheldiii / KeyV2

KeyV2: A Parametric Mechanical Keycap Library
GNU General Public License v3.0
1.41k stars 180 forks source link

Cleanly Cloned Version 2.4.0 is not working correctly. #194

Open Sebastian-Lamay opened 10 months ago

Sebastian-Lamay commented 10 months ago

What version of OpenSCAD are you on? OpenSCAD version 2021.01 Cloned the Master Branch so 2.4.0

Describe the bug When running any of the examples in keys.scad there are Warnings on the console, Keys don't generate correctly.

Error Log shows: WARNING: Can't call function on dynamically scoped variable in file functions.scad, line 29 WARNING: undefined operation (number + undefined) in file functions.scad, line 29 WARNING: undefined operation (undefined * number) in file key.scad, line 53 WARNING: Unable to convert cube(size=[18.24, undef, 0.01], ...) parameter to a number or a vec3 of numbers in file src/key.scad, line 53

To Reproduce Steps to reproduce the behavior:

  1. Clone Master Branch
  2. Open Keys.scad
  3. See error

Additional context Version 2.3.0 seems to work fine on my machine. I'm running on PopOs

Riesi commented 10 months ago

I am also hitting this. The issue seems to be in file functions.scad at line 30

function key_height_at_progress(progress = 0) = $bottom_key_height + ($unit * ($key_height - 1)) - $height_difference + $side_sculpting(progress);

The function $side_sculpting(progress) is not implemented in this file as mentioned in the TODO above.

If I remove it the default key cap is generated fine.

function key_height_at_progress(progress = 0) = $bottom_key_height + ($unit * ($key_height - 1)) - $height_difference;

But I cant generate different keys after fixing the warnings still...

Gitznik commented 8 months ago

I fixed this by running KeyV2 through the latest AppImage developer snapshot of OpenSCAD (2023.09.30.ai16393 (git f41aefc37)).

Hope this helps.