← All bug reports

FS#1407Splines: add support for knot weights, start-, end tangents

Type
Feature Request
Status
Assigned
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.13.1
Operating system
All
Reported
2016-04-01 by brorep
Votes
1

Attached DWG/DXF files are incorrectly read by QCAD.
They contain splines drawn using ZWCAD and saved as DWG/DXF version 2000.
Above splines are polylines created with autolisp routine which converts spline to polyline, so you can see how splines should actually be drawn.

First spline is created with fit points: 2,2 4,4 6,2
Then copied and applied weight of 2 on central control point.
Then copied again and applied weight of 0.5 on central control point.

Second spline is created with fit points: 6,2 8,4 10,2 with vertical start and end tangent.
Then copied and applied fit tolerance of 1 for fit points.

Third spline is created with fit points: 10,2 12,4 14,2 with horizontal start and end tangent.

Fourth and fifth spline are correctly drawn by QCAD.

Link to bitmap (converted to png) export:
External Link

Versions
QCAD version: 3.13.1.0
Date: Mar 17 2016
Qt version: 4.8.4
Compiler version: gcc 4.4.3
Build Date: Mar 17 2016
Revision:
Architecture: x86_64
OS: Linux
OS version: Unknown

Comments (3)

andrew 2016-04-01

I can confirm that fit points / knots with a weight other than 1 are currently not supported by QCAD. All fit points / knots are treated as if they have an equal weight.

brorep 2016-04-02

Not supporting weights (they are related to control points) is fine, not many users actually use them.

From what I can see, QCAD creates splines from fit points only (start/end tangent not respected), you would get better results if you create splines from control points and knots. Is this true?

andrew 2016-04-04

QCAD creates splines from fit points only (start/end tangent not respected), you would get better results if you create splines from control points and knots.

You can create splines from fit points or from control points:
Draw > Spline > Spline (fit points)
Draw > Spline > Spline (control points)

When files are loaded, fit points are used whenever available. You might be able to convert the spline with fit points to a spline with control points / knots in the source application.