If you can import your shape as a polygon (instead of polyline), then you can apply a cga rule to it which only colors the edges by using the comp operation to get the edges. You can hide the shapes (F11 or in viewport menu) so that you don't see the imported polygon face.
const edge_width = 0.2
ColorEdges -->
comp(e) { all: Edge }
Edge-->
primitiveCube
s('1, edge_width, edge_width)
center(yz)
color(1,0,0)