See the top rated post in this thread. Click here

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: Polyline

  1. #11
    Active Member
    Join Date
    2007-06
    Posts
    97
    Login to Give a bone
    0

    Default Re: Polyline

    Interesting task. Would the vertices of adjacent PLINE always share a common location, or is it possible a vertex from one to lie mid-span on another – as in attached image.

    If that were the case, I’d be tempted to suggest the creation of temporary REGIONs, UNION, then EXPLODE to eliminate unnecessary geometry. Not an easy task in itself, but may be more tractable than those mid-span intersections.

    I do have some demo code for re-creating a PLINE from the constituent parts. I’ll post it if that was a method you were willing to pursue.
    Attached Images Attached Images

  2. #12
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Re: Polyline

    Hey,

    Judging by your picture I think that is what I am basically looking for. And for Ed I finally have a better description for you. Envision the drawing that Sean just posted. Im working in civil engineering. Those 2 plined areas are 2 massive drain fields. I want to be able to pick the points that the 2 drain areas share and then make a new line there so that I can have 2 separate drain fields with 2 separate areas. Basically though, I think what sean has is what I am looking for. If you wouldnt mind posting that, I would appreciate that greatly. Thanks for all of your help.

  3. #13
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,421
    Login to Give a bone
    1

    Default Re: Polyline

    Quote Originally Posted by Christopher.cornell
    Im working in civil engineering. Those 2 plined areas are 2 massive drain fields. I want to be able to pick the points that the 2 drain areas share and then make a new line there so that I can have 2 separate drain fields with 2 separate areas.
    "By George, I think he's got it!" That picture says a thousand words. It provides scope for your project and communicates limitations and project boundaries.

    It reminds me of a program I had called Tracer, a raster to vector conversion program. You could select a line and a direction and it would follow it, creating vectors. When you came to an intersection, it would pause for the user to select a direction and continue on tracing. There are potentially many possibilities for what you want to do. It should be possible to duplicate that method in vba.

    Here might be a possible process.
    Prompt the user to select an ent.
    Prompt for a direction.
    Determine which end of the ent the point is closest to.
    Do a window selection at that endpoint.
    The window size could be a 'fuzz factor' set by a user variable.
    From the resulting ss, remove the prev ent.
    If the ss count is 1, then add that ent to what will be the final pline.
    If the ss count is >1, then zoom to the intersection and prompt the user to select another ent to continue with.
    Keep repeating the process until the ss count is 0.

    If there are no intersections, the program completes almost instantaneously. The more intersections there are, the longer it takes. But each prompt is only a single pick.
    C:> ED WORKING....


    LinkedIn

  4. #14
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Re: Polyline

    Ok. Do you happen to know how to get the bulges easily. The way I am doing this is a headache. It is not seeming to work very well at all. I dont want to continue further until I can make this at least work for all kinds of polylines which is where I am basically stuck at right now. As of right now, I have the polyline I selected (closed or not) and I can get all the vertices in between the points I selected. I make a new polyline based on these points I obtained. However obviously the legs are not going to match up for both polylines so I cant just get the legs for the oldpolyline and set that to the legs of the new one. Any suggestions on how I might be able to go about doing this.

    Sean I would still like to try yours, if you dont mind. It would more than likely help me out a lot.

    Thanks for all of the help.
    Last edited by Christopher.cornell; 2007-07-31 at 06:06 PM.

  5. #15
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,421
    Login to Give a bone
    0

    Default Re: Polyline

    Use RetVal = object.GetBulge(Index)
    C:> ED WORKING....


    LinkedIn

  6. #16
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Re: Polyline

    Yeah, thats what I was using. Its just I was having a problem because my new pline didnt contain all of the coordinates of the original. So even though I got the index of the bulge for the original it didnt always transfer over right. If that makes sense.

  7. #17
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,421
    Login to Give a bone
    0

    Default Re: Polyline

    Sounds like thats a problem of your workflow logic. When you say "didn't transfer right", do you mean that the wrong segment recieved the bulge?

    If you use the plan I gave you, you are only working on one segment at a time. When you have the original, you are also working on the next segment of the pline at the same time. I havn't had time yet to closely examine the code you already posted, but if you take it one segment at a time, you shouldn't have a problem.
    C:> ED WORKING....


    LinkedIn

  8. #18
    Member
    Join Date
    2007-06
    Posts
    44
    Login to Give a bone
    0

    Default Re: Polyline

    Alright I think I got if figure it out. Thanks for all the help.

  9. #19
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,421
    Login to Give a bone
    0

    Default Re: Polyline

    Keep us posted.
    C:> ED WORKING....


    LinkedIn

  10. #20
    Active Member
    Join Date
    2007-06
    Posts
    97
    Login to Give a bone
    0

    Default Re: Polyline

    It seems I've gotten back to this thread to late to be of any help. But, it also sounds like my region based suggestion would not have been relevant; ". . .polyline I selected (closed or not)"

    But, as Mr. Jobe suggested, Keep us posted.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. 2013: z value at intersection points in 3d polyline and polyline
    By jaychandran in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2013-10-30, 05:20 PM
  2. Replies: 14
    Last Post: 2007-09-10, 05:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •