Explode spline to polyline with line segments

Drop in here to discuss whatever you want.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

Explode spline to polyline with line segments

Post by CVH » Sat Aug 25, 2018 9:20 am

Andrew,

Still version 3.21.1.0 ; Win7 32bit.

Is there a reason why exploding splines to polylines with line segments yields 4 times the number of nodes per segment set in App Prefs.
Example included.

reading http://www.qcad.org/bugtracker/index.ph ... sk_id=1479
This should be 2 in version 3.15.5.
Nowdays it is configurable.

Regards
Attachments
Text Explode Spline 2 linesegments.dxf
(157.15 KiB) Downloaded 499 times

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

Re: Explode spline to polyline with line segments

Post by andrew » Mon Aug 27, 2018 11:57 am

N segments are created per control point. This is to make sure composite splines are exploded with the same resolution as simpler splines.

CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

Re: Explode spline to polyline with line segments

Post by CVH » Mon Aug 27, 2018 12:40 pm

[quote=andrew post_id=21574 time=1535367473 user_id=2]
N segments are created per control point. [/quote]

???
Fitpoint spline has 10 fit points and 14 knot vectors.
Control spline has 12 control points and 14 knot vectors.
Both splines are qubic and have 9 segments.
Yields:
N=2 => 73 vertexes = 9 x 8 +1 nodes
N=4 => 145 vertexes = 9 x 16 +1 nodes
N=8 => 289 vertexes = 9 x 32 +1 nodes
that is 4 times N times #segments plus one.

Post Reply

Return to “Chat”