Jump to content

Polyline drawn with multiple vertices from two pick points?


Recommended Posts

Posted

Does anyone have a routine (I've searched but can't find) to draw a straight polyline with a vertex every metre (or other specified distance). Also useful would be the option to 'equal segment lengths'.

 

So, if a polyline was drawn by picking two points, start and end, and the line had a length of, say, 7.2m then there would be the option to add a vertex every metre, leaving the last segment length at 0.2m, or, each segment length would be the same - 7 segments at 1.028571428571429m (I didn't work that out in my head!).

 

I see that if the user picks more than two initial points then the routine would have to treat each initial segment individually. Would also be useful if it worked with arcs.

 

Like I said, I have looked but couldn't find anything.

 

Regards

Demesne

Posted

It kind of sounds like you are laying out stationing (chainage). Is that what this is about?

Posted

Ah, no. I'm fitting polylines to sections of point cloud data. The software I'm using doesn't add vertices to lines to give a better fit, it just fits the line you give it. So, if I draw a line through a section of cloud data (one vertex at either end) the software will fit that line to the data based on tolerances I've specified. If the cloud data is actually depicting a slight arc then it will still try and fit a line. Therefore, if I give it a polyline that has several vertices it will fit that polyline to the data more accurately as the 'shape' I'm fitting has more flexibility than a rigid line.

 

I hope that makes sense.

Posted

I'm just trying to find a way to speed things up. I'm currently fitting a polyline and then adding vertices where I think they're required, then re-fitting the polyline. ...and maybe adding more vertices ...and then re-fitting.

If I could just pick two points for the start and end of a polyline that has multiple vertices and fit that It would save a lot of time. I could then 'weed' the polylines to remove unnecessary vertices (I'd use CadTools for that).

Posted

Polyline with two vertices doesn't fit well:

 

Line Fit.JPG

 

Polyline with multiple vertices fits better:

 

Polyline Fit.JPG

Posted

What if you could interactively add or delete a polyline vertex by picking a point on the line with your mouse? Would that be a practical solution?

Posted

I'm sort of doing that already by hovering on the grip and using 'Add Vertex'. I was just hoping to draw a polyline that had the vertices to start with.

 

I'm a demanding CAD user. I expect too much from my software!

Posted

I think someone over at The Swamp may have already anticipated your thread and wrote a lisp routine that will add vertices. Lee mac might know. He's a member of that forum as well as this one.

Posted

Anybody interested in the solution should follow the link Lee Mac has posted above.

 

Excellent solution. Thanks Lee (&CAB). :)

Posted

Ah, I see Lee Mac came to your rescue. Good.

Posted

Yes. Thanks for the push in the right direction. ;)

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...