Some time ago Headwar asked here in the forum how to enable Geometry
Constructions tools, internally known as LPE Tool. I very nearly forgot
about it, sorry about that. So here is the howto and more :)
The idea of the tool was to provide simple CAD drawing features like drawing a circle throw 3 points or drawing a bisector.
Before you go for it, I want to give an extra warning that the tool is
highly unfinished. It was a GSoC 2008 project, but wasn't finished in
time for the next releases and so got somewhat unmaintained. I don't
think it was really touched ever since then, even though Maximilian, who
created it, hasn't abandoned hope to return and give the tool all the
love it really deserves :)
The simple step-by-step guide is based on the current revision number
9760, trunk (that is, the future 0.49). But I see no reason for this not
to work with 0.48.
1. Open src/widgets/toolbox.cpp and go to line 1851. It looks like this:
Code
// " <toolitem action='ToolLPETool' />"
2. Uncomment it by removing double-slash in the beginning of the line
3. Save the file, close it. The tool will be enabled in toolbox now, but
since it relies on several live path effects, we have to enable them as
well.
EDIT: as su-v points out, you can just uncomment line 9
("//#define LPE_ENABLE_TEST_EFFECTS") in 'src/live_effects/effect.cpp'),
so you can do that and skip steps 4-5.
4. Open src/live_effects/effect.cpp, go to line 87. The #ifdef endif
section contains all the live path effects that are disabled by default.
presumably there is a way to build them by passing some variable for
,.configure script, but this is where my skills are badly lacking, so
I'm giving you the wrong advice to edit the file :)
5. Cut and paste all the lines with effects you want from this section
to the part after endif. The lines you need just for the tool are:
7. The last change you can do, even though it's not critical, is
enabling the tool in Preferences dialog. Open
src/ui/dialog/inkscape-preferences.cpp, go to line 544 and remove '//'
from this and the next line. You should have something like
Code
//LPETool
// commented out, because the LPETool is not finished yet.
//this->AddPage(_page_lpetool, _("LPE Tool"), iter_tools, PREFS_PAGE_TOOLS_LPETOOL);
//this->AddNewObjectsStyle(_page_lpetool, "/tools/lpetool");
8. Run the usual ./configure && make && make install routine.
Now when you start Inkscape, the tool is in the very bottom of the toolbar:
And here are the modes:
Curiously, Ruler LPE was considered generic enough to be included and
it's available in regular Inkscape release. You can see it used in the
demo of Mirror Symmetry mode in the video below.
In case you are wondering, what other disabled LPEs do, here is a quick guide.
doEffect stack test — just applies all avaliable effects to try to crash Inkscape. No practical use at all.
Boolops — boolean operations with paths, can be quite
handy for Spiro splines when you want e.g. an O glyph out of two Spiro
ellipses, but it crashes Inkscape too easily.
Dynamic stroke — was an early attempt at calligraphic live path effect. Doesn't work at all.
Extrude — does exactly what you think except it is of a
very limited use. I don't remember the last time I used it, so I don't
really know if it's any stable.
Lattice Deformation — gives you the usual 16 point over
a path that you can drag around to deform that path. Interestingly the
effect was introduced to Scribus (using same lib2geom library Inkscap
uses for that) back in 2008 and demoed at Libre Graphics Meeting in
Wroclaw. Andy Fitzsimon was its first official user :) Here is a photo
of that happening (sorry for the quality)
I think it was Franz's (principal Scribus developer, on the left below) birthday too. He came for just one day.
Power stroke — this is work in progress by Johan
Engelen (the guy who came up with live path effects in the first place).
We discussed the design of this LPE back in May at Libre Graphics
Meeting (see the interview published yesterday). The point of it is that
you can variate width of a stroked path. I haven't played much with it
yet, it's more or less stable for me, but severely lacks polishing. Will
definitely be fun for type designers once it's finished (or maybe even
now). It's available only in trunk, you won't find it in 0.48, I think.
Rotate copies — I loved this effect and was sorry to
see it excluded from all releases. It creates a user-defined amount of
copies of selected path at a given step in degrees and rotates them
around a point you can set.
Recursive skeleton — I could never figure out how it works. You tell me :)
You can enable them all and have a look yourself :) Just keep in mind
they are heavily untested and will beyond all doubt crash your lovely
Inkscape that you surely want to keep away from evil destruction :)
But I'm writing this also in the hope that someone interested could step
up and clean all this to make it available for everybody. And probably
add a Measure mode ;)
Edited by prokoudine on 14-09-2010 15:55
Huge thanks Prokoudine, that's an amazing work ! And
thanks a lot for the surprise video which indeed, is a great surprise !
Thank you again - and I appreciate the dedication
I hope your work will attract developpers' attention and this tool will
be resurrected for everyone to use. According to your video, the tools
are more than promising, and I'm going to try it right now. Did I
mention the video was great ?
Thank you again, especially knowing how busy you are.
Edited by Headwar on 15-09-2010 22:37
A quick note to say it works fine with 0.48 release's source code.
And those tools are really great, they just lack a little stability and
ease of use. They are nevertheless very close to being usable. Looks
like most of the job has been done and it just needs polishing : an U.I.
designer to think of a way to make the right tools available, and
behave as a firstcommer would expect, and a developper to apply those
ideas - using the existing functions.
As an exemple : the (impressive) "tangent to curve" LPE works great but :
- it's disturbing at first that the primary shape disappears (as for most LPEs...)
- it takes time to understand the parameters
- the most usefull one ("Location along curve") is not interactive but a (senseless for the average user) number.
Imagine if this LPE was a tool in the toolbar. You'd select a curve,
click this button and a (blue, red, or whatever) line would appear and
move along the curve as you move the mouse :
As you would click a second time, the line would be fixed at this
position. That would be very user-friendly ("Inkscapely", I'd say), and
all the functionnal programming is already in place :
- clicking the tool would create a clone of the selected shape and apply
the LPE to this clone (so that it doesn't erase the selected shape),
and the initial value of "Location along curve" would be the point of
the curve closer to the mouse pointer. A message in the status bar would
say "Click again to fix the location". The line color of the tangent
would be set to something showing it's selected (say, red, maybe dotted)
- As you'd move the mouse, the "Location along curve" parameter would be refreshed to stay the closer point of the curve
- As the LMB is clicked, the "Location along curve" parameter would no
longer be tied to the mouse position and the line color would be applied
to the newly created tangent. The message from the status bar would be
cleared.
Does it sound do-able from a developper point of view ?
Edited by Headwar on 18-09-2010 02:23
Ah. Well, I think I failed to make a special note in the initial posting
that it's all geeky stuff about tweaking and compiling source code of
Inkscape. It's not exactly difficult to do on Linux, because it's just a
handful of commands (albeit it might feel weird when you do it first
couple of times), it's somewhat more complicated on Mac as far as I can
say (at least more handiwork), and it's rather difficult on Windows.
So unless you are using a Linux distribution like Ubuntu, I wouldn't
recommend going through several circles of hell just to try a feature.
I'm sorry if I disappointed you If somebody creates a Win or Mac build (I don't know which system you are on), I can let you know.
But if you are on Linux and feeling brave, you need to download source
code, unpack its archive, and there you will find all the files
mentioned above.