STEP import

Someone here knows about this addon, I have some step files but comes to blender in one object…

The addon is currently available through Gumroad. Once you import the STEP file into Blender, you can adjust the meshing parameters for individual objects. It would help if you could be a little more elaborate in describing your issue.

Any chance you could add dates to the notes of the downloads on Gumroad?

The free version does that but the payed version imports individual objects.

Hello Lumpengnom. Thanks just one question… I have problems with the mesh how can I change the mesh to work in blender?

Well, what exactly are the problems?

I have a lot of components and all of them comes like this in blender… when I send a render just looks bad.

Maybe a weighted normal modifier would fix this issue?

The free version normals require some manual setup to look ok, the paid version has much improved mesh and normals.

Wonderful addon! Just discovered it and bought it right away! Thank you for the amazing work @ambi!
Would love to see it on Linux some day! Literally set up a VM just for this addon now :smiley:

1 Like

yeah I was sold on it until I found out it doesn’t work on a mac. Unfortunately we have an aging IT department at work who still believes we need macs for “art”, so I’m stuck with that dying platform.

Hello!

Thank you very much for developing this add-on/extension, I just discovered and purchased it today. It looks like it might be exactly what I need for my use cases and I’m playing around with it so as to learn how to use it but I’m very confused as to the ‘Linear Deflection’ and ‘Angular Deflection’ import parameters. I was hoping you might be able to answer a few questions about these two parameters so I could understand exactly what they refer to and how they work. These are as follows:

  1. Is the angular deflection setting the maximum allowed dihedral angle between two neighbouring triangles within the same triangle patch or triangle island?

  2. If so, is the angular deflection expressed in degrees or radians? Or…

  3. Is it actually the ratio between maximum allowed deviation away from the CAD surface and the distance travelled along the CAD surface?

  4. Is the linear deflection expressed in absolute units or as a percentage of the bounding box’s maximum size?

  5. Does STEPper collapse neighbouring triangles with a dihedral angle smaller than a certain angle? If so, can an option be added to prevent it from doing that?

  6. Would it be possible to replace the ‘linear deflection’ input parameter with a ‘maximum span’ or ‘maximum length’ parameter, which takes absolute units?

Basically, my intent is a very fine (high triangle count), very uniformly (consistent/uniform triangle size through the model) tessellated mesh to use for 3D renders. And I especially want to avoid very thing triangles if possible. I don’t really care if the triangle count goes into the many millions.

Thank you very much for taking the time to review and hopefully advise regarding the above.

Sure, here’s a good description of what they change: https://stackoverflow.com/questions/45274793/what-is-a-linear-angular-deflection-in-opencascades-incremental-mesh

  1. Currently not IIRC, in the dev version it does some geometry optimization (not sure about dihedral angle) and cleanup. Should be possible to make it an option if the mesh optimizations cause issues.

  2. Probably not, but I’ll keep it in mind if there’s a way to do that.

Hello,

Thanks you for your reply. From the article you linked to, it seems that the linear deviation is provided in absolute units and the angular deflection in degrees.

The reason I asked about 5 was because the mesh generated kind of looks like it was generated using the Netgen algorithm: https://cadexchanger.com/download/sdk/doc/dev/html/sdk_meshing_advalgos.html .

That is to say, the triangles don’t seem aligned, arranged in parallel rows or uniformly sized. Even along flat or nearly flat surfaces. This isn’t really an issue. Rather, it would just be nice to be able to deactivate this for use cases where generating a mesh with no long thin triangles or without non uniform tessellation in general was desirable. Here’s a screenshot of what I mean:

On the left is the mesh generated by the STEP import Blender extension and on the right is the same part of the same CAD model tessellated using MOI 3D.

If there was a toggleable option to get more uniform tessellation, like from MOI 3D, that would make this extension pretty much perfect as far as I am concerned, especially if implemented together with the option to specify the smallest allowed size for a triangle to prevent over-tessellation in the absence of the triangle optimization step, when that is toggled off. Thank you for making this plugin available.

1 Like

Yes, of course if there was a state-of-the-art 3D CAD meshing kernel available in GPL license I would use it. However, unfortunately, there doesn’t seem to be one. Writing one from scratch is multiple orders of magnitude out of the scope of this project.

I am having some trouble with importing a step file. stepper appears to import objects that are turned off in the step file.
Unfortunately I can not show the file due to nda reasons.

One thing that it imports seem to be variants of objects. For example, I have a robot are which is imported once the way it is supposed to be and a second time rotated to the left and equipped with a different tool.

The other thing that it appears to import are some kind of helper objects or something like that. The whole scene is filled with spheres which I believe to be helpers for radiuses or something like that.

However, if I open the scene in CAD Assistant these objects are not visible. If I import with Stepper they are there.
If I export to gltf or obj from CAD Assistant and into Blender the objects are there as well.

Does anybody with more experience with CAD know how to turn these objects off?

Stepper currently doesn’t detect if object is hidden. It just imports all objects it finds. If there’s a need for that, I’ll add it to the list. Just to clarify: do you want the objects to be imported but be hidden or not loaded at all?

Oh, thank you. :smiley:

For me personally at the moment not loading them at all would be better but I guess for other cases loading them hidden would be better.

Thanks, this plugin saved my *** :D.
Is there any way to set up import options within python script? I have bunch of .stp files and need to import each of them using same options.
I successfully batch-imported all files using

for filename in glob.glob(os.path.join(IMPORT_PATH, '*.stp'))
	bpy.ops.import_scene.occ_import_step(
		"EXEC_DEFAULT",
		# prg=opts,
		filepath=filename
	)

…but I cannot find out how to setup import up-axis and scale (so I can do even less work manually).
I have bought “new” (OCC Import) version from Gumroad

I got the same task as @postolka, but I only have the old version because I cant afford the new one.

Anyway, I dont know how to use the STEPper addon in a script to convert .STEP files into .GLTF or .FBX for my task.

Any help is appreciated :slight_smile:

What I’ve tried are things like:

def convert_recursive(base_path):
    for filepath_src in file_iter(base_path, ".step"):
        filepath_dst = os.path.splitext(filepath_src)[0] + ".gltf"

        print("Converting %r -> %r" % (filepath_src, filepath_dst))

        reset_blend() # just a method to reset the read_factory_settings

        bpy.ops.import_scene.import_gmsh_step(filepath=filepath_src) # find a way for this!!!
        bpy.ops.export_scene.gltf(filepath=filepath_dst)