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: 

Getting intersection of tin lines and a polyline

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
stacy.dunn
683 Views, 4 Replies

Getting intersection of tin lines and a polyline

Is it possible to locate the xy coordinates of the intersection of a polyline and the edges of TIN lines on a surface?  I am looking for a way to programattically flatten a polyline to a surface and add vertices to it where they cross TIN lines.

 

Thanks

Stacy

Stacy Dunn
4 REPLIES 4
Message 2 of 5
Jeff_M
in reply to: stacy.dunn

In .NET: the SampleElevations() method takes a Curve.ObjectId as an argument and returns a 3dPointCollection of all the TIN or GRID intersections with that curve.

 

In COM: the SampleElevations method takes 2 points and returns any intersections found along the line between them. So as long as you pline has no arcs you could go segment to segment. 

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 5
stacy.dunn
in reply to: stacy.dunn

Jeff,

Thank you for the quick response and information. 

 

Stacy

Stacy Dunn
Message 4 of 5
Partha.Sarkar
in reply to: Jeff_M

And there are some relevant blog posts in IM DevBlog -

 

http://adndevblog.typepad.com/infrastructure/2012/04/want-to-use-only-startpoint-and-endpoint-as-inp...

 

http://adndevblog.typepad.com/infrastructure/2012/04/using-sampleelevations-in-autocad-civil-3d-2013...

 

Hope this helps.

 

Thanks,

Partha



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
joantopo
in reply to: Partha.Sarkar

Great!! I will have to modify my own "maptrim"(vaciado areas) utiility because I created specifically a new feature line from entity(boundary) to do that using GetSurfaceIntersectPoints() method. Autodesk.AECC.Interop.Land.AeccLandFeatureLine oFtrLn = (Autodesk.AECC.Interop.Land.AeccLandFeatureLine)lineaCaract.AcadObject; Autodesk.AECC.Interop.Land.AeccSurface oSupLn = (Autodesk.AECC.Interop.Land.AeccSurface)sup.AcadObject; double[] punts = null; try { punts = oFtrLn.GetSurfaceIntersectPoints(oSupLn); } catch { }
Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes

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

Post to forums  

Rail Community


Autodesk Design & Make Report