with viewBox, simplify oversimplifies

Bug #166937 reported by Bug Importer
0
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Thomas Holder

Bug Description

Select the s shape in the attached SVG file (originally
imported from CorelDraw; cut down for size and privacy
reasons).

Press Ctrl-L to simplify. The simplification is too
radical, reducing twenty-some nodes to a handful.

Now, copy the image. Paste it into a new document.
Simplify. This shows what *should* happen.

What's the difference? Beats me.

Revision history for this message
Bug Importer (bug-importer) wrote :
Download full text (4.2 KiB)

[fuck, attach didn't work. Here it is.]

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Creator: CorelDRAW -->
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"

xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="11in"
   height="8.5in"
   viewBox="0 0 11 8.5">

<path

style="fill:none;stroke:#974578;stroke-width:0.0138898;stroke-dasharray:0.069
0.042 "
   id="path826"
   d="M 0.828425,3.77693 C 0.8136415,3.77693
0.7692911,3.7473631 0.7545077,3.7473631 C
0.7545077,3.7177962 0.7397242,3.7473631 0.7397242,3.7177962
L 0.7249407,3.7177962 L 0.7101572,3.7177962 L
0.6953737,3.6882293 L 0.6510233,3.6882293 L
0.6510233,3.6734458 C 0.6214564,3.6586623
0.4736213,3.6734458 0.4292713,3.6734458 C
0.4292713,3.6882293 0.3997044,3.7030127 0.3849209,3.7030127
C 0.3849209,3.7325796 0.355354,3.7325796 0.355354,3.7325796
L 0.355354,3.7473631 C 0.355354,3.7473631
0.3257871,3.7473631 0.3257871,3.77693 L 0.3110036,3.7917135
L 0.2962201,3.7917135 L 0.2814366,3.806497 L
0.2814366,3.8212805 L 0.2814366,3.836064 C
0.2518697,3.836064 0.2518697,3.9099813 0.2223027,3.9099813 C
0.2223027,3.9247648 0.2075192,3.9838986 0.2075192,3.9986821
L 0.1927357,3.9986821 C 0.1631688,4.0430325
0.1927357,4.2500011 0.1927357,4.3091351 C
0.2223026,4.3091351 0.1927357,4.3239186 0.2223026,4.3239186
L 0.2223026,4.3534855 L 0.2370861,4.3534855 L
0.2370861,4.3830524 C 0.266653,4.3830524 0.2370861,4.3978359
0.266653,4.3978359 C 0.266653,4.4126194 0.2962199,4.4421863
0.2962199,4.4569698 L 0.3110034,4.4717533 C
0.3553538,4.4717533 0.3701373,4.5456706 0.4144874,4.5456706
L 0.4292709,4.5752375 L 0.4588378,4.5752375 L
0.4736213,4.590021 L 0.4736213,4.6048045 L
0.4884048,4.619588 L 0.5179717,4.619588 C 0.5179717,4.619588
0.5475386,4.6491549 0.5623221,4.6491549 L
0.5771056,4.6787218 L 0.5918891,4.6787218 L
0.6066726,4.6787218 L 0.6214561,4.6935053 L
0.6214561,4.7082888 L 0.6362396,4.7230723 C
0.6510231,4.7230723 0.6953735,4.7378558 0.7101569,4.7378558
L 0.7101569,4.7526393 C 0.7249404,4.7674228
0.7988577,4.7822062 0.8284249,4.7822062 C
0.8284249,4.7822062 0.8727753,4.8117731 0.8875588,4.8117731
C 0.8875588,4.84134 0.9466927,4.870907 0.9614761,4.870907 C
0.9614761,4.9004739 0.991043,4.9004739 0.991043,4.9004739 L
0.991043,4.9152574 C 1.0058265,4.9152574 1.0353934,4.9300409
1.0353934,4.9596078 C 1.0501769,4.9596078
1.0945273,4.9891747 1.0945273,5.0039582 C
1.1240942,5.0039582 1.0945273,5.0187417 1.1240942,5.0187417
C 1.1240942,5.0335252 1.1684446,5.0778756
1.1684446,5.0778756 L 1.1684446,5.0926591 L
1.1684446,5.1074426 L 1.1832281,5.1222261 L
1.1980116,5.1222261 L 1.2127951,5.1370096 L
1.2127951,5.18136 L 1.2275786,5.18136 C 1.2275786,5.1961435
1.2423621,5.2552773 1.2423621,5.2700608 L
1.2571456,5.2700608 C 1.2719291,5.2996277
1.2571456,5.4178958 1.2719291,5.4474628 L
1.2867126,5.4474628 L 1.2867126,5.6100808 L
1.2719291,5.6100808 L 1.2719291,5.6248643 L
1.2719291,5.6396478 L 1.2571456,5.6396478 L
1.2571456,5.6839982 ...

Read more...

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

The reason is that the Corel file has a viewBox attribute
which makes it think that the path is much smaller than it
is - the entire page is declared to be 11x8.5 px (not
inches). Therefore, it simplifies it aggressively because it
does not have enough precision at this small scale. If you
copy/paste the path to a normal document without viewBox,
simplifying works as intended.

Revision history for this message
Horkana-users (horkana-users) wrote :

Please try not to file anonymous requests. instead please
get an account and login so we can ask for follow up
information if necessary.

This looks like odd but expected behaviour. There is no
suggestion of how this might be solved or if it is even
solvable.

Closing this request but it can always be reopened if
suitable new information is provided.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

No, this issue is genuine. Alan, please do not close reports
only because they are anon. It has a test file that you
could test to see it's real and not "expected behavior". My
comment below says as much, basically - I never implied it's
not a bug.

Granted it's low priority because it is caused by viewBox
which we do not use and do not claim to fully support, but
nevertheless it's real. Please only close bugs which are old
AND have no test cases/confirmations/backtraces/questions
answered, and even then, please be conservative.

Revision history for this message
Bug Importer (bug-importer) wrote : adding testfile as an attachment

Other attachments

vonHalenbach (lustik)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Thomas Holder (speleo3) wrote :

it is not (only) a viewbox bug, but a "parent scale" bug

Changed in inkscape:
assignee: nobody → speleo3
status: Confirmed → In Progress
Revision history for this message
Thomas Holder (speleo3) wrote :

fixed in rev 20385

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 0.47
ScislaC (scislac)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.