Meet Analysis Situs 1.1

Download Analysis Situs ver.1.1

It took half a year for the recent number of downloads to exceed the previous figure. And that means it’s the right time to release another version of Analysis Situs. Here is a brief digest of what happened since version 1.0 was published:

  • Reworked face repatch operator.
  • Added recognition of arbitrary cavities plus multiple minor but sweet improvements in the feature recognition toolbox, such as a new convex hull AAG attribute (recognize-hull Tcl command).
  • Added glTF export for the active part with colors, including colored edges, vertices, and random facets.
  • Added a bunch of Tcl commands for mesh refinement.
  • Now it is possible to see surface parameterization as hatching lines over the selected face.
  • Made a bunch of minor improvements and added more Tcl commands, e.g. connect-edges-to-wires , build-face-grid and more).

Below is the more detailed overview of the short-list items given above.

Updated face repatch

We had a long and productive discussion about the constrained filling problem on our forum here. Our good mate Joajin contributed a lot to recover some historical aspects of the Plate algorithm of OpenCascade. If you’re not aware, Plate is the ultimate kernel’s solution for approximating unstructured point clouds with spline surfaces. To be precise, Matra Datavision also had a commercial package (PlateFE) that took the idea of Plate to the next level (it approximated the final surface in B-spline basis right away, not using intermediate surface representation), but we were looking for an open-source approximation tool, and the “classical” Plate seemed to be good enough.

Face repatch allows for eliminating redundant faces.

In particular, the Plate algorithm is the working horse for the face repatching operator available in Analysis Situs. In version 1.1, this operator saw some improvements contributing to its better robustness. You can find this feature documented on the landing website of Analysis Situs.

Cavity recognition

There is now a simple detector of isolated cavities whatever shape they have. I used this function as a part of another commercial algorithm aimed at detecting turned features. It’s a good thing to detect letters, logos, and other minor features. The algorithm was briefly presented in our Graphicon conference talk (2017) where it was named “general holes recognition.”

Recognition of arbitrary cavities.

The max allowed feature size passed as an argument to recognize-cavities command controls the max dimension of the feature bounding box.

Together with other feature recognition tools, this algorithm provides an efficient way of CAD model simplification. We’ll return to this topic in the future.

Export to glTF with colored subshapes

This feature existed for quite a while but it was largely refactored in the last couple of months to get Analysis Situs prepared for another use case which is DFM Analysis. DFM is the abbreviature for “Design for Manufacturing,” and here we speak about a range of algorithms aimed to assess whether your design is manufacturable or not. The whole DFM thingy is a subject in itself, and we will return to this topic in the future series.

Colored part in Analysis Situs.

What was important to implement is the possibility to export meshes not only for faces, but also for edges and vertices. Thanks to the refactored architecture, we can now customize the contents of the outcome glTF scene and tailor this exporter to different usage scenarios.

The exported glTF model visualized in the standard Windows viewer.

Mesh refinement

Hell, yeah, mesh refinement. That’s a long shot and I was wondering whether to present it today or not because it’s maybe too raw as of now. However, the refinement strategies implemented in Analysis Situs have already found their way into a commercial project for one of our customers, so this thing definitely works. Well, almost. You can read more about this story in the corresponding forum topic.

Visualization mesh before refinement.

You can see mesh refinement in action when applied to CAD thickness analysis. It now works for planar domains only, but that’s practical enough. Btw, the thickness analysis itself has got some ergonomy improvements to make it more usable from UI.

Visualization mesh after refinement.

Hatching

The Hatching algorithm existed in the OpenCascade library for many years. So long that you can name it a classic functionality. It was not exposed in Analysis Situs till that moment though. The value of hatching is actually pretty evident: hatching allows you to look at the surface parameterization right in the modeling space, without switching back and forth between the Part and the Host viewers. The idea behind hatching is pretty straightforward: the algorithm samples the UV space of a surface to build its isoparametric curves, and then it cuts off all the curve segments that lie outside the trimming contour of a face.

Inspection of surface parameterization by hatching.

Looking at the hatching lines is sometimes very useful. For example, in the sheet metal unfolding algorithm, I use the UV directions to realign the flat pattern with the drawing plane. That’s a good approach for many CAD shapes as the surface parameterization often inherits the alignment of a sketch plane it was constructed from. The possibility to visually assess the surface parameterization by hatching is of great help while debugging. Btw, in OpenCascade native viewers, hatching is embedded into the wireframe visualization modes out of the box.

To build hatching lines, you should select a face of interest in the viewer and run the “Show hatching” command from the context menu.

Minor improvements

Here is the list of other minor improvements Analysis Situs has got:

  1. The load-part command now accepts IGES files.
  2. You can now search for multiple edges by their indices in the “Find Edge” dialog available by Ctrl+E .
  3. Cell picker of the Part Node now uses VTK native cell locator for better performance.
  4. Reading CAD files with Unicode filenames is now allowed.

Other news

Our youtube channel is constantly growing with the aim of cultivating a community of CAD software developers. By a CAD software developer, I mean someone who’s skilled enough to face low-level math and treat it in C/C++ language. Like in gamedev, the geometric kernels are all about efficiency, and they are all written in C/C++ (well, C# starts to be visible as well). After running this channel with its supplementary forum for several months, I realized that it’s a sort of a new genre. Indeed, there are many product-specific forums and communities, but when it comes to developing an engineering application from scratch, there’s no unbiased discussion panel (at least I’m not aware of such). We need a place that is free of commercial bullshit and all these marketing guys selling you shallow promises. Btw, the most popular topic seems to be CAE pre-/post-processors as of now.

Analysis Situs will smoothly transition to the fork of OpenCascade 7.4.0. There are many objective reasons for such a switch, and the main one is a lack of control over the library’s evolution. Still, the lessons on Youtube and the corresponding code samples will be based on the up-to-date and official versions of the library to stick the educational path to the baseline of OpenCascade development. The fork will be used for minor corrections mostly, and I’m not planning to take over a side branch of development. Right now, the fork restores the broken BREP compatibility with a trivial fix, hence it’s recommended to compile Analysis Situs with the fork version of OpenCascade.

Analysis Situs should stay compatible with the official OpenCascade 7.4.0, but it’s better to compile it against the forked version that would contain a few handy fixes, mostly to keep up with compatibility issues. I also hope that migration to new “certified” versions will not be too hard for anyone who’s interested in such porting.

Active Data is an open-source (3-BSD) library aimed at providing a higher-level API on top of the OpenCascade OCAF framework. It was initially designed as a standalone software package, but that way of organization has its own downsides. The biggest problem was that nobody but me has ever used this framework productively as the audience for such a tool is very specific. At the same time, people do compile Analysis Situs from sources, and the need to precompile this extra dependency is quite annoying. Starting from Analysis Situs 1.1, Active Data is merged to the main SDK, which makes the configuration process a bit more simple.

Active Data library for OCAF and stuff.

This merge also opens the door to using Analysis Situs as a pre-/post-processing framework (something like Salome for those who’s aware). Using the UI, visualization, modeling, and data model design functionality, one can build his own CAE application from the open-source ingredients we have.

What’s next?

The key user stories for Analysis Situs are presented on its website. The project continues to evolve in the directions of better usability, enhanced feature recognition workflows, assembly support, and advanced modeling algorithms. Right now, it’s mostly driven by the commercial projects I’m participating in, and I do my best to publish the pieces that do not fall under copyright and IP constraints. However, I would love to see it also driven by fair scientific research, which is much harder to accomplish.

It would be safe to say that the main focus of Analysis Situs remains to be CAD feature recognition. This discipline has got a variety of applications, starting from automated pricing and manufacturing process planning, and ending up with direct editing algorithms, like in SpaceClaim or Fusion. At the same time, feature recognition largely remains a commercial niche, where open source solutions are hard to find. That’s what we’re going to change.

A lot of ideas collected through the years in this blog are still waiting for realization. A lot of other things remain to be recovered from the original CAS.CADE and Euclid software. I think that Matra Datavision did an amazing job and truly innovated the field. It’s a hell of fun to revisit some fundamental approaches of the math kernel and match them with the state-of-art methods of the field. Such work can be conducted with a small community of interested folks, and that’s definitely another (maybe the most important) direction for our further growth.

I would like to thank all the folks who contributed their time and goodwill into messing around with Analysis Situs, trying to compile it, and posting even minor remarks. That helps a lot and keeps me motivated to continue working on this small app.

Open-source CAD platform: analysissitus.org