incorrect fill with complex 2D curve (coming from an svg import) #43902

Closed
opened 2015-03-05 19:20:09 +01:00 by John Allwine · 9 comments

System Information
Mac OS X 10.10.1

Blender Version
Broken: 2.72b

Short description of error
When I import this svg, blender doesn't fill it correctly. The svg was exported out of the GIMP (2.8.4) from a selection that was converted to a path. It opens and fills correctly in Inkscape (0.48.5 r10040).

svg_import.blend

logo.svg

Exact steps for others to reproduce the error
Import attached SVG file into an empty blender file. The attached blend file shows the results of a previous import that is scaled up.inkscape.png

blender_bug.png

**System Information** Mac OS X 10.10.1 **Blender Version** Broken: 2.72b **Short description of error** When I import this svg, blender doesn't fill it correctly. The svg was exported out of the GIMP (2.8.4) from a selection that was converted to a path. It opens and fills correctly in Inkscape (0.48.5 r10040). [svg_import.blend](https://archive.blender.org/developer/F147448/svg_import.blend) ![logo.svg](https://archive.blender.org/developer/F147449/logo.svg) **Exact steps for others to reproduce the error** Import attached SVG file into an empty blender file. The attached blend file shows the results of a previous import that is scaled up.![inkscape.png](https://archive.blender.org/developer/F147451/inkscape.png) ![blender_bug.png](https://archive.blender.org/developer/F147452/blender_bug.png)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @jallwine

Added subscriber: @jallwine

Added subscribers: @ideasman42, @Sergey, @mont29

Added subscribers: @ideasman42, @Sergey, @mont29

@jallwine please do not report bugs about old Blender versions, official one is currently 2.73a, and we are about to release 2.74…

Anyway, even with current master I can confirm issues here, yet looking at the curve it seems valid (i.e. no ugly overlapping afaics). Looks like scanfill is failing (due to curve being too complex?).

Campbell, Sergey, think you know that area of code much better than me?

@jallwine please do not report bugs about old Blender versions, official one is currently 2.73a, and we are about to release 2.74… Anyway, even with current master I can confirm issues here, yet looking at the curve it seems valid (i.e. no ugly overlapping afaics). Looks like scanfill is failing (due to curve being too complex?). Campbell, Sergey, think you know that area of code much better than me?
Bastien Montagne changed title from incorrect fill when using svg import to incorrect fill with complex 2D curve (coming from an svg import) 2015-03-06 10:14:52 +01:00

It's most likely just a self-intersection happening somewhere across those pile pf vertices.. This situations are handled differently in Inkscape and Blender.

It's most likely just a self-intersection happening somewhere across those pile pf vertices.. This situations are handled differently in Inkscape and Blender.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2015-03-06 10:29:09 +01:00

There are two intersecting islands in the area highlighted with the grease pencil there: http://www.pasteall.org/pic/show.php?id=84854

This confused inner/outer detection of the scanfill. Sure improvements are possible, but it's how scanfill always worked. Just avoid having such situations.

Thanks for the report anyway!

There are two intersecting islands in the area highlighted with the grease pencil there: http://www.pasteall.org/pic/show.php?id=84854 This confused inner/outer detection of the scanfill. Sure improvements are possible, but it's how scanfill always worked. Just avoid having such situations. Thanks for the report anyway!
Author

Just because that's how it's always been doesn't mean that it's not a bug. Does it give good results in other situations? Seems like matching other popular open source projects is a good idea (Gimp and Inkscape). How might I fix this situation?

Just because that's how it's always been doesn't mean that it's not a bug. Does it give good results in other situations? Seems like matching other popular open source projects is a good idea (Gimp and Inkscape). How might I fix this situation?

@jallwine, its not a bug because the code is working as intended.

Of course adding support for self intersecting curves could be a useful enhancement.

@jallwine, its not a bug because the code is working as intended. Of course adding support for self intersecting curves could be a useful enhancement.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43902
No description provided.