Spline Event Handler

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Newbie Member
Posts: 4
Joined: Mon Aug 26, 2013 7:06 pm

Spline Event Handler

Postby luckyChris » Fri Aug 30, 2013 9:16 am


I´m new in QCAD - want to extend the spline so that on the line circles within a constant spacing are drawn. While drawing the line, I found some functions where these points can be placed, but my question is: after drawing, when the user moves a control point, which function in SplineControlPoints is called so I can update the position of my circles on the line?

Thanks for anny suggestion!


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

Re: Spline Event Handler

Postby andrew » Tue Sep 03, 2013 2:50 pm

The only way I can think of is to install a transaction listener to get notified whenever something changes in your drawing. Based on the IDs of the object that were affected by the change you would then have to figure out each time which circles belong to which spline. This might work for the lifetime of a drawing and as long as the whole construction is not duplicated, but once the drawing is stored and reloaded from a file, the IDs change and the spline / circle relationship would be lost or would have to be reestablished.

Note that there are many pitfalls to keep in mind: what happens if the spline is deleted, copied to the clipboard, duplicated, etc.

Return to “QCAD Developers and Contributors”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests