Using decimals in customizer internationally

Dear all,
while testing the customizer today I fell into a litte trap I’d like to point out for all to avoid.
When entering variables make sure you use a dot “.” as divider, e.g. 15.5 mm
If you use a comma “,” e.g. 15,5mm, like many of us do in Europe, you will get funny results.
The model will render but objects that are affected by the value will be omitted.

As this is only a minor inconvenience if you know it, I don’t think it needs fixing.
Just wanted to leave a note here so others running into the same thing find an explanation.

Let’s grow this community!
Martin

I think you have done a helpful thing. I am aware of this possible problem on other occasions too.

@MaStr Great catch. I have to check the OpenSCAD spec to determine if this is a bug or a feature. I think the challenge is that variables can contain vectors in the format [x,y,z]. However, my first impression is that if there are no brackets I may be able to help the user by replacing a comma with a period. Need to do some testing but that you for pointing this out. I will add this to the backlog to investigate.

Irv

@Irv_Shapiro
Dear Irv, dear all,
There is an other interesting behaviour of decimals in OpenSCAD I stumbled during the research.
If in the OpenSCAD model the creator has entered the default value as a whole number, it’s for the user of the OpenSCAD customizer (in the OpenSCAD software) not possible to enter a value with decimals. (Unless you edit the source code, of course)
See the corresponding Github thread: Do not constrain the precision of manually entered numeric values in customizer [$5] · Issue #3315 · openscad/openscad · GitHub

This restriction seems not to apply if customising through the customizer in models.makewithtech.com.
Irv probably knows best why :wink:

This is a unique advantage of models.MWT.

@CoreyPDX. I need to revisit this area. For now, I suggest using US notation (periods) but I have just added fixing this in a future release. Coming soon are real-time previews of customizations. You can see an example in a test app here:

I will implement this first in the customizer but eventually, you will be able to preview any OpenSCAD file on the platform.

https://vimeo.com/720553041/7058307439