News:

Please remember to do a search before you ask a question!

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.

Parametric Parts Reserved Word List III

Started by sauerkraut2018, December 19, 2019, 01:31:20 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

sauerkraut2018

Hi,

I am currently testing the commands G3-Chamfer and G3-Fillet. Unfortunately, I don't understand the logic of the commands.

In the attached example, three fillets are to be created. However, five fillets are displayed.

I ask you to show me the correct procedure. Thank you very much for your help.

#-----
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.
#-----

nikkipollard

#1
Your points are wrong
For a fillet your points need to lie on the middle of the edge that want to fillet .

for a shell command they need to be on the face you want to omit
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

You are probably aware of this but
If I explode your part the penWidth is 0.508 not 0.02
To get a penwidth of 0.02 the macro recorder has
"PenWidth" = 7.8740157186985E-04
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

sauerkraut2018

#3
Hello nikkipollard,

thank you for your contributions.
The blue rectangle is only used to show where the base is.
By default, I draw with PenWidth 0 (zero).

I have corrected the points.
I do not understand why eight rounded edges are created even though I only entered the "rear" four edge points?  :o

In the attached listing I did not enter any z-values and still roundings in the z-direction are created.

My goal is:
Cuboid (six sides)
To create the roundings on this cuboid only on one side or surface.
So only above, only below, only behind, only in front, only on the left, only on the right.

edit:
To the moderators:
Maybe you should move the posts to PPM.
Parametric Parts Reserved Word List I
Parametric Parts Reserved Word List II
Parametric Parts Reserved Word List III

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

Quote from: sauerkraut2018 on December 19, 2019, 11:03:26 PM
...
I do not understand why eight rounded edges are created even though I only entered the "rear" four edge points?  :o
...

I worked with this a little bit.  There is actually some useful examples in the Help Documentation.

I guess the question is:  Can a G3Fillet be done via a PPM script without resulting in the "rounded corners" option.

_____
In the Drawing Space, insert a 100x100x100 Box.  Activate the 3D Fillet Tool.  Fillet four edges of one side.  Try it both with and without the "rounded corners" option.

sauerkraut-- Are you wanting the rounded corners?, or No?  The rounded corners is why/how the result of your script has the 4 "extra" fillet edges; it just has to be that way, if we want rounded corners.
The question remains Can a G3Fillet be done via a PPM script without resulting in the "rounded corners" option?
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)

sauerkraut2018

Hello Alvin Gregorio,

thank you for your contribution.

Quote: I worked with this a little bit. There is actually some useful examples in the Help Documentation.

Joke on  :)
I have read Help Documentation from top to bottom, left to right, and in all directions since I started working on PPM. But my question was not answered.
Joke off  ;)

Quote: Are you wanting the rounded corners ?, or No? ... The question remains Can a G3 Fillet be done via a PPM script without resulting in the "rounded corners" option?

I haven't thought about that yet. My thoughts are very simple.
Create a body (eight edges, 6 sides).
Page 1 on / off, query: radius yes / no
Page 2 on / off, query: radius yes / no
Page 3 on / off, query: radius yes / no
...

If I look into the future now, it could become more.
For example, I could simply show a square tube (frame) without an interior (angular) or with an interior (rounded).
And all through one (1) IF query in a PPM.
Or, customer drawing simplified, workshop drawing detailed.

Very simple, if it were not that difficult.  ::)

Kind regards sauerkraut
(surkål)
#-----
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.
#-----

nikkipollard

I think it does this because it uses the same default as TC. (where the corners are rounded)
attached is a macro and and an example of it's use
The Macro wont work on it's own as it has no parameters defined.
You can see how I typically work with G3 Fillet
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: nikkipollard on December 20, 2019, 08:31:13 PM
I think it does this because it uses the same default as TC. (where the corners are rounded)
attached is a macro and and an example of it's use
The Macro wont work on it's own as it has no parameters defined.
You can see how I typically work with G3 Fillet

I'm still a complete novice at this PPM script writing stuff Nikki, but I think the "BXFtest.txt" file you provided is a script for something else.
It is for a simple table-- tabletop and 4 legs.  No G3Fillet in that.

___________
I am not clear:  Do you think it is possible to write a PPM script that applies a G3Fillet to 4 edges of one side of a cube/Box, without the corners being rounded?
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

Quote from: Alvin Gregorio on December 21, 2019, 05:24:01 AM
I am not clear:  Do you think it is possible to write a PPM script that applies a G3Fillet to 4 edges of one side of a cube/Box, without the corners being rounded?

What are you thinking of Alvin, Bottom and/ or Top, or do you want to see a "Miter" after the fillet, that can be done, but not sure if it's possible with 3GFillet.

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

#9
Quote from: Torfinn on December 21, 2019, 08:47:52 AM
Quote from: Alvin Gregorio on December 21, 2019, 05:24:01 AM
I am not clear:  Do you think it is possible to write a PPM script that applies a G3Fillet to 4 edges of one side of a cube/Box, without the corners being rounded?

What are you thinking of Alvin, Bottom and/ or Top, or do you want to see a "Miter" after the fillet, that can be done, but not sure if it's possible with 3GFillet.

Torfinn

sauerkraut2018 expressed in this Topic thread that he-- I assume "he"; "sauerkraut2018" sounds like a "he"-- wanted to G3Fillet all four edges of a single side of a cube/Box, without that resulting in the filleting of the adjacent sides, which are filleted because of TurboCAD's default to apply rounded corners.

So, I guess what I am "thinking" is-- Can sauerkraut2018 get what he wants, via TurboCAD PPM scripting, using G3Fillet.

Can the below-- which was not done via a PPM script-- be achieved via G3Fillet.
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: sauerkraut2018 on December 20, 2019, 08:21:31 PM
...

Quote: Are you wanting the rounded corners ?, or No? ... T

I haven't thought about that yet. My thoughts are very simple.
...

Quote from: sauerkraut2018 on December 19, 2019, 11:03:26 PM
...
I do not understand why eight rounded edges are created even though I only entered the "rear" four edge points?  :o

In the attached listing I did not enter any z-values and still roundings in the z-direction are created.

My goal is:
Cuboid (six sides)
To create the roundings on this cuboid only on one side or surface.
So only above, only below, only behind, only in front, only on the left, only on the right.
...


Below is what would be the result if we were able to do via PPM script as you are requesting.
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

#11
That should not be a problem at all.
How would you draw it in TC ??, 2 boxes, fillet 1 and add them together (3D Add ), in ppm BoleanUnion.
The last example in Help that use 3GFillet Array will make the part that are filleted,if i dont remember wrong.
And then add it to a Box that are not, and voila you have your object :)

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 21, 2019, 10:39:40 AM
That should not be a problem at all.
How would you draw it in TC ??, 2 boxes, fillet 1 and add them together (3D Add ), in ppm BoleanUnion.
The last example in Help that use 3GFillet Array will make the part that are filleted,if i dont remember wrong.
And then add it to a Box that are not, and voila you have your object :)

Torfinn

Yeah, I was thinking to do it how we would in Deluxe.  Make an entity that is a "router bit" that would copy and group on the assigned edges and Subtract.
It's all dependent on what sauerkraut is wanting to achieve, and how sauerkraut wants to achieve it.
Seems simpler/faster to just do a Part, editable via Part Tree.  But probably less fun, if one enjoys writing and using PPM scripts.
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

Here is your Box Alvin, but you do need to write the Box.ppm first to make it work directly, else you need to create the "Box" inside the ppm.
I have/ use a standard Box in/ from my Macro folder.

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

#14
Quote from: Torfinn on December 21, 2019, 12:18:45 PM
Here is your Box Alvin, but you do need to write the Box.ppm first to make it work directly, else you need to create the "Box" inside the ppm.
I have/ use a standard Box in/ from my Macro folder.

Torfinn

I would have thought you would do it like this.  Just seems simpler, to me.  Produces same result, as far as I can tell.




//Alvin Edits Torfinn's "Alvis_Box.txt" script

Units (1[mm])

L = Parameter("Length", 10,LINEAR);
R = Parameter("Radius",1.5);

B1 = Box(0,0,0,L,L,L);
B2 = Box( 0,0,0,L-R,L,L);

B3 = G3Fillet(B1, Array(Point(L,L/2,0), Point(L,L,L/2),
              Point(L,L/2,L), Point(L,0,L/2)),
              Array(R, R, R, R, R, R, R, R));

B4 = BooleanUnion(B2,B3);

Output(B4);
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

Thats correct Alvin, i was using the example  in Help,(the last Array) so people could understand how to tweak it to fit something else then what it do original :)

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

John R

Can PPM do a 3D Intersect?

You might try Fillet Edge on opposite edges, then rotate a copy 90°, then 3D Intersect the two boxes.

In Deluxe, Simple Extrude from a profile containing rounded corners, then Copy, Rotate, Intersect.
John R.

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

Torfinn

Quote from: John R on December 21, 2019, 01:49:53 PM
Can PPM do a 3D Intersect?

You might try Fillet Edge on opposite edges, then rotate a copy 90°, then 3D Intersect the two boxes.

In Deluxe, Simple Extrude from a profile containing rounded corners, then Copy, Rotate, Intersect.

Hi John
By the commands it's possible to use, it can do a BooleanIntersect, depends only on how we want to do it.
There is also a 3GSlice, never tested, but seems like all basic options is covered.

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

sauerkraut2018

hello hardworking helpers,


I enter the forum via the "Recent Post" page. I was amazed this morning. All contributions concern my post "Parametric Parts Reserved Word List III".
Top, thanks to all of you. I can only say "wow".

I am in the test phase like Alvin and "only" wanted to know how the G3 fillet command works.
The result: TC sometimes thinks (works) differently than expected.

You were very, very busy today, so we now have two solutions:
1. with rounded corners
2. without rounded corners

Big, big thanks to you. Christmas can come now.

I wish everyone a Merry Christmas and a Happy New Year.
#-----
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

Quote from: sauerkraut2018 on December 21, 2019, 11:31:39 PM
...

sauerkraut-- Which of the examples below most accurately represents what would you like to achieve in this first phase of development of your PPM script(s), in regards to the corners?
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)

sauerkraut2018

Hello,

Quote: ... Which of the examples below most accurately represents what would you like to achieve in this first phase of development of your PPM script(s), in regards to the corners?



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

Quote from: sauerkraut2018 on December 22, 2019, 08:43:32 PM
Hello,

Quote: ... Which of the examples below most accurately represents what would you like to achieve in this first phase of development of your PPM script(s), in regards to the corners?

No Rounded Corners.  I see.

Yes, John's method would be a way to go.  Would be a very long and complex script, for writing all the Parameter/parametric options.

My suggestion-- creating entities that are 3DSubtracted, to create the fillets-- will be just as long-winded and cumbersome.

But both can be done!  Good Luck!



(It would be lovely if we could discover a way of invoking the option of "No Rounded Corners" within a PPM script or have it be so when inserted; I tried changing "Corners"-- from 0, to 1-- in TcExplorer, but no success.)
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)

nikkipollard

Hi Alvin the Macro is a cube which you can round the edges choosing which edges to fillet. The example  uses that macro.
I wanted to show how I use the 3g fillet command. and get around its quirks.
- I can set a 0 radius without having an error
and the sides don't automatically get filleted when the top and bottom  have a radius larger than 0.


Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: nikkipollard on December 23, 2019, 06:03:15 AM
Hi Alvin the Macro is a cube which you can round the edges choosing which edges to fillet. The example  uses that macro.
I wanted to show how I use the 3g fillet command. and get around its quirks.
- I can set a 0 radius without having an error
and the sides don't automatically get filleted when the top and bottom  have a radius larger than 0.

Hi Nikki.  Is this (Quote above) in response to?:

Quote from: Alvin Gregorio on December 21, 2019, 05:24:01 AM
Quote from: nikkipollard on December 20, 2019, 08:31:13 PM
I think it does this because it uses the same default as TC. (where the corners are rounded)
attached is a macro and and an example of it's use
The Macro wont work on it's own as it has no parameters defined.
You can see how I typically work with G3 Fillet

I'm still a complete novice at this PPM script writing stuff Nikki, but I think the "BXFtest.txt" file you provided is a script for something else.
It is for a simple table-- tabletop and 4 legs.  No G3Fillet in that.

If so, I'll go back with more a more positive mindset and try to work with the files you provided, and try better to incorporate your instruction.
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

#24
Quote from: nikkipollard on December 23, 2019, 06:03:15 AM
Hi Alvin the Macro is a cube which you can round the edges choosing which edges to fillet. The example  uses that macro.
I wanted to show how I use the 3g fillet command. and get around its quirks.
- I can set a 0 radius without having an error
and the sides don't automatically get filleted when the top and bottom  have a radius larger than 0.

[Note:  Torfinn answered my question here in a subsequent post.]

Nikki, Any chance you would be able to walk me(us) through how to use your "BXF.txt" and "BXFtext.txt" files; or get me/us started in the right direction.

I just can't figure out how to do anything with those two files, when loaded into PPM Script Editor.  I get errors every time I try to insert either one those PPMs.
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

Did you save the BXF fil as a PPM before running BFXtext Alvin ??
BXF is a Macrofile, that cant run by it self as it need Info from another file ( Parameter values ) so it will crash.
So if you save that as ppm first the BXFtest will work as it call up the BXF where all the G3Fillets are.

If you dont save BXF as a ppm first, the BXFtest will not find it and crash to.

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

Torfinn

Quote from: nikkipollard on December 20, 2019, 08:31:13 PM
I think it does this because it uses the same default as TC. (where the corners are rounded)
attached is a macro and and an example of it's use
The Macro wont work on it's own as it has no parameters defined.
You can see how I typically work with G3 Fillet

Thanks Nikki
That was a nice ppm, but i miss an option to adjust it in BXFtest (Round or Miter), or is it me that dont see it ?

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 23, 2019, 10:53:49 AM
Did you save the BXF fil as a PPM before running BFXtext Alvin ??
BXF is a Macrofile, that cant run by it self as it need Info from another file ( Parameter values ) so it will crash.
So if you save that as ppm first the BXFtest will work as it call up the BXF where all the G3Fillets are.

If you dont save BXF as a ppm first, the BXFtest will not find it and crash to.

Torfinn

Cool.  I got it to work.  And I learned something valuable about PPM scripts in the process.

Thanks Torfinn-- and Nikki
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)