Bug introduced in V9.0 or earlier and persisting through V11.3
Here's an example:
Graphics[
GraphicsComplex[
{{-1, 0}, {0, 1}, {1, 0}},
BSplineCurve[{1, 2, 3}, SplineClosed -> True]
],
PlotRange -> 1.1, Axes -> True
]
works well, but when we add FilledCurve
over BSplineCurve
, it doesn't anymore.
FilledCurve @ BSplineCurve[{1,2,3}, SplineClosed -> True]
The workaround is to keep it outside GraphicsComplex
:
Graphics[{
FilledCurve @ BSplineCurve[{{-1, 0}, {0, 1}, {1, 0}}, SplineClosed -> True],
GraphicsComplex[{{-1, 0}, {0, 1}, {1, 0}}, Line[{1, 2, 3}]]
},
PlotRange -> 1.1, Axes -> True
]
But this just adds work which I would like to avoid. Is it possible?
Could that problem have been anticipated?
Edit: Here's a response from WRI:
It does appear as though
GraphicsComplex
is misbehaving with theFilledCurve
option applied toBSplineCurve
. I have thus filed a report with our developers so that they may look in to the issue.In the meantime, as a workaround you could use replacement rules to get behavior similar to the
GraphicsComplex
functionality:Graphics[ FilledCurve@BSplineCurve[{1, 2, 3}, SplineClosed -> True], PlotRange -> 1.1, Axes -> True ] /. Thread[Range[3] -> {{-1, 0}, {0, 1}, {1, 0}}]