Export to STEP AP 242

Hello Pascal;
Could the detected instances have a unique number sequentially appended to the name of an identical object with a look up table?
Is there a plugin that offers this?
I am very happy to try out whatever approach you have in mind and see what happens as this would open up Rhino for me and I think others in a similar circumstance.
Thank you for considering this!
Eric

Hi Eric - something like that seems plausible but (I think) this would have to happen on distributing to layers to begin with so the tool would need to be in charge of both ends of the operation. ExplodeBlocksToLayers could probably do this , possibly, if I am smart enough.

ExplodeBlocksToLayersV6.rhp (15.5 KB)

-Pascal

Hello Pascal:
So, Blocks in, Blocks out with working layers in between - fantasticā€¦
Eric

1 Like

That would be the goalā€¦ it might need a bigger brain than mine, but Iā€™ll have a look.

-Pascal

A big:
THANK YOU !!!

Hi Pascal. This is really interesting. If the user has, at the outset, planned their model layer structure to be one object type (e.g. a M10 x 40 bolt) per layer - and they have the discipline to maintain that aproach :sweat_smile: - then being able to input / output objects as Blocks (and nested Blocks) would be fantastic. If the Rhino user field data attached to that object could also be saved to / read from the applicable ā€œbucketsā€ in AP 242 (which I suspect would be something for @chuck to comment on), then Rhino would have a non-destructive way of communicating back and forth with solid modeller packages.

I can see something like scaled Blocks on the same layer causing chaos, but that would perhaps be down to the user to maintain their discipline :smile:

If you can get this to work, can I request that you include command line options to filter geometry on the layers to be just closed polysurface(s)/ just surfaces/ just curves exported or imported?

Hi Matt - this is starting to feel like a fairly serious featureā€¦ Iā€™ll think about it some more and see if at least the basics can be hammered out, but donā€™t wait under water, we have V8 to finishā€¦

-Pascal

Yeah, I know. I see it as an extremely serious feature and using AP 242 as the conduit has always seemed to me like the best way to do it as itā€™s a universally supported format. Rhino is lagging behind in that respect.

The Blocks aspect is forced upon us, because thatā€™s the way that most of the solid modellers seem to handle in/outs using STEP format. As Rhino is late to the party, itā€™s their rules we have to play to.

Donā€™t worry, Iā€™m not holding my breathā€¦

hey pascal

I think I can help a bit on your quest :stuck_out_tongue: ,

after a few months of going back and forwards I have a semi working script that reblocks what the explodeblocktolayers does

here it is the python file
ExportStructuredStep.py (2.5 KB)

Few things that are broke on my code:

1 - It doesnā€™t actually exports the final block, I couldnā€™t find a way to do it (it said it exported but no step file was created) and when it was rhino became irresponsible after (I think it got with redraw false stuck but i couldnā€™t find it why)
2 - I couldnā€™t find a way to ask the user the schema to export the file (step 214+ is interpreted as assembly, step 203 as a multibody part, at least with the solid modelers I tested)
3 - I couldnā€™t manage to convert it to a rhino compiled command :frowning:

Could you take a look and improve it if you have the time?

I believe it could be a midway solution for Eric as well :smiley:

1 Like

Thanks! Iā€™ll take a look.
@altamiro.aj - the tricky book keeping part, (that needs help at the Explode stage with user data of some kind I think) is to locate objects that came in as instances of the same block so that they can be exported that way. Your script exports these as instances of different block definitions, which cancels the simplification poissible with blocks - i.e. exporting this way will make a more complex file than the incoming, if I understand what youā€™re doing here.

-Pascal

1 Like

Btw, it may need proper testing for other conditions, my layer structure is pretty well defined, and I just finished coding this version I send you. Like literally 20 minutes before sending to you, I tested with 4 files that were in my delivery pipeline and it worked like a charm!

Hi @Eric_Andkjar why donā€™t just open 3DM file in Spaceclaim?
Actually SC nicely convert Rhino layers to SpaceClaim components.
image

In Rhino v5 it was even possible copypasting straight to/from Spaceclaim but this is lost with Rhino v6

If I need to go from Rhino to other solid modelers (SW, NX, et) I open 3DM in SC then export STP from there. A bit cumbersome but it works nice!

Would be great of course to be able to export a ā€œstructuredā€ STP straight from Rhino as your are asking and I discussed already above

1 Like

Good Job @altamiro.aj
will try it and keep you updated.
thanks!

1 Like

Hello Luca;
Thank you!
I had mixed results some years ago but will try this again.
I think with a more careful approach in Rhino I should have good results.
Thanks again,
Eric

1 Like

I donā€™t really know what the full status is on Importing and Exporting Step AP242 with PMI in Rhino 8 but I would like to see more happen with this. I see on your issue RH-6077 ends with basically needing more information from users.

nist has a bunch of information on the standard if you have not already found it.

This link is what I expect to see when opening up new AP242 step files

This link gives some AP242 Fully Toleranced Test Cases provided by nist

4 Likes

Canā€™t we start with partial support?
Just being able to export Dimensions, leaders, text notes and any other annotations objects that we already have in rhino for the 242 format would be a nice addition for the PMI support already :slight_smile:

We just got out upgrade to R8 last week and I was happy to see I could export steps 242 but sad to see it still doesnā€™t support simple annotations :frowning:

1 Like

Shouldnā€™t we skip the block creation/destruction part and stick with the layer hierarchy?
STEP to layers, layers to STEP?

1 Like

Hi @Marc,
imho our exports are fully based on the block structure.
I guess an export by layer hierarchy is cool, but I would acutally be very unhappy not respecting the blocks any longer.

You mean that when you work in Rhino, your parts/assemblies are segregated by blocks?
Maybe I should revisit using blocks, the tools are probably better now. The problem I encountered before was that there was no good way to visualize the structure (how parts/sub-assemblies are organized) of a project when using blocks.

Yes, @Marc, I totally recommend it.
imho in Rhino8 dealing with blocks also got a lot easier.