Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get cell on Gridded Surface

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
anhtrung
693 Views, 6 Replies

Get cell on Gridded Surface

Hi everybody,

 

I have a question that is i want to get cells on gridded surface, i get show gridded in display surface and get all it.

I'm using by C.#.

Thanks so much

 

6 REPLIES 6
Message 2 of 7
Jeff_M
in reply to: anhtrung

Is this what you are looking for? From the help file:

2019-09-30_6-37-53.png

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 7
anhtrung
in reply to: Jeff_M

i don't find cells on type gridsurface, i mean that is show gridded on tinsurface, and get cells from it.

2019-09-30_20-47-47.png

 

Message 4 of 7
Jeff_M
in reply to: anhtrung

OK, you have TinSurface displaying the Gridded. The only thing I see is to use the ExtractGridded() method to extract the grid cells. There is an example of this in the help:

// Extract a grid from the surface and print information about it:
// 
ObjectIdCollection gridlines;
gridlines = surface.ExtractGridded(SurfaceExtractionSettingsType.Plan);

write("# of extracted grid lines extracted: " + gridlines.Count + "\n");1int i = 1;
foreach (ObjectId gridLineId in gridlines)
{
    // Gridlines are polyline3d objects
    Polyline3d gridline = gridLineId.GetObject(OpenMode.ForRead) as Polyline3d;
    write(String.Format(" Gridline #{0}: Length:{1}  Start:{2}  End:{3}\n",
        i, gridline.Length, gridline.StartPoint.ToString(), gridline.EndPoint.ToString()));
    i++;
}
Jeff_M, also a frequent Swamper
EESignature
Message 5 of 7
anhtrung
in reply to: Jeff_M

i want to get cell and create polyline from cell. Can you help me how to do that ?

2019-09-30_22-24-34.png

 

 

Message 6 of 7
Jeff_M
in reply to: anhtrung

I'm not sure I can help any further. Using the ExtractGridded() returns 3dPoly's that run horizontally and vertically between the edges of the surface. There are no vertices present for where they intersect one another, instead having vertices at the intersection with the TIN lines. It will take far more time than I have available to create the tools needed to create the cell boundaries. And what to do at the non-square edge cells? Sorry, and good luck!

 

2019-09-30_11-18-50.png

Jeff_M, also a frequent Swamper
EESignature
Message 7 of 7
anhtrung
in reply to: Jeff_M

 Thanks for your support to me, i think i will another way, because i want to get volume by polygon follow gridded on surface.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report