Determining area of Subassemblies

Determining area of Subassemblies

rolf.hoffmann
Contributor Contributor
2,359 Views
10 Replies
Message 1 of 11

Determining area of Subassemblies

rolf.hoffmann
Contributor
Contributor

Does any know how to determine the area of a subassembly, and then use that area to size a stock pile that will be connected to the same assembly?(say 1.0m from the toe of grading)

EG. lets say I have a crossfall of 5%, and I would like to grade a flat area 10m wide, (5.0m left and right of center). I would then like to take that area and size a stock pile based on the slope angle(35%) and Base width(using a formula to calc based on area and base angleof 35%)

I am aware that I can create a shape that will give me the Volume, but only after I run the corridor.

 

thanks

0 Likes
2,360 Views
10 Replies
Replies (10)
Message 2 of 11

gleeuwdrent
Advocate
Advocate

Please be a little more clear and add an image to explain your question. Do you mean the area of a shape within a subassembly? And is it a custom subassembly made in de Subassembly Composer? 

Message 3 of 11

rolf.hoffmann
Contributor
Contributor

Sorry I thought I was clear. I am using Subassembly Composer 2020 to create a sub subassembly to determine the volume of material to be removed, and then use that quantity to size a stock pile right beside the cut.  The Stock pile Subassembly has been created, so I am only look for a subassembly to determine the area/volume

 
 

Volume.JPG

0 Likes
Message 4 of 11

gleeuwdrent
Advocate
Advocate

As far as I know this is not possible within a subassembly. Calculating shape area is not a function within Subassembly Composer. Even in the .NET API for subassemblies there is no method or property to retrieve shape area. I've created my own method for that, based on this website. But that's only for .NET subassemblies, I think it's not possible to simulate the function in Subassembly Composer.

0 Likes
Message 5 of 11

Civil3DReminders_com
Mentor
Mentor

You should be able to use the formula provided by gleeuwdrent in SAC. You won't be able to use the for loop. 

((P1.X + P2.X) * (P1.Y + P2.Y)) + 
((P2.X + P3.X) * (P2.Y + P3.Y)) + 
((P3.X + P4.X) * (P3.Y + P4.Y))

I haven't tested the above formula, but it should work in SAC. 

https://knowledge.autodesk.com/support/civil-3d/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Civi...

 

Volume shouldn't matter since the stockpile and roadway section have the same average distance.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes
Message 6 of 11

rolf.hoffmann
Contributor
Contributor

Thanks for the Info. I have not had a chance to test the formula in SAC yet.

as to your last statement "Volume shouldn't matter since the stockpile and roadway section have the same average distance." yes you are correct.  the volume is not what I need, it is the area of the formula, which will be used to size the stock pile from the "get Value from" link in the assembly.

0 Likes
Message 7 of 11

mathewkol
Advisor
Advisor

@gleeuwdrent you mention that you created some code to calculate the area of a shape in .NET. "...Even in the .NET API for subassemblies there is no method or property to retrieve shape area. I've created my own method for that, based on this website...."

 

Does this mean that one can retrieve all the X and Y points of a Surface Link so that the formula can be used to calculate the area given its X and Y points?

 

Thanks.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
0 Likes
Message 8 of 11

Civil3DReminders_com
Mentor
Mentor

If you create sample lines and add the QTO materials you can get the area from the report.

SampleLineGroup.ReportQuantities(sampleLineGrp.ObjectId, qtoMaterialList.Name, tmpPath, xlsFullPath);

 

And to answer the other question, yes that is possible. I might just create a polyline in code, add the XY points to the polyline, and then get the area from the polyline. I like this approach since I can add the polyline to the drawing to check my work to see if I haven't made a stupid mistake processing the points.

 

For a subassembly in .NET, the code should look something like this: 

SampledSectionLinkCollection SampledSectionLinksArray = corridorState.SampleSection(SurfaceId, AlignmentId, BeginPt, EndPt);

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes
Message 9 of 11

mathewkol
Advisor
Advisor

Thanks, @Civil3DReminders_com . My customer needs a subassembly where there is a little fill and a lot of cut on one side. The extra cut needs to be stored in a pile on the other side. This pile needs to be shows in a custom subassembly they would like me to create. (Purple). This is why I need to calculate the area of the shape created from surface links.

SA.png

 

SAC cannot do this as far as I know. I think what you're telling me is that I can do this in a .NET subassembly. I can take that surface link and extract the X and Y coordinates, or just create a polyline as you suggest, and then get that area. My .NET subassembly would then create the 2 purple links that match the cut/fill area to store the extra cut.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
0 Likes
Message 10 of 11

Civil3DReminders_com
Mentor
Mentor

I would do it as you describe.

 

Although, based on your image, you'll have to some extra work. 

 

I would use the code to get the links across the surface, convert it into a polyline. Create a polyline for the shape you want for the grading, do the IntersectWith method between them to find the cut/fill locations, and then create enclosed polylines to get the areas of cut and fill.

 

You could also do the math to see when you are above or below the graded line to then use the surface link to find the cut fill locations without creating the polylines.

 

I use the polyline approach since its less math on my part and I usually get confused half way through on what I'm doing wrong math wise and fall back to the polyline method.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes
Message 11 of 11

mathewkol
Advisor
Advisor

Many thanks, as always Chris. You are a wealth of information.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
0 Likes