Announcement

Collapse
No announcement yet.

Using decimals in customizer internationally

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

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

    Comment


    • #3
      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

      Comment


      • #4
        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: https://github.com/openscad/openscad/issues/3315

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

        This is a unique advantage of models.MWT.

        Comment


        • Alan
          Alan commented
          Editing a comment
          Nice! Maybe Mr. Shapiro can help them close that bug report!

        • irvshapiro
          irvshapiro commented
          Editing a comment
          Yep. The overall customizer subsystem in OpenSCAD feels like an add-on, which it was. I built a custom parser instead of using the build-in OpenSCAD parser which gives me a bit more flexibility which is why models does not restrict fractions even when the original script has a whole number.
      Working...
      X