News:

All posts discussing pricing or where to buy TurboCAD will be deleted.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

tan(-1) Formula; Version-20ProPlatinum

Started by Alvin Gregorio, December 29, 2017, 01:04:45 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Alvin Gregorio

Hello All,  This is my first time messing with Formulas in the Variables Palette.  I know next to nothing about trig.

Scenario (determining a roof pitch, in degrees, based on Rise & Run entries):






VariableValueFormula
Run12______
Rise6______
Pitch______=tan(-1)*(Rise/Run)


The result should be 26.5650511771°.  But I'm not getting that in the Variable Palette.  I'm getting some very small values, including negatives.

Am I doing this correctly?
In the first image below, the Value is what is there just after inserting the Constrained Angle Dimension.
In the second image below, it's the result of entering in a formula.

This is just brain exercise, really.  I have a few more days off for the Holidays.  -Alvin
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Torfinn

Hi Alvin

Try to write "( atan(rise/run))", that should give you the correct degree.
If not you will need to change the answer from radian's to degree's i believe

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Alvin Gregorio

#2
Quote from: Torfinn on December 29, 2017, 02:09:23 PM
Hi Alvin

Try to write "( atan(rise/run))", that should give you the correct degree.
If not you will need to change the answer from radian's to degree's i believe

Torfinn

Hi Torfinn.  That didn't work.  Formula atan(Rise/Run) [and (atan(Rise/Run))] resulted in a value of .463648.

If I substitute .5 for the operation* Rise/Run, I get the same results, using it in your formula or any formula.  So that part must be working correctly (in fact, if I make a new Variable, with a Formula Rise/Run, the resultant value is the correct .5)

*(not "operation"; what's the correct term?...  anybody...?)
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Dean

"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Torfinn

Hi Alvin

If i use "(atan(6/12))", answer is 26.5651 in metric system, so i guess you will need to re-calculate it to radians
"(atan(6/12))*180/PI"
0.463648*180/PI = 26,5651

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Henry Hubich

The Variables palette works in radians, not degrees. The correct formula is pitch=atan(rise/run)*180/pi

Henry H

Alvin Gregorio

Quote from: Dean on December 29, 2017, 03:02:07 PM
Try this, Alvin

Yep, that works.

Using that, ((atan(Rise/Run))/3.14159)*180 in the Pitch Formula-- instead of having the other two rows-- works as well.  To accuracy up to the ten-thousandth decimal place.  Must be the pi round-off.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

Quote from: Henry Hubich on December 29, 2017, 03:14:14 PM
The Variables palette works in radians, not degrees. The correct formula is pitch=atan(rise/run)*180/pi

Henry H

Yep, that works.
I hate it when I don't know why.  Just how...
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Torfinn

This is the PI used in TC,   3.1415926535897932384626433832795  ;)

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Alvin Gregorio

Quote from: Torfinn on December 29, 2017, 03:29:16 PM
This is the PI used in TC,   3.1415926535897932384626433832795  ;)

Torfinn

I used 3.1415926535897932384626433832795 in my Forumla, and the pitch still was rounded off after the one-hundred-thousandth decimal place.
26.5650510000 instead of 26.5650511771°.  Angle Units set to 10 precision.
Ought to be good enough to build a house.  Probably not to land a mission accurately on Mars.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

All I know about Trigonometry is what I learned quickly today, visiting a website designed for schoolchildren.

SOHCAHTOA    In this scenario I described, it seems we should use Tangent-- the inverse of Tangent.  Why-- in TurboCAD Variables palette, atan works but not tan(-1)?
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Torfinn

Its just a "funny way" of writing atan i believe :)
I am used to tan' = atan

And TC only show you 6 desimals if it have something to do with cirkle's, but i guess it use the full pack when calculate.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Alvin Gregorio

In TurboCAD Variables Palette, deg(atan(Rise/Run)) works as well.
At the bottom of the list of Functions, there is a Units Conversion functions list.  deg(a) is the function "Convert radians to degrees".
deg(atan2(Rise, Run)) works also.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Henry Hubich

Quote from: Alvin Gregorio on December 29, 2017, 05:08:56 PM
In TurboCAD Variables Palette, deg(atan(Rise/Run)) works as well.
At the bottom of the list of Functions, there is a Units Conversion functions list.  deg(a) is the function "Convert radians to degrees".
deg(atan2(Rise, Run)) works also.

Thanks, Alvin. I never noticed that function.

Henry H

nikkipollard

Alvin that is all I know about trigonometry as well. I found this cheat sheet on an autodesk forum and being a visual person I find it useful.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: nikkipollard on December 29, 2017, 11:39:01 PM
Alvin that is all I know about trigonometry as well. I found this cheat sheet on an autodesk forum and being a visual person I find it useful.

Those are clean and easy to decipher.  Thanks Nikki

When I was a framing-contractor, including cutting/building my own sometimes complex roofs, I always told my crew members that were interested that-- using the Construction Master calculator, which internally is based on trig-- as long as you can find the right-angle, you can figure anything out.
The diagrams you provided take that even further-- such as determining the radius of an arc when height and chord length are given (previous Construction Master versions didn't include that function).
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)