Voronoi pattern origin incorrect

Bug #1495204 reported by Bart Van Audenhove on 2015-09-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
Alvin Penner

Bug Description

See attached SVG-file.
When selecting the pink rectangle and doing Extensions > Generate from Path > "Voronoi pattern" with a border (eg. average cell size 10, border size -15), there is only one border somewhere in the middle of the pattern (see screenshots), instead of four borders on the sides.

I saw in XML editor that the rectangle has a weird y-value (namely -1.9444004e-05), but even when setting this to 0, the problem persists.

Inkscape 0.91 on ubuntu 15.04.

(Note: the attached SVG-file is a stripped down version of a more complex file, only retaining the problematic element.)

su_v (suv-lp) on 2015-09-13
tags: added: extensions-plugins
su_v (suv-lp) wrote :

Simple workarounds (to compensate the 'translate()' transformation on the parent layer):

1) apply voronoi pattern
2) select rectangle, switch to the node tool
3) drag the 'X' of the pattern handles and snap it to the top-left corner of the rectangle

or

1) add a new layer
2) move rectangle to new layer
3) nudge the rectangle with the arrow keys (e.g. a tick to the left and one back to the right) to optimize the translate() transformation into the shape parameters.
3) apply voronoi pattern

su_v (suv-lp) wrote :

Reproduced with Inkscape 0.91 r13725 on OS X 10.7.5.

<off-topic>
With 0.91+devel, there's an unrelated scale factor issue (likely due to internal resolution change) which should be tracked separately. Otherwise, the symptom is the same (the pattern is not transformed to compensate the transformation applied to the parent group/layer).
</off-topic>

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
tags: added: transformations
Alvin Penner (apenner) wrote :

attached is a proposed fix for this bug.
this can be tested by copying the file generate_voronoi.py into the directory Inkscape\share\extensions\

su_v (suv-lp) wrote :

Modified version tested successfully with Inkscape 0.91 r13783 (HEAD of stable release branch <lp:inkscape/0.91.x>) and the provided test case.

Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.92
status: Confirmed → In Progress

Proposed fix by apenner tested succesfully on voronoi_problem.svg (attached above) with Inkscape 0.91 r13725 on Ubuntu 15.04.
(the Inkscape extensions directory for me was /usr/share/inkscape/extensions).

su_v (suv-lp) wrote :

Modified version also tested successfully with Inkscape 0.91+devel r14364 using the attached px-based version of the test case.

Alvin Penner (apenner) wrote :

committed to rev 14369

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp) on 2015-09-15
tags: added: backport-proposed
su_v (suv-lp) wrote :

Fix backported to 0.91.x in rev 13815.

Changed in inkscape:
milestone: 0.92 → 0.91.1
tags: removed: backport-proposed
jazzynico (jazzynico) on 2017-01-28
Changed in inkscape:
milestone: 0.91.1 → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers