function makeFurniture() { results = []; const dataSofas = [ { name: "Two Seat", sides: { "Front": { height: math.unit(30, "inches") }, "Side": { height: math.unit(30, "inches") }, "Top": { height: math.unit(30.5, "inches") }, } }, ] results.push({ name: "Sofas", constructor: () => makeAutoVehicleGroup(dataSofas, "Sofas", "furniture") }); results.push( makeHeight( [ ["twin", 75, "inches"], ["twin-xl", 80, "inches"], ["twin-xl", 80, "inches"], ["full", 75, "inches"], ["queen", 80, "inches"], ["king", 80, "inches"], ["california-king", 84, "inches"], ], "Mattresses", "", "furniture" ) ) /* ***Tables*** */ results.push(makeModel({"name": "Tables", "kind": "furniture", "forms": [{"name": "Picnic Table", "views": [{"name": "Front", "height": 0.7535526156425476, "extra": 1.0058282909930716, "bottom": 0.005761135840809958}, {"name": "Angled", "height": 0.7535526156425476, "extra": 1.0092250922509225, "bottom": 0.009057971014492754}, {"name": "Side", "height": 0.7535526156425476, "extra": 1.0073926822157433, "bottom": 0.007284971260779868}, {"name": "Top", "height": 1.8287999629974365, "extra": 1.003046218487395, "bottom": 0.003027771977448346}, {"name": "Bottom", "height": 1.8287999629974365, "extra": 1.003046218487395, "bottom": 0.003027771977448346}]}, {"name": "Small Folding Table", "views": [{"name": "Front", "height": 0.8018024563789368, "extra": 1.0033813096412243, "bottom": 0.0033585967302146766}, {"name": "Angled", "height": 0.8018024563789368, "extra": 1.0040256234915528, "bottom": 0.003993471069651093}, {"name": "Side", "height": 0.8018024563789368, "extra": 1.003167808219178, "bottom": 0.0031478645567465553}, {"name": "Top", "height": 0.6096000075340271, "extra": 1.004279089376054, "bottom": 0.004242778915687869}, {"name": "Bottom", "height": 0.6096000075340271, "extra": 1.004279089376054, "bottom": 0.004242778915687869}]}]})); /* ***INSERT HERE*** */ results.sort((b1, b2) => { e1 = b1.constructor(); e2 = b2.constructor(); return -math.subtract(e1.views[e1.defaultView].height, e2.views[e2.defaultView].height).value; }); return results; }