Importing STEP files to Rhino creates a new block

I have Solidworks and Inventor assemblies which I export from these two applications as STEP files.
When I import those STEP files to Rhino, they become nested blocks, which is fantastic.

However, each time the very same STEP file is imported, Rhino automatically creates a new block definition, and a new block instance from it.
And it does this not only for the top most (parent) block, but also for all the nested blocks inside it.

This makes the opportunity of using mechanical software’s assemblies to Rhino nested blocks, practically useless. Because the whole point is to keep the same block definition.

Just to be clear, Rhino makes the same problem with STEP files exported from Rhino, and then imported back to Rhino again.
There is an additional problem it makes by creating a new block around the imported one, but in my case I am not concerned with this, as STEP files come from Solidworks/Inventor and not Rhino.

Here is an example STEP file.
example.STEP (12.4 MB)

I tried exporting both AP203, AP214 from Solidworks, and the result is the same.
I was doing the testing on Rhino 6, Windows version.

@chuck is there any hope this can be fixed, by adding a similar dialog which exists for Rhino blocks:
image

Hi Djordje - why not Insert the exising block rather than import again?

-Pascal

Hi @pascal ,
Thank you for the prompt reply.

When an assembly from Solidworks/Inventor is exported to a STEP and imported to Rhino, Rhino positions it correctly according to transformation.
With Insert command I have no record of any transformation - basically I need to manually define the insertion plane, which is not acceptable, as the very reason why I am importing the same STEP file over and over again is because every single one of them have different transformation. But they should have the same block definition.

So, you are importing different versions of the same file, if I understand, and not the same file, or?

What happens if you Insert these files at 0,0,0?

-Pascal

In my initial post I wrote ‘try importing the very same STEP file’ just to simplify the discussion and not drag the Solidworks modelling into it, as Solidworks is not the cause of the issues. But this approach (import the same STEP file again) also results in the same problem: STEP file is imported as a new block definition, not as an already created one.

In reality, in Solidworks I have assemblies of the same type (for example ‘assembly1’) scattered around in 3D. By exporting each one of it to a STEP file, their transformation is contained inside the STEP file.
So when they are imported to Rhino, they are all perfectly oriented to the same insertion planes as they have been in the Solidworks models. With only one but significant drawback: they are all have different block definitions. I can’t use such Rhino model.

Then I get the same block definition for all of them, but I can’t use the Insert command as it requires manual positioning of each STEP file block instance.

If you Insert and place the insert at 0,0,0 in Top, you should get the same exact placement as Import - is that not the case?

It looks like it makes a new definition though…

-Pascal

No. Insert command requires performing manual transformation on the block instance. Import would automatically position the block instance according to the transformation it gets from the STEP file.

Okay, forget about Solidworks and Inventor.
Do this in Rhino:

  • Make a cuboid and create a ‘block1’ from it. Just a simple block, not a nested one.
  • Save the Rhino file as ‘test1.3dm’.
  • Copy-paste the ‘test1.3dm’ file, change its name to ‘test2.3dm’, and open it.
  • Do some transformation on the block (rotate it, move it).
  • Now _Import ‘test1.3dm’ file to ‘test2.3dm’ file - a dialog box will appear: ‘The current model has a block with the same name “block1”’. Check ‘Keep the current block’. Click ‘OK’.
  • This will import ‘block1’ instance from ‘test1.3dm’ as the same block definition, but with a different transformation:
    image

attached are Rhino 6 files:
test1.3dm (87.1 KB)
test2.3dm (84.2 KB)

Why we can’t have the same feature (keeping the same block definition) for _Import of STEP files? That’s my question.

No, that was my point - if you insert a file with the insertion point at 0,0,0 with the World Top Cplane active, the result should not be different than Import as far as location and orientation.

However, I do see that in the case of step files, it makes a new definition. My guess is, the blocks are not in the file as blocks, as they are for 3dm files, but are created by Rhino on import as a sort of translation of the hierarchy that is not identical to Rhino’s block system.

-Pascal

Those are two completely different results. The one with Insert at 0,0,0 provides a new block instance with no transformation. The one with Import makes a new block instance WITH transformation. The result is not the same neither in terms of location nor orientation.

Regardless of that, I see that these “created” blocks are perfectly functional Rhino blocks, and that Rhino SDK carefully checks if there’s already a block definition with the same name in the current .3dm file. If there is, it just adds some random number to the existing name, in order to create a new block definition. If such check already exists, I imagine it wouldn’t be very difficult to add an additional check:
image
@chuck any thoughts on this?

There should be a way in Solidworks to save the entire assembly as a main assembly STEP file and a collection of STEP files for the parts. The assembly STEP file will contain external file references that should bring in the parts as I think you are requesting. As long as all files are in the same directory, just import the assembly STEP.

Hi @chuck ,
Thank you very much for replying.

STEP file is a “dumb” file, and thus contains no references to other STEP files inside the same folder, or inside different folders. This is so for STEP files created from Solidworks, Inventor or any other software.

Is it possible when we _Import the same STEP file to Rhino, that Rhino does not automatically create a new block definition, but instead raises a dialog asking:

  • if STEP file we are importing should keep the same block definition, as the one that currently resides in Block definition table?

Similarly to the dialog we have when importing blocks:
image

Is it possible to have this implemented at least for Rhino 8, if not Rhino 7? Thank you.

That’s unfortunate. Other products that have similar file structures to Solidworks give the option to export an assembly that way to STEP, as well as a way to combine all instances of parts into a single STEP file with the correct assembly structure. A quick search for Solidworks does not show a way to do the first method but does for the second.

As far as I know, there is no reason why Rhino’s import options can’t be as you suggest. I don’t think this would necessarily be a STEP specific thing but it’s not my area so I don’t know for sure and don’t know what would be involved. I’ll put in a request for it.

RH-68343 When importing non-3dm files (STEP in particular) , can we have the same block conflict options?

1 Like

Thank you for the raised ticket @chuck !
It would be very nice if at some point the ticket would be public, right now I can’t open it.

This is what I am doing in this topic - I am exporting Solidworks assembly to a STEP file. And it retains all the parts substructure (as nested blocks when imported to Rhino). STEP file attached in the first reply of this topic has been created exactly like that. But it is a single STEP file, without any connection to any other files. I don’t even think that’s possible.

Should be visible now.

1 Like

Thank you @chuck !