Box with bayonet joint

Dear everyone!
I’m new to Rhino and Grasshopper.I would like to make a box with Bayonet joint like step file below.
Does anyone have ideas how to do it with grasshopper?
Thank you.
Bayonet joint
Bayonetjoint.stp (214.3 KB)

Is there a reason for doing this in Grasshopper and not in Rhino?

Hi Ftzuk!
I would like to do this in Grasshopper, because I want to change the different thickness, length and height later.

welcome to Rhinoceros and Grasshopper. I think, from my experience, that the best method is to dive into Grasshopper and try to solve your problem. It is better to have some experience in Rhinoceros, because it is easier to replicate in Grasshopper what you do in Rhino.

Your problem is not so simple. For example what is the 3d file needs a CNC that has more than 3 axes because the cuts are not perpandicular.

It is more easy to model that but it is more difficult to make (laser cut for example).
If you want just 2d cuts it is a bit more complex to develop. But it all depends if you want an automatic dor all cases or just a tool that work on some defined situation.
So could you eleborate on the exact parameters you want?

Examples of slits


Hi Laurent Delrieu.
Thank you for the quick response. It is good that you know exactly what I want. I would like to cut this in 2D-laser machine. But if it is diffcult to do this in Grasshopper for 2D cutting, can you make for 3D-axes machine in Grasshopper? I can convert the cuts to perpandicular later for the laser cutting. I’m sorry about my english.
The parameters I would like to have is something like this.

Bayonet parameters.STEP (914.0 KB)

Bayonet joint (48.3 KB)


Thank you so much Quan Li.
Can you design from begin in grasshopper without step file I uppload here? Because I want to change angle of the box.
When I open your file I have this message.

MCAD like Fusion or Solidworks are wiser choices.
Easy to make and maintain.

1 Like

There are always many different strategies to solve a problem.
If you have cuts that are not orthogonal you can
orient the pieces in order that they sit on plane XY, I decide that the biggest area part contains the plane.

Then I pack geometry in order to see each one, I use my plugin but this is not mandatory just nicer

Then project the contour of 2 biggest faces on XY plane

Then the idea will be to make the intersection of the outer shapes and union the holes. It is quite easy to do with Clipper library but I don’t know if there is a tool to do that in Grasshopper. So the idea is still the same.
Sort by area, reverse the list. 2 first curves must be the outside and the others the holes. Intersection some, union the other

And you have your 2d curves usable for cutting
But you can also cut everything and you will have to many cuts but at the end you’ll just have to sort the pieces.
orient (121.7 KB)

The other logic is to use median sheets associated with a thickness. It is what is done in Region Slits tools

You don’t need to install pOd plugin, it is just for preview at the very end.
It was designed from scratch, but if you want variations from this, better study it first.

Ok Quan. Thanks. I will study your grasshopper file from scratch.

Many thanks for your help.