Naar de inhoud

OPRP: pattern recognition in SolidCraft so STEP files become usable

OPRP Pattern Finder plugin voor SolidCraft

Dutch version: OPRP: patroonherkenning in SolidCraft zodat STEP-bestanden werkbaar worden.

OpenSourceCAD.nl now builds its own tools too: I made a plugin for SolidCraft. OPRP (OpenSourceCAD.nl Pattern Recognition Plugin) finds the repeating patterns in your imported STEP files and turns them into real Pattern and Mirror features. The plugin is available now as a beta, version 0.6.6.

OPRP Pattern Finder plugin for SolidCraft

What OPRP does

When you load a STEP file into SolidCraft, you often get a flat list of hundreds of loose bodies or placed parts. Screws in a row, holes in a grid, bolts in a circle: they all stand on their own. You cannot edit them as a group, and the feature tree becomes unreadable.

OPRP scans the model for repetition: linear patterns, grids, circular patterns and mirrors. Whatever it finds, it replaces with SolidCraft’s native Pattern and Mirror features. Every replacement is checked numerically before it is kept. The original geometry does not change; only the structure in the feature tree gets cleaner.

Installation

  1. Download oprp.zip from the GitHub release.
  2. Open SolidCraft, then Preferences, then Plugins.
  3. Drag the zip file into the window.
  4. Restart SolidCraft.

The plugin works on SolidCraft 0.53 or newer. Licence: CC BY-NC 4.0.

How to use it

After installation you will find a new Replace button in the plugin toolbar.

  1. Open your design (save first; Undo puts everything back).
  2. Click Replace.
  3. Check the result in the feature tree.

The plugin works on two levels:

  • Bodies: physical bodies that repeat. This works reliably.
  • Placed parts: components in an assembly. This is where the known limitation is.

Where it works well: bodies

A typical case: you import a STEP file of a bracket with 48 holes in a 6 by 8 grid. Without OPRP you see 48 separate bodies. After Replace you see one body plus one Rectangular Pattern feature. The feature tree is readable, and you can adjust the grid later with a single parameter.

The same goes for a ring of 12 bolts (Circular Pattern), a row of 20 screws (Linear Pattern) or a mirrored part (Mirror). The numerical check means the plugin only replaces when position, orientation and dimensions match exactly, within the tolerance SolidCraft itself uses.

The known limitation: assemblies

OPRP tries to respect the assembly tree. When you import a STEP file that already has an assembly structure (subassemblies, nested parts), the plugin tries to keep that structure. In practice this leads to false negatives: patterns are not recognised because the plugin thinks they belong to different branches of the tree.

Workaround: import a “clean” assembly, a flat list of placed parts without deep nesting. Then OPRP recognises the patterns fine. I am working on a better balance between keeping the structure and finding patterns.

Why this plugin exists

STEP files from commercial CAD packages (SolidWorks, Inventor, Creo) often arrive as “dead” geometry: no features, no patterns, only bodies. Restoring those patterns by hand is the biggest time sink when turning them into a workable SolidCraft model. OPRP takes that work off your hands.

It is not an AI model that guesses. It is a deterministic search: compare each pair of bodies, measure distance and orientation, test whether they fit a grid, row, circle or mirror. If it fits, replace. If not, leave it alone.

My verdict

For bodies, OPRP already saves real time. Assemblies still need work, but with a clean import it already works. If you regularly have to turn STEP files into editable SolidCraft models, download the beta and test it on your own files. Bug reports are welcome in the GitHub issues.

Keep an eye on this site for updates and tests. I will keep following the development of OPRP and SolidCraft.

Sources