Hi,
I wonder how to get intersection lines between two surfaces in Civil3D API. It seems that the "MinimumDistBetweenSurfaces" command in Civil3D can do this work. But I can't find corresponding API.
Can anyone help me?
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
I don't know any API function to do that, so I guess the way is like to do that manually: create a new volume-surface that shows Surf1-Surf2, set the style to show contours (just one contour at elevation = 0) and extract that contour as this is the intersection-line between Surf1 and Surf2.
Good luck, - alfred -
i tried the volume surface method but there is no function that "extract contours" in tin volume surface class. I tried to convert volume surface to normal tin surface but i got error. Do you have any other idea?
It is possible to paste the volume surface into a temporary TIN surface, extract the contour, then dispose of the temporary TIN surface. Granted, this is not a particularily elegant approach.
I found a solution to this issue with the embedded command "minimum distance between surfaces". You can find this on the analyze tab under the ground data cloumn. It couldn't be easier :). Now I'm trying to code some macro to use this command more autonomously. 🙂 Have a good day.
Yes, the "minimum distance between surfaces" is an option (as was noted in the very first post of this thread). The problem is that the API doesn't give easy access to the output of that command. The workaround I suggested (building on top of Alfred's suggestion) stays within the API:
Like I stated previously, it is not the most elegant approach but it works within the limits of the API.
I tried the method it worked well. But the cons is; It extracted the contour as a polyline without the elevation. Minimum distance between surfaces command generating 3d polyline which has elevation data. It is ready for converting to featureline to use as a surface breakline.
Do you have any idea how can i convert the programmaticly extracted polyline (contour at 0.0) to the featureline and get elevation data from one of the surface that i used for getting intersection line? (it doesnt matter which the elevation is the same for both surfaces on that line)
I would check the elevation of one of the two starting surfaces at any point along the polyline(s) and move the polyline(s) to that elevation, then convert it to a featureline.
pl.Elevation = srf2.FindElevationAtXY( GetPoint2dAt( 0 ) );
Oops. I realized I didn't think the problem through corectly and posted an incorrect solution. You will need to convert the polyline to a 3dpolyline and get the elevation for each individual vertex from the surface, then convert it to a feature line.
Hi,
>> i tried the volume surface method but there is no function that "extract contours"
Do you mean you don't find a function in the API? Then make sure you have a style for the triangulated volume modell that displays just major contours with really large intervals. That will show then only the contour at elevation 0.0.
Then run .Explode on the volume surface ==> you'll get a blockreferece, run .Explode a second time (now with the blockreference) ==> that gives you now the contours as polyline(s).
HTH, - alfred -
Yes, I believe gorkemtosun was getting at the fact that the managed API does not have .ExtractContours() or .ExtractContoursAt() methods for volume surfaces. There is a COM method .ExtractContour() available for use with volume surfaces so you wouldn't have to explode the surface. But, like the Alfred's suggested workflow, you will still need to create a surface style that displays only the contours you want to extract.
Hi,
I want to share this video:
https://www.youtube.com/watch?v=3-ZAO7UBtNs&feature=youtu.be
Simon Noyola Rivero
Application Engineer
Down to Earth Technologies, Inc.
Autodesk Authorized Consultant
Subject Matter Expert Civil&Map
Civil 3D Country kit development
para: Mexico, Central America, Caribbean & Venezuela
https://www.youtube.com/user/snoyolar
Hello,
There is a new way to do this process.
Go to Analyze, then Ground data and select Minimum Distance Between Surfaces.
It will ask you to select the 2 surfaces you want to compare, then it will create a 3D Poly where the surface intersect.
@leonardo.murte you have continued the tradition of this thread of mentioning the Minimum Distance Between Surfaces command. That command was mentioned in the very first post. The original poster was looking for a way to do the same thing as that command but only using the API.
Can't find what you're looking for? Ask the community or share your knowledge.