STEP import

Hey ambi

A little experimenting today. Using Solidworks. Not looking at assemblies which seem to work ok, but single parts which contained multiple bodies.

Start with the basics. Cube with a material assigned (thus the colour to the entire part) and a colour override assigned to one face.

Saved it as a step file, imported via STEPper no worries.

I added another cube to the part in Solidworks, not touching the first. Two detached cubes. The second cube, because it’s still part of the part, would have the overall part appearance by default. I set another colour to one of its faces.

Imported them via STEPper. Lost the colour of the face on the first part, second one came through. I could separate by loose parts. This didn’t bring back the missing face colour of course.

Now I added two more bodies to the part which were not merged in Solidworks but each shared a face with one of the two cubes. I assigned both bodies a new colour, and one face on each a new colour too.

These came into Blender as one mesh which could only be separated by loose parts into two - the pairs with common faces had been merged. All individual face colouring was gone.

Importing the step files into Rhino they were exactly as designed.

So I’m guessing this is either a limitation of OpenCASCADE or some kind of configuration problem with how you’re using it.

STEP files attached if you feel like having a play. In Rhino this is how they look:

This feels so close to working. I’m on the verge of getting one of my grads to build a blender materials library that matches the Solidworks appearances tree, in the hope we can match by STEP colour for a much simplified export/import/rig/render workflow. This issue is the only thing stopping me at the moment, you’ve got everything else working so well (especially the ability to reload and bring in a hierarchy)

Keep up the great work!

2CubePairsSpaced.STEP (62.2 KB)
2CubesSpaced.STEP (26.6 KB)
SimpleCube.STEP (14.2 KB)

2 Likes

I have the same problem as @aleksi1.

I attempted an import with STEPper 1.1.6 for Blender 4.1, and received the following message.

Python: Traceback (most recent call last):
File “C:\Users\Gerrard\AppData\Roaming\Blender
Foundation\Blender\4.1\scripts\addons\STEPper\main.py”, line 742, in execute
)

File “C:\Users\Gerrard\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\STEPper\main.py”, line 444, in load_step
step_reader = global_file_cache[filepath]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Gerrard\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\STEPper\main.py”, line 352, in build_mesh
else:
File “C:\Users\Gerrard\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\STEPper\main.py”, line 217, in bpy_update_object_data
return obj
^^^^^^^^^^^
AttributeError: ‘Mesh’ object has no attribute ‘use_auto_smooth’

EDIT: I resolved the problem above by simply restarting my PC - but now I have a new problem.

When importing a model from AutoCAD, the imported mesh is a single lump, where it was several Solid Bodies in AutoCAD. I can’t split them up in Blender.

Any suggestions??

@ambi Blender 4.1 has broke the STEP importer plugin. It now shows an error script when trying to import a .stp file. Had to roll back to 4.0 to get it to work again.

If they have common vertices (or vertices close enough to each other) the solid bodies will get merged into one.

If they are really separate bodies with gaps between them you should be able to go into edit mode and separate by loose parts.

Hello is there any hope to see a new version for blender 4.2 ? I have an error saying my phyton versions isn’t the right one but it seems to work anyway. thanks , keep up the great work

@ambi
Working on STEP file → Game asset transformation and am a huge fan of the remesh feature to balance quality.

When Blender is closed, the STEP Cache to do so is lost. In my case the STEP file is very heavy and takes ~20 minutes to import, so losing cache really sucks when I have to remesh a detail and have to wait 20 minutes to reload the step file. Is there a way to preserve Cache?

Looking for an update that is an extension for Blender 4.2 and wondering what the status is for the tessellation routines that are being used. Older STEPper tessellation is more consistent. I would like to see a reversion to an older OpenCascade version to improve the quality. For example, latest version of STEPper importing a cylindrical hollow part with an internal radius gives me botched beveled edges and weird sharpness values.

STEPper_1.1.7_for_Blender_version_4.2_or_later is up on Gumroad. Let me know if there are any regressions.

6 Likes

Using the latest version (1.1.7) with Blender 4.2.1, when I import a step file, I no longer get solid bodies like I used to, with seams at sharp edges. It is now all individual unconnected triangles.

1 Like

I am having the same problem, it makes the files sizes much larger unless I merge all vertices. I ended up going back to 1.1.6

Thanks for letting me know. Can confirm. STEPper_1.1.8_for_Blender_version_4.2_or_later should have the fix.

3 Likes

I can confirm it fixed my issue, thanks for the quick turnaround!

May I request just one simple feature: Scale normalization. Currently all imported objects have a scale of 0.001, except for the topmost Empty which is scaled at 1.0. Any chance imported objects can just be all scaled to 1.0?

1 Like
Python: Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1232, in _handle_fromlist
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/Claus/Library/Application Support/Blender/4.2/scripts/addons/STEPper/importer.py", line 36, in <module>
    from OCC.Core.BRep import BRep_Tool
  File "/Users/Claus/Library/Application Support/Blender/4.2/scripts/addons/STEPper/OCC/Core/BRep.py", line 15, in <module>
    from . import _BRep
ImportError: cannot import name '_BRep' from 'OCC.Core' (/Users/Claus/Library/Application Support/Blender/4.2/scripts/addons/STEPper/OCC/Core/__init__.py)

Getting this on 4.2 on macOS. Any way to resolve?

Hello, is this addon still being supported? If so is there a blender 4.3 compatible version coming any time soon?

Thanks!

Can we run it in Linux by any official or unofficial instructions, configurations or voodoo?

I could really use it but booting into Windows is not always a possibility. I use Plasticity 3D for now, to ingest .stp files and bridge them to Blender.

Some of the options and control I get are better through Plasticity, but for many files STEPper works really well and produces very good results, as I’ve seen.

Anyway, is there any hope for this add-on to run on Linux somehow? Thanks.

Went ahead and bought it. But no, it doesn’t work in Linux. Trying now several versions of OCC overwrittings to see if it works…
Anyboy aware of the opencascade OCC version we need now to make it work?

I made this addons,you can try.
[Free Addon] Rhino to Blender: Quickly export Rhino models to Blender - Coding / Released Scripts and Themes - Blender Artists Community