Hello All,
Few questions with respect to TGLExtrusionSolid behaviours which the "cutout star" demo does not describe.
1) I am able to create the profile of the extrusion, however only in one certain plane (x, y). Yet any other combination doesn't work, say the (y, z) plane. How can we create an extrusion on any plane? Here's a snippet on how I define the extrusion profile. I first create the profile of interest using TGLNodes and TGLLines (such that the user can see the profile), then use the nodes of the lines to add to the extrusion.
with MyGLExtrusionSolid.Contours.Add do
for LoopCounter := 0 to (NumOfNodes-1) do
BEGIN
Nodes.AddNode(MyGLLines.Nodes[LoopCounter].X,
MyGLLines.Nodes[LoopCounter].Y,
MyGLLines.Nodes[LoopCounter].Z);
END;
2) TGLExtrusion solid has a "height" field, yet it is for one direction. How do we create an axisymmetric thickness both forward and backwards? For example, for TGLRevolutionSolid we have StartAngle and EndAngle which helps create a revolution across a plane.
3) I noticed that there is a "path" property. I am assuming that it is used to define the path of the extrusion. If yes how is it activated? Below is a snippet of code I use which does not work. If the path parameter is not for that, then how do we define a path for the extrusion to follow which is independent of height? I'd like to do something similar to what can be done with TGLPipe.
I am not an expert in TGLExtrusionSolid but I guess you could extrude from the XY-plane and then rotate the extrusion so that it aligns with that other plane. To extrude both forward and backwards, you can offset the extrusion solid down. If you add the extrusion solid to a dummycube, it is easy to both rotate and offset in any angle and distance.
Hello All,
Few questions with respect to TGLExtrusionSolid behaviours which the "cutout star" demo does not describe.
1) I am able to create the profile of the extrusion, however only in one certain plane (x, y). Yet any other combination doesn't work, say the (y, z) plane. How can we create an extrusion on any plane? Here's a snippet on how I define the extrusion profile. I first create the profile of interest using TGLNodes and TGLLines (such that the user can see the profile), then use the nodes of the lines to add to the extrusion.
with MyGLExtrusionSolid.Contours.Add do
for LoopCounter := 0 to (NumOfNodes-1) do
BEGIN
Nodes.AddNode(MyGLLines.Nodes[LoopCounter].X,
MyGLLines.Nodes[LoopCounter].Y,
MyGLLines.Nodes[LoopCounter].Z);
END;
2) TGLExtrusion solid has a "height" field, yet it is for one direction. How do we create an axisymmetric thickness both forward and backwards? For example, for TGLRevolutionSolid we have StartAngle and EndAngle which helps create a revolution across a plane.
3) I noticed that there is a "path" property. I am assuming that it is used to define the path of the extrusion. If yes how is it activated? Below is a snippet of code I use which does not work. If the path parameter is not for that, then how do we define a path for the extrusion to follow which is independent of height? I'd like to do something similar to what can be done with TGLPipe.
Hello All,
Few questions with respect to TGLExtrusionSolid behaviours which the "cutout star" demo does not describe.
1) I am able to create the profile of the extrusion, however only in one certain plane (x, y). Yet any other combination doesn't work, say the (y, z) plane. How can we create an extrusion on any plane? Here's a snippet on how I define the extrusion profile. I first create the profile of interest using TGLNodes and TGLLines (such that the user can see the profile), then use the nodes of the lines to add to the extrusion.
with MyGLExtrusionSolid.Contours.Add do
for LoopCounter := 0 to (NumOfNodes-1) do
BEGIN
Nodes.AddNode(MyGLLines.Nodes[LoopCounter].X,
MyGLLines.Nodes[LoopCounter].Y,
MyGLLines.Nodes[LoopCounter].Z);
END;
2) TGLExtrusion solid has a "height" field, yet it is for one direction. How do we create an axisymmetric thickness both forward and backwards? For example, for TGLRevolutionSolid we have StartAngle and EndAngle which helps create a revolution across a plane.
3) I noticed that there is a "path" property. I am assuming that it is used to define the path of the extrusion. If yes how is it activated? Below is a snippet of code I use which does not work. If the path parameter is not for that, then how do we define a path for the extrusion to follow which is independent of height? I'd like to do something similar to what can be done with TGLPipe.
MyGLExtrusionSolid.Path[0].AddNode(0,0,0);
MyGLExtrusionSolid.Path[1].AddNode(0,1,0);
MyGLExtrusionSolid.Path[2].AddNode(0,2,0);
MyGLExtrusionSolid.Path[3].AddNode(1,3,0);
MyGLExtrusionSolid.Path[4].AddNode(1,4,0);
Your support is much appreciated.
sincerely
John
Hi John
I am not an expert in TGLExtrusionSolid but I guess you could extrude from the XY-plane and then rotate the extrusion so that it aligns with that other plane. To extrude both forward and backwards, you can offset the extrusion solid down. If you add the extrusion solid to a dummycube, it is easy to both rotate and offset in any angle and distance.
\Lars
From: John Kidikian hello-me-john@users.sourceforge.net
Sent: Saturday, 22 May 2021 14.27
To: [glscene:discussion] 93606@discussion.glscene.p.re.sourceforge.net
Subject: [glscene:discussion] TGLExtrusionSolid (Extrusion) direction, length, path
Hello All,
Few questions with respect to TGLExtrusionSolid behaviours which the "cutout star" demo does not describe.
1) I am able to create the profile of the extrusion, however only in one certain plane (x, y). Yet any other combination doesn't work, say the (y, z) plane. How can we create an extrusion on any plane? Here's a snippet on how I define the extrusion profile. I first create the profile of interest using TGLNodes and TGLLines (such that the user can see the profile), then use the nodes of the lines to add to the extrusion.
with MyGLExtrusionSolid.Contours.Add do
for LoopCounter := 0 to (NumOfNodes-1) do
BEGIN
Nodes.AddNode(MyGLLines.Nodes[LoopCounter].X,
MyGLLines.Nodes[LoopCounter].Y,
MyGLLines.Nodes[LoopCounter].Z);
END;
2) TGLExtrusion solid has a "height" field, yet it is for one direction. How do we create an axisymmetric thickness both forward and backwards? For example, for TGLRevolutionSolid we have StartAngle and EndAngle which helps create a revolution across a plane.
3) I noticed that there is a "path" property. I am assuming that it is used to define the path of the extrusion. If yes how is it activated? Below is a snippet of code I use which does not work. If the path parameter is not for that, then how do we define a path for the extrusion to follow which is independent of height? I'd like to do something similar to what can be done with TGLPipe.
MyGLExtrusionSolid.Path[0].AddNode(0,0,0);
MyGLExtrusionSolid.Path[1].AddNode(0,1,0);
MyGLExtrusionSolid.Path[2].AddNode(0,2,0);
MyGLExtrusionSolid.Path[3].AddNode(1,3,0);
MyGLExtrusionSolid.Path[4].AddNode(1,4,0);
Your support is much appreciated.
sincerely
John
TGLExtrusionSolid (Extrusion) direction, length, path https://sourceforge.net/p/glscene/discussion/93606/thread/4ea523ce96/?limit=25#a74c
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/glscene/discussion/93606/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Thank you Lars for the response and the proposed way-forward.
It is much appreciated.
Best regards
John