[Subassembly Composer] How to create closed shapes within a loop?

[Subassembly Composer] How to create closed shapes within a loop?

Vinicius_Estrelow
Contributor Contributor
256 Views
10 Replies
Message 1 of 11

[Subassembly Composer] How to create closed shapes within a loop?

Vinicius_Estrelow
Contributor
Contributor

Hello everyone!

Recently I've been facing a major challenge, which is to add a closed shape that follows along with a loop geometry. Here's the scenario: I want to create slopes and berms that tie into the surface. On these berms, I have already created the excavation "box" for the corresponding drainage channels, based on a format the user can select.

In addition to the excavation, I want to quantify this linear drainage using these shapes. Knowing that the loop geometry only works with links, I can't insert these shapes.

Is there any solution to automate this within SAC?

Thanks!

0 Likes
257 Views
10 Replies
Replies (10)
Message 2 of 11

ecfernandez
Mentor
Mentor

Hi @Vinicius_Estrelow, I hope you are doing well

 

I bet this is not the answer you were waiting for. But, I would not go with loops for this. Instead, I'd create a variable that controls how many repetitions I need, and then feed a switch that will know which geometry to point at. This means more work, but yields lots of benefits when running your corridor.

 

I hope this helps. Best regards! 

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 3 of 11

Vinicius_Estrelow
Contributor
Contributor

Hi @ecfernandez ! Yes, that's what I was thinking: creating specific codes to "anchor" the geometry I want, controlled by some switch logic.

My main question is, considering I could have a variable number of berms (X), how would the mapping of the point codes work? Is there a programmable logic I could use to find specific point codes and then generate the required drainage geometry based on them?

Message 4 of 11

ecfernandez
Mentor
Mentor

Hi @Vinicius_Estrelow, any chance you could post a draft of how you are envisioning your subassembly to behave? This would help me understand what you are proposing and be able to add to the discussion.

Regards, 

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 5 of 11

Vinicius_Estrelow
Contributor
Contributor

Of course @ecfernandez ! Let's take a daylight bench subassembly as an example.

On the benches (berms), I already create the excavation for the drainage device based on the user's inputs (see photo below). However, this only handles the excavation.

What I also want to do is add the concrete shape to each bench in order to have the complete model, showing both the excavation and the concrete drainage itself.

Vinicius_Estrelow_0-1759847006702.png

 

0 Likes
Message 6 of 11

ecfernandez
Mentor
Mentor

Hi @Vinicius_Estrelow, thanks for posting that image. There are to things I want to mention:

 

1. Excavation quantity: The slope and gutter geometry look pretty well developed. Once you run a corridor in Civil 3D using this subassembly, you'll be able to create a Datum surface that will go along the red line I am showing in the following image:

ecfernandez_0-1759880029280.png

With this surface, you'll be able to compute your earthwork by either surface comparison or sectional volumes. Nicely done!

 

2. Concrete shape: You'll need links to be able to create the shape. You currently have auxiliary links, which won't allow you to do it. Then, start by replacing those aux links. As I mentioned before, I would not use loops, but program each bench repetition manually. Consequently, there will be a chance to add that shape for each repetition.

 

Programming each possible number of benches is pretty good as it allows to define different slope ratios for the different benches, which is a common request by geotechnical engineers (starting at Y elevation, they want a different slope ratio).

 

I hope I did not misunderstand your question. Let me know your thoughts about this.

 

Regards,

 

  

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 7 of 11

Vinicius_Estrelow
Contributor
Contributor

Hello @ecfernandez ! Greetings.

So, I'm going to test the idea of doing it manually, by programming the number of benches and thus generating the concrete shapes. But first, I was thinking about some solution within the .pkt, editing the file's XML to try and do this. Some way for it to scan the point codes and add the shape where it's convenient. For example:

  • Let's suppose that for each drainage format I define a specific point code. For a triangular one, "Triangular Drainage," for example. This point code should be assigned to just one point, which would serve as an anchor for our shape. From there, find some way to create something within the .PKT's XML to search for all the point codes in the roadway model and if the "Triangular Drainage" point code exists, generate the triangular concrete shape. But if that's not possible, I will follow your guidance to program every possible number of benches, which is already a very good idea.

Thank you! I look forward to your reply.

0 Likes
Message 8 of 11

ecfernandez
Mentor
Mentor

Hi @Vinicius_Estrelow, I got a little confused when reading that you want to edit the file's XML... do you mean editing the coding of the pkt file itself? If so, I'm not even sure that the correct programming language for that would be XML or even if that is possible. I have no idea about that.

 

You can save some time when creating those shapes in Subassembly Composer using copy/paste into the flowchart and then modify a few point/link geometry properties to get almost everything set up.

 

I was talking about switches in the previous post, but there is another way that can get you out of that. I'll try to break down the process...

 

1. Test if you are in cut condition or fill condition. You should pick a relevant reference point to evaluate this. You can do this with an point and a decision using:

P1.DistanceToSurface(EG)>0

EG is the name of your target parameter, in the example, mine is EG. You can see this in the target parameters tab

ecfernandez_0-1759974721793.png

 

2. Now test if the cut height is greater than or at least equal to a full bench height. You would need the latter from the user. Say this max bench height is 10m. Test this with an auxiliary point and a decision.

ecfernandez_1-1759975076801.png

If the decision yields True, then draw the sideslope. Then ask if the user wants to have a gutter installed at the berm. You can test this with a Yes/No input parameter and a decision.

ecfernandez_2-1759975454247.png

 

Say, in this case the user wants the gutter. Go to step 3.

 

3. Draw the gutter with its corresponding shape, and then ask the same question of Step 2.

ecfernandez_3-1759975914484.png

 

4. Draw the sideslope, and say the gutter is desired again. Then, draw the gutter and ask again the same question of step 2. (Is cut height greater than or equal to the max bench height?)

 

For this last iteration, I'll say it is not greater than or equal to the max bench height, and will target the terrain, so you can see the full result. See next image.

ecfernandez_4-1759976298025.png

 

As you could see, the geometry gets created iteration by iteration. To save time when doing this you can, for example, create a flowchart

ecfernandez_6-1759976981699.png

 

that contains the points, links, and shapes for the gutter, and copy/paste it at each bench iteration, then change the point/link geometry properties to make it work. 

 

On the other hand, a completely different thing is if you wanted to find/replace something. Then, you must go to the Edit menu, then to find and replace, and explore the possibilities the software offers to see if what you want is actually possible.

 

ecfernandez_5-1759976502769.png

 

I hope any of the previous helps. Best regards!

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 9 of 11

Vinicius_Estrelow
Contributor
Contributor

Hello @ecfernandez ! Yes, that entire flowchart is already built in my SAC. Regarding the XML, it was just an idea I had for editing, since the .PKT file is actually a .ZIP containing several data files. When you open that zip, you find the file’s XML inside.

I believe now there really isn’t a way to create the shapes automatically. I’m following your suggestion to create them manually.

Message 10 of 11

ecfernandez
Mentor
Mentor

Hi @Vinicius_Estrelow, editing the programming of a PKT sounds very interesting, but I don't have information on how to do it, and have never seen in this forum any related information. I'm sorry not being able to help with that.

 

I hope you find any of my posts so far helpful. Best regards and good luck creating your custom subassembly.

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
Message 11 of 11

Vinicius_Estrelow
Contributor
Contributor

@ecfernandez  Thanks for the posts, I’ll mention it here if there are any updates! See you next time!