<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Analysis Situs on Medium]]></title>
        <description><![CDATA[Stories by Analysis Situs on Medium]]></description>
        <link>https://medium.com/@analysis-situs?source=rss-226a37672a2a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zDCej-LCFUI1f6Za3moSoQ.jpeg</url>
            <title>Stories by Analysis Situs on Medium</title>
            <link>https://medium.com/@analysis-situs?source=rss-226a37672a2a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:49:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@analysis-situs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Analysis Situs 2026.1 is out]]></title>
            <link>https://analysis-situs.medium.com/analysis-situs-2026-1-is-out-c7f8dea82dba?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7f8dea82dba</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Fri, 08 May 2026 17:46:48 GMT</pubDate>
            <atom:updated>2026-05-08T17:46:48.624Z</atom:updated>
            <content:encoded><![CDATA[<p>The Analysis Situs ver. 2026.1 is now available. This spring release summarizes what we’ve been doing in the field of CAD algorithms over the past 4–5 months.</p><ul><li>You can download the Windows x64 installer <a href="https://analysissitus.org/forum/index.php?resources/analysis-situs.6/">here</a>.</li><li>Visit the official website of Analysis Situs at <a href="https://analysissitus.org/">www.analysissitus.org</a>.</li><li>All changes logged: <a href="https://gitlab.com/ssv/AnalysisSitus/-/blob/master/CHANGELOG">CHANGELOG</a>.</li><li>The corresponding Git tag is “<a href="https://gitlab.com/ssv/AnalysisSitus/-/tree/v2026.1?ref_type=tags">v2026.1</a>.”</li></ul><p>Our main focus remains on the open-sourced feature recognition kernel. At the same time, the release has features that do not directly relate to shape interrogation. Some of its functions (including defeaturing, advanced surface modeling, and shape healing) are used in a wide range of CAD/CAM/CAE applications and we see more and more interesting uses of this framework in industry. The most spectacular features will be shared in this blog as usual, so stay tuned and enjoy the new one.</p><h3>Contributors</h3><p>From our team, Andrey Voevodin added a Clipper2-based polygon union that made the computation of concave NFPs fast enough for practical use (<a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/419">#419</a>). He also provided a STEP file import fix for OpenCascade 7.6 vs. 7.7 / OpenGeom (<a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/422">#422</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hGalx6kBKeLXPY0P.png" /></figure><p>Sergey Kiselev fixed a bunch of issues in Outliner that left significant gaps in the silhouette contours (<a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/425">#425</a>). Julia Slyadneva made some improvements in the glTF writer to enhance it with visual diagnostics for the derived work in Extensions. The community was helpful in identifying issues mostly in the commercial Extensions but a number of improvements landed in the open core (including gap fixing in Outliner), and that’s definitely our favorite part of this whole business.</p><h3>Algorithms</h3><h3>Sphere-based thickness analysis</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/421">#421</a>: Add draft implementation of sphere-based thickness analysis.</li></ul><p>Sphere-based thickness analysis complements the ray-based method: better accuracy in corners and no useless thickness values. The algorithm inscribes a sphere inside the material until it touches opposing walls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NFaCocxnK_VWWZ0f.gif" /></figure><p>The algorithm may still benefit from general performance improvements, which are planned for the future releases. You may want to read more about the CAD thickness analysis tool in the <a href="https://analysissitus.org/features/features_thickness.html">documentation pages</a>.</p><p>This algorithm has a long history. We prototyped the initial version as a part of a presale activity some 10 years ago but later on switched to a ray-based method that proved to work reasonably well while being much faster. Then, based on a customer request, a sphere-based method was implemented. Now, after several years, we are implementing it once again and, this time, publishing it as open source. That’s actually a pattern: a good algorithm takes time, sometimes years, to come to a useful condition. That is something yet to be discovered by AI “vibe coding” lovers.</p><h3>Minimal face width</h3><ul><li>Implement a `check-min-width` function for faces. 1922596f</li></ul><p>For CAM uses, including DFM analysis and toolpath planning, we introduced the `check-min-width` command and the corresponding C++ algorithm. It is a ray-based intersection analysis that takes into account the presence of concave edges on a face (the “minimal width” property) or analyzes all edges regardless of their vexity (the “minimal neck” property).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*87G3mVcmMfTJLeQo.gif" /></figure><p>Right now the algorithm is in the “test drive” mode, and we are looking for community feedback regarding its usability and accuracy.</p><h3>“Protection” mode in face maximization</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/423">#423</a>: `MaximizeFaces`: sporadic degenerate V range on cylindrical face merges (Linux).</li></ul><p>The face maximization (“unify same domain”) algorithm is quite often a source of surprises. Some crashes are insanely difficult to trace because they appear only on specific platforms and pop up sporadically. For example, face maximization has been corrupting cylindrical faces on Linux runs, but the problem could not be easily traced because, after corruption, the problematic shapes continued to travel over the subsequent feature recognition pipeline. A modeling algorithm can silently injure your B-rep and hand it over to another algorithm that would not survive on corrupted geometry. That’s a notoriously hard class of bugs to trace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*82-avPCKupRu4Lx2.png" /></figure><p>The shape in the image above (<a href="https://quaoar.su/imgs/blog/v2026.1/ProcessBody_Perform_shape0.brep">download</a>) exhibits a cylindrical face with a degenerated V range. For such interesting degeneracies we introduced a specific “protection” mode in the face maximizer. The algorithm now has a room for post-checks: if not passed, the original body won’t change.</p><h3>2D convex hull</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/413">#413</a>: Rework `asiAlgo_QuickHull2d` to reuse the logic of convex hull construction from `asiAlgo_BuildMinAreaRect`.</li></ul><p>The convex hull computation has been reworked for better performance. The old algorithm hasn’t been used much in the SDK, so it was implemented without a special focus on heavy calculations. At the same time, our work on <a href="https://quaoar.su/blog/page/true-shape-nesting-21-getting-started-with-nfp">the NFP algorithm</a> called for a quick convex hull computation for part pairing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9zKPZlD4AgX82D95.png" /></figure><p>The performance of the algorithm strongly depended on the number of points in the initial point set. In extreme cases, the speed-up with the new algorithm can be ~100 times.</p><h3>Convex NFP</h3><ul><li>Add the first workable prototype of packing hodographs for convex polygons.</li><li>Introduce part pairing based on convex NFP.</li></ul><p>A classic NFP (No-Fit Polygon) construction algorithm for convex polygons has been introduced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*Jm8hzuE4ro9MZwDL.gif" /></figure><p>The algorithm is shipped in two variants: “smart” vector summation and direct Minkowski sums. The latter appeared to be our preferred approach (read <a href="https://quaoar.su/blog/page/true-shape-nesting-21-getting-started-with-nfp">here</a> if you want to know why).</p><h3>Concave NFP</h3><ul><li>Rework the NFP construction algorithm for convex polygons to be based on Minkowski sums to have explicit reference points.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/419">#419</a>: Integrate Clipper2 for fast polygon union.</li><li>Finish up the pairing algorithm for concave polygons.</li></ul><p>A decomposition-based concave NFP algorithm has been added. Fast polygon union is achieved thanks to the employed <a href="https://www.angusj.com/clipper2/Docs/Overview.htm">Clipper2</a> code, although two alternative approaches were also implemented (<a href="https://quaoar.su/blog/page/technical-memo-on-opencascade-booleans">OpenCascade’s Booleans</a> and the <a href="https://quaoar.su/blog/page/brand-new-outline-algorithm-has-been-open-sourced">Outliner</a> algorithm).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*wiiAwkxTiXfYbicb.gif" /></figure><p>The algorithm is supplemented with a procedure to find the best position for a flipped variant of the same part. This function facilitates placing identical parts in 2D nesting scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y-MFT7c-y329AW6X.png" /></figure><p>You may want to read more in our documentation: <a href="https://analysissitus.org/features/features_poly-nfp.html">No-Fit Polygons</a>.</p><h3>Smaller improvements</h3><ul><li>Use dynamic ray casting distance for outline creation (<a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/425">#425</a>). ec3a635b</li><li>STEP file imported incorrectly with OpenCascade 7.6 (OpenGeom) but works in 7.7. (<a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/422">#422</a>) b8edf4a4</li><li>Fix `asiAlgo_ConvertCurve::Convert2Polyline()` 568f4e7f</li></ul><h3>Data exchange</h3><h3>UV to SVG</h3><ul><li>Add `-domain` option for `write-svg` command to dump UV domains of faces. 677301e4</li></ul><p>SVG export has been traditionally used for exporting HLR outlines of 3D shapes in publish-ready quality. Now we added a similar feature for the Domain viewer because quite often we have to deal with 2D geometries living in the UV spaces of our parametric surfaces. Here is one example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*N3P-LN7wE_fT6PPt7FPnCQ.png" /></figure><p>The geometries to export are grabbed right from the VTK viewer, i.e., we convert vtkPolyData into SVG primitives. This is different from the original SVG export functionality where we exported OpenCascade shapes. The VTK-source approach makes the exporter more generic, although it clearly sacrifices accuracy because the exported data is always polygonized.</p><h3>Missing instance paths in HAG</h3><ul><li>Fix <a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/424">#424</a>: Scene tree drops instance paths when a subassembly prototype is shared between multiple parents.</li></ul><p>A subtle issue has been identified by the commercial subscribers of Analysis Situs: some instance paths were missing in the <a href="https://analysissitus.org/features/features_asm-json-hierarchy.html">assembly JSON serialization</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JlUYCKYx_R9pzVHX.png" /></figure><p>To remind, a CAD assembly can be formally described as a <em>hierarchical assembly graph</em> (HAG), where nodes are assembly components nested into each other and directed arcs denote “part of” relationships. Components are nested by <em>instancing</em>, which is referencing a unique part or subassembly (called a <em>prototype</em>) with a specific rigid body transformation matrix. A prototype may be referenced multiple times, yielding multiple parent nodes. Any modification of a prototype propagates to all its occurrences. Working with a single unique occurrence requires addressing it by a path of edges in the graph. That’s a mechanism known as <em>“instance singling”</em> and formalized first by one of the solid modeling pioneers, Ari Rappoport, in 1993. The path of a component in an assembly is something called an “assembly item ID” in the modern OpenCascade jargon.</p><p>We started using the HAG concept with instance singling in <a href="https://quaoar.su/blog/page/cad-processor-v10">CAD Processor</a> first. After that, the structure of assembly item IDs was reused many times in various projects, where it proved to be a reliable way of addressing individual assembly components. It is not surprising, then, that OCAF/XDE plus assembly item IDs is the core mechanism of working with assemblies in Analysis Situs. In ver. 2026.1, we added a search bar for the prototype IDs and fixed the annoying problem of iterating over all assembly items in the JSON serializer that is mostly used in <a href="https://analysissitus.org/featuresext.html">Extensions</a> but is shipped as a part of the open core.</p><h3>Propagation of materials throughout XDE</h3><ul><li>Make sure that materials from STEP files are passed over to the XDE medium data structure. 3a8d8655</li></ul><p>This one also relates to XDE. From the ver. 2026.1, Analysis Situs propagates the as-designed material specification from a STEP file to the OCAF/XDE document representing a product.</p><h3>User interface</h3><h3>Double-click intelligence</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/386">#386</a>: Select all smoothly connected faces, holes, and blends by double-clicking.</li></ul><p>You can now double-click a face and get the whole feature. We borrowed this idea from commercial tools like Fusion and SpaceClaim. When you double-click on a face, the software automatically runs several feature recognizers to decide on the context around that face. The logic checks if it is a fillet chain or a drilled hole. If not, we grab all the smoothly connected neighbors, which is often a meaningful feature itself (e.g., a side-milled contour).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*FjMnC47JfDxljRWK.gif" /></figure><h3>Smaller improvements</h3><ul><li>Provide app icon on Linux. 1f5167f8</li><li>Add UI dialog for the `convert-to-bezier` command. 548d7727</li><li>Add shape-type annotation, corner-pinned to the part viewer. 19621319</li><li>Add a tool button for making fast annotations. d667c823</li></ul><h3>Infrastructure</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/416">#416</a>: Application prints errors that it cannot find a directory with scripts on double-click on a CAD file.</li><li>The documentation pages for Analysis Situs (including its commercial extensions) have been significantly reworked.</li><li>Fix broken links in the documentation pages. 03a2e531</li></ul><h3>Smaller changes</h3><ul><li>Fix potential dangling reference problems (see <a href="https://quaoar.su/blog/page/tip-of-the-week-002-dangling-references-can-cost-you-a-day">TotW#2</a>). 5cd6cb6d</li><li>Rebind panning to RBM. e2b87b53</li><li>Implement zoom-to-cursor. a143e169</li><li>Tweak visualization for high-dpi displays; use arrow keys for panning. 2750aca6</li><li>Make the legend for feature recognizers a draggable component in `asiVisu`. 8900f8bd, 743ef4ab</li><li>Make repatch run when the &lt;R&gt; keyboard key is pressed. 29db2112</li><li>Toggle visibility on spacebar keypress for the selected object in the tree view. 506b7698</li><li>Add infrastructure to name bodies on STEP export. 89f754ce</li><li>Connect progress indication to the taskbar icon on Windows. f32a7e75</li><li>Make Analysis Situs preserve the last used directory for file open/save between sessions. d274f329</li><li>Add a button to disable interactive selection. 59d11545</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/386">#386</a>: Use the dbl-click callback to select smoothly connected faces.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/420">#420</a>: Remove Eigen includes from public SDK headers.</li><li>Add ‘-dump’ key to all feature recognition Tcl commands to report their JSON reps. eae2bad6</li><li>Add a toolbar button in the Active Script window to show the available shortcuts. bc06c08c</li><li>Add a mock-up handler for the double-click event. 45318163</li><li>Add quality-of-life improvements to the UI of Active Script console. a19688fa</li><li>Add a “dump autoread” icon with Ctrl+Shift+S shortcut to the left toolbar. e736f753</li><li>Add plotter to glTF writer 99dd73a0</li><li>Add more documentation pages. cdd30209</li><li>Finish up the pairing algorithm for concave polygons. 2de4d90d</li><li>Slightly refactor multicurve interpolation for Gordon surface builder. e8ed55df</li><li>Finalize concave-shape NFP construction with tests. 20755a58</li><li>Rework the NFP construction algorithm for convex polygons to be based on Minkowski sums to have explicit reference points. 7e9023b0</li><li>Fix <a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/416">#416</a>: Use the executable’s path to set the tcl scripts’ path in case the ASI_TCL_SCRIPTS environment variable. 5dee6d80</li><li>Introduce part pairing based on convex NFP (non-optimized for performance yet). 9606d8cf</li><li>Make the `check-length` command work without arguments to compute the total edge length of a part. 81560cd4</li></ul><h3>What’s next</h3><p>Over the past few months we’ve been discussing the use of AI quite a bit. It was educational to talk to people from top industries and sciences about AI-based feature recognition, its caveats, practical applications, and shadow points. It was also interesting to discover that many folks who “vibe-coded” their little CAD apps in the first place eventually came across Analysis Situs and got back to “first principles” at least to drive their geometric cores safely. The trendy AI topic will definitely influence our open core, but it will 100% remain deterministic and rule-based because that’s how geometry works. Let’s see at the end of this year if any new uses of Analysis Situs in AI-driven platforms reveal themselves.</p><p>Another topic, which is important personally to me, is also related to AI and the lowering entry barrier to CAD geometry. It is amazing how easy one can start using OpenCascade, Analysis Situs, and any other open CAD package without investing much brainpower in self-education. Does anyone need training on a CAD kernel these days? My personal take is that you would need such training <em>to build comprehension</em>. If you’d like to really understand the low-level CAD geometry, AI won’t build such comprehension for you. Therefore, this blog will remain to exist together with the forum, and some further format extensions will come later. The more CAD developers exist (even if many of them are “vibe developers”), the more important it is to have a professional-grade knowledge database for those who remain conscious and do not blindly delegate jobs to a “thinking machine.”</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7f8dea82dba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analysis Situs 2025.2 is out]]></title>
            <link>https://analysis-situs.medium.com/analysis-situs-2025-2-is-out-08c94e1037cf?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/08c94e1037cf</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[cae]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[opencascade]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 09:07:08 GMT</pubDate>
            <atom:updated>2026-01-05T09:07:08.827Z</atom:updated>
            <content:encoded><![CDATA[<p>The Analysis Situs ver. 2025.2 is now available. With this release, we continue to progressively build a solid foundation for CAD practitioners and organizations. The focus of this release is on shape healing (sewing, maximization), feature recognition (segment reporting, face probing, better outliner) and modeling (sheet metal). Another major milestone is the complete overhaul of the regression testing system.</p><ul><li>You can download the Windows x64 installer <a href="https://analysissitus.org/forum/index.php?resources/analysis-situs.6/">here</a>.</li><li>AppImage for Linux (Ubuntu) is <a href="https://analysissitus.org/forum/index.php?resources/analysis-situs-appimage-ubuntu.8/">here</a>.</li><li>Visit the official website of Analysis Situs at <a href="https://analysissitus.org/">www.analysissitus.org</a>.</li><li>All changes logged: <a href="https://gitlab.com/ssv/AnalysisSitus/-/blob/master/CHANGELOG">CHANGELOG</a>.</li><li>The corresponding Git tag is “<a href="https://gitlab.com/ssv/AnalysisSitus/-/tree/v2025.2.1?ref_type=tags">v2025.2.1</a>.”</li></ul><h3>Contributors</h3><p>Rajendra Pardeshi added the functionality of <a href="https://analysissitus.org/forum/index.php?threads/multiple-file-selection-option-in-load-from-brep.496/">loading multiple BREP files</a> to the active part. The forum member <a href="https://analysissitus.org/forum/index.php?search/53943/">_mk</a> proposed a bunch of improvements for CAE preparation tools of Analysis Situs. He also tested quite many functions and provided his useful insights.</p><p>From our team, Sergey Kiselev contributed a number of fixes to the outliner algorithm that has been employed in a bunch of commercial projects already. He also improved the face stitching (sewing) algorithm to preserve the structure of solids in both manifold and non-manifold modes of processing. Another contribution by Sergey is our brand new CI/CD ecosystem, which is now hosted on a professional server. Julia Slyadneva finished the new face sampling functionality that offers a way to pick a CAD face programmatically with Cartesian coordinates. Andrey Voevodin improved the CAD face maximization algorithm to work on surfaces of revolution that we often see in turned parts and turbomachinery components.</p><p>If you feel like contributing to this open project, the best way to do so is to show up on the <a href="https://analysissitus.org/forum/index.php">forum</a> and discuss the idea first. Any contributions are welcome. We don’t ask anyone to sign any agreements, and you will remain your copyright holder.</p><h3>Outliner</h3><ul><li>Fixed crash caused by outline’s memory issue.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/400">#400</a>: Crash in the `onBuildHLROutline()` function when the `DRAW_DEBUG` macro is used.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/402">#402</a>: Fix gaps in the output of the outliner algorithm (max 1 mm).</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/398">#398</a>, <a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/399">#399</a>, <a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/403">#403</a>, <a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/404">#404</a>: Multiple fixes in the outliner algorithm; skip dangling edges by default.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/364">#364</a>: Outliner generates a contour with a gap for extracted walls of a prismatic feature.</li></ul><p>The outliner algorithm is used to build planar outer contours for parts and prismatic features (2D pockets). We received substantial user feedback on this functionality from the <a href="https://analysissitus.org/forum">community</a> and made sure to correct the majority of critical bugs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UlVS4IYseI2Qc_8s.png" /><figcaption><em>Incorrect projection of pocket walls.</em></figcaption></figure><p>There are two key improvements. First off, small gaps in the projected contours are now automatically filled. Second, we improved treatment of dangling edges to clean up the resulting contours. Smaller fixes cover sporadic crashes in the algorithm.</p><h3>Segment extractor</h3><ul><li>Add two algorithms to extract connected segments and smooth contours over the reported segments.</li></ul><p>There are two smaller algorithms contributed to the segment extraction tool. One collects all connected components (subcontours) and another extracts smoothly connected chains from a contour. The latter logic is demanded for building NC paths and/or assessing machining time. You may want to read more about this algorithm in the dedicated article: “<a href="https://quaoar.su/blog/page/smoothly-connected-segments-over-a-planar-contour">Smoothly connected segments over a planar contour</a>.”</p><h3>Better sewing</h3><ul><li>Add solids auto collection after the sewing operation.</li><li>Introduce non-manifold mode in sewing.</li></ul><p>The sewing algorithm of OpenCascade had one important flaw that complicated its usage in subsequent workflows, such as hexahedral meshing. For example, to build hexa blocks of a volumetric domain in Salome, you need to have solid geometry as an input. At the same time, the sewing algorithm does not respect solids and flattens them out into plain lists of faces (although sharing is perfectly preserved). Therefore, to recover solids after face stitching, we had to provide special care in the algorithm.</p><p>A typical domain passed for hexahedralization in Salome is often modeled as a partition with nonmanifold faces:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/0*bQCVmcEPNPOGr5r1.gif" /><figcaption><em>Non-manifold domain for meshing.</em></figcaption></figure><p>If the partitioned blocks are not homeomorphic to cubes (i.e., if they do not contain eight vertices, twelve edges, and six faces), then the default mesher cannot process them. In the example below, one solid in a partition has been meshed while another failed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7EXpXZQjH3oeimm-.png" /><figcaption><em>Failed meshing.</em></figcaption></figure><p>Preconditioning geometry with such operators as <a href="https://analysissitus.org/features/features_concat-pcurves.html">PCONCAT</a> detaches faces from each other and requires sewing to be called at the end. However, the default mode of sewing will not only fail near nonmanifold faces but also corrupt the shape structure, making all solids a plain list of faces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/0*LEpxY_F7KPhugfdx.gif" /><figcaption><em>Non-manifold sewing preserves inner faces with proper sharing.</em></figcaption></figure><p>The enhanced sewing now preserves solids and enables running in nonmanifold mode.</p><h3>Better face maximization</h3><ul><li>Make face maximization work on surfaces of revolution.</li></ul><p>Face maximization was designed as an integral part of Boolean operations. At the same time, this algorithm is often employed as a standalone tool in various modeling scenarios. E.g., we run it to prepare flat patterns of sheet metal parts and unite canonical faces before feature recognition or numerical simulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*vHV15nEOkWEFBwGV.gif" /><figcaption><em>Face maximization now works for surfaces of revolution.</em></figcaption></figure><p>In the new release, we extended the <a href="https://gitlab.com/ssv/AnalysisSitus/-/blob/master/src/asiAlgo/auxiliary/asiAlgo_UnifySameDomain.h?ref_type=heads">algorithm</a> to make it work with surfaces of revolution. The latter enhancement is especially demanded for rotational parts, such as lathed pieces or turbomachinery components (e.g., capping faces of blades).</p><h3>Improvements in PCONCAT</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/411">#411</a>: PCONCAT operation fails for a surface of revolution.</li></ul><p>The <a href="https://analysissitus.org/features/features_concat-pcurves.html">PCONCAT</a> operator aims at concatenating p-curves in the UV domain of a face. This function is a low-level building block for the vertex removal operator. The normal workflow of this operator is as follows:</p><pre>Concatenate p-curves → Rebuild 3D curves</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-HHCvWSvc-1E7FyA.png" /><figcaption><em>Concatenation of p-curves.</em></figcaption></figure><p>However, this workflow is only valid if we make sure that the host surface never changes. What happens in reality, though, is that OpenCascade substitutes the original surface with its copy whenever we happen to have a non-null location in the target B-rep face. This is a subtle problem caused by the parasitic <a href="https://quaoar.su/blog/page/more-on-b-rep-instancing">B-rep instancing effect</a> in the kernel. If a host surface is changed, all p-curves are logically invalidated (because they refer to a wrong surface after rehosting), so we need to change the conversion workflow as follows:</p><pre>Concatenate p-curves → Rebuild 3D curves → Rebuild p-curves (if missing)</pre><p>With the new workflow, the PCONCAT operator becomes more robust.</p><h3>Part hashes</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/405">#405</a>: Introduce geometry hasher and `get-part-hash` Tcl command.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/408">#408</a>: Use OBB dimensions instead of max point as a reference in part hashes.</li></ul><p>Analysis Situs now comes with a specific algorithm to compute unique hash codes for CAD geometries. These hashes are invariant to part locations in the modeling space and can quickly match identical geometries. You may want to read the dedicated article about the hashing algorithm here: “<a href="https://quaoar.su/blog/page/hash-codes-for-identical-cad-geometries">Hash codes for identical CAD geometries</a>.”</p><h3>Bend defeaturing on shells</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/394">#394</a>: Finish up bend suppression mechanics for shells.</li><li>Correct a bunch of cases for the bend-on-shell suppression algorithm.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MGKm7ZW6cS0pvIGK.gif" /><figcaption><em>Isolated blend suppression on a shell model.</em></figcaption></figure><p>The blend defeaturing function of Analysis Situs can now suppress isolated blends on shell models. The motivation to introduce this feature was to provide a way to affect bending radii of sheet metal parts before unfolding. You may want to read more about this enhancement in the corresponding article: “<a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-how-to-override-bending-radii">One way to override bending radii in sheet metal unfolding algorithm</a>.”</p><h3>Basic sheet metal modeling</h3><ul><li>Add the basic SMM (Sheet Metal Modeler) package.</li><li>Finish up the `smm-make-edge-flange` prototype.</li><li>Fix the treatment of arguments in the `smm-make-block` command: they were incorrectly parsed.</li><li>Add the `smm-trim` command to split thickness faces before flanging.</li><li>Add a dialog to define a flange.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/378">#378</a>: Wrong “thickness” face is detected when modeling a sheet metal flange for the provided part.</li><li>Add PlaneGCS as a 2D constraint solver algorithmically (no sketcher yet).</li></ul><p>Sheet metal modeling and feature recognition have been in our focus for around a decade now. In the new release of Analysis Situs, we started to prototype a direct editor for simplistic sheet metal parts. The motivation behind this project is to provide a convenient way of designing different configurations of bends and flanges. We usually create many synthetic models in commercial software like Fusion or Inventor to test out our <a href="https://analysissitus.org/featuresext.html#ext-smru">SMRU</a> package. Also, FreeCAD ships its own sheet metal modeling workbench, which has been around for quite some years already. At the same time, there is no reason why we wouldn’t want to combine the modeling power of OpenCascade with the feature recognition and direct editing capacities of Analysis Situs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nCwguh-r9PBWppm7.gif" /><figcaption><em>Sheet metal modeling in Analysis Situs.</em></figcaption></figure><p>This journey has just begun and it will likely remain a little side project on its own. Seemingly simple, sheet metal modeling has many subtle issues and requirements to address. For now, Analysis Situs provides basic mechanics for this kind of modeling and puts the first brick for the future enhancements.</p><h3>Face sampling</h3><ul><li>Finish `asiAlgo_NamingInfo` for persistent feature reporting.</li><li>Introduce the `recognize-probes` function and algorithm for face sampling at one (random) point.</li><li>Cache UV bounds for faces in a random point sampler.</li></ul><p>This new functionality allows us to probe CAD faces in order to extract sample points in their interiors. Those points can be used later on to match CAD features for the same part being loaded into different CAD packages. Face probing is activated with the <a href="https://analysissitus.org/commands.html#recognize-probes">recognize-probes</a> command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/0*jhELpxOjrEzQVHUM.gif" /><figcaption><em>Probe recognition in Analysis Situs.</em></figcaption></figure><p>This command takes a sample point from each CAD face. The retrieved points serve as geometric anchors for the spatial location of faces. Their coordinates are attached to the corresponding faces as AAG attributes, resulting in an association between Cartesian coordinates and face IDs. The PMC test is done on meshes with <a href="https://quaoar.su/blog/page/bounding-volume-hierarchies-bvh">BVH acceleration</a>.</p><h3>Smaller enhancements in modeling</h3><ul><li>Make a canonical recognition attempt in the `asiAlgo_Utils::IsCircular()` function.</li><li>Introduce the `SetProgressOn`/`SetProgressOff` methods in the notifier.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/377">#377</a>: `split-closed` command corrupts some periodic faces. You may want to read this “Tip of the Week” for details: “<a href="https://quaoar.su/blog/page/tip-of-the-week-004-split-closed-shapes">Tip of the Week 004: split closed shapes</a>.”</li><li>Protect the `asiAlgo_FeatureAttrAngle` AAG attribute from being removed in the `RemoveNodeAttributes()` function.</li><li>Make sure that the spring edges finder for fillets is stable across operating systems.</li><li>Introduce a memory allocator and face-edges cache in the dihedral angle computation for the sake of better performance on specific cases.</li><li>Speed up incremental blend suppression and ensure that it verifies the validity of reconstructed faces only once at the very end.</li><li>Add history of modification to `asiAlgo_FindOptimalOrientation`.</li><li>Clean up the Data Model API to remove useless Partition accessors.</li><li>Add a prototype for `asm-xde-extract` to extract subassemblies from XDE.</li></ul><h3>Persistent facets</h3><ul><li>Enable triangulation reading/writing in shape retrieval/storage drivers (OCAF).</li></ul><p>Analysis Situs comes with an OCAF-based data framework that has been employed in a number of commercial pre-/post-processors for CAE. Right now we are developing yet another pre-processor as a custom Salome module and we exploit the expressive power of Active Data to build a parametric model of a CFD domain with dependency graphs baked in. Salome allows saving project files (so-called “studies”) in binary format. To make facets computed per CAD faces persistent, we now unlocked their serialization into binary buffers.</p><h3>Customizable SVG export</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/392">#392</a>: Rework the interface of `asiAlgo_WriteSVG` to allow for customization in subclasses.</li></ul><p>Analysis Situs dumped a plain list of geometric primitives one after another in the SVG format. In practice though, it appears beneficial to encode certain feature-related information directly within the SVG data. For example, in sheet metal applications, we want to report wire IDs to match them up with their associated features, such as drilled holes, cutouts, or engravings. The same logic of grouping by contours may be needed in drawings when specific features are associated with projection views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4_iVMg4Ez54dn5Vw.png" /></figure><p><em>More structured SVG layout.</em></p><p>In the new release, <a href="https://gitlab.com/ssv/AnalysisSitus/-/blob/master/src/asiAlgo/interop/asiAlgo_WriteSVG.h?ref_type=heads">asiAlgo_WriteSVG</a> tool has been refactored to provide customization interfaces: all customizable routines are now exposed as virtual functions. This unlocks using SVG files for communication of contour features from the algorithm to a frontend.</p><h3>Smaller enhancements in data exchange</h3><ul><li>Changes for multiple file selection in “Load from BREP” + Tcl command.</li></ul><h3>Brand new regression testing</h3><ul><li>Added basic functionality to run Tcl test cases.</li></ul><p>The regression testing mechanism of Analysis Situs has been completely reworked. We took the testing engine shipped with OpenCascade’s <a href="https://quaoar.su/blog/page/testirovanie-pri-pomoshhi-draw">Draw Test Harness</a> and made it work with the native Tcl interpreter of Analysis Situs. The Tcl command named <a href="https://analysissitus.org/features/features_testing-framework.html">testgrid</a> runs all test scripts located in a specific directory whose path is configured via an environment variable. The results of nightly regression testing will be exposed publicly once we clean up some server-related issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BmngjBbN-7IRuLP4.gif" /><figcaption><em>Navigating over the testing report in Analysis Situs.</em></figcaption></figure><p>Although this overhaul does not improve anything in the core algorithms of Analysis Situs, we consider it to be an important milestone. With the new framework, we essentially inherited one of the best practices from the former OpenCascade development culture. After some fancy facelifting and more infrastructural improvements, we got a reliable test engine that allows us to collect an unlimited number of test cases for the computational geometry and modeling algorithm that we develop in-house.</p><p>You may always use the following permanent link to check the nightly results of Analysis Situs testing: <a href="https://analysissitus.org/results/summary.html">www.analysissitus.org/results/summary.html</a></p><h3>Update to C++17</h3><ul><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/380">#380</a>: Switch over to C++17 in CMake.</li><li>Get rid of `tl::optional` in favor of `std::optional` from C++17.</li></ul><p>Migration to C++17 has been a long-postponed action. In certain configurations though (e.g., for bridging with NetGen), switching to C++17 was a prerequisite but we got rid of this requirement (together with NetGen) a while ago. Now that we integrated the PlaneGCS 2D constraint solver (<a href="https://forum.freecad.org/viewtopic.php?t=20541">borrowed from FreeCAD</a>), migration became the thing again. This update allows us to exploit some selected language features, such as <a href="https://en.cppreference.com/w/cpp/utility/optional.html">optionals</a>.</p><p>C++17 is already “old enough” to be considered commonly supported so we hope that this transition will be smooth, especially given that our commercial algorithms (sheet metal, CNC, DXF, etc.) have been based on C++17 since the very beginning.</p><h3>Smaller enhancements in base framework</h3><ul><li>Add more test cases for polygon decomposition.</li><li>Add the `clear-iv` command; add the ‘-top’ argument for the `vdump` commands.</li><li>Make `set-as-part` work without arguments; add yet another test case for interop.</li><li>Introduce `transform` and `make-axes` commands.</li><li>Fix the missing freeimage configuration in the Dockerfile.</li><li>Make sure that the FreeImage and oneTBB libraries are installed with the “Complete” distribution.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/387">#387</a>: Get rid of Mobius binaries in the installation directory of Analysis Situs SDK.</li></ul><h3>Quick ruler</h3><ul><li>Add a callback for the &lt;M&gt; key press to measure lengths interactively in the viewer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/0*TZd7c_5Qg26AAua6.gif" /><figcaption><em>Quick measurement.</em></figcaption></figure><p>You can now press the &lt;M&gt; key to activate an interactive ruler. The ruler is not precise and the acquired measurement depends on how accurately you click points in the modeling space. Still, it is a handy way to quickly check the principal part’s dimensions.</p><h3>Visualization</h3><ul><li>Add a line width parameter to IV Curve Nodes.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/393">#393</a>: Introduce the `vgl-dump` command for dumping shapes with the specified color and background color.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/385">#385</a>: Add interaction for local reference frames and attach them to the corresponding geometries.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/383">#383</a>: Add the possibility to select several actors with the presentation manager.</li><li>Introduce the camera orientation gizmo: backport the corresponding widget from VTK 9.5 with small ameliorations. You may want to read this article for details: “<a href="https://quaoar.su/blog/page/camera-gizmo-from-vtk-95">Camera gizmo from VTK 9.5</a>.”</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/381">#381</a>: Camera orientation widget sometimes jumps into the opposite axis w.r.t. the chosen one</li><li>Fix NPE crash on click in the Domain viewer with no part loaded in.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/371">#371</a>: Make it possible to add more functions to the same plotting canvas by several `draw-plot` invocations.</li><li><a href="https://gitlab.com/ssv/AnalysisSitus/-/issues/389">#389</a>: Collect history for sewing and enable history tracking for CAD edges.</li></ul><p>More customization opportunities are now available for making snapshots in the offscreen rendering mode. This feature was highly demanded by people who develop <a href="https://quaoar.su/blog/page/maas-geometric-kernel">MaaS platforms</a> on top of Analysis Situs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*W3s5ZAKxU_o5pnLD.png" /><figcaption><em>Custom colors in an offscreen-rendered image.</em></figcaption></figure><p>Another patch is related to the history of modification. Although <a href="https://gitlab.com/ssv/AnalysisSitus/-/blob/master/src/asiAlgo/editing/asiAlgo_History.h?ref_type=heads">asiAlgo_History</a> does not restrict any subshape type to be tracked, the visualization abilities of the <a href="https://analysissitus.org/commands.html#show-history">show-history</a> command are limited with faces. This is mostly enough for feature recognition and direct editing scenarios, but sometimes we want to work with planar geometries where CAD edges are of the same importance as CAD faces. In ver. 2025.2, there is a new option named -withEdges to visualize the traced edges together with faces.</p><p>Some more interaction is added to the local reference frames from the Geometric Set. We have <a href="https://gitlab.com/ssv/AnalysisSitus/-/blob/master/src/asiData/iv/asiData_IVAxesNode.h?ref_type=heads">asiData_IVAxesNode</a> that is used to report local reference frames in different situations. The same frame we use in the <a href="https://analysissitus.org/commands.html#orient-part">orient-part</a> command to report the movable axes frame of a part to be relocated. Now the user may click on the axes and relocate a part to the global origin via a dedicated context-menu action.</p><h3>P.S.</h3><p>It was about ten years ago when the first lines of Analysis Situs’ codebase were put together. Slowly but surely, this application absorbed all our experience and industrial/scientific contributions we collected over decades. It cannot be more rewarding than publishing it all in open sources and letting other people use it in all possible ways without restrictions and paywalls.</p><p>In this and upcoming releases, Analysis Situs continues to be what it has been since the very beginning: a collection of advanced CAD algorithms for shape interrogation, feature recognition and modeling. Our plans for 2026 are dynamic, but they include the following directions for research and development:</p><ul><li>Everything related to feature recognition is in our direct focus. Although we cannot publish all feature recognizers in the open source, the basic framework of our <a href="https://analysissitus.org/featuresext.html">commercial extensions</a> remains fully available, and it will continue to expand.</li><li>More functions for CAE preparation. We started to work on advanced healing and modeling functions for CFD preconditioning a couple of years ago (while generic healing functions were laid out a decade ago). Now we are slowly getting back to this use case with more ideas and requests to address.</li><li>This summer we introduced a concept-stage sheet metal modeler. Right now, it cannot do much other than putting some flanges together for testing out various bending topologies. We will continue working on it.</li><li>Configuration concerns need to be addressed. Since we walked away from the official modeling kernel with our own fork (<a href="https://opengeom.org/">www.opengeom.org</a>), we need to resolve possible dependency clashes in the development environments where several versions of OpenCascade are mixed.</li></ul><p>With this update, our team wishes you a Happy New Year 2026. Let all your iterations converge smoothly. See you in the new computational season.</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08c94e1037cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Check face accessibility for milling]]></title>
            <link>https://analysis-situs.medium.com/check-face-accessibility-for-milling-719f85375567?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/719f85375567</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[features]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Sat, 22 Nov 2025 20:46:09 GMT</pubDate>
            <atom:updated>2025-11-22T20:46:09.315Z</atom:updated>
            <content:encoded><![CDATA[<p>Autodesk’s Fusion comes with a handy feature that enables checking accessibility of faces. Such functionality is demanded by <a href="https://quaoar.su/blog/page/maas-geometric-kernel">quotation platforms</a> and perhaps machine shops using Fusion to generate NC paths. But let’s stop promoting Fusion (it has its own pretty annoying deficiencies) and rather see how to develop the same type of algorithm. After all, that’s what we are doing here: developing tricky CADCAM algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0nm54w_Hj6zX-XSm.gif" /></figure><p>Accessibility analysis is actually a sort of <em>visibility</em> problem. What you want to know is whether a piece of a feature surface can be approached by a cutting tool from a certain direction or a number of principal machining axes (sometimes called “cardinal” axes). Let’s leave the collision testing aside and simplify the thing (well, quite a lot) by saying that if a face is visible, it is accessible. That’s not exactly true, as you might claim. Indeed, if a face is visible, that does not necessarily mean that you have a suitable mill to remove the corresponding portion of material. Also, visibility says nothing about setup and other non-geometric aspects of fabrication. At the same time, visibility is still a good enough <em>necessary condition</em> for the very manufacturability of a feature.</p><p>The following screenshot illustrates one of the benchmark models that we use to demonstrate manufacturability issues on milled parts. Aside from sharp concave angles and thin zones, there is one pocket with a blind hole, which is hardly accessible in production (highlighted in red):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dY0ibLcH4uxH9GCr.png" /></figure><p>At NUMGRID 2022, we gave a talk about manufacturability analysis (<a href="https://quaoar.su/files/papers/dfm/NUMGRID_2022.pdf">read here</a>). The main principle is as follows: you run feature recognition to extract portions of engineering knowledge from a CAD part and supplement it with ray-based visibility tests. Ray casting alone is blind. Feature recognition alone is incomplete. Therefore, to make DFM checks possible, you need to combine both. Several years ago we started a project with one [Danish] machine shop to prove that such a combination makes industrial sense. After many trials and errors, we found out that DFM checks are hopeless without feature recognizers. To put it simply, you need to know the approach axis of a feature to test that this axis is actually viable. Here’s one illustration of why it’s important. Consider a T-slot feature:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GxG3Pgx7WT_dP2WS.png" /></figure><p>Such slots are done with specific tools (disk cutters) and are not problematic in general (see the simulation below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KDpK3JahL36avrqt.gif" /></figure><p>However, a blind visibility test will inevitably report occlusions for the overhanging “roofs” of a feature. A wise feature recognition (slash DFM) tool should understand it’s a T-slot and check accessibility in the slot’s horizontal direction. Alternatively, if for some reason this feature remains unrecognized (and T-slots are sometimes excluded from processing), then the face accessibility check should not even launch: we should not analyze the feasibility of something we have no idea about. Unrecognized features and 3D-milled features fall into this category.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rJ-zhlZE4oeghbMx.gif" /></figure><p>A true manufacturability test cannot be either instant or simple. To know if a part is feasible, you need to simulate the roughing process, and such simulation requires building trajectories and running material removal with a set of a priori known tools. As a result, no software package can tell you if a part is feasible or not with a button click, and all claims of doing so are nothing but speculations.</p><p>From the computational perspective, there are two conflicting aspects of a decent accessibility test:</p><ul><li>It should be fast.</li><li>It should be dense.</li></ul><p>For the sake of speedy computations, ray casting is traditionally accelerated with Bounding Volume Hierarchies (BVH). You can find an example of how to construct and iterate such trees in our supplementary example for OpenCascade lessons: <a href="https://gitlab.com/ssv/lessons/-/tree/master/extras_BVH?ref_type=heads">extras_BVH</a>. Also, make sure to read the <a href="https://analysissitus.org/forum/index.php?threads/this-is-a-forum-thread-about-building-and-using-bvh-bounding-volume-hierarchy-in-opencascade.250/">accompanying forum discussion</a>. The second property is DENSITY. We need to have enough geometric carriers to spread a scalar field over. Accessibility analysis reports true and false for each feature element, whether it is a face, a triangle, an edge or a point. One natural approach to conducting dense-enough analysis is by paneling your CAD geometry with uniform triangulation (make sure to <a href="https://quaoar.su/blog/page/a-note-on-netgen">use a good tool for that</a>). Alternatively, you may want to report probe points without topology (i.e., a point cloud instead of a mesh) and this way highlight the problematic zones.</p><p>Many of the approaches we researched over past years have found their way into the <a href="https://analysissitus.org/featuresext/features_dfm-about.html">Analysis Situs Commercial SDK</a>. We identify corners that may be difficult to produce (internal points should be rounded, e.g., with at least a 1 mm radius). We also find edges and surfaces that may be difficult to approach. Sometimes, such surfaces may be manufactured using 5-axis machining or special tools but it also means that a part needs a human revision and should be flagged as potentially problematic.</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=719f85375567" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smoothly connected segments over a planar contour]]></title>
            <link>https://analysis-situs.medium.com/smoothly-connected-segments-over-a-planar-contour-7174741842c1?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7174741842c1</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[sheet-metal-fabrication]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Mon, 10 Nov 2025 21:32:52 GMT</pubDate>
            <atom:updated>2025-11-10T21:32:52.005Z</atom:updated>
            <content:encoded><![CDATA[<p>Analysis Situs ver.2025.1 introduced <a href="https://quaoar.su/blog/page/segments-over-a-planar-contour">reporting of planar segments</a> for decomposing machining profiles into elementary chunks of data. This feature appeared to be useful for measuring cutting times in <a href="https://quaoar.su/blog/page/maas-geometric-kernel">MaaS platforms</a> and the upcoming release of Analysis Situs adds some further enhancements to this functionality. As practice shows, to assess machining time, we need to know how much of “smooth” movement over a path a cutter is going to do. The elementary segments that we introduced before do not answer this question directly because they correspond to the design edges over a contour, not to the <em>contour features</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cytqy_WCTFr5Hq8I.gif" /></figure><p>The segments reported by the <a href="https://analysissitus.org/commands.html#check-segments-info">check-segments-info</a> command would give you all elementary edges for all contours in a face. The first thing to do is to group these segments into connected chains, i.e., recover the topology of elementary loops. This stage is optional and it is not required if you extract segments for a contour instead of a face.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*UrLJ3_P-yBnRID4r.gif" /></figure><p>The second stage is to iterate over the segments contained in a single contour and propagate them over smooth connections. We assume here that a cutter (a mill or a laser cutter) would not have to stop at smooth joints. If that’s not the case, you can always check the underlying properties of elementary segments for finer details, e.g., arc radii.</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7174741842c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One way to override bending radii in sheet metal unfolding algorithm]]></title>
            <link>https://analysis-situs.medium.com/one-way-to-override-bending-radii-in-sheet-metal-unfolding-algorithm-75e6f111989d?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/75e6f111989d</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[sheet-metal-fabrication]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Thu, 09 Oct 2025 17:18:10 GMT</pubDate>
            <atom:updated>2025-10-09T17:18:10.775Z</atom:updated>
            <content:encoded><![CDATA[<p>It is not uncommon for the bending radii expressed in a CAD file to not match the tooling used to produce a part. For example, a particular shop may not have specific tools, or the design may just be flawed. In an ideal situation, the inner radius of a bend should be equal to the material thickness. If this is not the case, we are dealing with a “dirty design” problem. <a href="https://analysissitus.org/featuresext.html#ext-smru">SMRU</a> detects such issues with a specific error code, and the very presence of this code indicates that the flagged part should go through design review before proceeding to quotation and production.</p><p>But what can we do at the computation side to make sure that bend radii are correct? One seemingly straightforward answer is: let’s go for direct editing and defeature the wrong bending to reinsert a proper one instead.</p><p>The problem with the defeaturing approach is twofold:</p><ul><li>It requires two “heavy” modeling operations (defeaturing and filleting), and none of those is perfectly robust and quick. In fact, these operations would only work on reasonably simple cases.</li><li>It is an overkill to modify the original solid body. Editing a solid may not be necessary to accomplish the task of unfolding. Since we unfold one side of a sheet metal part, we don’t need to care about solids; shells are enough.</li></ul><p>The unfolding algorithm uses a simplified geometry to generate a flat pattern. Depending on the seed face, it can be the &quot;inner&quot; or &quot;outer&quot; side. In fact, the recognition logic does not even speak the “inner/outer” language and simply propagates from the max-area face to all its smoothly connected neighbors when collecting a shell to unfold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/0*Qs6V4tNtvv5nBLiv.png" /><figcaption><em>A shell to be unfolded.</em></figcaption></figure><p>TTherefore, if we want to adjust the geometry of a part, we can omit one dimension and transition from a solid body to an idealized face set. SHowever, even with this simplification, we still need to apply two operations: defeaturing and filleting.</p><h3>Euler defeaturing</h3><p>As per defeaturing, one may suggest using <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx?ref_type=heads">BRepAlgoAPI_Defeaturing</a> tool from OpenCascade, which is known to behave like a general-purpose face removal operator. Technically, this is another specialization of the generic Boolean engine that affects the target shape globally. There are several critical issues with this tool, though:</p><ul><li>It is abandoned. No one is working anymore to improve it in any substantial way, and the story repeats itself. The situation with Booleans is currently no different from the situation with fillets, chamfers, thickening, approximation and interpolation tools: they all do not receive the love they deserve because people who designed and implemented them are all gone. And these tools are left in an incomplete state, which means they are unusable in the batch mode that calls for predictability and robustness.</li><li>This tool cannot work on shells. While it seems natural to extend the scope of its applicability to shells, that’s not going to happen (see the point above for “why”).</li></ul><p>Reflecting on this situation, we (our team) definitely considered making further changes in the “defeaturing” API in the scope of our public <a href="https://opengeom.org/">fork of OpenCascade</a>. However, given that Booleans are essentially global ops, this route does not seem to promise enough control over what’s going on with the geometry. Removing one set of faces and letting another extend until intersection is quite a religious operation: you keep your fingers crossed when it runs.</p><p>Alternatively, why not use the defeaturing framework that we started to put together some 7–8 years ago (time flies so fast)? This framework was initially developed to automatically suppress simple blend chains and isolated fillets. We also put together a simple <a href="https://quaoar.su/blog/page/inkrementalnoe-podavlenie-skruglenij">incremental procedure</a> that proved to be a reliable way of simplification, although we haven’t had a chance to generalize it the way it can be generalized. The algorithm is based on Euler operators that we made available in Analysis Situs back in the day. To go for Euler, we need to conduct local topology analysis at the modification zone so that we know exactly which edges and faces to contract, eliminate and reconstruct.</p><p>For a sheet metal shell with a single cylindrical bend, the local topology analysis would lead to the following labeling:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/0*u8x86UF4XuuOFbbr.png" /></figure><p><em>Local topological situation.</em></p><p>This drawing is what we call a <em>topological situation</em>. Different situations are clipped into the blend suppression algorithm, which makes up our extensible architecture for Euler-based defeaturing. For the sake of better modularity, each “situation” knows not only how to initialize itself but also provides an “Euler program” to do all necessary surgery that defeatures it locally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ohxlRMyVtop_dQoJ.png" /></figure><p><em>A sheet metal side shell after application of the corresponding Euler program.</em></p><p><em>The topological situation after application of the corresponding Euler program.</em></p><p>Euler operators do not go further than preparing the topology of a part. Once the topology is prepared, it is time to “normalize” the geometry by stitching the neighbor faces together. Such stitching is not a universal algorithm either. For solid models, we can expect to reintersect faces to obtain new curves for edges. In shell modeling, we lack surfaces to intersect. Look at the “topological situation” image once again: we do not have side faces t1 and t2 and therefore, the edges e-s1-t1, e-s1-t2, e-s2-t1 and e-s2-t2 cannot be computed from surface-surface intersection. This observation calls for a specialized normalization algorithm, e.g., like the following one:</p><ul><li>Intersect faces f-s1 and f-s2 to obtain the intersection curve.</li><li>Project vertices to the intersection curve to obtain their new positions.</li><li>Rebuild the edges e-s1-t1, e-s1-t2, e-s2-t1 and e-s2-t2 as straight lines to the new vertices.</li></ul><p>Back in 2018, we devoted a small article to the geometry normalization process (read <a href="https://quaoar.su/blog/page/k-ejlerovym-operatoram-rekonstrukcija-rebra">here</a>). The algorithm of edge reconstruction was decoupled from the blend recognition algorithm and attempted to extract the <em>topological situation</em> on its own, simply by questioning the local neighborhood of an edge. This decoupling was done intentionally, as we wanted to have a generic tool that does not depend on feature recognizers.</p><p>In the scope of sheet metal processing, we are clearly dealing with an edge case: we have a shell with each bend as an isolated feature. Therefore, why not design an ad hoc geometry normalization algorithm that knows everything it needs to know from the recognizer? Once Euler is applied, we are done with the topology of a model, so any geometric postprocessing is by definition a topology-preserving operation. I don’t know if the early architects of OpenCascade had such an idea in mind, but they prepared such an opportunity for us—the successors.</p><h3>Hard defeaturing</h3><p>Some topological situations are easier to handle without Euler. One such is when two bends meet each other at a common vertex:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZcgcynTHnpIYNIDv.png" /><figcaption><em>A typical corner situation.</em></figcaption></figure><p>With Euler, we would have been bothered to reconstruct all edges in the vicinity of the common vertices, which is quite a laborious task (although that does not mean it’s a bad idea).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D6efGL7BWAMSWXbt.png" /><figcaption><em>Corner bend defeaturing by extending support faces.</em></figcaption></figure><p>Another situation where the Euler-based approach would not work is when we have more edges than expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EdynHxO0hbMNqYXd.gif" /><figcaption><em>Several terminating edges at a bend are enough to challenge Euler ops.</em></figcaption></figure><h3>Hard vs Euler</h3><p>So why would we need Euler ops if there’s just a generic algorithm that can handle more situations? In fact, application of “hard” defeaturing alone can at times be slower (e.g., x3 or so) than the Euler-based ad hoc algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*leRlz1JoC0gTgKrw.gif" /><figcaption><em>Euler-based defeaturing can be several times faster than the generic approach.</em></figcaption></figure><p>Both approaches to defeaturing can break the consistency of a model if no special care is taken. Look at the shell below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/0*Z4alMpkR2vwzQFge.png" /><figcaption><em>Some bends cannot be defeatured.</em></figcaption></figure><p>Euler defeaturing is unable to reconstruct a common edge between the support faces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MUHuSb0uEwU02V5C.png" /><figcaption><em>Euler defeaturing.</em></figcaption></figure><p>The worst thing about improperly applied “hard” defeaturing is that it gives a formally valid shell: all contours are closed while face overlapping is not checked in the conventional validity analyzer of OpenCascade.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/0*S3-9sd8H_Kfsj2ty.png" /><figcaption><em>Hard defeaturing.</em></figcaption></figure><h3>Incremental procedure</h3><p>Now that we are able to defeature one isolated bend, let’s move on and try defeaturing all bends from a shell model. The easiest (to debug and maintain) approach is an incremental procedure. There is one big advantage in developing the suppression algorithm in frames of the generic blend defeaturing—we can reuse just the same <a href="https://quaoar.su/blog/page/inkrementalnoe-podavlenie-skruglenij">incremental scheme</a> that we presented six years ago.</p><p>The procedure kills one bend at each iteration, rebuilds <a href="https://analysissitus.org/features/features_aag.html">AAG</a> and proceeds with another bend. Here are some examples of our incremental procedure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CnCI3EkLICEpkPWG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7RfFnO6AkTy6pWs7.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MZ8_UuY5RtgSv5U2.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RKimb_mzOCQd3gZ3.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QcsZkxdl2bVsWX0O.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1Hn8ectw8UQb1kYt.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0wsh98yyOO0K6DDc.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eslXyu0iSvvufbSY.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U5NMXRlMNyXnIzgb.png" /></figure><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75e6f111989d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perforated sheet metals and performance of the OpenCascade STEP translator]]></title>
            <link>https://analysis-situs.medium.com/perforated-sheet-metals-and-performance-of-the-opencascade-step-translator-c592c7a2e085?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c592c7a2e085</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[sheet-metal]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Sun, 31 Aug 2025 18:03:34 GMT</pubDate>
            <atom:updated>2025-08-31T18:03:34.736Z</atom:updated>
            <content:encoded><![CDATA[<p>A perforated sheet metal part is a conceptually simple geometric object. But, as practice shows, it’s one of the most unpleasant cases for a recognition system to handle. Take a look here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iOzxx-44zXPnB25H.png" /><figcaption><em>An extreme case of a perforated sheet.</em></figcaption></figure><p>We’ve been analyzing a bunch of perforated cases to figure out what the typical hotspots are. It appears that the STEP translator may at times slow down the whole process quite a bit. Take a look here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tDx7Jfwtkoo0TqXx.png" /><figcaption><em>Performance hotspot due to shape healing on STEP import.</em></figcaption></figure><p>What we see here is that shape healing consumes around 90% of the processing time, which looks suspicious. Although OpenCascade, of course, has to precondition the input geometry (e.g., build missing seam edges), it makes little sense to hunt down self-intersecting loops in the input faces if we assume that the CAD model is healthy. In fact, the entire shape-healing preprocessing is done for two reasons:</p><ul><li>Make sure to convert the incoming shape to a valid B-rep format used by OpenCascade. This is essentially a translation stage because we literally translate a shape from the STEP language to the OpenCascade dialect of B-rep. This stage is unavoidable and should be present unconditionally.</li><li>Heal common geometry flaws, e.g., misoriented faces or these self-intersection issues that appear to be the source of trouble.</li></ul><p>To eliminate the hotspot due to the self-intersection check, the first thing to try is just disabling it. We introduced a dedicated read.step.nohealing static variable in our <a href="https://opengeom.org/">OpenGeom fork</a> of OpenCascade. This flag is used to turn off ad hoc healing operators that we assume are unnecessary. According to our non-regression test database for sheet metal parts, getting rid of self-intersection tests does not have any negative impact on feature recognition. It only improves the overall processing time. The following chart depicts the performance of the STEP reader measured over ~2600 cases. For some cases, we get the reader working several times faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L99L2d29wgfKheye.gif" /><figcaption><em>Optimizations in STEP reader (click to enlarge).</em></figcaption></figure><p>Disabling the wire intersection test is undoubtedly a low-hanging fruit. Andrey Betenev, the [former] architect behind data exchange and shape healing in OpenCascade, thinks that it is not surprising that these checks are not demanded anymore. Back in the days when they were introduced to OpenCascade, 3rd-party software used to write all sorts of garbage to the CAD files and a translator needed to take all possible care to survive on dirty input. Nowadays, we may not see such issues so much and the workload of a translator appears to be unbalanced: a lot of processing is done to struggle with issues that are rare. Moreover, we need to clearly understand what it means to “heal” a self-intersection issue for a contour that is shared (by edges) between several faces. To the best of my knowledge, such issues are not really healed but are rather getting hidden by increased tolerances. Do we really want to devote so much of the execution time to powdering a wound?</p><p>Another interesting hotspot is revealed in the STEP writer. Because <a href="https://analysissitus.org/featuresext.html#ext-smru">SMRU</a> (Sheet Metal Recognition and Unfolding) not only reads a STEP file but also generates a bunch of geometric artifacts, we need to be sure that exporting a STEP file would not take too long. And here is what we see for a perforated sheet metal model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eKki-puMHL5QeK2M.png" /><figcaption><em>A hidden trap of BRepAdaptor_Surface.</em></figcaption></figure><p>This initialization does a heavy job of computing UV bounds for every edge on every face coming in. Previously, we <a href="https://quaoar.su/blog/page/outerwire-problem-of-opencascade">discussed</a> that computing UV bounds is actually quite an issue in OpenCascade, because this computation is heavy and its results are not cached. In the situation discovered for the STEP writer, the problem is even funnier: the computed UV bounds are not only computed thousands of times but they are also not used! This happens because the UV bounds computation is done implicitly behind the scenes of the BRepAdaptor_Surface ctor. This adaptor allows you to work with a CAD face using the interface of Geom_Surface, i.e., a CAD face is wrapped to behave like a surface. The problem here is that you do not necessarily need to know the UV coordinates of the trimming contour of a face to query its geometric properties. The fix is trivial:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LJF_Gi7PINLvUKUj.png" /><figcaption><em>Never forget about this little Boolean flag in BRepAdaptor_Surface.</em></figcaption></figure><p>This patch is legal because the constructed adapter SA is only used to check the surface type below in the code. I.e., we do not need to bother with the UV bounding rectangle. Surprisingly enough, this slight modification has a massive impact on the STEP export time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gqMaj8L6hK2YrEvN.gif" /><figcaption><em>Optimizations in STEP writer (click to enlarge).</em></figcaption></figure><p>These tests were performed on a personal laptop with the following configuration:</p><pre>CPU: Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz<br>RAM: 32GiB<br>Machine Type: Notebook<br>OS: Windows 10, x64.</pre><p>All patches are made on the <a href="https://opengeom.org/">OpenGeom fork of OpenCascade</a>. We are heading towards testing it all with the available data pack provided together with the official version of OpenCascade 7.6. Of course, the test coverage won’t be complete since we do not have the [bigger] part of the test data files that have never been published by OCC. At the same time, all the tests we have in Analysis Situs SDK make us believe that the applied patches are just as good as they are. Some more delicate improvements are still possible in the STEP translator and we might come back to this issue once/if it becomes a thing again.</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c592c7a2e085" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On sheet metal unfolding. Part 13: hole mapping]]></title>
            <link>https://analysis-situs.medium.com/on-sheet-metal-unfolding-part-13-hole-mapping-71c507c7e502?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/71c507c7e502</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[sheet-metal-fabrication]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 15:03:13 GMT</pubDate>
            <atom:updated>2025-08-28T15:03:13.795Z</atom:updated>
            <content:encoded><![CDATA[<ol><li><a href="http://quaoar.su/blog/page/on-sheet-metal-unfolding-part-1">Part 1</a> gives an introduction to unfolding and reviews the software packages for solving similar tasks.</li><li><a href="http://quaoar.su/blog/page/on-sheet-metal-unfolding-part-2">Part 2</a> explains how bends can be unrolled precisely.</li><li><a href="http://quaoar.su/blog/page/on-sheet-metal-unfolding-part-3">Part 3</a> instructs how to survive the K-factor.</li><li><a href="http://quaoar.su/blog/page/on-sheet-metal-unfolding-part-4-1">Part 4</a> outlines the structure of the unfolding algorithm. It also introduces the notions of the “unfolding tree” and the “border trihedron,” which are essential ingredients of the solution.</li><li><a href="http://quaoar.su/blog/page/on-sheet-metal-unfolding-part-5">Part 5</a> introduces a generalized unfolding algorithm that can handle rolled parts and parts with specific design issues, such as terminating or consecutive bends.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-6">Part 6</a> is the introduction to another challenging problem of sheet metal processing, which is bend sequence simulation.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-7-drilled-holes">Part 7</a> discusses how to treat machined holes in a way to generate accurate flat pattern contours.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-8-rolled-parts-vs-tubes">Part 8</a> gives some topological heuristics to distinguish round tubes from rolled pieces.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-9-dynamic-unfolding">Part 9</a> introduces the concept of “dynamic unfolding” for bending simulation.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-10-non-isolated-cutouts">Part 10</a> highlights the importance of recognizing non-isolated cutouts in folded sheet metals.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-11-bend-grouping">Part 11</a> discusses how to join bends into meaningful groups for simulation and manufacturing.</li><li><a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-12-searching-for-feasible-bends">Part 12</a> explains how to check if there is a feasible bending sequence for a part.</li></ol><p>It’s been five years since “Part 1” of our sheet metal saga was published. And it’s unlikely to end any time soon because there is always something new to work on. This time we will revisit a pretty important subject of mapping feature contours between the 3D and the 2D states of sheet metal geometry. In “<a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-7-drilled-holes">Part 7</a>” we introduced a little trick that substitutes the contours left by machined holes with more appropriate diameters. Over the past years, this feature has proven to be useful and it works decently in a production environment. Let’s take a look at a part with a bunch of machined holes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*C_rKF7NbgzTmWVwJ.png" /><figcaption><em>A sheet metal part with machined holes.</em></figcaption></figure><p>When we unfold sheet metal parts with countersunk, counterbored or other types of machined holes, we normally want to give such holes special treatment. In particular, on a flat pattern we usually leave main diameters and eliminate countersinks and counterbores from the flat geometry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lsQk2mj21aGgp-5P.png" /><figcaption><em>Reinserted machined holes in 3D and 2D (flat pattern).</em></figcaption></figure><p>The original contour of a machined hole is substituted twice: once on the folded state of geometry and the second time on the flat pattern. This geometric modification does not lose any information because the presence of machined holes is identified and reported for the 3D shape specifically. Here is an example of a drilled hole report in JSON:</p><pre>&quot;drilledHoles&quot;: [<br>  {<br>    &quot;diameter&quot;: 15,<br>    &quot;count&quot;: 2,<br>    &quot;countersinkDiameter&quot;: 21,<br>    &quot;countersinkAngle&quot;: 90,<br>    &quot;countersinkDiameterOpposite&quot;: 25,<br>    &quot;countersinkAngleOpposite&quot;: 90,<br>    &quot;faceIds&quot;: [[1, 2, 3], [57, 63, 64]]<br>  },<br>  ...</pre><p>Defeaturing of machined edges is done by contour substitution right on unfolding, which makes it a very fast and robust process. However, there is one subtle issue that we haven’t touched yet, although it has significant practical importance. The question is, how do we actually know which contour on a flat pattern corresponds to one or another hole in the folded state? That’s the feature mapping question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IK7HPOiDnl0AaNK1.png" /><figcaption><em>We need to restore the missing link between a 3D feature and its 2D contour.</em></figcaption></figure><p>If we know the contour of each hole in the flat pattern and vice versa, we can let the user interact with the flat sheet instead of the folded model. This mapping is not given for granted and needs to be carefully implemented. The key to implementing it is the <a href="https://analysissitus.org/features/features_history.html">history of modifications</a>.</p><p>The modification history, as a data structure, has undergone a lengthy evolution process. Back in the early days of OpenCascade, the very idea of a history tracker was aggregated into the modeling API (<a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx?ref_type=heads">BRepBuilderAPI_MakeShape</a>). Later on, the concept of the history was encapsulated into a dedicated class named <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/BRepTools/BRepTools_History.hxx?ref_type=heads">BRepTools_History</a>, which is now used throughout OpenCascade modeling and editing tools. In Analysis Situs, we have our own implementation of the history tracker that is also employed by the persistent naming service. In summary, every significant modeling algorithm inherently maintains a history tracker. So does unfolding.</p><p>It is the history tracker that tells us what happens to flanges and bends on unfolding. We also employ the modification history to query the “anchor” edges for paving flat patterns in <a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-5">UNFOLD2</a> algorithm (the second version of the unfolder that can handle rolled flanges). If we want to understand what happens to the insertion contours of drilled holes, we should consult the history tracker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dA83VEK7x8LLMFgq.png" /><figcaption><em>The maximized face is the most concise representation of a flat pattern.</em></figcaption></figure><p>A flat pattern is a <a href="https://analysissitus.org/featuresext/features_smru-fp-structure.html">composite structure</a>. Topologically, it is a <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/TopoDS/TopoDS_Compound.hxx?ref_type=heads">COMPOUND</a> that contains one face for communicating all cutting contours plus three extra “layers” for unrolled flanges, bends and bend lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tBQx8Mirx_3Rthdy.png" /><figcaption><em>The preserved images of flanges, bends and bend lines on a flat pattern.</em></figcaption></figure><p>It is the maximized <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/TopoDS/TopoDS_Face.hxx?ref_type=heads">FACE</a> that is normally exported to <a href="https://analysissitus.org/featuresext/features_smru-svg.html">SVG</a> and <a href="https://analysissitus.org/featuresext/features_smru-dxf.html">DXF</a> formats to communicate a flat pattern for further processing (<a href="https://quaoar.su/blog/category/nesting">nesting</a>, production). Therefore, ideally, we would want to trace the history of holes all the way down to the maximized FACE (MFACE).</p><p>History is a fragile thing. If you happen to break the shape evolution chain from one algorithm to another, you may end up having “dead” shapes stored in the history. These are the shapes that do not exist in the active part (whichever geometry you consider to be “active”). The worst thing about such “dead” shapes is that they often do not reveal themselves up to the final moment when something entirely different stops working because of them. Also, because history is just a transient cache, it is often not covered by regression tests, and its consistency may easily be broken with software evolution. One way to go around this is introducing contract checks in the code.</p><p>OpenCascade loves and practices exceptions. Its usual way to perform contract checks is through assertions like this:</p><pre>for (Poly_ListOfTriangulation::Iterator anIter(theTriangulations); anIter.More(); anIter.Next())<br>{<br>  const Handle(Poly_Triangulation)&amp; aTriangulation = anIter.Value();<br>  Standard_ASSERT_RAISE (!aTriangulation.IsNull(), &quot;Try to set list with NULL triangulation to the face&quot;);<br>  ...<br>}</pre><p>The used <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/Standard/Standard_Assert.hxx?ref_type=heads">Standard_ASSERT_RAISE</a> macro throws an exception that would crash your program in release mode and stop execution in debug mode (on Windows) to prompt you to attach the debugger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4joFbNPBb3-7J0d_.gif" /><figcaption><a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/Standard/Standard_Assert.hxx?ref_type=heads"><em>Standard_ASSERT</em></a><em> in action.</em></figcaption></figure><p>It&#39;s probably not a good idea to crash the program, especially when you have thousands of tests to review and gather statistics from. Therefore, my preferred way to use this assertion would rather be this (with the surrounding _DEBUG condition):</p><pre>#ifdef _DEBUG<br>  Standard_ASSERT_RAISE( ... );<br>#endif</pre><p>Getting around history is one of the trickiest aspects of programming with the OpenCascade API. In the training sessions, we used to devote a bunch of hours not only explaining the history tracker but also debugging the students’ code to understand why evolution chains get broken at times. Here is the modeling pipeline for a part after it gets all drills and cutouts recognized:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/0*t8JlsipnMgcLiSTr.png" /><figcaption><em>Modeling pipeline that has to propagate history of modifications for contours.</em></figcaption></figure><p>The algorithms in red boxes may or may not affect the contours of cutting features depending on whether these features are entirely isolated or penetrate into flange boundaries. Look at the part below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*24zDCIGEVE6vqoUs.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7iyX7ol1K09g9s2P.png" /><figcaption><em>Two variations of the same part challenge the history tracker differently.</em></figcaption></figure><p>In the first case, the holes are entirely isolated, so face stitching and face maximization algorithms may reuse their contours from the previous states of geometry without rebuilding the shape. If, however, the holes happen to touch the bend edges (the second case), then both sewing and face maximization would have to allocate new wires and put the corresponding records into the history tracker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kKTYx6UFeM5XqoWE.gif" /><figcaption><em>Iterating the history graph for the sake of verification that all “active” leaves are actually present in the model.</em></figcaption></figure><p>Equipped with the modification history, we can trace the evolution of each contour down to its final state in the flat pattern. This information can be used later on to connect the flat contours with their folded preimages. One practical way of using this information is to group the corresponding entities in the SVG image of a flat pattern so that the user may select the whole group and associate the required machining properties with the corresponding feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2cL7RF-W1kwOp4n4.gif" /><figcaption><em>Interaction with the SVG groups that correspond to flat contours of drilled holes.</em></figcaption></figure><p>This opens the door to bidirectional interaction between the 3D and 2D states of a sheet metal part: choose the one that is easier to work with.</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71c507c7e502" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Geometric kernel for digital manufacturing // MaaS kernel]]></title>
            <link>https://analysis-situs.medium.com/geometric-kernel-for-digital-manufacturing-maas-kernel-12b864aae790?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/12b864aae790</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[computational-geometry]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 12:16:06 GMT</pubDate>
            <atom:updated>2025-08-22T07:49:33.345Z</atom:updated>
            <content:encoded><![CDATA[<h3>A really long preamble</h3><p>Back in 2022, we delivered a presentation of our services in a local “Computational Geometry” workshop. The occasion was a small event sponsored by a well-known corporation, and we prepared carefully. To me, this meetup was another milestone: the former OCC team was parting ways with the parent company and there were many rumors about possible directions for the future development of the kernel. Back then, our team had already been independent for a couple of years, so we used this opportunity to summarize our experience and talked publicly about the things we were up to.</p><p>Over the past 5 years, it has become evident that most of the algorithms, data flows, and computation principles we’ve been practicing can be summarized under the umbrella of a software development kit (SDK). The idea is nothing new: there is something to reuse and resell from one client to another, so you turn this reusable thing into a separate package and bring it to the market. Supplemented with customization services, this package becomes an offer not only to buy something but also to work on a problem together with your customer. We jargonized this offer as an “MaaS kernel” to draw a parallel between a general-purpose geometric modeling kernel (like OpenCascade, ACIS, or Parasolid) and our tools. Technically speaking, it remained the same OpenCascade but was empowered with more libraries related to:</p><ul><li>Feature recognition</li><li>Assembly management</li><li>Geometry preprocessing (simplification, healing)</li><li>Direct editing</li><li>Specialized data exchange</li><li>etc.</li></ul><p>This “MaaS kernel” is being developed in the Analysis Situs SDK, both its open-source and commercial components. The architecture is not monolithic and is well illustrated by the following diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dhHle6KOM43lkwVJiRaFHw.png" /><figcaption><em>Analysis Situs SDK.</em></figcaption></figure><p>Among other things, the CG event served as a forum for discussing the future of the OpenCascade library. There have been different opinions on where it should go and how. One school of thought is to evolve OpenCascade by specializing it to specific needs. E.g., if we are building a direct modeler (or editor), we have to focus on the core modeling functions, such as <a href="https://quaoar.su/blog/page/technical-memo-on-opencascade-booleans">Booleans</a> or defeaturing. If all we need is the data conversion, then let’s probably focus more on the API functions employed in the CAD translators (e.g., spline approximation will be one of such). Our use case is more of a CAM domain, so we can push the development of a kernel in this direction better than in others.</p><p>The hard thing is that a CAD kernel isn’t really a source of innovation anymore. It is rather a commodity. At least, this is what people expect from a CAD kernel. The days of innovative development in Boolean operations or surface-surface intersections are clearly gone, and we are mostly left without a reliable and good-enough general-purpose CAD kernel. We are trying to catch a departed train, trampling our feet until they bleed, while gentlemen who paid for tickets enjoy swift travel with their icy umbrella drinks. There is also this constant question of human resources and money you must burn to feed OpenCascade development. Unless you have several million dollars, this question is not that trivial. My absolutely random estimate would be about 5 people for 5 years of full-time development to contribute meaningful changes to the library. It’s not the cheapest thing to do, of course. But the main question is not money and time. It’s the purpose and the goals you set for the kernel development, because this is what defines your roadmap.</p><p>Funding the development of yet another geometric modeling kernel for the sake of having yet another geometric modeling kernel is a terrible idea in many aspects, starting from the financial side of things and ending up with the inevitably poor quality of the code that is not used by any significant community of engineers. Our “MaaS kernel” is based on the well-established OpenCascade core, where we accumulated decades of experience and that is used by thousands of companies over the globe. We have a well-defined plan to transform it into a robust product that caters to the CAM market in its MaaS dimension. This intention of building up the “MaaS kernel” is not a startup idea whatsoever. This idea has been organically crystallized from dozens of custom development projects where we’ve been implementing the same and similar algorithms over and over again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd941nRBJ4brSoTkyLfb2A.png" /></figure><p>Today we see companies like PaperlessParts, DigiFabster, SecturaFab, QuotationFactory and many others that expose more or less the same API. No matter which geometric kernel they use under the hood and how much AI wording their sales put into PowerPoint decks, they are all from the same family of software components. And our MaaS kernel aims at providing a general-purpose API for platforms like the listed ones.</p><h3>The place of AI in CAD feature recognition</h3><p>This topic could have been another side thread in our MaaS talk but back in 2022 we did not hear this AI hype loud enough. For anyone interested in learning from the leaders, I would definitely recommend the following podcast from The Fabricator magazine: “<a href="https://www.thefabricator.com/podcast/episode/next-gen-metal-fab/practical-approaches-to-using-ai-in-manufacturing-and-fabrication">Practical approaches to using AI in manufacturing and fabrication</a>.” While the whole discussion was definitely worth the time, the most interesting piece is, in my opinion, the message delivered by Caleb Chamberlain of OSH Cut (a top-tech US company for sheet metal fabrication). Here is the quote:</p><blockquote><em>“Honestly, I think that stuff like DFM will probably make sense to be done from first principles for the foreseeable future. By first principles, I mean, hey, model the part, model the break, run a collision check, and render it. That’s first principles. An AI large language model is using these massively scaled-up neural networks to create these complex results, and I think to the extent that you can just take a relatively physical real-world system and just model it, that’s always going to be better.”</em></blockquote><p>The same goes for CAD feature recognition: you do not need a large, overly trained language model to understand that a bottom face is concavely connected to a contour of perpendicular walls. It’s the computational geometry question that was answered in a trivial way by something called a “Geometric Modeling System” back in the ’70s. CAD feature recognition can be done entirely based on Caleb’s “first principles,” and the real intelligence here will likely be avoiding anything “artificial” in a well-defined geometric problem.</p><p>Having said that, let’s not pretend that AI is useless in our domain. It is useful but for another purpose. You can still predict fabrication costs based on AI models and you can basically use them for any other type of similar approximation where a CAD is the input and a number is the output. In this context, a CAD feature recognition subsystem is employed as the data source for training a neural network. It quantifies the CAD geometry in a way that can be used by AI. You may want to read more about our take on this issue here: “<a href="https://quaoar.su/blog/page/interfacing-with-machine-learning-feature-recognition">Interfacing rule-based feature recognition with machine learning (AI) methods</a>.”</p><p>But Analysis Situs is all about Caleb’s “first principles.” So let’s dive into the presentation now.</p><h3>The talk</h3><p>Below I will reproduce the main ideas we presented at the CG event, followed by the corresponding slide deck. This whole thing is reduced quite a bit, so only key topics are highlighted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aToDyl3funEitCDO.png" /></figure><p>The idea for the front cover and a few other illustrations down the road was borrowed from A. McKay and A. de Pennington, whose paper I was pleased to review <a href="https://quaoar.su/blog/page/po-motivam-odnoj-recenzii">the other day</a>. The talk is devoted to a “MaaS kernel,” which we define as an SDK to address some typical needs of an “online manufacturing-as-a-service platform.” After many years of working in this niche of CAD development, we were able to crystallize the common thing behind this whole business. Because we are being contacted by start-up companies aiming at building their own MaaS solutions, it feels like this presentation can help CTO people understand better what they are actually looking for. Of course, people are often referring to existing systems that they wish to reproduce and make better, but let’s avoid any companies’ names and focus on the common core.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*01uMRPQbM5rOz8qF.png" /></figure><p>Just to state the fact, our core team is compact yet highly experienced. All of us have a long story contributing to CAD software, including end-user products and low-level math of geometric modeling kernels. All of us participated heavily in the development of the OpenCascade geometric modeling kernel starting in the days when it was built using WOK. Somehow, the history of the kernel has become our own history, with youth, middle ages and retirement phases all together. Aside from this, our team contributed more than 600k lines of code to open-source <a href="https://analysissitus.org/">Analysis Situs</a> and <a href="http://openmobius.org/refdoc/index.html">Mobius</a> projects, and this journey has only begun.</p><p>In the field of industrial geometric modeling, public dissemination of knowledge about low-level CAD/CAGD algorithms is a good style. Equipped with the proper theoretical mindset, the future generations of CAD researchers and developers will have a more profound idea of how low-level CAD works. Publishing openly is a part of our profession, and we keep dedicated to providing scholarly contributions to the field of geometric modeling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FDdE4kANGD1-MkFd.png" /></figure><p>Analysis Situs started as an educational software package. Within the frames of the European IODA project, we conducted a workshop about computational geometry. To make a talk a little less boring, we prototyped a compact VTK-based software package with three viewers to display a CAD part, the host geometry of a single B-rep primitive and its trimming contour. The idea was to illustrate the mechanics of B-rep. It became clear after a while that a tool for CAD model inspection is just a proper foundation for a feature recognition and shape interrogation system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hBWr_NhH-XG2GJCV.png" /></figure><p>After ten years of development, Analysis Situs has proven to be a successful project. Just several months after the first version was compiled, I found myself using it more often than Draw. Today I do not remember when I launched Draw for any productive use last time. My sole prototyping workbench is Analysis Situs and its functionality continues to expand. With this tool as a basic framework, we developed a number of new algorithms, including the vast majority of feature recognizers. We also developed the commercial CAD Processor, having Analysis Situs as a main prototyping environment. Now, since our team is independent, we base our commercial offers on the Analysis Situs SDK.</p><p>As this talk is devoted to MaaS, let’s highlight the key feature of Analysis Situs with respect to digital manufacturing: the open-source feature recognition SDK. A normal user starts with the interactive application where you load a CAD model and check its contents by clicking through the CAD faces. Besides the 3D visualization, Analysis Situs works in a pure batch mode and exposes its C++ API for software developers.</p><p>The added value of Analysis Situs lies in its implementation of the Attributed Adjacency Graph (AAG), rule-based feature recognizers and the pattern-matching algorithm based on the dictionary of features. There is also a bridge between AAG and trendy machine learning tools such as UVNet. The feature recognition framework is supplemented with the corresponding modeling core. We develop a range of specific algorithms for defeaturing, direct editing, shape conversion, shape interrogation and more. As practice proves, feature recognition needs to be backed by a powerful modeling kernel in order to extract various properties of the detected features and facilitate manufacturability checks. And this modeling core is open-sourced in our case. We do not compete with Parasolid or ACIS; we just do it differently: in a completely open way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B20XmY1wCP0r5s-Z.png" /></figure><p>MaaS is a fancy term that describes a clear business case. A customer wants to get a part fabricated and he has a “digital drawing” of a product (e.g., a CAD model). He communicates this “drawing” to a specialized CAD service (normally, just sends it over the Internet) and gets back a couple of outcomes: the manufacturability report, the quotation, and the delivery date. The quotation and DFM checks can be done at the target shop or by an intermediate broker. How this communication process is done defines several types of MaaS architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p12DydDJPF_N8Y82.png" /></figure><p>The first case is a hub. The customer sends his design to a centralized platform and the platform delegates the job to one or another manufacturer. Normally, it is the hub that decides on the price. The connected (and certified) manufacturers can pick up the already preprocessed order from a centralized platform if they ensure to have all the required tooling and capacities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*StTn6z2FEQtz8b1L.png" /></figure><p>The second case is when an MaaS platform belongs to a manufacturer. It is often the case when a shopfloor prefers to keep the entire order processing logic at their premises, aiming at higher flexibility. In such a case, the manufacturer acts as a software developer because it is the manufacturer who has to create and maintain the MaaS CAD service bottom-up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kKTYlEEkFXhNYDny.png" /></figure><p>Another case is when an MaaS platform is being developed as a box product that is then installed or given access to among several manufacturers. The shop itself just uses the platform provided by a vendor and does not bother with developing such a complex piece of software on its own. It’s not a hub, though: from the customer’s point of view, the platform belongs to the manufacturer. The user who uploads a part for quotation does not know that the manufacturer licenses the MaaS service from a 3rd-party provider. The user does not care. But we do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NQI2lcClEkJHpOVD.png" /></figure><p>The last case is when MaaS is integrated as a plugin to CAD software. The user may stay in his favorite design tool when placing an order, but there should still be a remote part of a CAD service: one of the three options mentioned above: a hub, a self-hosted solution or a licensed software package.</p><p>Staying on the ground of computational geometry and deterministic pricing models, we claim that all the mentioned cases may benefit from the same common core: the MaaS kernel. A MaaS kernel to a MaaS platform is the same thing as a CAD kernel to a CAD system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gYsGDI1d4m7uPBis.png" /></figure><p>From all the logistics around MaaS platforms, we, as computational geometry engineers, care only about price and manufacturability feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yMxybsfbT2d1gduV.png" /></figure><p>When a CAD design is uploaded, we need to be able to check the production method first and answer the very basic question: do we have all the required machines in our park to fabricate the part in question?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wW-0yxL_DrenFDoN.png" /></figure><p>If yes, then let’s have a closer look at a design in terms of its features. Are all features machinable? If yes, do they all come with a reasonable manufacturing effort?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P9gJgYC8Q_VfoLk9.png" /></figure><p>The more precise rules you build on top of a feature recognizer, the better price you can give. The quotation platform should also avoid automatically pricing parts that expose manufacturing difficulties. To avoid high prices that drive your clients away, it might make more sense to give a client a manufacturability report first. Once all the issues are addressed, it’s the right time to price the part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0KcFuCRCbMFRDXUI.png" /></figure><p>The overview of a typical quotation workflow brings us to the following key opportunities for automation:</p><ul><li>Automate design validation by DFM checks;</li><li>Automate price calculation by predicting the required machining time.</li></ul><p>Both topics are challenging and require proper geometric and algorithmic support. Let’s talk about the API of a geometric system that could address these two challenges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C6Wn7FKclHTe7-Vx.png" /></figure><p>We presume that there is already a general-purpose CAD modeling kernel, such as ACIS, Parasolid or OpenCascade, that we use for working with CAD geometry. It appears that literally all quotation platforms use one or another kernel, and it also seems that OpenCascade is a brilliant choice for exactly this use case. It is free, it is flexible, and it works well with the existing CAD designs created somewhere else. But at the same time, the modeling kernel is not enough. It just does not have the required functions to assess the manufacturability of a part, feature-recognize it and derive machining time from the dumb geometry. But what do we actually need from a CAD kernel to make an MaaS solution possible?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wx5nB1byjCavN-LT.png" /></figure><p>It all begins with reading a CAD file, be it a single part or an assembly. Let’s focus on a single part in this talk with a remark that adding assemblies is quite a simple technical question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SUbQpkmm3aSRy6TT.png" /></figure><p>The vast majority of our clients use the STEP format at the input. For better user experience, some prefer plugging in native data converters, e.g. SolidWorks or Inventor. Adding more data exchange formats does not add anything to the workflow except for a more extensive list of file formats to choose between. Therefore, proprietary file formats are often added as a “luxury” feature. Analysis Situs has a bridge with a well-known vendor of data connectors, so adding more input formats is not a big deal technically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bq1uVzzeQioCWpWs.png" /></figure><p>Whichever CAD format we use as the input, what we need to get from it is the B-rep geometry and optionally the assembly structure. All other metadata, including colors and GD&amp;T, is normally out of the question, so it should not come as a surprise that even with the native formats as the input, we do not import any design features to work with. The thing is that manufacturing features are generally different from the design features and therefore they must be extracted from the model as if they never existed there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1pU10TwRZNufEIcb.png" /></figure><p>The imported boundary representation (B-rep) needs to be expressed with canonical forms. Feature recognizers in the MaaS domain do not work on meshes (with the exception of 3D printing). Also, splines should be used with care: if a feature can be expressed without them, it should be. If splines are still popping up, they normally have to be converted to canonical shapes first. We do this with our <a href="https://analysissitus.org/features/features_convert-canonical.html">open-sourced CANCONV</a> operator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WlA6ARqWcaRMj0Wg.png" /></figure><p>As mentioned earlier, assemblies cannot be ignored, as more often than not users upload multibody parts and complex CAD products for automatic quotation. In such cases, we need to extract BOM (bill of material), i.e., to list all unique parts and their quantities. This is also done by our open-sourced component for <a href="https://analysissitus.org/features/features_asm-json-hierarchy.html">traversing assembly hierarchy</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rYhNxILrCp07P3aD.png" /></figure><p>Now let’s look closer at the geometry of a part. Feature recognition in essence is like coating our part in different dresses depending on the identified production method and the analysis goal we set for ourselves. For example, in the image above, we are interested in thin walls that we would consider as ribs and expose to thickness analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1AZMGz5KJCFBI7eN.png" /></figure><p>Alternatively, we might want to look at a part from the perspective of subtractive manufacturing (milling). The questions to answer then are different: how much of the raw material is to be machined out? Are there any sharp corners that are difficult to fabricate? Are there any zones that are not accessible by the tools we have? These and similar questions are so fundamental that we cannot be sure if a part is manufacturable if we don’t answer them all. Now imagine that you have to quote dozens and hundreds of such parts every day. How much easier would it be if there was an accompanying software package doing this for you?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UL2apoxdbzYKi4u6.png" /></figure><p>Whichever perspective we put on a part, such smart software would necessarily have two key ingredients: shape interrogation as the basic modeling API and feature recognition for extracting the design intent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1oWclQNUFL0l8SGf.png" /></figure><p>So we arrive at three bullets here:</p><ul><li>Data exchange for importing and exporting CAD files.</li><li>Feature recognition for looking at a part under different perspectives.</li><li>Common modeling API for shape interrogation and DFM analysis.</li></ul><p>These ingredients constitute a generic MaaS kernel that can be used for process planning, quotation and manufacturability checks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XprLG0Oby79DuGvc.png" /></figure><p>There are some other useful services provided by a MaaS kernel. For example, our customers often want to have little thumbnail images for previewing the processed CAD parts. Very often it’s a raster format like PNG, which is generated in a headless manner (i.e., without UI and even without GPU) with configurable appearance properties (colors, background, lighting, etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-fPjdOY-y-QwQh_q.png" /></figure><p>If you want to go for a real 3D preview, there is such an option as well. The standard de facto for 3D visualization on the web is the Three.js framework, where you can load a glTF file. We make sure to keep all features reported as groups in the mesh-based glTF outcomes so that you can match the reported face IDs with specific triangles in the viewer. We have an <a href="https://quaoar.su/blog/page/feature-recognition-on-the-web">online demo viewer</a> that is publicly available to see these mechanics in action. The viewer is open-sourced, so our customers can quickly get up to speed by customizing it or simply reusing some ideas or code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kXFb4v8ynLXiRYoM.png" /></figure><p>Let’s talk about different production methods, because they define which feature recognizers to use. For example, feature recognition algorithms employed for sheet metal interrogation would not be suitable in a more generic CNC domain. Also, there are different subtypes of production methods, like rolling in sheet metal or 3D milling in CNC. We need to be able to cope with all these complexities to give a CAD part the care it deserves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5LnkqRX5rmzapItv.png" /></figure><p>In the CNC milling domain we distinguish between pure CNC milled, turned, and turned+milled parts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LS3OKjilGgDmSapH.png" /></figure><p>In sheet metal, we started with classic bent parts that are usually made on press brake machines. Such parts need to be flattened out with a proper k-factor at bends. We <a href="https://quaoar.su/blog/category/sheet-metal">published many articles</a> (including scientific papers) to explain how these algorithms work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RQnFbisc7g59g7CX.png" /></figure><p>Besides bending, such processes as rolling are not uncommon. Moreover, there are cases that mix both production methods: bending and rolling. The MaaS kernel should be able to treat rolled flanges equally well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SQtZHrJwTK7_H76E.png" /></figure><p>Let’s dive a little deeper into the feature recognition discipline to uncover some of its non-obvious complexities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u7IOOjro_yCwvoBg.png" /></figure><p>Let’s start from the beginning. In traditional CAD software, you normally build a part in terms of its design features, such as sketches, holes, pockets, slots, embossings, etc. In the vast majority of cases, these features are parameterized and arranged in a history tree that allows you to reevaluate the geometry of a part once you change some of the design variables. The responsiveness of a design to change is encoded in this history tree: whenever you change something, you get back to the originating CAD system to reevaluate the geometry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EPibeJXyHxA84iuB.png" /></figure><p>In contrast to this, there are direct editing software packages that do not employ history trees. Instead, they come with a bunch of powerful algorithms that are able to recognize the design intent as you go and alter the geometry based on inline feature recognition. In such systems, the responsiveness of a design to changes is not coming from data. It is rather based on how intelligent your modeling algorithms are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1McV0rQLx3EdBC3C.png" /></figure><p>The key workhorse of our feature recognition framework in Analysis Situs is the <a href="https://analysissitus.org/features/features_aag.html">Attributed Adjacency Graph</a>. This is a classic data structure that encodes a B-rep model as a formal graph of faces and their neighborhood relationships. Equipped with this data structure, we can build very efficient feature recognition algorithms, either rule-based or pattern-based. Many shape interrogation issues and design flaws can be addressed using the graph alone, without a need to go down to the geometry. In the photo, it is my son (8 years old at that time) checking the valences of graph nodes in the interactive graph view shipped with Analysis Situs: he is chasing the situations where a node has more than three incident links in order to localize a design issue for yet another industrial sheet metal part. He’s actually having some fun because it’s often a true detective story to figure out where exactly your CAD model is broken.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H23D8Snls5e5oIKp.png" /></figure><p>Academic papers come with lots of profound classifications for feature recognition algorithms. They call them rule-based, graph-based, hint-based and whatnot. In our practice, we came to using just two terms: rule-based and pattern-based. In fact, all our feature recognizers are effectively graph-based as long as AAG is involved. In a similar manner, they are all hint-based, because we use many strong and weak heuristics that act pretty much as “hints” for the recognizer. Let’s take a closer look at these two different types of recognizers that we have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0dZzgqJHYSI4hcpd.png" /></figure><p>Since we are able to formalize a CAD part as a graph, it is very appealing to try to formalize the feature recognition process as well. Indeed, if a <a href="https://analysissitus.org/features/features_recognition-anatomy-of-feature.html">feature is a subset of CAD faces</a>, then, mapped to the graph theory, it would be nothing more than a subgraph that we have to find in the bigger graph of the entire model. The graph theory applied to geometric computing is so powerful that we devoted a <a href="https://analysissitus.org/references.html#slyadnev-graphs-2020">conference talk</a> to explore different aspects of its use. One such is the so-called <em>graph isomorphism</em> matching.</p><p>With the isomorphism algorithm, we do not have to program a line of code: the algorithm of feature recognition is <a href="https://analysissitus.org/features/features_find-isomorphous-faces.html">generic</a>. What we rather have to do to recognize a specific type of feature is to give it a proper description in a “feature dictionary” that is often organized as a JSON or an XML file. In the process of feature recognition, the algorithm would collect all available feature descriptors from the dictionary and will search for the corresponding subgraphs. Although graph isomorphism is known to be a computationally heavy operation, we rarely see any performance issues with it because the input data is optimized by <a href="https://quaoar.su/blog/page/useful-heuristics-for-checking-aag-isomorphisms">pruning out unnecessary relations</a>. There is another issue with this technique, though: it cannot reliably handle features that interact with each other.</p><p>The graph isomorphism technique is used in our sheet metal recognition solution to identify typical features, such as drilled holes or punching features. You normally consider using this algorithm to make your system more “data-driven,” i.e., when you let the users customize the feature dictionary. In the sheet metal domain, good candidates for pattern matching are different types of louvers, bridges and other deformed features that are otherwise quite laborious to express programmatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E4Cue43-hT1MYFkC.png" /></figure><p>An alternative to isomorphism is rule-based matching. In a broad sense, a rule is a C++ program that iterates over AAG and searches for specific patterns by cursoring over the neighbor CAD faces and asking a bunch of geometric questions on the go. These rules, if implemented properly, are unbeatable in performance and generality: you can make a program that would recognize any kind of a feature, regardless of whether it interacts with other features or not. You just need to ground the recognition logic on good enough heuristics, and sometimes this is not a trivial thing to do. Some feature recognizers become so capable and mature that they easily turn out to be several thousand lines of C++ code. The logic behind such rules is far from trivial at times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g6VhJi9JJxPmuJfU.png" /></figure><p>Rules are also invaluable for compound features that are common in CNC machining. Take a look at the compound hole in the slide above: you never know how many counterbores and countersinks a hole contains, so it is just impractical to use feature dictionaries in such situations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DvxJ1uQVkE1EPgbn.png" /></figure><p>At the same time, if you are looking for standard shapes, then graph isomorphism is of much help. We employ it not only to recognize drilled holes but also to extract conventional forms of cutouts: slot-like, rectangular, squared, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7LZ9kEI5rDm7MWD1.png" /></figure><p>Now let’s go over typical CAD/CAM features that are of much interest for the users of a MaaS kernel. Historically, we developed a bunch of feature recognizers in the scope of our R&amp;D activities. I was personally doing my PhD studies between 2015 and 2019, with the main focus on reverse engineering, feature recognition and defeaturing algorithms. We made a number of conference talks and published a bunch of papers, followed by plenty of open-source prototypes that made their way into our Analysis Situs software package. Back then, it mostly had academic use and we did not have any clear intention to commercialize our results.</p><p>The recognition of fillets was one of the first algorithms we implemented. This recognizer identifies smooth “spring” edges and transversal “cross” edges to compose a chain. For machining automation, we added the identification of approach axes and different grouping strategies for blends. It should be noted that in machining reality it is not enough just to recognize a feature, such as a fillet chain. What we also need to understand is whether or not a fillet is too small in radius or too tall in length. Some fillets are designed as double-curved spline surfaces, which essentially means that 3D milling is required to make them. There are many cost drivers associated with the complexity of a feature, and that is why the recognition toolbox has to question the input geometry heavily to generate a useful outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v-kVTbQgEn1Onmkp.png" /></figure><p>Surprisingly, chamfers are harder to recognize than fillets, even though they are represented with individually simpler feature faces: a plane and a cone instead of a cylinder and a torus (in the canonical case). Because fillets possess the distinctive property of having surface curvature, we can trace the whole chain by probing this curvature value across neighboring faces. Chamfers are not so explicit: they often look no different from their supporting planar faces.</p><p>Our implementation of chamfer recognition follows some ideas that we grabbed from a <a href="https://quaoar.su/files/papers/feature_recognition/US20150269284A1.pdf">US patent registered by Siemens</a>. Of course, we could not reuse any piece of code, but we borrowed some terminology and a couple of heuristics. The very existence of a patent related to chamfer recognition speaks for itself: this is how complicated those feature recognition rules are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EWr8ikUTU2of1mxJ.png" /></figure><p>“Prismatic feature” is a term that we use to name pockets. This feature is done by side milling with optional bottom milling with a flat-end tool. To put CAD faces into contours, we first evaluate their candidate approach axes and then group together those faces that can theoretically be done all together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rHRhOWQmDO5-i4JH.png" /></figure><p>A slot is a special case for a contour. Slots are usually narrow so that they can be done in a single pass, for example, with a disk cutter. We require a slot to be open-ended in at least one direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lKXH6PdZRH6xvkmk.png" /></figure><p>Modeled threads are usually represented with helical splines. We recognize different types of modeled threads and also classify them into internal (at drilled holes) and external features. For lathed parts, we also check if the identified modeled threads are coaxial with the turning axis of a machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lamL6_lcFjMyYvgc.png" /></figure><p>CNC recognition comes hand in hand with the analysis of manufacturability. In the early days of our SDK, we had a specific library to analyze manufacturability issues on milled parts, but this module appeared to be tightly coupled with the feature recognizer. Indeed, to judge if a pocket is too deep and narrow, we first need to understand that we are dealing with a pocket (contour) feature. Features first, DFM second.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*APAjknJRT7CVfjmx.png" /></figure><p>Fundamentally, we want a MaaS kernel to secure the estimator or process planner from problematic designs. DFM analysis calls for the “heavy artillery” of shape interrogation, where we need to make hundreds and thousands of probes to reveal potential design issues. Some of the typical questions we’d like to address are listed on the slide above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WaZZ6GQwEYZb9-V1.png" /></figure><p>One example is the face accessibility analysis. Can a mill approach a certain pocket? Can a drill approach a certain hole? Answering these questions requires intensive ray casting, which is pretty much a visibility test in a simplified formulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WFriBM-3vVEcUccI.png" /></figure><p>To raycast a model, we have to cover it with a dense cloud of probe points. Here we have some options. For example, our approach in Analysis Situs is to generate a uniform mesh that covers the surface of a part. Alternatively, it could have been a uniform point cloud on the boundary. The mesh nodes or points from the point cloud are used as ray sources, whereas the rest of the part is checked for intersections with the emitted rays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kGwsgQtXsDKbabfV.png" /></figure><p>The identified problematic regions are communicated to the user (estimator or process planner) with visual artifacts. In our case, it is a glTF file that is supposed to be rendered on top of the part being analyzed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uILKOnJTVUHMGx6k.png" /></figure><p>Because the generated glTF files preserve the information about features, it is easy to build an interactive frontend to highlight the problematic regions and report their geometric properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X7R3cN5XChalCJqy.png" /></figure><p>Feature recognition opens the door to estimating the number of required setups. The slide above illustrates a situation where it is not clear which face is a bottom one and which are the walls. Such an ambiguity is reported by the feature recognizer as a “configuration” of three (in this case) potential features. Depending on the order of operations, one of the reported configurations prevails. Analysis Situs may predict the required number of ops by an original optimization algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kEozKisEub5hLkSI.png" /></figure><p>A MaaS kernel is a highly complex piece of industrial software. Depending on the application domain, such a kernel may need to contain a variety of computational methods not necessarily belonging to the feature recognition domain. Some examples are 2D and 3D nesting, bending sequence simulation, analysis of 3D printed parts, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iib3aJ5tk0vMiccg.png" /></figure><p>Analysis Situs accumulates decades of our R&amp;D in the field of geometric modeling, computational geometry, and algorithms. It has an open-source core that is used by a wide community of CAD software developers and engineers all over the world. We continue developing it in a transparent way and welcome anyone interested to contribute to the project or partner with us to solve challenging industrial issues.</p><p><em>Want to discuss this? Jump in to </em><a href="http://analysissitus.org/forum"><em>our forum</em></a><em>.</em></p><p><em>Originally published at </em><a href="https://quaoar.su/blog/page/maas-geometric-kernel"><em>https://quaoar.su</em></a><em> on August 21, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12b864aae790" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2D nesting simplified: concurrent BLF (CBLF) scanning]]></title>
            <link>https://analysis-situs.medium.com/2d-nesting-simplified-concurrent-blf-cblf-scanning-dc9833c0174c?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc9833c0174c</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[sheet-metal-fabrication]]></category>
            <category><![CDATA[sheet-metal]]></category>
            <category><![CDATA[nesting]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 16:57:15 GMT</pubDate>
            <atom:updated>2025-07-14T16:57:15.941Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“For concurrent programming to become mainstream, we must discard threads as a programming model.” [Edward Lee, 2006]</blockquote><h3>Motivation</h3><p>Grid-based placement leaves a natural room for parallel (concurrent) processing. The motivation behind such an extension becomes obvious if you look at the following nesting job:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*T1YtTy45q2Z3dSEn.gif" /><figcaption><em>Suboptimal nesting results with simple-stupid serial BLF.</em></figcaption></figure><p>This animation illustrates a major flaw of the <a href="https://quaoar.su/blog/page/true-shape-nesting-12-blf-implementation-highlights">serial BLF scheme</a>: it does not know that each other nestable variant (for the given cursor position) might be way worse than a hypothetical variant a few rows above the current position. I.e., the nesting process is blind with respect to the global layout being composed at the current sheet. To improve this situation, we may consider running several cursors simultaneously from different rows. Here’s what we would like to get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*IbquG0tw6e-DhdWQ.gif" /><figcaption><em>Better nesting with concurrent cursors.</em></figcaption></figure><p>Let’s call this scheme Concurrent BLF (CBLF) and talk about its implementation.</p><p><em>Note that the purpose of CBLF is not to accelerate calculations. Its purpose is to explore more nesting solutions by replacing one BLF cursor with multiple “parallel” cursors that move simultaneously, similar to volunteers searching for a lost person in a forest. Parallel computations on a multicore CPU are more of a necessity here because, in sequential mode, such an algorithm will run for a desperately long time.</em></p><p>It is important to note that CBLF scheme can be implemented on just one CPU core. However, running concurrent cursors and making them compete for a better layout gives us a good opportunity to introduce parallel computations. We claim that each concurrent cursor might be driven by a separate CPU core for the sake of efficiency. Let’s now explore how to do this.</p><h3>Threading Building Blocks</h3><p>One option to introduce parallelism in C++ code is TBB (rebranded to oneTBB a while back). TBB builds on the abstraction of tasks that run in shared memory. The key paradigm of TBB is to separate logical tasks from physical threads and to delegate task scheduling to the system [<a href="https://quaoar.su/blog/page/true-shape-nesting-18-parallel-blf-scanning#ref1">1</a>]. TBB was initially released by Intel in August 2006 and quickly gained popularity. In OpenCascade, TBB was injected for parallel computing in meshing, Boolean operations, and shape integrity analysis. We also benefitted from its scalable memory allocator. The potential of having more TBB inside the kernel was vast but it also faced few obstacles. First, parallel computing is really hard and, in a way, dangerous because of possible races and deadlocks. Second, it is not always desired to have TBB as a 3rd party dependency, and that is why another threading pattern was introduced to the kernel as an alternative: <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/OSD/OSD_ThreadPool.hxx?ref_type=heads">OSD_ThreadPool</a>. We will come back to this subject a bit later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*UxxjlthCP5Nq1XvC.jpg" /></figure><p>TBB was our main workhorse in a big project for pre-/post-processing related to hydrodynamics of offshore structures (“FPSO” for those who are familiar). We achieved a high level of concurrency in almost every CPU-intensive algorithm and also injected thread-based concurrency into the very architecture of the app, including <a href="https://gitlab.com/ssv/AnalysisSitus/-/tree/master/src/asiActiveData?ref_type=heads">Active Data</a>, which has been open-sourced in the scope of the Analysis Situs project since then. That was a big success and plugging TBB into the project was a smooth and pleasant experience. Looking at it retrospectively, the very success of injecting parallelism into this big project was due to the high level of inherent “data parallelism.” To give you an example, TBB really shines when you compute individual coefficients of large matrices. If, however, some elements are coupled, then the need for proper synchronization may easily turn your life into a nightmare.</p><p>TBB is an extra dependency, i.e., it is a library (not a compiler extension, a framework, or a fancy language). Still, in the OpenCascade ecosystem, this dependency was not a complete foreigner. It has been used in the kernel for decades, in many commercial projects, and was even promoted by the local Intel team to the local OCC team (both are now dissolved). Anyway, being a 3rd-party library, TBB requires proper configuration and careful injection into the target code.</p><p>For example, <a href="https://en.cppreference.com/w/cpp/language/pimpl">pimpl</a> pattern is beneficial to clean up native TBB includes from the header files of your own project. For us, this is particularly important as we are primarily developing an SDK, not an end product. If the SDK exposes its TBB-based guts to innocent users in header files, then the SDK users will have to plug in TBB into their projects as well. Bad luck for them.</p><h3>Data partitioning</h3><p>Task stealing is a central programming pattern used in parallel computations based on TBB. Instead of thinking of threads, we rather think of how to divide the work between concurrent workers, no matter how many they are. It is the responsibility of TBB to allocate and assign threads to the chunked work portions, while our job is to provide enough granularity in the data. To get started, we used the partitioners shipped with TBB and checked how concurrent ranges (the instances of tbb::blocked_range template class) pave the nesting grids. Here are some results obtained by tagging each grid point with the left boundary of the corresponding range:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4J2pEXD50LmzwvUO.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5_ejKvW_SNJukfI3.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f4zkrBfHPgXynnRU.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VzIa5DnlZSuys5sq.png" /></figure><p>The automatic partitioner aims at higher scalability, i.e., it splits the data ranges as finely as it makes sense based on dynamic monitoring of work-stealing actions. This partitioner tends to prefer smaller chunks. While TBB assumes that such granularity is good for load balancing, experiments show that smaller chunks are too computationally heavy for CBLF. Instead, we might prefer simple partitioning and ensure that each range spans, for example, two rows of the grid. Starting from a left point within its range, we would let the BLF scheme do its job “virtually” and then choose the best result among the concurrently computed outcomes.</p><p>One problem pops up almost immediately here: we do not have any control over the starting positions of ranges. Look at the image below. Here, we have two parts already nested (their corresponding patterns are labeled as “<a href="http://www.openmobius.org/refdoc/structmobius_1_1nest___grid_pt.html">occupied</a>” and are rendered in red color). The algorithm is now at its 3rd stage, trying to nest another instance of the same part. The blue points are the starting points for the ranges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8peXo8rOm0kmdfpc.png" /><figcaption><em>Ranges.</em></figcaption></figure><p>At those starting positions, all nesting variants are generated and a parallel TBB task stops as early as it gets a collision-free placement. All such placements are rendered with green contours in the image. It is pretty obvious that those contours appear aligned with the ranges. It looks so ugly because we ruin the very property of the BLF scheme: to be the LEFT-first placement. One natural way to overcome the issue is to make sure that ranges all start at the left column. However, TBB does not provide a simple way to override the logic behind partitioning, and such customization will probably take us too far from the goal of prototyping. My guess here is that such customization should be possible, especially given that it’s a conceptually simple way of partitioning and TBB is full of generics.</p><p>It should also be noted that wise parallelism should not test all grid positions remaining vacant in a sheet. As every container is filled incrementally, at each stage we know the position of the top-right corner. If we want to preserve the BOTTOM behavior of the nesting algorithm, we can take just one row above the corner, because any further scanning towards the top will only make the result worse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*90egK3tIYF3tPlyu.png" /><figcaption><em>Effective task scope is a band defined by “range start” positions.</em></figcaption></figure><p>The picture above illustrates the desired scope “band” for the parallel tasks. All tasks begin processing at the corresponding “range start” points — the vacant and “roomy enough” positions in the grid rows. All variants being checked for collisions are rendered in green color. When all tasks finish their nesting attempts, the best result is chosen and fixed in the outcome layout as the “best variant.” It is obvious that with more CPU cores, we have more tasks that can run concurrently as separate physical threads.</p><h3>Races</h3><p>Critical to parallel placement is avoiding data races. This whole business is complicated by the fact that one range is not necessarily processed by one thread. Although TBB abstracts away the physical threads, you can still check the worker thread IDs with tbb::detail::d1::current_thread_index() and discover that several threads may go for a sole partitioned chunk:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/0*nlsFhVQXO5xVDLl2.png" /><figcaption><em>One range is stealed by many threads.</em></figcaption></figure><p>We cannot blame TBB for that because recursive range subdivision and juggling threads around are at the very core of its architecture. In fact, this is the task-stealing paradigm in action: it’s the way of close-to-perfect balancing. The problem here is that our “matrix elements” are coupled. In the philosophy of ideal data parallelism, it makes no sense to use cursor-based placement because it would not scale well. Actually, with thousands of CPU cores, we would probably want to test each grid point in isolation. The problem is that we normally have something like 4–12 cores, not thousands.</p><p><em>One funny thing I am constantly discovering is the limited computational power of units that are offered by “cloud” providers. We have come across some ridiculous memory constraints of 4 GiB with one large MaaS platform and were informed of just 4 CPU cores available for another. Both platforms could have exploited better hardware but the options they were given are just that. Both of my personal laptops are way more powerful than any of the cloud-provided facilities. And I am writing this in the era when tens of CPU cores in one chip do not surprise anyone.</em></p><p>Let’s look at how race conditions reveal themselves. For example, this is the result of point membership classification done without exclusive locks with some static memory issue involved:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bzX3YG0hAI5UB-8b.png" /><figcaption><em>Scattered PMC results indicate race conditions.</em></figcaption></figure><p>When you discover a race condition, your hand usually starts groping for a mutex (mutual exclusion lock). The idea behind a mutex is to prevent the instruction pointers of several threads from entering concurrently into a code block with thread-unsafe shared memory (or other resource). You can either serialize your threads forcibly with a spin mutex at the entrance or try solving the real issue with unsafe memory access.</p><p>Distributing mutexes in the code kills parallelism quickly. Therefore, it is much better to precompute PMC patterns for all nestable variants beforehand, while in the serial mode. This job is done by what we call a “variant factory.” This is essentially a collection of rotated part instances that is populated before a parallel run and is switched to a “read-only” mode on threading.</p><p>While mutexes are commonly recognized as parallelism “enemies,” they help to hunt down subtle issues that otherwise may easily drive you crazy. Here is an example of a “safe” data race, i.e., the algorithm demonstrates unstable behavior but whichever result it generates, it is self-consistent:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*Twx6YyFOMzNsKdS9.gif" /><figcaption><em>“Safe” data races on a shared grid “arena.”</em></figcaption></figure><p>If parallelism is disabled and CBLF is forced to run on a single core, the issue disappears. The next stage (after disabling parallelism) is putting around some mutexes in the code to see if threads compete badly INSIDE a body (TBB functor):</p><pre>static tbb::spin_mutex MUTEX;<br>{<br>  tbb::spin_mutex::scoped_lock lock(MUTEX);<br>  <br>  // ...suspicious code...<br>}</pre><p>If races remain, they may come from the order in which the task bodies are executed. For example, the “safe” race mentioned above was induced by “locking” the container’s grid points, given that all tasks share the same container. If one task locks a position in a grid, then another task will skip that point on its own BLF run. And because the order of task execution is non-deterministic, points are getting locked quite randomly so affecting the nesting layout in all possible (but valid) ways.</p><p>Here are some further observations related to races and locks:</p><ul><li>The concurrently populated collections can be typed as tbb::concurrent_vector: that’s a thread-safe collection where we can store, for example, the concurrently computed variants coming from the competing tasks.</li><li>We can safely read different statuses of the grid points (e.g., check if a point is already occupied) because those points are stored in a plain array, which is thread-safe.</li><li>We should not change statuses of the grid points from parallel threads. If the container’s grid is shared, we should not “lock” or “occupy” a point because a point “locked” (or “occupied”) in one task remains “unlocked” (or “vacant”) in another. In this regard, CBLF is different from BLF.</li></ul><h3>OpenCascade thread pool</h3><p>By its very design, TBB is compatible with other threading techniques. As we cannot really employ partitioning-based parallelism offered by TBB generics, we may fall back into native thread-based tasking while keeping some elements of TBB, such as its concurrent collections. Highly concurrent TBB collections use fine-grained locking, i.e., different threads proceed with no locks if they access different portions of data.</p><p>One easy-to-pick-up alternative to TBB is the OSD_ThreadPool utility from OpenCascade. This tool was introduced to back parallelism in the kernel when the TBB dependency is not plugged in. The header file <a href="https://gitlab.com/ssv/opencascade-analysis-situs/-/blob/main/src/OSD/OSD_Parallel.hxx?ref_type=heads">OSD_Parallel.hxx</a> says the following:</p><blockquote><em>“Implementation uses TBB if OCCT is built with support of TBB; otherwise, it uses an ad-hoc parallelization tool. </em>In general, if TBB is available, it is more efficient to use it directly instead of using OSD_Parallel<em>.”</em></blockquote><p>It should be noted that OSD_ThreadPool is not just a “worse” alternative to the nicer TBB. In fact, thread pooling here does not imply task-based parallelism: it is entirely thread-based. Because both approaches are declared to be interchangeable, OpenCascade’s thread pooling resembles TBB in its exposed interfaces. In both cases, we are supposed to implement a functor (also called a “body” sometimes) that defines the job to be done concurrently. The key difference between the two approaches is how those functors are exposed to actual logical threads. In TBB, one range (one functor) may be executed by several threads, and this very fact calls for some more protections and locks to be added in the task body. With a primitive thread pooling, such task stealing is simply impossible because this mechanism was (luckily) not implemented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JcqJR7nSeogwxWZN.gif" /><figcaption><em>Parallel nesting on Intel i9 chip with 24 logical cores.</em></figcaption></figure><p>Another “advantage” of using raw threads is that we fully control data partitioning. I.e., we just give every thread a certain band of “matrix elements” to scan and largely forget about smart partitioning. There is one more implication of explicit partitioning: the idea of CBLF would naturally keep working in the single-threaded environment. It will be just slower but all partitioned bands will still be scanned as if the corresponding cursors were sailing concurrently.</p><p>With thread pooling, you do not need to introduce either a copy or a splitting constructor to your functor class because the job scope is never subdivided. However, why not use TBB tasks instead of raw threads, just making sure that partitioning is done with rows as atomic (unsplittable) grains?</p><h3>Getting back to TBB tasks</h3><p>If you’d like to dive into TBB, you may want to start with the old textbook by J. Reinders [<a href="https://quaoar.su/blog/page/true-shape-nesting-18-parallel-blf-scanning#ref1">1</a>]. The main principles haven’t changed much anyways, although there are some surprising alterations to what they consider an exposed API. E.g., J. Reinders devoted a big deal of his old text to working with TBB tasks, which is not surprising as long as a task should be the 1st-class citizen in a library providing task-based parallelism. <a href="https://uxlfoundation.github.io/oneTBB/main/tbb_userguide/Migration_Guide/Task_API.html">Not anymore</a>, though. oneTBB reconsidered the way of working with low-level tasks, trying to abstract away a huge deal of complexity of their proper initialization.</p><p>Luckily, J. Reinders did not leave us alone with the official clunky manual and wrote another book: “Today’s TBB” [<a href="https://quaoar.su/blog/page/true-shape-nesting-18-parallel-blf-scanning#ref3">3</a>]. It seems that the authors of these TBB books are now retired (correct me if I am wrong), and I really hope that oneTBB is not going to have another facelift, as otherwise we will be desperately reading their horrible official manuals [<a href="https://quaoar.su/blog/page/true-shape-nesting-18-parallel-blf-scanning#ref2">2</a>].</p><p>A direct substitution of threads with TBB tasks can be accomplished by passing the corresponding body functions in the tbb::parallel_invoke generic algorithm. If that’s the case, then we effectively tell TBB to create as many tasks as many rows we’d like to process with the BLF procedure. Although TBB remains responsible for mapping those tasks to raw threads, we do not utilize another powerful mechanism of TBB, which is task partitioning. In the beginning of this article, we have already tried to employ the TBB partitioner and the results appeared to be disappointing because we decomposed the very problem in a wrong way. Instead of letting the TBB partitioner chunk the two-dimensional grid, let’s remove one dimension and give it an array of rows. It is then more appropriate to call tbb::parallel_for and let TBB figure out the grain size itself. In fact, we already know that the grain size of 1 is not bad at all: we’ve been using it with thread pooling. Here, 1 means one row for a single task, but the task scheduler may want to execute several rows in a task because some rows are shorter than others and can be scanned real quick. We know that logical tasks represent opportunities for parallelism, so we should have many of them.</p><p>We need to be sure that parallel threads do not synchronize for too long. E.g., the following diagram shows unpleasant “pulse” behavior of threading where a lot of time is spent to split a body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F3XOXZ8_zVvk1OGV.png" /><figcaption><em>Poor CPU utilization with smaller task working bands.</em></figcaption></figure><p>Compiling TBB with debug info (pdb files on Windows) would not help much to reveal the “parallelism killer” in your code. It is a matter of common sense and experimentation. In the case of CBLF, the bottleneck was copying the entire grid with its contents to feed concurrent tasks with data. Such deep copying improves thread safety but kills scalability no worse than mutexes. Ideally, we should allow our threads to mess around in a common playground but make them play SAFE with each other. This is a much better option than deep copying the whole playground for a thread to operate in complete isolation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PZXQ5-Agi9vT5qHd.png" /><figcaption><em>“Thread monitor” waits.</em></figcaption></figure><p>If implemented properly, CBLF tends to be quite scalable, i.e., adding more CPU cores is strongly beneficial for the algorithm. The following plot illustrates elapsed time for 70 nesting jobs. Some of them (around half) correspond to BLF and others perform CBLF. The CBLF cases are easy to recognize: they expose smaller elapsed time in a multithreaded mode. This is not the case for BLF, as this algorithm does not benefit from multi-core hardware anyhow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*emw5tDMTeQJHpP61.png" /><figcaption><em>Serial and parallel versions of CBLF.</em></figcaption></figure><p>CBLF is also a good illustration of Gustafson’s law: with more CPU cores becoming available, we can nest more parts “instantly.” E.g., with just a couple of CPUs, we can probably let something like 10 parts in a job. Adding two more cores would let us increase the load for the nesting algorithm and still be confident that the user will not have to wait for too long.</p><h3>Conclusions and lessons learned</h3><p>We set aside from this conversation other threading techniques such as OpenMP or anything else you might think to be an appropriate choice. Low-level threading is pretty <a href="https://quaoar.su/blog/page/switching-from-precise-hlr-to-discrete-hlr">horrible</a>, in fact and I tend to say “no” to such naive parallelism in the future.</p><p>Thread pooling is better than just forking a thread each time you feel like there’s something to throw at the processor’s core. However, thread pooling has nothing to do with load balancing and therefore it’s still suboptimal. The desire to have decent threading support throughout the very architecture of our SDK has led to the decision to add TBB as one of the key (yet optional) dependencies. Of course, the possibility to run algorithms sequentially should be preserved and even the TBB guidelines promise that we will be “happier” if we are able to fall back to serial execution, at least for debugging. But in production, we would want to benefit from multiple CPU cores as long as they are available. And here we need a set of proven concurrency patterns.</p><h3>References</h3><ol><li>Intel Threading Building Blocks, by James Reinders. Copyright 2007 James Reinders, 978–0–596–51480–8.</li><li>Intel oneAPI Threading Building Blocks // Developer Guide and API Reference [<a href="https://quaoar.su/files/misc/onetbb_developer-guide-api-reference_2022.1-772616-849551.pdf">full text</a>].</li><li>Today’s TBB. C++ Parallel Programming with Threading Building Blocks. Second Edition. Michael J. Voss, James R. Reinders [<a href="https://quaoar.su/files/books/979-8-8688-1270-5.pdf">full text</a>].</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc9833c0174c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our paper in Computer-Aided Design and Applications]]></title>
            <link>https://analysis-situs.medium.com/our-paper-in-computer-aided-design-and-applications-19b7b6292e6a?source=rss-226a37672a2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b7b6292e6a</guid>
            <category><![CDATA[cad]]></category>
            <category><![CDATA[sheet-metal-fabrication]]></category>
            <dc:creator><![CDATA[Analysis Situs]]></dc:creator>
            <pubDate>Mon, 23 Jun 2025 13:12:03 GMT</pubDate>
            <atom:updated>2025-06-23T13:12:03.194Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“If your pictures are really good looking, they’re going to go to some effort to find out how you did them.” [How to Get Your SIGGRAPH Paper Rejected by Jim Kajiya, SIGGRAPH 93 Papers Chair]</blockquote><h3>The Paper</h3><p>This year we decided to publish in the Computer-Aided Design and Applications (CADA) journal, which is also backed by the <a href="https://www.cad-conference.net/">CAD Conference</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eSqkr4r2ml7wcS1M.png" /><figcaption><a href="https://www.cad-journal.net/files/vol_23/CAD_23(1)_2026_85-100.pdf">https://www.cad-journal.net/files/vol_23/CAD_23(1)_2026_85-100.pdf</a></figcaption></figure><p>We presented our paper about bending sequence simulation, and, while the paper “speaks for itself,” I thought it might be interesting to share some supplementary information. After all, that’s the whole idea of blogging, right? So, first of all, I have to mention that we were lucky to get a proper review. One review was conducted at the entry level to approve or not the incoming abstract. For CADA, the abstracts are presented in the “extended” form, i.e., they are already similar to brief papers. In the 5-page-long manuscript (see our abstract <a href="https://www.cad-conference.net/files/CAD25/CAD25_255-260.pdf">here</a>), you’re supposed to explain the very idea of the publication and reveal all important details. Once (and if) the abstract is accepted, your full paper would also undergo review. Together with the abstract, we collected 5 (!) reviews on the paper. Read more on this in “The Review” section below.</p><p>While working on the paper, I experienced many hours of deep and rewarding work. Here are some good things about this publishing process:</p><ul><li>Your paper can be prepared in 100% user-friendly LaTeX. MS Word (although accepted) is not required. That was such a relief to hear this and to [just] send the LaTeX sources to the editor.</li><li>The publishing process is distributed in time. It’s not a big deal that you are supposed to upload the abstract and the paper on different dates; that’s completely expected. The really good thing here is that all reviewed versions of both the abstract and the paper are uploaded separately (into different UI “placeholders”), so you can be sure that the final version of the manuscript will not be messed with the original version.</li></ul><p>There are also some cons that I should mention to stay fair, although the pros outweigh them a lot. For example, it was not clear when reviews arrived, so I had to check manually if someone left any review comments by periodically visiting the paper submission system. A couple of reviews I saw on the final deadline date could easily be missed if I did not do this double-check.</p><h3>The Talk</h3><p>The talk was a pleasure. A presenter is given 30 (!) minutes to deliver the talk and that’s more than enough for a calm yet concise reporting. In my preliminary rehearsal sessions, I could never make it less than 15 minutes of speech. With 30 minutes granted, it was easy to deliver the main message of the research without being in a rush. That’s definitely the right timing.</p><p>For various reasons I could not travel to China and my experience with the conference was limited to a Zoom window without much interaction involved. Still, the very fact of remote participation did not spoil the overall positive impression about the conference: it is truly international and it’s really about CAD. What else to desire?</p><h3>Recording</h3><p>I took advantage of remote participation and recorded the talk: <a href="https://www.youtube.com/watch?v=T3b2WvjHCv0">Bending simulation framework for rapid feasibility checks of sheet metal parts (CAD Conference 2025)</a> (link to YouTube).</p><h3>Script</h3><p>2.</p><p>We start with a CAD file of a sheet metal part with no information about features or design parameters. This is what is often called a “dumb” model. In CAD systems that have sheet metal modeling functionality (API), such parts normally allow for specific processing, such as automatic feature recognition to extract material thickness, cutting contours and bending lines. After feature recognition, we can construct a flat pattern and a production drawing out of it. However, we still do not have information about the bending sequence and tools. More importantly, we do not even know if a part is feasible or not.</p><p>This box shape in the image is not infeasible but it cannot be made on a press brake without special treatment. We can effectively press brake every bend until the last one, and whichever order of bending we choose, the last bend will always remain inaccessible for a tool.</p><p>The basic question of this talk is how to check that a part is infeasible. By “infeasible,” we understand the impossibility of making a part with straight punching. With custom tooling and manufacturing “know-how,” some more tricky shapes become possible.</p><p>3–5.</p><p>Let’s put this talk into a context. We are mostly interested in mathematical support of what is now called the “Manufacturing as a Service” (MaaS) industry. Other names for this niche are “Digital Manufacturing” or “On-demand Manufacturing.” Whichever name is used, the principle holds: a customer sends a CAD file to a specialized automated CAD service and this service sends back a manufacturability report and an estimation for the fabrication cost. To assess manufacturability and prepare a quote, the algorithms have to look at the design in terms of its features; that is, we need to feature-recognize the part.</p><p>6.</p><p>Looking at many similar use cases, we came up with a notion of a “MaaS kernel” for lack of a better name. We tried to summarize all common functions that are required in the majority of traditional, so to say, Digital Manufacturing services that deal with computational geometry and are not entirely driven by AI. What they all have in common is</p><ul><li>Data exchange;</li><li>Shape interrogation and feature recognition functions;</li><li>The ability to work with assemblies and extract bills of materials;</li><li>All sorts of manufacturability checks;</li><li>Irregular shape nesting for sheet metal parts and 3D packaging for printing and also for delivering.</li></ul><p>7.</p><p>Back in 2017, we published an open-source framework for feature recognition that we called Analysis Situs. It contains both open and closed modules, with sheet metal processing being a closed one but architected on top of the open core. My talk today about bending feasibility analysis belongs to the scope of this sheet metal processing module.</p><p>8.</p><p>The key apparatus we employ for feature recognition is the attributed adjacency graph (AAG). We turn a B-rep model into an undirected graph where each node corresponds to a CAD face and each link represents the adjacency relationship between CAD faces. The convexity and concavity of dihedral angles is encoded with an attribute that is also represented with a color code: red for concave and green for convex.</p><p>The notion of AAG is pretty old and classic. Some references to the pioneering papers are given on the slide.</p><p>9.</p><p>Using the graph model, we aim at recognizing a sheet metal part as a two-sided object. For a usual sheet metal solid body, it is normally possible to separate the inner-side shell of a model from the outer-side shell.</p><p>10.</p><p>Once a part is separated into two sides by eliminating all thickness faces, the corresponding graph is broken down into 2 connected components. This is a strong heuristic that we use for the recognition.</p><p>11.</p><p>The dual heuristic is related to the thickness of faces. If we keep only the thickness faces in the graph, then they make up a closed ring of nodes. It is required that the degree of each node is exactly 2.</p><p>12.</p><p>Feature recognition aims at labeling all CAD faces of a part according to their types and functions in the model: sheet faces, material thickness faces, bends, cutouts, engravings, notches, etc.</p><p>13.</p><p>The recognition process starts with selecting the seed face. In the simplest case, this can be the face with the max area. The opposite face is selected by ray casting inside the material. This is how the material thickness is deduced.</p><p>14.</p><p>Starting from the seed and mate faces, the recognizer propagates over all smooth dihedral angles. It stops when a sharp border is approached, so there are no faces left to visit.</p><p>15–16.</p><p>The thickness faces are extracted. Here we check the number of connected components for the sheet faces and the degrees of the thickness faces in the AAG loops.</p><p>17.</p><p>The process of recognition is formalized in Algorithm 1. At the end of the algorithm, we obtain the so-called unfolding tree. This is a hierarchy of flanges with the bending information stored at the graph links. The unfolding tree is of key importance for synthesizing the simulation model for the bend sequence simulator.</p><p>18–19.</p><p>One important outcome of the recognizer is the information about bend groups. In practice, several distinct bend features might require a single folding operation. While for a one-shot unfolder, proper grouping is not that important, for simulation this information is of critical importance.</p><p>In this image, we see bends 9 and 10 having all identical properties: angles, radii, axes and directions. However, they should not be grouped. Whether these bends are aligned or not completely depends on the order of bending.</p><p>20.</p><p>It should be noted that bends 9 and 10 appear aligned only in the initial (flat) and in the final (folded) states of geometry. During the folding process, these are clearly separate features.</p><p>21–22.</p><p>We claim that besides identical geometric properties (such as axis, angle, radius and direction), we should take into account topological constraints in order to group bends correctly. It appears that cutouts arrange the topology of a part at a local scale. If several bends with identical properties do not share any common flanges, then we group them if and only if they are constrained by a cutout.</p><p>This way of grouping tends to give the bending simulator more degrees of freedom than are probably required on a shop floor. Still, it is computationally safer to leave some bends ungrouped than to group them inconsistently.</p><p>23.</p><p>Once the model is feature recognized, we can try to find the bending sequence. If we have n bend features in the model, there are at least n! sequences. The direct check by permuting bends in a sequence is computationally prohibitive.</p><p>In fact, the observation that a sequence 1–2–3 brings us to the same folded state of geometry as, say, 3–1–2 allows us to do something smarter than blind permutations. All intermediate folded states of geometry can be represented with a direct graph. We need to find a path in this graph from the initial flat state to the final folded state.</p><p>24.</p><p>Still, our first attempt to check if a part is feasible was to apply the direct search method with a limited number of iterations. This approach started from a blank sheet and attempted to fold it by the projected bend lines.</p><p>There is a certain modeling overhead with such an approach that can be prohibitive in extreme cases. With the direct approach, we do not reuse the folded geometry of a part; we rather model a “foil” shape from scratch in origami fashion.</p><p>25.</p><p>The direct search method needs to explore a huge number of folded states. The algorithm gets back to the previous state each time another flange cannot be constructed without a collision.</p><p>Effectively, we have to iterate the entire graph of folded states, trying to find a path from the unfolded root node to the folded destination node. Although many heuristics are proposed to make this search less computationally prohibitive, there is still no hope to make the algorithm any closer to “instant” in a general case. This is partially because of the vast search space itself and partially because of the modeling overhead. The latter one can be eliminated by adopting the unfolding tree coming from the feature recognizer.</p><p>26.</p><p>To check if a part is infeasible, we do not need to search for a feasible sequence. We rather need to prove that such a sequence does not exist. One practical way to do so is to reverse folding in time. At each iteration, we are searching for all bends that can be regarded as “final” ones and unfolding them. If at some point, no bend can be regarded as a “final” one, then the part is infeasible.</p><p>At each new iteration, we are checking fewer bends than at the previous iteration. This check is of quadratic complexity w.r.t. the number of bends in a part.</p><p>27.</p><p>Unfolding of a single bend should be done frame by frame with collision checks performed at each intermediate folded stage. This flexibility is not provided with a “one-shot” unfolder that jumps from a folded state of geometry into a flat pattern immediately.</p><p>The question arises then: how to make the folded B-rep model flexible enough to represent each frame of simulation? It is possible to keep using B-rep for that purpose and remodel bends as solids of revolution locally. However, such an approach tends to be computationally heavy as it brings a lot of redundancy in both data and modeling effort.</p><p>28.</p><p>We prefer switching to sparse meshes for each side of a sheet metal. Thickness faces and bend faces are eliminated to reduce the number of triangles. For bends, only bend axes are kept. They serve as interactive handles for manual folding and unfolding. Further decimation of meshes can be achieved by the defeaturing of holes and cutouts.</p><p>29.</p><p>When a bend is being simulated, the unfolding graph gets a split at the corresponding node. The entire model is divided into the “left” and the “right” sides. Each side is rotated around the bend axis.</p><p>30.</p><p>Because the simplified mesh model contains only a moderate number of triangles, we can build bounding volume hierarchies (BVH) for a model at each frame while keeping high FPS for manual inspection. The use of BVH opens the door to self-collision checks for the model flanges.</p><p>31.</p><p>And also for collision checks between the model and the press brake. In this example, a punch tool is used for a test but other components, such as dies, can be added equally well.</p><p>32.</p><p>All bends grouped together at the recognition stage are treated as a single feature. It is important to take into account bend grouping on topological split.</p><p>33.</p><p>Now let’s head over to some examples where the simulator triggers the infeasibility error. For this part, the algorithm cannot approach some of the bends while it successfully unfolded 3 flanges.</p><p>34.</p><p>The same situation here. Only smaller flanges could be unfolded without collisions. They will be regarded as the “final” ones and the simulator will stop processing.</p><p>35.</p><p>Here the simulator identified self-collisions on a part because of missing bend reliefs.</p><p>36.</p><p>In this example, one of the flanges is just too narrow to accommodate the tool.</p><p>37.</p><p>In this design, the folded flanges are in no-proximity contact with each other, so self-collision is reported.</p><p>38.</p><p>Some present limitations of the published algorithm are listed on the slide. First, the presence of flat hems is clearly a problem because no tool can fit into a completely closed bend. The second problem is related to a small inaccuracy that is induced by rotation-based simulation. Clearly, for better precision, we need not just to rotate flanges but also to take into account bend allowances based on the k-factor. Finally, to speed up the collision checker, it looks wise to eliminate small holes and cutouts, thus making the simulation model more compact.</p><h3>The Review</h3><p>Because reviewers are not involved in your research, it is always refreshing to hear their opinions on the subject. They bring another perspective on the reported message and highlight unobvious flaws that you might otherwise miss. Exposing your results to the audience of seasoned professionals is a challenge, and if you pass through this process, then your paper likely makes sense. On the other hand, it is not enough to get your stuff published for it to make sense. But it’s clearly an indicator of quality. I found it pretty productive to read the review comments and give my answers to highlight some unobvious aspects of the work.</p><h3>Review 1</h3><blockquote><em>The paper describes a method for determining bend sequences for bent parts and testing their feasibility. The paper seems clear and well-written. It is also interesting because it is linked to practical application in industry. I have some comments but I do not think the paper should be modified to take these into account.</em></blockquote><blockquote><em>The paper mentions folded part models being ‘communicated’ but does not give details of the circumstances of communication. It would have been interesting to know more about the industry for which the software described is intended. Also, it would have been interesting to know the form in which the part shape arrives. Is it STEP or something else?</em></blockquote><p>By “communication” we meant the ordinary process of passing a CAD file from one system to another, e.g., from SolidWorks to the presented simulator. Indeed, such data exchange is done via STEP format because it is widely used and we can benefit from the OpenCascade open-source kernel to accomplish this. Passing native files into the simulator (such as SLDPRT, for example) is also possible through commercial data connectors, e.g., the one from Datakit. Whichever format is used as the input, the geometry is translated into <a href="https://analysissitus.org/features/features_asm-xde-document.html">OCAF/XDE data structures</a> that serve as an in-memory database for B-rep structures of the OpenCascade kernel.</p><blockquote><em>Since the paper mentions in passing both features and history trees, not commonly communicated, it raises a question about how the process is intended to work. The paper rightly says that this information is unreliable when introducing the reason for doing feature recognition.</em></blockquote><p>Also, if native formats are used (even with commercial data exchange components plugged in), the reality is that those history trees are simply ignored at file export.</p><p>All in all, feature recognition is required because of two major difficulties we face in the practice: a) sometimes features are not readily available even in the originating CAD system, e.g., “flat hems” may not be explicitly labeled as such; b) feature information is almost never communicated from software by one vendor to software by another with neutral or native CAD formats.</p><blockquote><em>The question of the feasibility of bending seems more appropriate for the design stage than the manufacturing stage. The designer should be informed about feasibility so the first part of the paper could be reworked as a design tool, but that also opens up a number of questions about how the design is created.</em></blockquote><p>The feasibility checks are, indeed, more natural to see at the design stage. Why we speak about feasibility analysis at later stages (when parts are sent for quotation or manufacturing) is because we look at this task in the context of contemporary MaaS (Manufacturing as a Service) platforms.</p><p>The typical MaaS workflow is as follows: a) the user designs a sheet metal part in his favorite CAD system; b) the user exports the design to a neutral format, usually STEP; c) the CAD file is uploaded to one of the online manufacturing platforms (or sent by email, it does not matter in this context), where the user expects to specify tolerances, select the material, and get the price together with the expected delivery date.</p><p>Our check is related to what happens at this remote MaaS platform. The automatic quotation system should read the geometry from a CAD file, extract all properties that define the fabrication costs (e.g., number of bends, their properties, cutting length, number of features, etc.) and analyze possible manufacturability problems (i.e., measure critical dimensions between features, check for unfoldability, etc.). Bend feasibility analysis comes as the last stage in this workflow: it simulates how a part is going to be folded with the given set of tools. The main goal of the simulator is to warn the manufacturer about possible collisions with his machining/tooling park. It should be noted that the creator of the design might not know the machining constraints, such as “safe” distances from holes and cutouts to bends, minimum allowed flange lengths, etc. It is possible to give the user some recommendations during the design stage, and there are, indeed, some plugins to popular CAD systems that allow for doing so (e.g., DFM Pro). However, such systems are not aware of tooling (e.g., punch shapes) that will be used in production and are therefore limited in their prediction scope. Therefore, although we agree that manufacturability checks are better done as early as possible, there is also demand to have such checks done at the manufacturer’s end, at least to configure the available punch tools, but also to double-check at the production side that all manufacturing constraints are satisfied.</p><blockquote><em>One comment is about the Face Adjacency Graph. Face Adjacency Graphs were used by Ansaldi et al. in 1985 and reference to their work could be added. The idea, though, is much older and is known as the dual in graph theory. I did not find the method very innovative, the dual is used in several ways in solid modelling.</em></blockquote><p>Indeed, the use of AAG/FAG can be traced back to at least 1985 because graph formalism is at the very core of B-rep, where geometry is divorced from topology. While we also don’t think that any use of AAG/FAG can be innovative after 40 years since the concept was published, still, some heuristics related to sheet metal processing (and based on the apparatus of AAG) we haven’t found published before. One such heuristic is illustrated by Fig. 7, where we discuss closed loops as constraints for grouping bends. Another heuristic is depicted in Fig. 4, where we provide a rule on how to distinguish rolled parts with a cutting edge from completely closed round tubes. In our work, AAG is nothing but a set of adjacency lists; still, it opens the door to formulating “strong” heuristics that are free of geometric intricacies or imprecision errors.</p><p>Action taken: A reference to Ansaldi et al. has been added where FAG is first mentioned.</p><blockquote><em>The defeaturing mentioned in section 4, for example, could be done by looking for isolated nodes like node 13 in figure 3. Isolated subgraphs from the dual can be checked for relatively easily.</em></blockquote><p>Yes, that is exactly how defeaturing is being done in the prototype system. By topological cutting from AAG/B-rep, we can do quick suppression of inner features. We only need to be sure to not suppress entirely nested flanges, which is the only reason why defeaturing was not finalized yet in our work.</p><blockquote><em>I liked the presentation about bending tools and possible collisions.</em></blockquote><p>Thank you.</p><h3>Review 2</h3><blockquote><em>This paper presents a framework to rapidly verify the manufacturing feasibility of folded sheet-metal parts. Starting with B-rep models, it uses automatic feature recognition to extract bending properties and creates a hierarchical flange structure. Instead of an exhaustive search, it employed a simulation-guided reverse unfolding process to iteratively identify all bends that can be feasibly unfolded without self-collisions or clashes with predefined punch tools. These feasible bends are unfolded simultaneously at each step. If a part cannot be fully flattened, it is flagged as potentially infeasible for automated processing. The proposed method combines automatic feature recognition (creating an unfolding tree) with a simulation-guided unfolding process specifically tailored for rapid feasibility assessment. This paper proposed an efficient heuristic search strategy that implements an iterative reverse simulation that groups and unfolds all currently feasible bends in each step, significantly reducing the search complexity compared to exhaustive permutation checks. In addition, the proposed practical collision-checking approach incorporates efficient hierarchies for collision detection during simulations. This paper is well-written and organized. Some comments are provided for further improvements.</em></blockquote><blockquote><em>The current simulation idealizes bending as a simple rotation around the bending axis. Incorporating a more physically accurate model that accounts for material deformation could reduce false-positive collision reports, particularly near the bend zone.</em></blockquote><p>We see that rotation around the bend axis can, indeed, result in false-positive collisions due to ignoring material deformation at bends. E.g., the simulator is currently reporting false-positive collisions for the following model at the highlighted zones:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OxUkBVXIvCejUGER.png" /></figure><p>Ideally, the simulator should end up with the same dimensions of the flat pattern as obtained with the one-shot unfolder. This we left for future improvement.</p><blockquote><em>However, the proposed method has certain limitations. Explicitly addressing the handling of flat hems and potentially relaxing the strict degree-2 heuristic for thickness faces (to better handle parts with machined edges on cutting contours) would increase robustness.</em></blockquote><p>That’s correct. We have been asked several times if the presence of machined edges (i.e., fillets and chamfers) can be tolerated during recognition. We think that such secondary features should be “virtually” suppressed from the model without actually changing the B-rep structure of a part. If such simplification is done at FAG/AAG, then we can still use degree-2 heuristic for thickness faces. Our take on it is that this subject goes slightly beyond the focus of the paper, which is mostly devoted to the simulation side of sheet metal processing. If/when we publish another paper about recognition, we will take into account the problem of “virtual” suppression and hopefully give it the detailed overview it deserves.</p><blockquote><em>Although generally fast, the performance degrades significantly on parts with many small features. Implementing adaptive mesh simplification or targeted defeaturing, specifically for the simulation model, could mitigate this bottleneck.</em></blockquote><p>We plan to defeature holes and cutouts from the part before constructing a simulation model. Defeaturing can be done swiftly for isolated features by removing the corresponding boundary elements (faces, contours, edges, and vertices) from the topology graph. The complexity of the simulation model should correspond to the complexity of the folding process and not depend on how much perforation is done on the part before or after bending.</p><blockquote><em>Unfolding all feasible “final” bends simultaneously is efficient but might miss collisions caused by the combined movement of flanges. Exploring a slightly more refined check within the group, or a limited look-ahead, could improve accuracy without resorting to a full sequential simulation.</em></blockquote><p>That’s a very valid remark. Unfoldability of a single bend from a given intermediate folded state of geometry does not mean that all bends from the current group are unfoldable all together. In the following example, bends 1 2 4 5 7 8 can all be regarded as the final ones and unfolded separately from the folded state of geometry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q28iI7yrRGz9bO0j.png" /></figure><p>However, unfolding them in a sequence 1 -&gt; 2 -&gt; 4 -&gt; 5 -&gt; 7 -&gt; 8 leads to a collision:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ci9u-KYxJL3UCwjZ.png" /></figure><p>The algorithm therefore fails to identify a feasible sequence because it is trapped with the group of final bends and their implicit order in the group. To cope with such cases, our idea is to switch the algorithm into a completely incremental mode when group unfolding does not work. In this mode, the algorithm will have to decide on the order of bends, and this is where we can benefit from pragmatic rules proposed in the previous research: e.g., we can employ <a href="https://quaoar.su/blog/page/on-sheet-metal-unfolding-part-6">permutation logic</a> in groups based on shape-defining criteria for bends.</p><h3>Review 3</h3><blockquote><em>The paper titled “Bending Simulation Framework for Rapid Feasibility Check of Metal Parts” presents an interesting and practical approach to simulating the bending process. The methodology is described step by step with clarity and detail. Surely, the overall approach could be reproducible or even integrated into CAD software to assist designers in cost estimation for bent parts, as well as to help identify parts that are potentially unmanufacturable.</em></blockquote><p>Thank you for the review. Right now we have this approach integrated into several “online manufacturing” platforms, but we also anticipate its integration in a plugin manner to desktop apps. This would, however, require solving a certain number of specific technical problems related to data communication.</p><h3>Review 4</h3><blockquote><em>The paper presents a method to select a feasible bending sequence and validating it through a specifically designed simulation procedure. The proposed method includes three subroutines: feature recognition, topology-based separation of the simulation model’s flanges, and BVH-based collision detection. The authors made one thousand tests to evaluate the proposed approach and found the main bottleneck is for models of perforated sheet metal parts with hundreds to thousands of triangles.</em></blockquote><blockquote><em>The proposed method has certain practical value. However, there are some questions. 1. The feature recognition method used is to traverse from the automatically selected seed surface to the end. So, when there are fragment face errors on the model surface, will it affect the feature recognition results? 2. The paper presents a method to select a feasible bending sequence. Then, is it the best bending sequence? Can the best bending sequence be selected through the proposed simulation method?</em></blockquote><ol><li>The method does some preparation, such as maximization of faces prior to processing. I.e., if a flange or a bend feature is split into pieces that can be united into larger faces, then this would happen. However, the algorithm still assumes that the input model follows some design rules. E.g., the connections between planar flanges and bends should be smooth, the bends should be modeled as analytical cylinders, etc. If the implicitly assumed design rules are not satisfied, then two results are possible: a) the recognition stops with “unknown error” status; b) the recognition stops with “unrecognized features” status, which is a better outcome because it highlights the problematic zones. In practice, if proper sheet metal modeling tools are used to design a part, the recognition normally succeeds.</li><li>The algorithm detects “just any” feasible sequence. The goal of this simulation is to make sure that the part is feasible in the first place. Searching for an optimal sequence would require computationally exhaustive optimization that is not required for a feasibility check and would not provide “instant” kind of feedback. In software packages specialized for bending, such optimizations may run several minutes, and sometimes it is the operator who is supposed to stop the search process when the result is “optimal enough.” That’s an interesting research topic and some of the papers we refer to are devoted to searching for the optimal sequences with different optimality criteria.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b7b6292e6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>