STEP import

Thanks, I will look into it.
edit: I can’t reproduce this with any Blender version, I need to know more about your setup.

Copy & paste the following: import platform as p; import bpy; "|".join([p.machine(), p.platform(), p.python_version(), p.python_compiler(), bpy.app.version_string,bpy.app.binary_path_python]) into Blender Python Console and tell me what it prints out, in addition what your issue ie. Use the email address you got from your receipt from Gumroad and send the message there, using the email address you used to buy the addon.

I’ll add easier values option for artists on to the TODO list

1 Like

Thank you for you reply, maybe I didn+t explain myself or is only a Solidworks step situation. In SW (I design plastic products) so imagine you have a container and a lid for that container in the same step file (they are 2 solids within SW despite they are togheter in the same file), when I imported that step file the 2 parts are only one mesh in blender. The other thing is (and I think I misslead you in my question) is that in MODO when you open a SW file (Opens directly not from a STEP) it carries the materials to modo, so then is easier to select by material and make changes on those materials separately. I use that feature a lot for instance to apply some different textures to a part (polish in some sections and rugged in others). May be it can be done now in the plug-in and Im just doing something wrong.

Thank you again

2 Likes

Hi Ambi,

very nice job.
I bought your stepper and tried it with blender version 2.91.
But sometimes the step import only provides an empty collection with no content.
(f.e. the step examples with a box or cylinder)
what could be the reason? (wrong step file fomat?) or should i action something

thanks

I just grabbed this add, and with blender 2.91 it just crashes, or hangs a bit and crashes. I’m trying to import files with 10,000-40,000 objects - is this a problem?
I usually have imported them into 3ds max

You always can send me STEP files for testing and debugging if that’s possible. The library I’m using isn’t crash-proof and it’s always helpful to get new data.

@Leonardo1962, @victorascencao Current dev version should have fixes to at least partially address those issues.

I wanted to release the dev version to Gumroad this week, but there still remain some showstopper regressions.

Here’s the stuff I’ve done/planning on the dev version:

Done:

  • Improved colors/materials loading

  • Issue: Imports from MoI3D working

  • Sharp edge data build from STEP custom normal data (better Quad Remesher compatibility)

  • Reload STEP file operator

  • Load multiple STEP

  • Issue: Merge distance gives errors on color match

  • Error messages as separate debug panel

  • Colors as materials

  • Issue: Can’t rebuild in edit mode

  • Read scale from STEP

Planned:

  • Issue: Load STEP into cursor position (doesn’t work)

  • Three options: flat, tree and non-collection hierarchy

  • Use .occ Python location in Blender, instead of PropertyGroup

  • Test use STEP import operator from Python

  • Option to show easier values for artists (1/value)

  • Proper hierarchy when exporting FBX

  • Apply scale (need to think through workflow first)

  • Save presets

  • Add build single object from all as option

If you have anything to add, let me know.

I uploaded STEP_OCC_import_1.0.5-alpha to Gumroad, if somebody wants to look what’s going on, but there’s still quite a bit of issues I need to fix before I recommend people using it.

3 Likes

Still great to see this addon being developed. I’m using this first time on real project at the moment and although the current version works for basic import, many improvements that are in development will make it easier to use. :+1:

Actually I discover that separate materials from SW step, open in blender with boundaries that define them, so it works very wellm we can select one poly of an area and grow the selection with ctrl and + and the selection respects the boundaries (defined in red vectors). I have to test again with a model with 2 parts, because last time I tried, was a 2 parts model and opened as only one mesh.

Great with the color - had it working on some smaller files - saves a ton of time. Really excited for this - great job.

Had troubles with this model in the alpha though (works fine on 1.0) https://grabcad.com/library/2022-new-model-honda-954-concept-motorcycle-cafe-racer-project-1

@ambi: Does the import of a CAD model still uses Collections for the various parts?
Or can we have a option now to get a proper hierarchy on import? I can do Collection splits later.

cheers,

rob

Not sure if feedback is preferred yet, but I tested out new alpha and got an issue during first import. I am using previous OCC 1.0.0 version in Blender 2.83 and as I didn’t want to remove that I installed new Stepper 1.0.5 alpha on 2.92a.

Not sure if 2.92 is supported yet, but the .step model that works well in earlier version was not working in this new one. Most of CAD parts were not imported and imported ones were way too large. Collection that partially showed up was .flat. I also tried with custom scale 0.01 which I had used before with same model, but that didn’t seem to affect in size, so I assume it is the standard value.

Below is the info from System console and everything mentioned “…removed…” were CAD file or part names that I needed to hide, but looked alright.


Opening file: "Path and file removed not to display"
[STEP import] OCC version: 7.4.0
DataExchange: Reading STEP
Scale from file (meters per unit): millimetre 0.001
DataExchange: Transferring
DataExchange: Transfer done
DataExchange: Init get_shapes()

Number of shapes at root: 1
DataExchange: Reading shape (1/1)
Outliers: defaultdict(<class 'set'>, {'"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'COMPOUND=0', 'SHELL=3', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'COMPOUND=0', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6', 'SOLID=2'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}, '"Removed"': {'EDGE=6'}})
Current Blender scale set at: 1.0
"Removed not to show".flat

Building (0/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (1/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (2/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (3/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (4/156): "Removed not to show" [T2][B][s][bm][d][lk]
Building (5/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (6/156): "Removed not to show" [T2][B][s][bm][d][lk]
Building (7/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (8/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (9/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (10/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (11/156): "Removed not to show" [T2][B][s][bm][d][lk]
Building (12/156): "Removed not to show"[T2][L]
Building (13/156): "Removed not to show" [T2][L]
Building (14/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (15/156): "Removed not to show"[T0][B][s][bm][d][lk]
Building (16/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (17/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (18/156): "Removed not to show"[T2][L]
Building (19/156): "Removed not to show"[T2][L]
Building (20/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (21/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (22/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (23/156): "Removed not to show" [T2][L]
Building (24/156): "Removed not to show" [T2][L]
Building (25/156): "Removed not to show"[T2][B][s][bm][d][lk]
Building (26/156): "Removed not to show"Python: Traceback (most recent call last):
  File "C:\Users\Saku\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\STEPper\__init__.py", line 620, in execute
    up_as=self.up_as,
  File "C:\Users\Saku\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\STEPper\__init__.py", line 380, in load_step
    step_reader, obj, shp, lin_deflection, ang_deflection, merge_distance
  File "C:\Users\Saku\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\STEPper\__init__.py", line 175, in build_mesh
    mtx, colors, norms = step_reader.build_bm(shp, bm, lin_def=lind, ang_def=angd)
  File "C:\Users\Saku\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\STEPper\importer.py", line 608, in build_bm
    res, messages = self.triangulate_face(bm, face, trf, norms, face_hashes)
TypeError: cannot unpack non-iterable NoneType object

location: <unknown location>:-1

I made an additional test with new alpha version by creating very simple model in FreeCad with just 2 separate bodies. Importing worked fine with that model and also Reload STEP File functionality worked. That is nice, as I could make changes to modeled parts and overwrite exported .step file. In Blender it is then possible to update the model without deleting old model and re-importing new model. This also allowed to save and close Blender scene and when re-opening it was still possible to Rebuild geometries if tessellation needs changes.

Unfortunately according my tests, number of parts can’t change in original CAD model if design updates are made to the saved .step file. When I added new bodies, those parts didn’t appear, but Stepper addon somehow keeps the original number of parts and is not checking if imported file has new parts.

For others to know if doing updates to geometry like in my test: First need to select Relaod STEP File and after Rebuild Selected. Just one of those functions is not enough to make the update.

This was not an extensive test session and Ambi had mentioned it having issues, but I wanted to let know that the addon is in a good track regardless of issues (especially my complex production model).

2 Likes

Yes, that is on the planned list, however I don’t know when I can get to it.

@Saku: thanks for testing very useful. I will add the full reload into TODO. Currently it only can reload into objects that already exist in the project. Also seems you have a lot of edges in your STEP when it fails, I need to also test with those types of files.

2 Likes

Hi,
Just curious if you can make something that would allow Blender to export STEP files? I’d be willing to pay for the development cost.
Thanks,
Crin

Hey ambi,

just wanted to let you know that I dropped a hundo for the importer. It really opened up for the Farming Sim community the option to use Blender as the main modelling tool.

Keep it coming, the addon is already great!

2 Likes

Are there so many models available as step files?

br
Kai

any possibility of installing this on a Mac? thanks a lot!

1 Like

Hello Ambi,
I’ve bought your tool and want to use it for some larger step files, but every time I import, some components are getting lost and it’s not working properly for me… Any way you could help me fix my workflow?

Sure, you can send me PM. Also check you’re not using the alpha if you don’t want to just test. It does lose some parts occasionally.

I’m trying to send you PM but maybe there’s no PM function for newly registered users like me.
The version is the official one you get when buying, so probably not the Alpha.

Here are other workarounds we found:

  • 3ds Max can import stl natively and export to obj, then import the obj with blender
  1. Freecad can import stl and export to obj, then import the obj with blender. Next version of freecad will include gltf support (beta version can already be downloaded and tested)

  2. There is a tool called “CAD assistant” than can directly convert STEP → GLTF, although the results were not very good. But converting STEP to obj and then importing the obj form blender worked flawlessly

And then, there are at least three more paths I didn’t get into:

  • gltf exporter plugins for 3ds max. I know there is at least one that works correctly for non-animated models.
  • solidworks native gltf exporter. I didn’t install the trial version of solidworks because I already found many successful export paths.
  • CAD exchange can also read step and output standard formats, but my trial license expired

Greetings