Jump to content

Circle on a Surface


Jozi68

Recommended Posts

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

  • Jozi68

    15

  • SEANT

    7

  • Hippe013

    7

  • BIGAL

    4

Top Posters In This Topic

Posted Images

Have you looked at the .NET TinSurface.ExtractContours Method (Double)?

 

The 'Double' would be the elevation. You could progressively work your way up the surface. For each contour, though, you may have to determine which of the returned ObjectIDs points to the most appropriate polyline.

 

Once that were done, I'd be tempted to avoid the database overhead and replicate the Poly as a CompositeCurve2d. Create appropriately radiused and positioned CircularArc2d to use with the CurveCurveIntersector2d Class. Examine the returned Point2ds, determine which one is in the best direction. Then use the XY coordinates of that, along with the Elevation (Double) as Z to add to the Point3DCollection necessary for the Polyline3d constructor. You may have to dispose the polylines returned by the ExtractContours method.

Link to comment
Share on other sites

"...but there is no way we could pay $495."

 

What does your company pay you per hour? How long have you worked on solving this problem? Wouldn't it more cost effective to buy the DotSoft program so you can go back to being productive? I do hope you aren't charging a client for this.

Link to comment
Share on other sites

Thank you Seant, but I have no idea how to even start implementing this

 

ReMark may be right. It would probably take more than $495 worth of effort, even if there was a good comfort level with all the APIs involved.

 

Post an example surface(It may need to be converted to more standard AutoCAD entities). See what the board makes of it.

Link to comment
Share on other sites

Following on Seant extracting the surface mesh to 3dfaces then there is a formula to work out the Z value for a x,y you would need circle points and find required level with fuzz factor maybe 360 as a start or 2xPIx100 as in radians.

Link to comment
Share on other sites

Thanx for all the advice.

We tried getting the Dotsoft program, but they do not answer our emails, so they are not an option anymore. So I need to get this working. If I can't, I will probably not charge for it. I think my hourly rate is low enough to still make it feasible for a client.

I've attached an image (can't get the drawing to upload?)100mmContours.PNG. If the user chooses 1% as the grade, and point A as the starting point, then the program should draw the 2 yellow lines. I hope this makes sense.

pencil.png

Link to comment
Share on other sites

Even with the image posted I still don't understand what you are trying to do. I appears to me (I'm guessing here) that the yellow lines are daylight lines for some grading at the 1% from point A to the red polyline. If I understand correctly more than just a point is needed for input. Either way, I'm going to go out on a limb here and say that what you may be trying to do can be done with the tools available through the API. If you are able to write up a detailed process of what you are trying to achieve then I would be willing to take the time to write the code. I only ask that you at least attempt to learn from the code.

Link to comment
Share on other sites

OK lets see. The 2 yellow lines have two very important characteristics: The are both draped on the surface, and they both have a slope of exactly 1% ALL the way up the hill. I.e we need to build a road up this hill, from the selected point (and at the selected grade, which is 1% for now). The cars can not handle anything less than 1%, and also not anything more than 1%. Normally there should be two possibilities. So the program needs to draw these two lines.

 

I don't think a planar surface would work, as the direction of the lines change.

 

So my thinking was to create 10m radius circle with the starting point as the center. Then drape it onto the surface. Then convert to 3dPoly line with 360 nodes. This was done very successfully by the code you've provided me with. The next step would be to find the node on the circle that would give a 1% slope (if connected to the center with a line). Then we need to draw another circle with this node as the center, and repeat the process to get another 1% line. Then repeat again, and again, and again until we reach the top of the hill.

 

I hope this makes sense? Thank you for your willingness to help.

Link to comment
Share on other sites

Hmmm... Now this has just become quite interesting.

 

So essentially you are trying to find a path, up a hill, that maintains a 1% grade yet requires no cutting or filling.

 

If you don't mind I'd like to ask a question.

 

Where do you live? I mean where you are designing a road, without cutting or filling, for cars (what type of cars?) that can't be more (or less) than a 1% grade?

 

I would like to help out with this problem, but don't you think that we could come up with a better solution?

 

regards,

 

hippe013

Link to comment
Share on other sites

This post may help illustrate how I was envisioning the process.

 

I have to agree; a 1% grade is rather shallow. Are you dealing with some sort of rail car?

 

For my illustration, I used a Solid model (perhaps not overly accurate) of the Matterhorn. 1% was too shallow, so I used 100%.. Which is to say a Rise/Run of 1.

 

Two different paths were plotted (manually, in this case) along South and SouthEasterly routes up the mountain.

 

Some interesting things came to light, one being:

 

The algorithm of intersecting circles can restrict the grade, but a check would need if the local terrain did not allow for the grade.

 

As a confirmation that the two 3d Polylines maintain a point to point grade:

In the attached, the polys start from the same point, and terminate at the same elevation - as a result, their lengths are the same.

Routes.jpg

Matterhorn2.dwg

Link to comment
Share on other sites

Hello Hippe013,

I'm in South Africa, but the application would actually be used to find a path for a trench, or a pipeline, which is very sensitive to grade.

Hi SeanT,

I think that more or less sums up what I need - your images look very cool.

Link to comment
Share on other sites

Jozi68

 

Now that I understand how and why it will be used I'll see what I can come up with. It may take me a bit as I have been really busy at work, but I'm willing to give it a try.

Link to comment
Share on other sites

Jozi68,

 

I am working on a solution. It is still in progress. At this point I am creating 360 points around the center point and it will choose the point that is closest (or within a fuzz distance) of the desired slope. Once that point is selected the process will repeat itself. I am currently working on selecting the point that is closest to the desired slope. I will post my code as soon as I get that part working.

 

regards,

 

hippe013

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...