Spline same info but not same shape

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
duccoder
Active Member
Posts: 30
Joined: Thu Jun 25, 2015 10:11 am

Spline same info but not same shape

Post by duccoder » Thu Dec 22, 2016 9:42 am

Hi, I use Qcad Pro 3.16.2 to draw 2 same splines on 2 layers, but it seem difference. I don't know why them difference
spline_sames.PNG
spline_sames.PNG (13.13 KiB) Viewed 4942 times
Attachments
spline_same.dxf
(188.16 KiB) Downloaded 343 times

duccoder
Active Member
Posts: 30
Joined: Thu Jun 25, 2015 10:11 am

Re: Spline same info but not same shape

Post by duccoder » Thu Dec 22, 2016 9:49 am

It render same shape on qcad 3.15.* but when open by 3.16.2 or autocad, it not same

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

Re: Spline same info but not same shape

Post by andrew » Thu Dec 22, 2016 9:54 am

Were they both created in QCAD or in another application?

One of the splines (the orange one) uses start and end tangents that differ from defaults. This is not currently supported by QCAD when creating splines. However, if such tangents are stored in the file, they are loaded and the spline is displayed accordingly.

I'd recommend to recreate the orange spline with QCAD.

duccoder
Active Member
Posts: 30
Joined: Thu Jun 25, 2015 10:11 am

Re: Spline same info but not same shape

Post by duccoder » Thu Dec 22, 2016 10:29 am

Thank Andrew for quick reply, I've found this, I think problem from rotate function (can see by use Modify/Rotate). I've quick write autostart file, you can check this:

Code: Select all

include("scripts/library.js");

var storage = new RMemoryStorage();
var spatialIndex = new RSpatialIndexNavel();
var document = new RDocument(storage, spatialIndex);
var di = new RDocumentInterface(document);

var operation = new RAddObjectsOperation();

var p1 = new RVector(52.08949, 6.319991);
var p2 = new RVector(52.098214, 6.120181);
var p3 = new RVector(55.078156, 3.103479);
var p4 = new RVector(55.277965, 3.094755);

var data = new RSpline();

data.appendFitPoint(p1);
data.appendFitPoint(p2);
data.appendFitPoint(p3);
data.appendFitPoint(p4);

var s = new RSplineEntity(document, new RSplineData(data));
operation.addObject(s);

operation.apply(document);

// problem
s.rotate(deg2rad(-4.040695825910859), new RVector(55.0621, 13.2756));

di.exportFile("C:/tmp/example.dxf", "DXF 2013");


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

Re: Spline same info but not same shape

Post by andrew » Thu Dec 22, 2016 10:41 am

Yes, I can confirm this. Bug report added at:
https://www.qcad.org/bugtracker/index.p ... sk_id=1520

Thanks for your report!

Post Reply

Return to “QCAD Troubleshooting and Problems”