Unit Mismatch Error

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
claytoncarney
Posts: 34
Joined: Sun Feb 12, 2023 7:35 pm
Location: Albuqueruqe, NM, USA

Unit Mismatch Error

Post by claytoncarney »

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.2.29177 +426 (Git)
Build type: Release
Branch: (HEAD detached from 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Attempting to set the Helix parameters Height. I don't understand why I get this error. Both operands are in mm.
Attachments
male_thread.FCStd
(471.79 KiB) Downloaded 7 times
fc.png
fc.png (7.16 KiB) Viewed 657 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Unit Mismatch Error

Post by chrisb »

claytoncarney wrote: Fri Mar 24, 2023 9:48 pm Both operands are in mm.
No. If you enter <<Cylinder>>.Height you get 10.00mm, with unit; if you enter parameters.pitch you get 0.5 without unit.

Multiply the value with 1mm.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Unit Mismatch Error

Post by wmayer »

Attempting to set the Helix parameters Height. I don't understand why I get this error. Both operands are in mm.
Apparently not. The Content field of the spreadsheet for the pitch value says its a dimensionless value. The field B3 only shows the dimension mm but this is only for display purposes and doesn't convert the value into a length.

To fix the mismatch error the easiest is to change the expression

Code: Select all

<<Cylinder>>.Height + <<parameters>>.pitch * 1 mm
bgma1961
Posts: 107
Joined: Mon Apr 02, 2018 9:19 am

Re: Unit Mismatch Error

Post by bgma1961 »

wmayer wrote: Fri Mar 24, 2023 10:39 pm
Attempting to set the Helix parameters Height. I don't understand why I get this error. Both operands are in mm.
Apparently not. The Content field of the spreadsheet for the pitch value says its a dimensionless value. The field B3 only shows the dimension mm but this is only for display purposes and doesn't convert the value into a length.

To fix the mismatch error the easiest is to change the expression

Code: Select all

<<Cylinder>>.Height + <<parameters>>.pitch * 1 mm
or you can use /mm
<<Cylinder>>.Height / mm + <<parameters>>.pitch
User avatar
claytoncarney
Posts: 34
Joined: Sun Feb 12, 2023 7:35 pm
Location: Albuqueruqe, NM, USA

Re: Unit Mismatch Error

Post by claytoncarney »

Thank you. I misunderstood the purpose of the Cell properties>Display unit. If I enter '0.5mm' in cell B3, I get the behavior expected.

A follow up question: No matter what I've tried, if I perform Part ChcekGeometry, I get invalid shapes. I don't think it's a self-intersection issue, but I'm not certain.
Attachments
fc.png
fc.png (241.03 KiB) Viewed 521 times
male_thread.FCStd
(525.92 KiB) Downloaded 3 times
user1234
Veteran
Posts: 3326
Joined: Mon Jul 11, 2016 5:08 pm

Re: Unit Mismatch Error

Post by user1234 »

The OCCT have sometimes some hassles with sweeps. But with some experience, yo know what "errors" you can ignore. In that case, i would ignore it. Even when i fillet the edges, it works flawless and fast (instant).

2023-03-25_04-38.png
2023-03-25_04-38.png (309.17 KiB) Viewed 489 times

The only issue i see, is that you cut the sweep cylindrical coplanar, make the outside of the Sketch a little bit bigger. Since the "cylindrical" outside of a helix sweep is just a very good near of a cylinder, you can get some troubles with that. Generally coplanar operation, especially on freeform shapes, should be avoided (not only in FreeCAD, just said).


Greetings
user1234
User avatar
claytoncarney
Posts: 34
Joined: Sun Feb 12, 2023 7:35 pm
Location: Albuqueruqe, NM, USA

Re: Unit Mismatch Error

Post by claytoncarney »

Thank you very much! Your suggestion corrected all the problems.
Attachments
fc.png
fc.png (241.03 KiB) Viewed 458 times
male_thread.FCStd
(906.54 KiB) Downloaded 1 time
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Unit Mismatch Error

Post by chrisb »

claytoncarney wrote: Sat Mar 25, 2023 5:11 am Thank you very much! Your suggestion corrected all the problems.
There are more such cases to avoid in critical situations in the tips of the Thread for Screw Tutorial.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
claytoncarney
Posts: 34
Joined: Sun Feb 12, 2023 7:35 pm
Location: Albuqueruqe, NM, USA

Re: Unit Mismatch Error

Post by claytoncarney »

chrisb wrote: Sat Mar 25, 2023 6:44 am There are more such cases to avoid in critical situations in the tips of the Thread for Screw Tutorial.
I had read that reference and believed I was following its guidance. I must have missed something...
Post Reply