from spline to polyline - how to reduce the segment count?

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
chattermark
Junior Member
Posts: 24
Joined: Sun Oct 12, 2014 8:30 am

from spline to polyline - how to reduce the segment count?

Post by chattermark » Mon Aug 22, 2016 8:34 pm

Hi all,
my task: convert a spline derived from actual measurements on my boat (height of a coaming rim, to be the base for a new solid dodger / pilot house) to a polyline. Furtheron, the result shall be integrated into the shape of a window frame for the dodger. Frame and window are to be waterjet-cut.

The red line in the attached dxf file is a spline derived from 12 points. The green line is the result of exploding a shifted copy of that spline (factor already set down to 2). I want to reduce the number of segments that this polyline is composed of. I tried polylinesimplify with various tolerance settings - no change. Then I saw that a tool named polylinenormalize exists - but I did not find any information on its purpose and usage.

My goal is to reduce the polyline to, say, 20 or so (order of magnitude) segments. Yes, I could purge single points manually, but if there is a parametrized way - I've got some more lines to process...

Thanks in advance!

Cheers,
Ulli
Attachments
bb-seite-hinten-gesamt-2.dxf
spline2polyline-segment count reduction example
(107.89 KiB) Downloaded 482 times
Don't try to fix it if it ain't broken.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: from spline to polyline - how to reduce the segment coun

Post by andrew » Tue Aug 23, 2016 8:28 am

Before exploding, go to Edit > Application Preferences > Modify > Explode and adjust the spline approximation tolerance (e.g. to 1). This will give you a lot less nodes when exploding.

chattermark
Junior Member
Posts: 24
Joined: Sun Oct 12, 2014 8:30 am

Re: from spline to polyline - how to reduce the segment coun

Post by chattermark » Tue Aug 23, 2016 3:54 pm

Andrew, thanks for the comment. As I wrote:
The green line is the result of exploding a shifted copy of that spline (factor already set down to 2).
I had done that already, but not to 1, only to 2 - I'll give that another try!

[Edit:] Just saw that I had changed the spline segments parameter, not the spline tolerance. That looks better now! [/Edit]

Cheers,
U.

[Edit2]PS: Who ate the 't?' in the subject line?[/Edit2]
Don't try to fix it if it ain't broken.

benjamindahl
Junior Member
Posts: 11
Joined: Mon Aug 20, 2018 4:23 pm
Location: Berlin, Germany

Re: from spline to polyline - how to reduce the segment count?

Post by benjamindahl » Mon Aug 20, 2018 5:02 pm

Hhm, for my opinion the results are unsatisfying, as I posted here: https://www.qcad.org/rsforum/viewtopic. ... nes#p21518
I'd love to have a higher accuracy with less points.

Cheers. Benny

Post Reply

Return to “QCAD 'How Do I' Questions”