Description of the problem
Hi!
Problem description:
I have a svg path with holes and i want to extrude geometry from it, everything is fine except usecase where i have a isolated inner figure in source svg path
here is a fiddle with example of problem
at top of the scene: is the final result of extruding
at bottom: separated subshapes, one hole related to another polygon
edit: i dig into three.js code and figured out that is a bug of ShapePath.toShapes method.
the part of code with detection of correct hole target is bugged. case when one area enclosed my another (countour hierarchy) is not handled properly
Three.js version
- Dev
- r91
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
- any
I would call it an SVG option, set by the SVG
fill-rule
property.It is a three.js standard, however — subject to the value of the
toShapes()
argumentisCCW
.Note that three.js fills by triangulation, while SVG fills per pixel.