walls_svg_node = {
const dpi = dims.dpi;
const scale = v => Math.round(v * dpi * 1/3);
const width = Math.round(dims.width_in_inches * dpi/2);
const height = Math.round(dims.height_in_inches * dpi/2);
const marginx = 1.00;
const marginy = 1.00;
const svg = d3
.select(DOM.svg(width, height))
.style('display', 'block')
.style('background', 'ivory');
const rect_elems = svg
.selectAll('rect')
.data(design_elems.footprint.rects)
.join('rect')
.attr('fill', 'none')
.attr('stroke', d => d.c ? d.c : 'blue')
.attr('x', d => d.name == 'fullsize' ? scale(d) : scale(d.x+marginx))
.attr('y', d => d.name == 'fullsize' ? scale(d) : scale(d.y+marginy))
.attr('width', d => scale(d.w))
.attr('height', d => scale(d.h));
const polyline_points = design_elems.footprint.polylines.map(({name, points, c}) => {
return ({name, c, points: points.map(([x,y]) => `${scale(x+marginx)},${scale(y+marginy)}`).join(' ')});
});
const polylines = svg
.selectAll('polyline')
.data(polyline_points)
.join('polyline')
.attr('fill', 'none')
.attr('stroke', d => d.c ? d.c : 'blue')
.attr('points', d => d.points);
return svg.node();
}