@@ -15,6 +15,7 @@ import { __sampleAttribs } from "@thi.ng/geom/internal/vertices";
15
15
import { withAttribs } from "@thi.ng/geom/with-attribs" ;
16
16
import { concat } from "@thi.ng/transducers/concat" ;
17
17
import { map } from "@thi.ng/transducers/map" ;
18
+ import { mapcat } from "@thi.ng/transducers/mapcat" ;
18
19
import { takeNth } from "@thi.ng/transducers/take-nth" ;
19
20
import type { ReadonlyVec } from "@thi.ng/vectors" ;
20
21
import type {
@@ -92,10 +93,9 @@ export const asAxiDraw: MultiFn1O<
92
93
93
94
// used for all shapes which need to be sampled
94
95
circle : ( $ , opts ) =>
95
- __polyline (
96
- asPolyline ( applyTransforms ( $ ) , opts ?. samples ) . points ,
97
- $ . attribs ,
98
- opts
96
+ mapcat (
97
+ ( line ) => __polyline ( line . points , $ . attribs , opts ) ,
98
+ asPolyline ( applyTransforms ( $ ) , opts ?. samples )
99
99
) ,
100
100
101
101
complexpoly : ( $ , opts ) =>
@@ -114,7 +114,11 @@ export const asAxiDraw: MultiFn1O<
114
114
// ignore sample opts for polyline & other polygonal shapes
115
115
// i.e. use points verbatim
116
116
polyline : ( $ , opts ) =>
117
- __polyline ( asPolyline ( applyTransforms ( $ ) ) . points , $ . attribs , opts ) ,
117
+ __polyline (
118
+ asPolyline ( applyTransforms ( $ ) ) [ 0 ] . points ,
119
+ $ . attribs ,
120
+ opts
121
+ ) ,
118
122
119
123
group : ( $ , opts ) => __group ( < Group > $ , opts ) ,
120
124
}
0 commit comments