News:

The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software can be used with TurboCAD.

Main Menu

The "Surface from Law" tool

Started by Henry Hubich, April 02, 2016, 11:40:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Henry Hubich

Just finished an article that introduces TCad's "Surface from Law" tool. Fifty-three pages, 49 illustrations, and a bazillion mathematical formulas. This is a mathematical tool and there's no way to treat it non-mathematically, but anyone who's comfortable with high-school algebra and understands sines and cosines should have no trouble following the article. Staying awake is another matter. The article isn't really a tutorial; more like a short textbook, but heaven knows there are many more aspects of this tool than I touched upon.

Download it here.

Henry H

EDIT: The table on Page 17 contains errors. I have deleted the original article and attached the corrected version in its place. I've also attached a screenshot of the corrected table.

Jeff_in_90620

Gave it a quick once-over and read a couple pages; it is a fascinating primer on how to use this functionality.

Thanks, Henry.


Jeff
Jeff

TC 2026 Pro Platinum plus 2015->2024 (most with LightWorks & RedSDK) & V21
System: AMD Ryzen 9 7950X, MSI Mag X670E Tomahawk WiFi, 64GB RAM @ 4.80GHz, ARC A770 w/16GB, 3 x Samsung NVMe 990 (1TB), Windows 11 Pro (64-bit)

Andy H

Wow, thanks for doing this Henry.

Only had a quick look up to now as its going to take reading it quite a few times to try and sink in to my non-mathematical brain.

Tim Stewart

Henry,

thank you.
I'm looking forward to studying your latest . . . whatever!

Regards Tim
Regards Tim

You can design without engineering, but you cannot engineer without design.
Windows 10 Pro (19043.1165) 64-bit, TurboCAD Designer 2017-2020 and Pro. Plat. 2018-2020 + LW (64-bit) + AnimationLab 6
Intel i5 2500@3.3GHz 8GB Ram NVIDIA Quadro K2200

Majo

Thank you very much Henry, it's completely Help to this tool
WorkPC->HP Z6 2x Xeon Gold 6138 CPU, 192GB RAM, NVIDIA RTX 4060 Ti, Win11 Pro 64bit

TC Pro Plat x64
www.invent.sk, www.facebook.com/marian.jurcak

Ken Simmons

Thanks for the tutorial Henry. This is just one reason to brush up on math, the other one is astronomy (measuring binary stars). I haven't checked but do the other CAD programs have a similar "Laws" tools, I sure they do. (Autocad, Solidworks, ect.)
TC 2017 Plat. x32 / x64 (LightWorks)
Win 10 Pro 64.
i7-3770 16 GB. Ram.
Nivda GeForce GTX 970 4 GB.

Stefaan

Impressive short txt book Henry...Thank you to help us out with this!!

me262

Henry,

Thank you for the excellent document!

btw, it appears that using the sqrt function in the Surfrace from Law tool causes tcad to crash, like, z(u,v)=sqrt(u*2)

Has this happened to anyone else?

Thanks
Kevin

Henry Hubich

Quote from: me262 on April 13, 2016, 07:41:49 AM
Henry,

Thank you for the excellent document!

btw, it appears that using the sqrt function in the Surfrace from Law tool causes tcad to crash, like, z(u,v)=sqrt(u*2)

Has this happened to anyone else?

Thanks
Kevin

I've had problems with the sqrt function, too. Instead of sqrt(x), I now use abs(x)^.5 with no trouble.

Henry H

me262

Not sure why but abs(u)^.5 is not working for me either.

Henry Hubich

Quote from: me262 on April 13, 2016, 08:24:45 AM
Not sure why but abs(u)^.5 is not working for me either.

Care to post the X, Y, and Z Laws you're working with?

Henry H

me262

Certainly,

Using the Surface from Law tool, I used

x(u,v) = u
y(u,v) = v
z(u,v) = abs(u)^.5

Thanks
Kevin

me262

I should note to that the crash does not show up until you click on the model space.

Henry Hubich

Quote from: me262 on April 13, 2016, 12:40:32 PM
Certainly,

Using the Surface from Law tool, I used

x(u,v) = u
y(u,v) = v
z(u,v) = abs(u)^.5

Thanks
Kevin

Strange. Works fine for me.

Henry H

John R

#14
Crashed for me also. It generated a UE and sent the report to SoftDev.

On a second crash, I answered "No" and copied the M$ report.
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: tcw23.exe
  Application Version: 23.0.23.1
  Application Timestamp: 56f9cbca
  Fault Module Name: MSVCR100.dll
  Fault Module Version: 10.0.40219.1
  Fault Module Timestamp: 4d5f034a
  Exception Code: 40000015
  Exception Offset: 00000000000761c9
  OS Version: 6.0.6002.2.2.0.256.6
  Locale ID: 1033
  Additional Information 1: c457
  Additional Information 2: d152718b5945b031752a3c3117d3d332
  Additional Information 3: 7791
  Additional Information 4: 568dad990b75121c0f3882a6e539fd4b
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

Dean

It worked ok for me, using Henry's image
The other shape has six sqrt(2) in the formula = no problem either.

What version are you using, kevin, 32 or 64 bit?
Maybe something got corrupt, though I would double check your formulas.
"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

John R

I tried the formula in Windows 10 and it crashed there.

Vista w/Platinum 64bit - crashed
Win 10 w/Platinum 64bit - crashed
Win 7 w/Pro Basic 32bit - no tool
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

me262

I was using 64 bit before, but, I just installed the 32 bit on Win 7 w/Platinum and getting the same error that I did on the 64 bit version.

Dean

Quote from: me262 on April 14, 2016, 04:01:08 AM
I was using 64 bit before, but, I just installed the 32 bit on Win 7 w/Platinum and getting the same error that I did on the 64 bit version.

Ok, :P
I think I found the "Bugger"
> see attachment try these "ACIS" setttings > before you create the law  ;D
"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

me262


Hey, that worked !!   ;D

Thanks!

Kevin


John R

re: …try these "ACIS" settings before you create the law.

I think you only need to turn "Degenerative Faceting" OFF.

Thank you Dean for the useful info.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

DTTurbocad


Henry Hubich

Quote from: John R on April 14, 2016, 10:00:36 AM
re: …try these "ACIS" settings before you create the law.

I think you only need to turn "Degenerative Faceting" OFF.

Thank you Dean for the useful info.

Yup. That's it. I almost never have Degen ON.

Henry H

Bill G

Hi Henry,

Is this a "2016" tool only, or is it present in 2015?

BG

Henry Hubich

Quote from: Bill G on April 22, 2016, 09:25:11 PM
Hi Henry,

Is this a "2016" tool only, or is it present in 2015?

BG

It's new in 2016, Bill.

Henry H

Hemmex

#25
Quote from: Biell G on April 22, 2016, 09:25:11 PMHi Henry,

Is this a "2016" tool only, or is present in 2015?
 
BG

Looks like a great tool thanks! Are there any video tutorials of how to use it anywhere?

Andy H

Quote from: Hemmex on August 03, 2016, 11:11:29 PM
Looks like a great tool thanks! Are there any video tutorials of how to use it anywhere?

There are a couple of short video's done by IMSI, they are more of an overview than a tutorial.

https://www.youtube.com/watch?v=uLkOF9pW4H0
https://www.youtube.com/watch?v=z9eQZCppJ5s

John B.

Just by chance I saw a video about Surface Laws and by coincidence I found this thread and downloaded it and like everyone else read it word for word but I can't seem to find which toolbar or drop-down window the Law is found in.  I looked on the 2016 desktop and looked at all the toolbars and menus and I can't find it.

John B.
John B.
TCv2019 Platinum
Windows 10 Pro 64 Bit
1 GB Hard Drive 16 GB RAM
AMD Radeon RX 580 Series

willeng

#28
Hi John,

Draw - 3D Object - 3D Law Object

Cheers
David

John B.

I went to Draw/3D Object but there was no 3D Law so I looked in Customize/Commands/3D Object and found Surface With Law and dragged it to Draw/3D Object and pasted it there.

Cheers David,

John B.
John B.
TCv2019 Platinum
Windows 10 Pro 64 Bit
1 GB Hard Drive 16 GB RAM
AMD Radeon RX 580 Series

Henry Hubich

#30
Page 17 of the article contains some errors. My thanks to Igorun for finding them. See the original post at the top of this thread for corrections.

Henry H

nikkipollard

I finally got around to start reading this article. Thanks Henry it is a fantastic article
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Henry Hubich

Quote from: nikkipollard on December 12, 2017, 05:06:19 AM
I finally got around to start reading this article. Thanks Henry it is a fantastic article

Thank you, Nikki.

Henry H

drajer

That borders on a doctoral thesis!
Thank you Henry.

9dms9

Thanks Henry.

I have a small guitar part (a truss rod cover) whose shape follows a parabola with formula y = 1/3 x^2. [I don't think that this is a concidence because the designer, Brian May, was a maths whizz!] It can be created easily enough with a spline or bezier curve, obviously, but I did wonder while designing this whether it was possible to create a complicated object such as a surface from a law/mathematical expression.

I will take a look at this when I have some spare time. It might prove useful in future endeavors.

Doug

sauerkraut2018

Hello,

I am currently studying the Pdf. A great document. Thank you so much for that.

I'm on page 39, down.
I typed this law off, no success.
I tried C + P, no success.

Could it be that there is a mistake?
#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

Henry Hubich

Quote from: sauerkraut2018 on June 26, 2021, 06:40:43 AM
Hello,

I am currently studying the Pdf. A great document. Thank you so much for that.

I'm on page 39, down.
I typed this law off, no success.
I tried C + P, no success.

Could it be that there is a mistake?

Yeah, it looks like I did make a mistake someplace. Afraid I don't have time to track it down now; I'll try to take care of it later today.

Henry H

Henry Hubich

Quote from: sauerkraut2018 on June 26, 2021, 06:40:43 AM
Hello,

I am currently studying the Pdf. A great document. Thank you so much for that.

I'm on page 39, down.
I typed this law off, no success.
I tried C + P, no success.

Could it be that there is a mistake?

Sauerkraut, the problem is "punctuation": parentheses, brackets, curly brackets.

I found the .tcw in which I had created the Figure 36 object and copied the Laws from there. Tested in a new v2021 drawing and verified that they do work. Here they are...

X: (20+((2)/(.01+.99*abs(cos(v)))+.5)*cos(v))*cos(u)
Y: (20+((2)/(.01+.99*abs(cos(v)))+.5)*cos(v))*sin(u)
Z: 2*u+((1)/(.01+.99*abs(sin(v)))+.5)*sin(v)

Henry H

sauerkraut2018

Hi henry,

thank you for your very quick help.

I immediately marked page 3 below and 4 above in yellow (as a warning or tip).  ;)

Quote: ... Note that the Laws Editor will accept brackets ...
#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

Alvin Gregorio

Since Ownership cleared out all Attachments a few years ago, here I am re-posting Henry's "____ Law" Tutorial PDFs.
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)