News:

Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

Main Menu

Parametric Parts (via Parametric Part Script Editing)

Started by Alvin Gregorio, November 26, 2019, 09:20:59 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Alvin Gregorio

Parametric Part Script Editor:

What does the "Set Add/Update Parametric Part mode" button do?
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: Alvin Gregorio on November 26, 2019, 09:20:59 AM
Parametric Part Script Editor:

What does the "Set Add/Update Parametric Part mode" button do?

I figured it out.
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

#-----
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 November 26, 2019, 10:10:13 AM
Hi,

Great, and what?

It switches the function of the button next to it from "Insert Parametric Part" to "Update Parametric Part"; and the reverse, when it is not activated.
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

It's very handy when testing the ppm, so we not get a "billion" symbols on top of each other.

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

Please see the attached image below for questions, request for input.
Below is the PPSE script.
Thanks, Alvin


// Here is a description of simple rectangle with brush
H = Parameter("Height", 9, LINEAR, Interval(0, 100));
L = Parameter("Length", 16, LINEAR, Interval(0, 200));
Angle = Parameter("Angle", 90, ANGULAR, Interval(0, 360));
Rect1 = Rectangle(L, H);
Rect = RotateZ(Rect1, Angle);
PL0 = SetProperties(Rect1, "Brush" = "Solid");
Output(PL0);
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

#6
Change Brush to BrushStyle and it work
We cant change linewidth, not a command for it, so it will use default, explode it 1 time after insert and the linewidth should be able to change, but of course then it's not a ppm anymore
Rect dont work because you use Rect1 in PL0, if change to Rect it will work and you can rotate it

Torfinn

Edit; We can set it inside the ppm like in;
PL1 = SetProperties(PL0,"PenWidth" = 0.02);
and we can give options like this;
PW = Parameter("Pen Width", "02" , Set("00","02","05"));
PL1 = SetProperties(PL0,"PenWidth" = PW2);
PW2 = IF(PW == "02",.02,IF(PW == "05",.05,.0));
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

#7
Quote from: Torfinn on November 26, 2019, 02:47:07 PM
Change Brush to BrushStyle and it work
We cant change linewidth, not a command for it, so it will use default, explode it 1 time after insert and the linewidth should be able to change, but of course then it's not a ppm anymore
Rect dont work because you use Rect1 in PL0, if change to Rect it will work and you can rotate it

Torfinn

Thanks Torfinn.

What you wrote means the version-21 Help Documentation has some errors; and probably more yet to be discovered.  (screen-snippet below)

I guess I need to be cognizant of what I trust from there; and be very open to experimenting, learning by trial & error, and asking questions here.

I'm curious what "0xff" means/does.  I wonder if we can figure out how to set Brush Scale & Angle options in PPSE.

[EDIT]  I see you edited your Post that I quoted above Torfinn.  Yes, that Pen Width properties in PPSE works.  Thanks.
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

There is a lot of thing that we can do inside a ppm, only we don't know it as it's not inside the commandlist we are suppose to use
PenWidth is one of them.
And brush Scale is like
PL0 = SetProperties(Rect, "BrushStyle" = "L45");
PL2 = SetProperties(PL0,"BrushScale" = 1)
PL3 = SetProperties(PL2,"BrushAngle" = 20)

And the "0xff" is the hexa code for color, in the case you showed it was PenColor
We will get a long list in TC as we can only change 1 property at the time i think to remember.
And all this can be in a IF line with options for changing before ore after insert the symbol.

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 November 26, 2019, 04:44:58 PM
There is a lot of thing that we can do inside a ppm, only we don't know it as it's not inside the commandlist we are suppose to use
PenWidth is one of them.
And brush Scale is like
PL0 = SetProperties(Rect, "BrushStyle" = "L45");
PL2 = SetProperties(PL0,"BrushScale" = 1)
PL3 = SetProperties(PL2,"BrushAngle" = 20)

And the "0xff" is the hexa code for color, in the case you showed it was PenColor
We will get a long list in TC as we can only change 1 property at the time i think to remember.
And all this can be in a IF line with options for changing before ore after insert the symbol.

Torfinn

Okay.  That is plenty for me to digest, for now.  Thanks Torfinn.
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

Quick Question:  Is there always only one "Output" in a script?
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

Yes, minimum 1, you can have so many you wish, but need at least 1 else there is nothing to get/ see from it.
Output ( a);
Output ( b,c,d,e);

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 November 26, 2019, 05:12:42 PM
Yes, minimum 1, you can have so many you wish, but need at least 1 else there is nothing to get/ see from it.
Output ( a);
Output ( b,c,d,e);

Torfinn

Okay.  I'll experiment with it.  Thanks Torfinn.
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

Alvin if you want to know what programming term is used to describe a property. -And you cant find int in help-
Draw a rectangle in TC . open the macro palette start recording a macro change the properties of the rectangle in the info palette stop the macro - and look for the property and the code in the macro.
Pen widths aren't the same as they are in TC they have a random number- but
I usually use by layer  I think it is -3
which makes the most sense to me because when you have a lot of symbols in a drawing changing the pen width of each symbol would take time.

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

John R

Alvin,

Here's a list of the TurboCAD Colors, with RGB, Decimal & HTML values that you could use in a PPM. Something else to bookmark. ;)
John R.

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

Alvin Gregorio

Thank You John.

Can someone provide a PPM script that has multiple Outputs in it.  That makes good use of that feature.
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: nikkipollard on November 26, 2019, 08:23:38 PM
Alvin if you want to know what programming term is used to describe a property. -And you cant find int in help-
Draw a rectangle in TC . open the macro palette start recording a macro change the properties of the rectangle in the info palette stop the macro - and look for the property and the code in the macro.
Pen widths aren't the same as they are in TC they have a random number- but ...

Thanks Nikki.  Yes, the Macro use is a good tip.  For example, I see from there the term "BrushStyle" is used, not "Brush", as the Help states.

RE  "Pen widths aren't the same as they are in TC they have a random number":  It looks to me that it is in the Drawing's Space Units.
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

Does anyone want to try a PPM script to accomplish shown below.
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

#18
No hatch because it is a polyline
here are 2 examples the first one set parameter for the length and the rise in SI.

The second one uses nodes to set the arc - nodes need to be moved in a clockwise direction. I am too lazy to fix that now.
If the in arc is larger then a semi circle there is a checkbox to change the default angle to the larger of the 2 possible internal angles.

If you really need a hatch. You can define a hatch in the ppm using lines.
The advantage being that the pattern will follow the curve - unlike our hatch.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: nikkipollard on November 27, 2019, 10:00:33 PM
No hatch because it is a polyline
here are 2 examples the first one set parameter for the length and the rise in SI.

The second one uses nodes to set the arc - nodes need to be moved in a clockwise direction. I am too lazy to fix that now.
If the in arc is larger then a semi circle there is a checkbox to change the default angle to the larger of the 2 possible internal angles.

If you really need a hatch. You can define a hatch in the ppm using lines.
The advantage being that the pattern will follow the curve - unlike our hatch.

Thanks Nikki.  Good job!
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

Thanks Nikki

Btw, we can set the Hatch inside the ppm, and it will turn up in curveobjects if exploded 1 time after insert ( if we want :)

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

nikkipollard

Yes but you have to program all the hatches you want into the ppm. If you are exploding it anyway it is not worth it.
With a curved object Tc hatches can look odd  too. - unless they are a random  hatch that doesn't need to follow the curve.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: nikkipollard on November 30, 2019, 12:18:01 AM
Yes but you have to program all the hatches you want into the ppm. If you are exploding it anyway it is not worth it.
With a curved object Tc hatches can look odd  too. - unless they are a random  hatch that doesn't need to follow the curve.

Those 3 PPM Hatches Nikki-- Are they written into the script?
If yes, can you share an example?
The concrete one really has me scratching my head.
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

I am still refining that idea Alvin.
A hatch is just a repeated pattern.
I copy rotated the pattern around the centre of the arc.
Basically you work out the Arc length in the ppm, divide that by the spacing - to figure out the number of repetitions.
Work out the angle for that distance,then Rotate the object by that angle.

For the "concrete hatch" I used a series of patterns inside another pattern.
The hatch Idea works in this case because it's a small area with a uniform shape it wouldn't be as easy with an irregular shape.
because each line wouldn't be the same size and you would need to calculate and draw each line separately.
- much easier to explode and use TC hatches.


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

Alvin Gregorio

Hello All.  Question:

Occasionally, when using the Parametric Part Script Editor, I inadvertently do some type of keystroke and/or mouse-click that causes the text in the editor to zoom out.  The text appears smaller suddenly-- almost too small to read and work with.

I have not been able to figure out how to get it back to normal-sized, without closing the program and re-Starting it.
Does anyone know how to accomplish getting the text zoom level back to the default?
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)

murray dickinson

I'd try Ctrl + 0, Windows key sequence to reset zoom level. 

Alvin Gregorio

Quote from: murray dickinson on December 10, 2019, 12:35:42 PM
I'd try Ctrl + 0, Windows key sequence to reset zoom level.

Hi Murray.  Thanks for the suggestion.

I did try Ctrl + 0 when (the few times) the issue occurred.  It did not resolve it.  I also tried Ctrl + (+ numerical keypad key) and Ctrl + (- numerical keypad key); those did not resolve the issue either.

When the issue occurs again, I'll post back here.
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)

murray dickinson

The zoom of the reference point's rotator bars behaves like that too.  Wonder if that's related?

Alvin Gregorio

#28
Quote from: Alvin Gregorio on December 10, 2019, 06:37:01 AM
Occasionally, when using the Parametric Part Script Editor, I inadvertently do some type of keystroke and/or mouse-click that causes the text in the editor to zoom out.  The text appears smaller suddenly-- almost too small to read and work with.

I have not been able to figure out how to get it back to normal-sized, without closing the program and re-Starting it.
Does anyone know how to accomplish getting the text zoom level back to the default?

I just discovered the cause and remedy for my issue described above:  Holding down the Ctrl key while scrolling the (Microsoft wireless) mouse wheel.  Similar (same) to that action in drawing space and other Windows applications.

I can get it nice and yummy large now.  Gonna come in handy as my eyes get worse.  There's a lot of characters to get correct in PPSE.  I could use Notepad-- and I do-- but I like the colored tips and other help the PPSE gives us.
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

Hello All.
In the attached drawing, we can see an inserted PPM Part; also the script that created it.

Notice the faceting.

I have my ACIS set to 100.  If I extrude a Polyline that I created, not by PPM scripting, I do not get the faceting.

Do PPM curved objects made via arc segments always have this faceting?
Is there some way to alleviate it?

Here is the script:


Units (1[mm])

//Subtrahend(s)

S=Identifier("Length", 10,LINEAR); //Size of Subtrahend Square, X and Y; might not be used
R=Parameter("Fillet Radius",10,LINEAR);
RP=(Point(R*.1,R))


SPath = Polyline
(Point(0,0),Point(0,R*1.1),Point(R*1.1,R*1.1),Point(R*1.1,R),
Arc1(R*1.1,0,R),Point(R*.1,0),Point(0,0));

STh=Thickness(SPath,1)

Output(STh);
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 22, 2019, 11:17:51 AM
Hello All.
In the attached drawing, we can see an inserted PPM Part; also the script that created it.

Notice the faceting.

I have my ACIS set to 100.  If I extrude a Polyline that I created, not by PPM scripting, I do not get the faceting.

Do PPM curved objects made via arc segments always have this faceting?
Is there some way to alleviate it?

Here is the script:


Units (1[mm])

//Subtrahend(s)

S=Identifier("Length", 10,LINEAR); //Size of Subtrahend Square, X and Y; might not be used
R=Parameter("Fillet Radius",10,LINEAR);
RP=(Point(R*.1,R))


SPath = Polyline
(Point(0,0),Point(0,R*1.1),Point(R*1.1,R*1.1),Point(R*1.1,R),
Arc1(R*1.1,0,R),Point(R*.1,0),Point(0,0));

STh=Thickness(SPath,1)

Output(STh);

Is the Polyline closed? Is the extrusion a Surface?

Henry H

Alvin Gregorio

Quote from: Henry Hubich on December 22, 2019, 01:10:51 PM

Is the Polyline closed? Is the extrusion a Surface?

Henry H

The Polyline is Closed.  In Parametric Parts scripts, if the end-point of the polyline is the same as the start-point (in this case, X=0;Y=0), the polyline is considered closed.

There is nothing I did to make the "extrusion" ("Thickness", actually) in the script a TcSurface.  I don't even know if that's possible.
Oddly, if we Explode the inserted PPM once, the entity is reported in Selection Info as being a Polyline, with Thickness, ACIS Solid (news to me, right now); but we'd really rather not have to Explode the thing-- I plan on using it within the script as a Subtrahend, and I really don't want a bunch of facets on the resultant PPM entity.
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
Many time a curved Object comes out this way, so then i use Sweep instead.
In your ppm i also changer RP = Point() to RefPoint()
In line with arc there was an R to much, (x,x,R) = a value up in the air on last point, x,x = 2D, x,x,x = 3D, so i take away that R.
Then make the L = Sweep path and rotated it so i could use the line and give thickness that way
And finally put out the RP, as you see in pic, it now are where you write it to be.

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

#33
Quote from: Torfinn on December 22, 2019, 01:51:42 PM
Hi Alvin
Many time a curved Object comes out this way, so then i use Sweep instead.
In your ppm i also changer RP = Point() to RefPoint()
In line with arc there was an R to much, (x,x,R) = a value up in the air on last point, x,x = 2D, x,x,x = 3D, so i take away that R.
Then make the L = Sweep path and rotated it so i could use the line and give thickness that way
And finally put out the RP, as you see in pic, it now are where you write it to be.

Torfinn

Thanks Torfinn.  You see where I'm headed with this.  I'm thinking of (within PPM) array copying the object, grouping them, and having the option to 3DSubtract them from Box edges.  This is to attend to sauerkraut's request-- for sport and experience/familiarity.

Question:  Regarding the Arc1-- What tells the radius?-- I had the (wrong, apparently) understanding that the last of the 3 digits was the radius.  In this script scenario, I am wanting the R parameter to be the radius.  The "R" and the RefPoint drive those whole thing.  I read Help more; I understand.

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: Torfinn on December 22, 2019, 01:51:42 PM
Hi Alvin
Many time a curved Object comes out this way, so then i use Sweep instead.
In your ppm i also changer RP = Point() to RefPoint()
In line with arc there was an R to much, (x,x,R) = a value up in the air on last point, x,x = 2D, x,x,x = 3D, so i take away that R.
Then make the L = Sweep path and rotated it so i could use the line and give thickness that way
And finally put out the RP, as you see in pic, it now are where you write it to be.

Torfinn

Torfinn, Is there a reason you rotated the Sweep path polyline?
Trying to simplify things as much as possible, I changed the Sweep path (L) as shown, and it "swept" fine.  Is there some reason that is not a good idea and your way is preferable?
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

I double checked in help and they show R as Radius, so maybe a mistake, but we dont need it so for me it's a z point.
It's the start, end and CenterPoint that tell the Radius.
Try to write 12 instead of R as a 3 value, insert the symbol and see what you get in radius.

I need R for a circle, but not an arc, but assume i have wrote it many times in earlier ppm's to.

The Refpoint is something you set after the Objects is drawed, so we have a spesific insertpoint to use for Snap in example.
When you insert the symbol from Library it dont care where the refpoint is, is will set it in with the refpoint at the middle of screen/ workplane, no matter what.
So it's only relative to the Object, and by that a Refpoint is a Snap point, in my head :)
Only from Edtor it will be inserted at Refpointvalues, because there we may need it, to see if comes correct to something else in example.

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

#36
Quote from: Torfinn on December 22, 2019, 03:18:05 PM
I double checked in help and they show R as Radius, so maybe a mistake, but we dont need it so for me it's a z point.
It's the start, end and CenterPoint that tell the Radius.
Try to write 12 instead of R as a 3 value, insert the symbol and see what you get in radius.

I need R for a circle, but not an arc, but assume i have wrote it many times in earlier ppm's to.

The Refpoint is something you set after the Objects is drawed, so we have a spesific insertpoint to use for Snap in example.
When you insert the symbol from Library it dont care where the refpoint is, is will set it in with the refpoint at the middle of screen/ workplane, no matter what.
So it's only relative to the Object, and by that a Refpoint is a Snap point, in my head :)
Only from Edtor it will be inserted at Refpointvalues, because there we may need it, to see if comes correct to something else in example.

Torfinn

The Help is pretty clear, on arcs in Polylines (below), once I read it correctly.

The RefPoint I see in my head like a Block Reference Point.
However, my intention for the RP in this script is to use if for placement of the 3D objects on the edges of the Box, for 3DSubtracting/filleting use.

Just something for my brain exercise, and sense of accomplishment, really.
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



Torfinn, Is there a reason you rotated the Sweep path polyline?
Trying to simplify things as much as possible, I changed the Sweep path (L) as shown, and it "swept" fine.  Is there some reason that is not a good idea and your way is preferable?
[/quote]

Nope, only because i could not do that earlier, so it's a habit for me, not even think that something have changed on that point, but much easier if i can draw it in Z.
I tryd to draw in Z in my 2 ppm, not possible, so have continued with rotate since that.

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

Thanks Alvin, great finding 👍

Now its possible to draw in angled direction, up i Z, insted of all the endless  x,y calculations to find a Z distance:)
Not 100 % PolarPoint, but a huge difference.

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 22, 2019, 03:18:05 PM
I double checked in help and they show R as Radius, so maybe a mistake, but we dont

need it so for me it's a z point.
It's the start, end and CenterPoint that tell the Radius.
Try to write 12 instead of R as a 3 value, insert the symbol and see what you get in

radius.

I need R for a circle, but not an arc, but assume i have wrote it many times in earlier

ppm's to.

Quote from: Alvin Gregorio on December 22, 2019, 03:27:02 PM
The Help is pretty clear, on arcs in Polylines (below), once I read it correctly.


Actually, I guess there is an alternative way.  See the attached.  I copied/pasted that from a bit further down in the Help documentation; cleaned it up some with some "Enters" (paragraph returns), so that it was easier to comprehend and work with.

To the left in the image is the PPM insertion.
Attached is the script.  I also a attached a simple one I wrote.
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

How do we make a Circle Parameter allowable Value infinite?



Units(1[mm]);

CR=Parameter("Radius",5,❓(❓,❓));
C = Circle(CR,0,0);

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

Look at Nikki's ppm's or the Arrow i just made in a tread here, using ParameterPoint instead of Point, then you can drag it to whatever size later with edit tool i assume by dragging the node

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 24, 2019, 10:43:10 AM
Look at Nikki's ppm's or the Arrow i just made in a tread here, using ParameterPoint instead of Point, then you can drag it to whatever size later with edit tool i assume by dragging the node

Torfinn

Okay.  Thanks Torfinn
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

And i tested a little bit, it cant be a circle i believe as it will only have 1 point, so then i think it need to be Arc so you get a node to drag.

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

And when there are some people that look at this tred :)
Something to do during the Christmas holiday's, see Attached
I know it's possible, but i dont know how to, and it's for an ppm, so use a calculator or similar with a feature for it dont help :)
I need how to write it in simplest way.

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

Jeff_in_90620

What is the relationship of X1 to X2?  If this is known, then all the other values (including the absolute values of X1 & X2) can be determined when the arbitrary distance from A to B is specified.


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)

Torfinn

Hi Jeff

We dont know more than what show's, the relationship is only that they meet on point C, and was to say that any one of this 3 x's will solve the issue, if i only could figure out how 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

Tim Stewart

Quote from: Torfinn on December 25, 2019, 02:54:28 AM
And when there are some people that look at this tred :)
Something to do during the Christmas holiday's, see Attached
I know it's possible, but i dont know how to, and it's for an ppm, so use a calculator or similar with a feature for it dont help :)
I need how to write it in simplest way.

Torfinn

Torfinn,

if I understand you correctly, the solution is to use either the Sine or Cosine rules in your PPM.

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

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

#49
Quote from: Torfinn on December 25, 2019, 04:26:02 AM
Hi Tim

Yeah, but how :)

Torfinn

Like when I find/do calculations for framing-carpentry work, I always try to find the right-angle, so that I can input into the Construction Master Pro calculator I carry on my bags (used to... phone app now, and haven't framed in a long time).
Of course, that right-angle is at the point on the AB line X1 & X2 distance from points A & B respectively, in relation to the projected line from that point to Point C.

__________
To me-- and I'm no mathematician-- we need another known.  The angles and X1 & X2 & X3 are all still variable.
Can you provide us an image Torfinn, showing how the intended Circle relates to the triangle geometry.  Or just tell us-- Does it snap to points A, B, C?

Because, I assume, in the Parametric Symbol, the User will be inputting the "Radius" Parameter; therefore, the Radius will be another known.
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)