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}]}]})); /* ***Stools*** */ results.push(makeModel({"name": "Stools", "kind": "furniture", "forms": [{"name": "Tall Barstool", "views": [{"name": "Front", "height": 0.8789909482002258, "extra": 1.0012079744564009, "bottom": 0.0012050630855495337}, {"name": "Slightly Angled", "height": 0.8789909482002258, "extra": 1.0012192880930424, "bottom": 0.001216321999180584}, {"name": "Angled", "height": 0.8789909482002258, "extra": 1.0012192880930424, "bottom": 0.001216321999180584}, {"name": "Top", "height": 0.4042597711086273, "extra": 1.0013041924250352, "bottom": 0.0013007994394842364}]}, {"name": "Counter Stool", "views": [{"name": "Front", "height": 0.6924768090248108, "extra": 1.0008852513128281, "bottom": 0.000883686743129245}, {"name": "Slightly Angled", "height": 0.6924768090248108, "extra": 1.0010763629214054, "bottom": 0.001074050784525029}, {"name": "Angled", "height": 0.6924768090248108, "extra": 1.0011664973602852, "bottom": 0.001163782262410989}, {"name": "Top", "height": 0.3737407326698303, "extra": 1.0005802727702944, "bottom": 0.0005796001179620889}]}]})); /* ***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; }