Hi,
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!
Chris
Spline Event Handler
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: Spline Event Handler
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.
Note that there are many pitfalls to keep in mind: what happens if the spline is deleted, copied to the clipboard, duplicated, etc.