Inkscape for embroidery
by Michael Soegtrop
Dear Inkscape Developers,
I added a few features to Inkscape for use in embroidery, because the
commercial tools available don't offer the artistic flexibility I want.
I would like to have your opinion on if you think it makes sense to
integrate such functionality into the Inkscape mainline, or if it would
be too much of a stretch. It boils down to some LPEs and an export
format. The commercial tool I have from Bernina (a Swiss sewing machine
manufacturer) is based on Corel Draw.
Below is a list of the additions I did / I am working on.
Please let me know what you think about this. With these additions,
Inkscape offers substantially more flexibility than affordable
commercial SW (and affordable here means 500..1000$).
Best regards,
Michael
1.) Ways to fill an area with clusters of contours
Inkscape already offers 2 path interpolation LPEs which allow this. I
plan to add a 3rd one which creates a set of equidistant inset/outset paths.
2.) A way to connect sub path of a path into one continuous path
I added an LPE to do this with various options of end interpolation.
Maybe if I use bool-ops I need to extend it with some sort of sorting,
cutting and auto reversing mechanism to keep the connections short.
3.) A way to cut a path into stitches (straight line segments) in a
controlled way.
I added an LPE to do this, but it is quite primitive as yet.
4.) Bool ops on paths because in embroidery you cannot simply hide an
object below another one.
I just added a bool-op LPE for this - needs some additional work to cut
contours against a closed path.
5.) A tool to convert graphics output to some format an embroidery /
sewing machines can read.
I wrote an external tool to convert HPGL to a common embroidery format
(stitch/DST), but could also integrate this into Inkscape.
6.) Maybe a tool to hide connections between path segments below filled
areas. For a sewing machine it is quite complicated to do a "pen up" -
it has to cut the threads, so one typically hides connection paths below
some embroidery to avoid thread cutting.
Currently I do this semi-manually. Doing this automatically might be
quite complicated.
6 years, 10 months
performance problems and possible remedies?
by Yale Zhang
Hi. I'm using Inkscape to author a comic and the slow speed for certain
things is very annoying. I'm already have OpenMP turned on and using 4
cores.
1. *large blurs are slow* - I'm an expert with writing SIMD code, so I was
thinking about vectorizing the Gaussian IIR filter with SIMD intrinsics,
even though it's harder than for a FIR. But I noticed there isn't any SIMD
code in Inkscape so does that mean it's something to avoid.
I'm pretty sure no current compiler is smart enough to vectorize it, and
besides, Inkscape is compiled with -O2, meaning -ftree-vectorize isn't on
by default.
2. *when there's a large image (raster based) background - scrolling in a
zoomed region is very slow*
I compiled the latest 0.49 code with GCC profiling and it shows this:
33.98 22.47 22.47 exp2l
21.29 36.55 14.08 log2l
17.57 48.17 11.62 pow
7.12 52.88 4.71 658 0.01 0.01
ink_cairo_surface_srgb_to_linear(_cairo_surface*)
6.72 57.32 4.44 563 0.01 0.01
ink_cairo_surface_linear_to_srgb(_cairo_surface*)
5.51 60.96 3.64 1216 0.00 0.00
Inkscape::Filters::FilterGaussian::~FilterGaussian()
5.23 64.42 3.46 internal_modf
0.59 64.81 0.39 _mcount_private
0.41 65.08 0.27 __fentry__
0.12 65.16 0.08 GC_mark_from
0.09 65.22 0.06 5579 0.00 0.00
Geom::parse_svg_path(char const*, Geom::SVGPathSink&)
0.06 65.26 0.04 35320 0.00 0.00
bounds_exact_transformed(std::vector<Geom::Path,
std::allocator<Geom::Path> > const&, Geom::Affine const&)
0.06 65.30 0.04 8 0.01 0.01
convert_pixbuf_normal_to_argb32(_GdkPixbuf*)
0.05 65.33 0.03 885444 0.00 0.00
std::vector<Geom::Linear, std::allocator<Geom::Linear>
>::_M_fill_insert(__gnu_cxx::__normal_iterator<Geom::Linear*,
std::vector<Geom::Linear, std::allocator<Geom::Linear> > >, unsigned long
long, Geom::Linear const&)
The cost is absolutely dominated by ink_cairo_surface_srgb_to_linear() and
ink_cairo_surface_linear_to_srgb(). My first instinct was to optimize
those 2 functions, but then I thought why are those even being called every
time I scroll through the image?
Why not convert the images up front to linear and stay that way in memory?
If that can't be done, then my optimization approach is:
1. replace ink_cairo_surface_srgb_to_linear() with a simple 3rd degree
polynomial approximation (0.902590573087882 - 0.010238759806148x +
0.002825455367280x^2 + 0.000004414767235x^3) and vectorize with SSE
intrinsics. The approximation was calculated by minimizing the square error
(maxError = 0.313) over the range [10, 255]. For x < 10, it uses simple
scaling.
2. replace ink_surface_linear_to_srgb() with a vectorized implementation
of pow(). Unlike srgb_to_linear(), a low degree polynomial can't be used
due to the curve having larger high order derivatives. An alternative would
be piece wise, low order polynomials.
The main question I have is what degree of accuracy is desired? Certainly,
it doesn't need double precision pow() since the input is only 8 bits! Is
+- 0.5 from the true value (before quantization) OK or do people depend on
getting pixel perfect results?
UJ
6 years, 11 months
Style dialog
by Tavmjong Bah
Hi,
One of the proposed GSOC projects is better CSS style sheet support.
There are a number of simple things that can be done to improve
Inkscape's use of style sheets and there is one big thing... adding a
Style editing dialog. I've made a first stab at designing such a
dialog.
The dialog presents a list of CSS selectors.
* Clicking on selector
Selects all matching objects in the SVG document.
* Double clicking on selector
Selects all matching objects in the SVG document and opens CSS
dialog.
* Dragging selector
Allows reordering selectors.
* Click on object
Selects all matching selectors.
* Modifying property
If "Sheet" enabled: modifies CSS of highlighted selector if only one
selector highlighted otherwise produces error message. If "Attribute"
selected: modifies inline style attribute.
* Clicking on '+' in front of selector
Adds selected objects to selector.
* Clicking on 'x' in front of object
Removes object from selector.
* Clicking on '+' at bottom
Opens up text dialog to add new selector. If the selector is a Class
selector, adds the class attribute to the selected objects with the
value of the selector name. If the class attribute already exists,
appends the selector name to the class attribute value (the class
attribute can include more than one class name).
* Clicking on 'x' at bottom
Removes selected selectors unless selector is a Class selector. If it
is a Class selector: if the selector was selected by clicking on it,
remove the selector; if the selector was selected by selecting objects,
removes the selector name from all selected objects class attribute.
This dialog could replace the "Selection Sets" dialog, using CSS class
attributes to define sets.
Please comment on the dialog here or at:
http://wiki.inkscape.org/wiki/index.php/Style_Editor
Tav
7 years, 3 months
New video three features.
by Jabiertxo Arraiza Cenoz
Hi, here are my last video. Is a kind of showcase of three features:
* Eraser tool with no width now in trunk.
* Randomize color extension now with a limit slider, also in trunk.
* Optional auto fill Delaunay triangles with color and thin stroke in
the same color. The code of this are in this bug:https://bugs.launchpad
.net/inkscape/+bug/1553497
Anyway, there is better/faster ways to make Delaunay based in a image.
So this is just a example.
http://jabiertxof.marker.es/2016/03/no-width-eraser-mode-limit-random.h
tml
Cheers, Jabier.
7 years, 4 months
0.91 performance when zoomed in
by Saar Drimer
Hello everyone,
I work with Inkscape nearly every day, but am now experiencing some
painfully slow performance with some files (that I cannot share right now,
sorry!) I'm working with Inkscape 0.91 r13725 on Ubuntu 15.10 with an
i7-5500 and 16GB of RAM.
The designs are not particularly complex, but have one feature that
might be relevant: I'm working with dimension accurate objects that
can be very small, 0.1mm and below (I design printed circuit boards).
The slowness becomes painful when zoomed in onto the small objects; it
happens when I try zooming, choosing objects, moving them, and even
changing tools from 'node' to 'select'. nearly every such operation I
get the greyed-out Ubuntu stall. Working on the design when zoomed out
is not practical, but it is quite a bit faster performing.
Another thing that's happening that could be related is the following
prompts keep appearing on the console:
(inkscape:15569): Pango-CRITICAL **: pango_font_family_list_faces:
assertion 'PANGO_IS_FONT_FAMILY (family)' failed
(inkscape:15569): Gtk-CRITICAL **: IA__gtk_tree_view_scroll_to_cell:
assertion 'tree_view->priv->tree != NULL' failed
I could not find any report for how to handle these, and discover if
they are related to the performance problems.
Searching for a solution through looking at bug reports, I've tried:
* Running with fresh preferences.xml
* Geometric bounding box
* Reducing the complexity of the design
* Hiding layers (there are 24 layers) to only ones that are relevant
for the operation (usually only two layers)
* Hiding rulers and scroll-bars
* Maximising memory and threads (with restart)
I'm out of ideas, and I hope that someone might be able to recommend
something. If there are no ideas, I'll work on a design that I can
share so that we could work though it.
Thanks,
Saar.
7 years, 5 months
Hackfest catering and venue information
by Alex Valavanis
[Can ignore if you're not attending the Hackfest!]
Hi All,
Some information about the Hackfest venue, and a request for your
dietary requirements...
== Venue ==
The Hackfest venue will be in the Evans Room at Devonshire Hall in the
Hyde Park area of Leeds [1]. It is a traditional "Oxbridge style"
stone-built hall. Our meeting room will accommodate 10 delegates.
== Catering ==
A buffet lunch will be provided each day. I will suggest that we
break for lunch at 1300 each day, unless there are any objections.
Please let me know by tomorrow if you have any special dietary
requirements.
There will also be an unlimited supply of tea, coffee and biscuits.
Sugar, milk and soy milk will be provided.
== Facilities ==
* Wireless networking
* UK mains power (remember to bring your own socket adapters if you're
coming from outside the UK!!)
* Data projector & screen
* Flipchart and pens
== Nearby amenities ==
There are a few pubs, bars, cafes and coffee shops 5 minutes walk away
from the venue if we want a change of scenery. There is also a small
convenience store.
The venue is located on the Woodhouse Ridge nature trail if you want
to step out for some fresh air [2].
== Local contact ==
I live within walking distance of the venue. Send me a message if you
get stuck! I'll also be free on the Sunday evening before the
Hackfest if anyone would like to meet for food/drink in Leeds City
Centre.
Best wishes,
Alex
[1] http://www.meetinleeds.co.uk/devonshire-hall
[2] http://www.woodhouseridge.org.uk/
7 years, 5 months
Git
by Krzysztof Kosiński
Eventually we probably need to move to Git. The user interface is
completely atrocious, but the fact it works from a single directory by
default is very convenient when using Eclipse, and Eclipse is an
elephantine monstrosity but has good code navigation. This could also
encourage more people to contribute, since almost all OSS developers
know Git, while a very limited number know Bazaar at this point.
The bug tracker and answer tracker should definitely stay on
Launchpad, but what about the code? Should we use Launchpad's nascent
Git support, or some other site like Github? What people think?
We can convert lib2geom first and apply the lessons learned to Inkscape.
Best regards, Krzysztof
7 years, 5 months
Proposal for building Windows devlibs and for windows build environment setup
by Michael Soegtrop
Dear Inkscape Team,
I have a proposal for improving the delivery for the windows libs and
for setting up a build environment.
The current method of delivering binary libs has two disadvantages:
1.) it restricts the user to a very specific binary gcc build (at least
the docs say so).
2.) it is tricky to check if this delivery method is GPL compliant.
According to GPL if you deliver binaries you also have to deliver
sources, and it is a lot of work to check all libs licenses and to check
if all required sources are in the delivery. Please note that it is NOT
sufficient to say "this is standard GPL software and you can download
the sources from the official sources". If you delivery binaries, you
have to deliver the sources.
Now to my proposal: for another open source project I created 2 scripts:
one which automatically sets up a fresh cygwin with MinGW cross support
and whatever else is needed and another one which downloads and builds a
bunch of libraries and apps from sources, including GTK, cairo and
pango. About 70% of the libs inkscape requires are built by this script,
so it wouldn't be that much work to add the remaining 30%. This does not
just setup a build environment and builds everything automatically, it
also documents exactly what was used and how it was built (and possibly
patched).
So my proposal would be to instead of delivering the libs as binaries
and lengthy instructions just deliver these two scripts. The scripts are
fairly simple and well documented. The build for inkscape and all its
libs from scratch would likely be 2..3 hours on a decent machine.
Would others appreciate such a mechanism to build inkscape on windows?
Usually it would be a single call to a DOS batch file to setup cygwin
and start the download and build process.
Best regards,
Michael
7 years, 5 months