Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Skip unit requirement for zero in expressions #64

@joyfullservice

Description

@joyfullservice

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

I run into this very frequently when doing parametric modeling. If I am extending an object using negative coordinates, I typically use something like 0 - VarSet.Length to set the length. However, the expression editor requires me to designate a unit for the zero. (For example, 0 mm - VarSet.Length.)

This seems unnecessary because 0 is always 0, regardless of the unit. I would propose that the unit only be required when the number is <> 0. I believe this will make the expressions cleaner and more intuitive. If a unit designation is required by the internal programming, perhaps the default unit could be used when parsing the expression.

image

Thank you for your consideration! I am loving the Ondsel fork of FreeCad, and thrilled with the enhancements released in the latest version, and especially the VarSet panel! Great work!! 👏

Full version info

OS: Windows 10 build 19045
Word size of Ondsel: 64-bit
Version: 2024.2.1.37226 (Git)
Build type: Release
Branch: (HEAD detached at 2024.2.1)
Hash: 1a1bd7290494aef925a026c87b808ac58d53c3b0
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods: 
  * fasteners 0.5.21
  * Ondsel-Lens 2024.1.22.01

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions