News:

Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

Main Menu

Smoothing Bezier 2D lines

Started by John W, June 21, 2024, 03:38:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

John W

Perhaps Bezier smoothing in mass is possible with the present tools? I've included part of a larger file (5 MB) of a topo map generated by arcGIS (I think, not sure, came to me as dxf, and appears to be Bezier with no spline component.) The original map was created by a lidar drone making a point cloud through a densely vegetated area. The original digital elevation model although good, could be better (less wiggly, smoother.) The topo map dxf document attached here shows 1ft elevation changes and each individual node on any particular line is about 2in apart. The topo map attached here is for a multi-acre parcel. That's a lot of nodes to edit one at a time. What I really need is an editing tool to do a smoothing function for an entire line end to end, or better yet a bunch of elevation lines from end to end. Add-ons, Scripts user have written, other 2D apps to export to and then import to TC again? I do all sort of things with TC, for money and for fun, sometimes both at the same time.

Read the adjacent general forum thread; where have all the TC users gone? So many subscription products now, TC being one of the few purchase options which is not. Pretty soon going out my front door will need a subscription. I feel old.
John W
13th Gen Intel(R) Core(TM) i7-13700K   3.40 GHz
TurboCAD3-TurboCAD2023 Platinum

Andy H

#1
Quote from: John W on June 21, 2024, 03:38:02 PMPerhaps Bezier smoothing in mass is possible with the present tools?

John.  First I must say I have no idea about topo maps.  Never used one in my life.

Second. I know this is a wish list post, but hope you don't mind me commenting on smoothing.

I don't know if its a dfx thing, or Turbocad thing, but all the lines are polylines (straight lines between each node),  which is what happens when a bezier/spline is exploded, and also happens when a file with bezier curves is saved to dxf from TC.  Also when that happens, the distance between nodes varies depending on the curvature.  with some nodes being only 0.08 inches apart. 

Smoothing is not really a problem, the problem would be getting the nodes 2 inches apart.

Regarding smoothing. If one is not bothered about the 2 inch apart per node thing, then. 
With the dfx being polylines, one can use the 'to Bezier' tool (it used to be called convert to curves tool),  with that one can set the amount of tolerance needed, for example one could convert with a tolerance of 12 inches.

As a test, make a copy of a few lined and put them on a new layer, (change their colour).  Turn off the layer visibility.  Select one of the relevant lines still in the drawing, and use the 'To Bezier' tool, inputting ones desired tolerance. Do the same with each relevant lines in turn. Turn on the new layer to compare the difference.

For existing huge node beziers, one can explode once (to polylines, then re-convert to Bezier.

Sorry, whilst this is probably not what you mean,  I thought it worth mentioning. 


nikkipollard

Andy's method sounds like a good solution.

It is a pity all the old attachments have been deleted from the forum.

https://forums.turbocad.com/index.php?topic=6717.0

Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

murray dickinson

I can recommend another program, free but requiring registration, Marcus Bole's PolyCAD, polycad.co.uk.  It can switch polyline to bezier or spline and switch the other way.  Polylines node edited parametrically: number of nodes in the pline, distance between nodes, with curvature combs.  Exchanges .dxf, IGES for curves.

John W

Quote from: Andy H on June 22, 2024, 01:10:45 AMAs a test, make a copy of a few lined and put them on a new layer, (change their colour).  Turn off the layer visibility.  Select one of the relevant lines still in the drawing, and use the 'To Bezier' tool, inputting ones desired tolerance. Do the same with each relevant lines in turn. Turn on the new layer to compare the difference.

Sorry for the delay, just getting over a bought of Covid last weekend. Did another layer to see the difference and played around with the tolerances of both the "converts to curves" and "converts to Arcs polylines" tools and I do see differences before and after. Though TC is trying desperately to be faithful to the original set of lines. In doing so, when it comes to the tighter more densely packed node sections of the original polyline it disregards my tolerances. I tried 12in, 24"...160in and in the tighter areas it would leave a node much less than my given tolerance from another node to maintain the tighter turns. I could easily be missing some part of either tool which may give a more dramatic change. Thought an answer did not exist, hence the wish. Will keep the exploration with these two tools going.

Yes, and thanks too for the nomenclature of Beziers and polylines. still a little unclear of Beziers and splines or if Beziers are just a set of splines? Appreciate getting on the same page so we can discuss such things.

Quote from: murray dickinson on June 23, 2024, 05:58:18 AMI can recommend another program, free but requiring registration, Marcus Bole's PolyCAD, polycad.co.uk.  It can switch polyline to bezier or spline and switch the other way.  Polylines node edited parametrically: number of nodes in the pline, distance between nodes, with curvature combs.  Exchanges .dxf, IGES for curves.

Thanks Murray for the recommendation of Marcus Bole's PolyCAD. What a completely knowledgeable complex curve wizard! Suppose as a ship designer, one would have to be. Intimidating. perhaps I made need such a set of tools to get what I need done.

I sincerely appreciate the thoughts!
John W
13th Gen Intel(R) Core(TM) i7-13700K   3.40 GHz
TurboCAD3-TurboCAD2023 Platinum