We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Spline tutorial 2

From LibreCAD wiki
Revision as of 19:16, 4 June 2014 by Ferdi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

After you finished Spline tutorial 1 you may be ready for some additional remarks.

Splines in Librecad are special:

  • (Closed) splines cannot be filled by hatching.
  • Many line/circle operations are not possible, eg dividing by Modify / Divide.
  • The number of spline elements are defined globally.
  • In contrary to eg circles splines are not independent of scaling. Large magnification reveals its basic straight lines.
  • Splines can be transformed into single lines, but lines cannot retransformed into splines.

The setting Edit / current drawing preferences / splines specifies the number of elements between spline fixpoint.


Fc spldeg.png


In the upper diagram the number of segments are 2 and 32 respectively. There are 5 fixpoints and you may expect around 8 and 128 segments in total respectively. The different curves compare the influence of the degree of splines.

The diagram is a composition of two images. In the moment you change the preferences all splines in the drawing will change.

Splines are usefull for vectorizing of images.


Lc splnft.png


Please open a new layer (Layer / Add new layer) and import the image you wish to convert into lines by Draw / Insert image. This way you can switch it on and off. Change back to the layer where you will collect your drawing. Because splines are limited in their post processing options try to avoid them. In the example the left inner circle was approximated by the 3-point circle tool ( Draw / Circle / 3 points). The same would be possible with the outer circles. You might divide and delete the inner cutting lines of the two big circles later.

But there may be elements with are neither circles nor ellipses. The thick upper line shows the approximation of the boundary by a spline. The higher the gradient of the image the more fixing points should be set.
After finishing the spline drawings change to edit mode. Select (click) the spline and you should see the blue fixpoints. You may move them around in order to improve the fitting. The fitting will be problematic near discontinouus boundaries, like the crossing point between the two circles.

If the global fittig is good enough you may explode the spline (Modify / explode, select spline, <enter>). Please remember that you cannot reverse this step. Now there is a collection of straigh lines. Each single line can be selected and addopted to the sharp corner between the two circles.