<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>cabinetry — Onshape</title>
        <link>https://forum.onshape.com/</link>
        <pubDate>Sat, 24 Oct 2026 21:24:50 +0000</pubDate>
        <language>en</language>
            <description>cabinetry — Onshape</description>
    <atom:link href="https://forum.onshape.com/discussions/tagged/cabinetry/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Custom Feature: Material &amp; Grain definition + Grain Layout for sheet goods</title>
        <link>https://forum.onshape.com/discussion/31941/custom-feature-material-grain-definition-grain-layout-for-sheet-goods</link>
        <pubDate>Thu, 08 Oct 2026 22:19:34 +0000</pubDate>
        <category>FeatureScript</category>
        <dc:creator>jānis_brencis</dc:creator>
        <guid isPermaLink="false">31941@/discussions</guid>
        <description><![CDATA[<p><strong>TL;DR</strong>: FS kit to tag parts with material, finish and grain direction + a grain-oriented-layout feature, ready for a drawing callouts and CNC file prep.</p><p><a href="https://cad.onshape.com/documents/9f4974129b73ab17a8814db7/w/2a62f76c5318a9495d7520f4/e/68b6dbfb695cca91b5834e8d" rel="nofollow noopener ugc" role="button">Material and Grain definition</a> - try it out and come back with suggestions.</p><div data-embedjson="{&quot;height&quot;:113,&quot;width&quot;:200,&quot;photoUrl&quot;:&quot;https:\/\/i.ytimg.com\/vi\/8JF1Gf9QLIs\/hqdefault.jpg&quot;,&quot;videoID&quot;:&quot;8JF1Gf9QLIs&quot;,&quot;showRelated&quot;:false,&quot;start&quot;:0,&quot;url&quot;:&quot;https:\/\/www.youtube.com\/watch?v=8JF1Gf9QLIs&quot;,&quot;embedType&quot;:&quot;youtube&quot;,&quot;name&quot;:&quot;Onshape | Material &amp; Grain definition + Layout - custom feature script&quot;,&quot;embedStyle&quot;:&quot;rich_embed_card&quot;,&quot;frameSrc&quot;:&quot;https:\/\/www.youtube.com\/embed\/8JF1Gf9QLIs?feature=oembed&amp;autoplay=1&quot;}">
    <a href="https://www.youtube.com/watch?v=8JF1Gf9QLIs" rel="nofollow noopener ugc">
        https://www.youtube.com/watch?v=8JF1Gf9QLIs
    </a>
</div><p>I'm releasing it hoping people will fork it and build on it. I'll keep improving it and keep the document updated - hopefully this starts an interesting discussion.</p><p>I built it with an experimental MCP setup, exploring a problem that has people resorting to all sorts of workarounds and cheats to manage materials, finishes and grain direction for CNC file prep and drawings: <strong>a part doesn't carry enough data on what it's made of</strong>. Once it does, useful things open up downstream.</p><p><strong>Huge props to whoever first made Auto Layout</strong> - it's been a major inspiration, and a very useful FS for the community for years. I've (AI mostly) built this from the ground up refraining from taking code from other FS's to test my AI setup, but obviously Auto Layout has been a major inspiration and a very useful FS to the community since forever.</p><p><strong></strong></p><p><strong>Material &amp; Grain - the definer</strong></p><p>Pick a material, pick each part's visible (decor) face, and click the arrows on the face to turn the grain 90°. It then writes onto the part:</p><ul><li><strong>An attribute</strong> - material, measured thickness, decor face, grain direction and decor-face area. This is what the layout reads.</li><li><strong>Part properties</strong> - Title 1 = thickness, Title 2 = paint code, Title 3 = decor-face area - for drawings and BOMs.</li><li><strong>Appearance and material</strong>, so colors follow the material choice and mass properties come out right.</li><li><strong>A texture decal</strong> on the decor face, aligned to the grain. The image is a manual pick for now - I haven't found a way for FS to choose one per material automatically.<br />
The grain direction sticks to the face and travels with the part through patterns and transforms, like a decal does.</li><li><strong>3 modes:</strong> <em>Decor</em> - pick from a list of products, typical for MFC; <em>Grain </em>- pick from a list of grains, select a texture image; <em>Painted </em>- pick a substrate material and define it's color either from a list of RAL tones or paste in a HEX code.</li></ul><span data-embedjson="{&quot;url&quot;:&quot;https:\/\/us.v-cdn.net\/5022071\/uploads\/E96UVGEBOGBE\/image.png&quot;,&quot;name&quot;:&quot;image.png&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:62140,&quot;width&quot;:1034,&quot;height&quot;:514,&quot;displaySize&quot;:&quot;large&quot;,&quot;float&quot;:&quot;none&quot;,&quot;downloadUrl&quot;:&quot;https:\/\/forum.onshape.com\/api\/v2\/media\/download-by-url?url=https%3A%2F%2Fus.v-cdn.net%2F5022071%2Fuploads%2FE96UVGEBOGBE%2Fimage.png&quot;,&quot;active&quot;:true,&quot;mediaID&quot;:58252,&quot;dateInserted&quot;:&quot;2026-10-08T21:34:28+00:00&quot;,&quot;insertUserID&quot;:42357,&quot;foreignType&quot;:null,&quot;foreignID&quot;:null,&quot;embedType&quot;:&quot;image&quot;,&quot;embedStyle&quot;:&quot;rich_embed_card&quot;}">
    <span>
        <a href="https://us.v-cdn.net/5022071/uploads/E96UVGEBOGBE/image.png" rel="nofollow noopener ugc" target="_blank">
            <img src="https://us.v-cdn.net/5022071/uploads/E96UVGEBOGBE/image.png" alt="image.png" height="514" width="1034" data-display-size="large" data-float="none" data-type="image/png" data-embed-type="image" srcset="https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=300, width=300/5022071/uploads/E96UVGEBOGBE/image.png 300w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=600, width=600/5022071/uploads/E96UVGEBOGBE/image.png 600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=800, width=800/5022071/uploads/E96UVGEBOGBE/image.png 800w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1200, width=1200/5022071/uploads/E96UVGEBOGBE/image.png 1200w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1600, width=1600/5022071/uploads/E96UVGEBOGBE/image.png 1600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=2000, width=2000/5022071/uploads/E96UVGEBOGBE/image.png 2000w, https://us.v-cdn.net/5022071/uploads/E96UVGEBOGBE/image.png" sizes="100vw" /></a>
    </span>
</span>
<p></p><span data-embedjson="{&quot;url&quot;:&quot;https:\/\/us.v-cdn.net\/5022071\/uploads\/0Y3RIAL43KMN\/image.png&quot;,&quot;name&quot;:&quot;image.png&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:78050,&quot;width&quot;:1539,&quot;height&quot;:927,&quot;displaySize&quot;:&quot;large&quot;,&quot;float&quot;:&quot;none&quot;,&quot;downloadUrl&quot;:&quot;https:\/\/forum.onshape.com\/api\/v2\/media\/download-by-url?url=https%3A%2F%2Fus.v-cdn.net%2F5022071%2Fuploads%2F0Y3RIAL43KMN%2Fimage.png&quot;,&quot;active&quot;:true,&quot;mediaID&quot;:58254,&quot;dateInserted&quot;:&quot;2026-10-08T21:37:03+00:00&quot;,&quot;insertUserID&quot;:42357,&quot;foreignType&quot;:null,&quot;foreignID&quot;:null,&quot;embedType&quot;:&quot;image&quot;,&quot;embedStyle&quot;:&quot;rich_embed_card&quot;}">
    <span>
        <a href="https://us.v-cdn.net/5022071/uploads/0Y3RIAL43KMN/image.png" rel="nofollow noopener ugc" target="_blank">
            <img src="https://us.v-cdn.net/5022071/uploads/0Y3RIAL43KMN/image.png" alt="image.png" height="927" width="1539" data-display-size="large" data-float="none" data-type="image/png" data-embed-type="image" srcset="https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=300, width=300/5022071/uploads/0Y3RIAL43KMN/image.png 300w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=600, width=600/5022071/uploads/0Y3RIAL43KMN/image.png 600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=800, width=800/5022071/uploads/0Y3RIAL43KMN/image.png 800w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1200, width=1200/5022071/uploads/0Y3RIAL43KMN/image.png 1200w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1600, width=1600/5022071/uploads/0Y3RIAL43KMN/image.png 1600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=2000, width=2000/5022071/uploads/0Y3RIAL43KMN/image.png 2000w, https://us.v-cdn.net/5022071/uploads/0Y3RIAL43KMN/image.png" sizes="100vw" /></a>
    </span>
</span>
<p><strong></strong></p><p><strong>Grain Layout - the consumer</strong></p><ul><li>No selection: one instance finds every tagged part in the Part Studio, groups them by material and exact thickness, and packs each group onto sheets (MaxRects best-short-side-fit on bounding rectangles).</li><li>Grained materials stay locked to the sheet's grain axis; plain ones can also turn 90° for a tighter pack. The first sheet dimension is the grain axis.</li><li>Parts land <strong>decor face down</strong> by default. Untick <em>Decor face down</em> to put the larger side down instead, or pick faces to force them down.</li><li>Each sheet gets an outline, and each row a label with its material, thickness and sheet count. Funny enough - this is actually the <strong>heaviest part of the FS</strong>.</li><li><strong>Run layout! is off by default</strong> - laying out is the heavy part, and you'll likely open the dialog a few times while setting it up.</li><li>Part validation is in the code but switched off in this build; it needs more work.<br /></li></ul><span data-embedjson="{&quot;url&quot;:&quot;https:\/\/us.v-cdn.net\/5022071\/uploads\/09C5VV7IPSOM\/image.png&quot;,&quot;name&quot;:&quot;image.png&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:446512,&quot;width&quot;:1958,&quot;height&quot;:1047,&quot;displaySize&quot;:&quot;large&quot;,&quot;float&quot;:&quot;none&quot;,&quot;downloadUrl&quot;:&quot;https:\/\/forum.onshape.com\/api\/v2\/media\/download-by-url?url=https%3A%2F%2Fus.v-cdn.net%2F5022071%2Fuploads%2F09C5VV7IPSOM%2Fimage.png&quot;,&quot;active&quot;:true,&quot;mediaID&quot;:58258,&quot;dateInserted&quot;:&quot;2026-10-08T21:47:30+00:00&quot;,&quot;insertUserID&quot;:42357,&quot;foreignType&quot;:null,&quot;foreignID&quot;:null,&quot;embedType&quot;:&quot;image&quot;,&quot;embedStyle&quot;:&quot;rich_embed_card&quot;}">
    <span>
        <a href="https://us.v-cdn.net/5022071/uploads/09C5VV7IPSOM/image.png" rel="nofollow noopener ugc" target="_blank">
            <img src="https://us.v-cdn.net/5022071/uploads/09C5VV7IPSOM/image.png" alt="image.png" height="1047" width="1958" data-display-size="large" data-float="none" data-type="image/png" data-embed-type="image" srcset="https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=300, width=300/5022071/uploads/09C5VV7IPSOM/image.png 300w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=600, width=600/5022071/uploads/09C5VV7IPSOM/image.png 600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=800, width=800/5022071/uploads/09C5VV7IPSOM/image.png 800w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1200, width=1200/5022071/uploads/09C5VV7IPSOM/image.png 1200w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1600, width=1600/5022071/uploads/09C5VV7IPSOM/image.png 1600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=2000, width=2000/5022071/uploads/09C5VV7IPSOM/image.png 2000w, https://us.v-cdn.net/5022071/uploads/09C5VV7IPSOM/image.png" sizes="100vw" /></a>
    </span>
</span>
<p><strong></strong></p><p><strong>Drawings and DXF</strong></p><p>A bottom view with <em>Show hidden lines</em>, exported to DXF, puts part outlines and through holes on the visible layer and blind holes on the hidden layer, along with the row labels. It's a bottom view, so mirror the DXF to get what the CNC sees - the labels come out mirrored, so that's hard to miss. The labels are one flat Composite part, because a drawing can't show a sketch made inside a feature. Sheet outlines show in the Part Studio only, so they stay out of the CNC file.</p><p>Callouts and BOM tables can pull thickness, paint code and decor area straight off the parts, so the model stays the source of truth for materials and finishes.</p><span data-embedjson="{&quot;url&quot;:&quot;https:\/\/us.v-cdn.net\/5022071\/uploads\/3BLFUWUOKGW5\/image.png&quot;,&quot;name&quot;:&quot;image.png&quot;,&quot;type&quot;:&quot;image\/png&quot;,&quot;size&quot;:90165,&quot;width&quot;:1331,&quot;height&quot;:916,&quot;displaySize&quot;:&quot;large&quot;,&quot;float&quot;:&quot;none&quot;,&quot;downloadUrl&quot;:&quot;https:\/\/forum.onshape.com\/api\/v2\/media\/download-by-url?url=https%3A%2F%2Fus.v-cdn.net%2F5022071%2Fuploads%2F3BLFUWUOKGW5%2Fimage.png&quot;,&quot;active&quot;:true,&quot;mediaID&quot;:58256,&quot;dateInserted&quot;:&quot;2026-10-08T21:43:55+00:00&quot;,&quot;insertUserID&quot;:42357,&quot;foreignType&quot;:null,&quot;foreignID&quot;:null,&quot;embedType&quot;:&quot;image&quot;,&quot;embedStyle&quot;:&quot;rich_embed_card&quot;}">
    <span>
        <a href="https://us.v-cdn.net/5022071/uploads/3BLFUWUOKGW5/image.png" rel="nofollow noopener ugc" target="_blank">
            <img src="https://us.v-cdn.net/5022071/uploads/3BLFUWUOKGW5/image.png" alt="image.png" height="916" width="1331" data-display-size="large" data-float="none" data-type="image/png" data-embed-type="image" srcset="https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=300, width=300/5022071/uploads/3BLFUWUOKGW5/image.png 300w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=600, width=600/5022071/uploads/3BLFUWUOKGW5/image.png 600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=800, width=800/5022071/uploads/3BLFUWUOKGW5/image.png 800w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1200, width=1200/5022071/uploads/3BLFUWUOKGW5/image.png 1200w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=1600, width=1600/5022071/uploads/3BLFUWUOKGW5/image.png 1600w, https://us.v-cdn.net/cdn-cgi/image/quality=80, format=auto, fit=scale-down, height=2000, width=2000/5022071/uploads/3BLFUWUOKGW5/image.png 2000w, https://us.v-cdn.net/5022071/uploads/3BLFUWUOKGW5/image.png" sizes="100vw" /></a>
    </span>
</span>
<p><strong></strong></p><p><strong>Limits</strong></p><ul><li>It packs bounding rectangles, not silhouettes - a step up from Auto Layout, not a nesting optimizer. Good for quick material estimates.</li><li>Parts go at 0° or 90° only. Easy addition in case of popular demand.</li><li>The definer owns Titles 1–3 and the part color. A hand-edited value permanently overrides what it writes.Hand-edited part colors break the feature's ability to paint the parts. Reset all properties fixes that.</li><li>Texture images are picked per feature, not stored in the library. Use images with the pattern running horizontally and larger than any part at real scale - one centered decal then covers the face without distortion.</li></ul><p><strong></strong></p><p><strong>Forking it</strong></p><p>The materials and paint colors are lookup tables in their own tab. I've generated a starter set, but the idea is that you fork it and build your own library, since everyone's material preferences differ. Or I might expand the library if there's request for that…</p>]]>
        </description>
    </item>
   </channel>
</rss>
