Offset on full ellipses

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
marzof
Junior Member
Posts: 23
Joined: Tue Mar 18, 2014 5:47 pm

Offset on full ellipses

Post by marzof » Fri Feb 26, 2016 4:10 pm

Hi,
I noticed that the offset tools on full ellipses is not working on open source version (after disabling pro plugins) of QCAD 3.12.8. I noticed the issue using Linux (Ubuntu) and Windows 7.
The issue doesn't show up on trimmed ellipses.
I think it's related to the ShapeAlgorithms.getOffsetEllipses() function and, notably, it's seems related to the nature of the new entity (being a polyline or a spline).
It seems to me that the lines

Code: Select all

if (isFullEllipseShape(shape)) {
   spl.setPeriodic(true);
}
are the reason of this unexpected behavior since setPeriodic is not a method of polylines.
Am I right?

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

Re: Offset on full ellipses

Post by andrew » Mon Mar 07, 2016 9:08 am

Moved to QCAD Community Edition forum.

marzof
Junior Member
Posts: 23
Joined: Tue Mar 18, 2014 5:47 pm

Re: Offset on full ellipses

Post by marzof » Fri Mar 18, 2016 6:44 pm

Hi,
in order to solve the bug I made a little change in ShapeAlgorithms.js (scripts folder).
In ShapeAlgorithms.getOffsetEllipses function I replaced the lines

Code: Select all

            if (isFullEllipseShape(shape)) {
                spl.setPeriodic(true);
            }
whit these lines:

Code: Select all

            if (isFullEllipseShape(shape)) {
                if (isSplineShape(spl)) {
                    spl.setPeriodic(true);
                }
                else {         // is Polyline
                    spl.setClosed(true);
                }
            }
I hope it helps.
Bye

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

Re: Offset on full ellipses

Post by andrew » Mon Mar 21, 2016 9:33 am

Thanks. The fix has been applied.

Bug report:
http://www.qcad.org/bugtracker/index.ph ... sk_id=1399

Post Reply

Return to “QCAD Community Edition”