Make pins with holes

Can you help me with a plug-in that creates pins with holes?


lp me with a script to do this, I would greatly appreciate it

Please read this post on asking effective questions on the forum.

1 Like

And categorize your Topic posts too please.

1 Like

Maybe google translated it wrong? sorry my english is very bad.

What are you trying to do?

Make a plugin? That’s a big question. RhinoCommon is easiest.
Rhino - Guides (rhino3d.com)

Or make holes?
If holes, can you give us a simple example file?

He wants a script or a plug-in that will automatically create the little tabs with holes (on what looks like a sheet metal part) that the arrow is pointing to, all around the outside border at (I suppose) a given size and spacing.

1 Like

Thank you Helvetosaur, you understood exactly what I wanted

You had more confidence in Google Translate than I did :slight_smile:

Also, his(?) English is much better than he represented.

Ok then…

Is this a surface or a solid?

What are the inputs:
how do you decide where to put the holes?
Are the tabs always the same size?
Are the holes always the same size?

Step by step, how would you do it manually?

Example files help a lot.

Example answer:
The sheet is a surface, not a solid. Tabs and holes are all the same size. I would be happy with a solution that let me select the line segments representing the two opposite sides of the tab and drilling a 5mm hole centered as if they were a rectangle. A 10mm depth for the cylinder ‘drilling’ the hole is safe because I know no other parts will be that close.

1 Like

11.rar (137.2 KB)

Those are surfaces

tabs and holes it the same desired size.

Ok. I see that you have a pair of Breps showing the before and after of adding tabs with holes.

The tab is a polyline edge (not closed because the ‘top’ is open) and the hole is a closed nurbs curve.

I believe that I understand how to cut the holes (Brep.Trim) given selection of the tab.
Brep.Trim method (rhino3d.com)

I’m not sure I understand your process for positioning and creating the tabs to begin with.

It seems like we could let you click on the tab polyline (shift-ctrl-select) to specify the target of a plugin command or script which then drills a hole: either prompting you for a diameter or always using the same diameter.

Is that about what you’re looking for?

If so, how do you build the tabs now?

Screenshot (313)

1 Like

I’m doing those things manually

I understand that. It’s not that hard to punch a hole in one of those tabs. This image+model is the result of:

  1. user issues plugin command PunchTab
  2. user selects the Brep edge representing the tab (shift-ctrl click on the edge, if there are multiple things in a dropdown list select the edge)
  3. code finds the rectangular part of the tab (assuming it’s a five-edged tab with the rectangle defined by the first and last edges)
  4. then drills a hole in the Brep in the center of that rectangle, perpendicular to the surface of the tab
  5. then redraws the whole thing.

Screenshot (314)

I did this on the piece of the model which already had a hole for comparison. The smaller hole is mine.

You haven’t supplied much information about what you want.

Locate the hole where?
Make the hole how big?

Create the tabs where?
Shape them how?
How does one know what angle to attach the tabs at?

And so on.

It occurs to me that you may want to look at Blocks: if all of the tabs are identical, you can define it once and then reuse it.
punchtab-0.1.1-rh7_13-any.zip (58.3 KB)

I want the red color to be automatically generated, with flexibility, the blue distance also flexible?

I don’t see it working? Did I do something wrong here?

Contact me. I make it :slight_smile:

1 Like

I really look forward to your help.

I don’t see that link as a downloadable attachment.

Because there were still open questions, I didn’t test that deeply: it works for I think four out of six but not the two on the rear side. That should be an easy fix. I’m also not sure which version you’re using: 7 or 8?

Ok:
Items in the red box, specs for the tab.
Blue distance is the position input. I assume: centered along a user-specified edge, pointing down, with the user specified distance between them.

So:
User runs the command
Upon prompt, user picks a bottom edge of the surface.
Upon prompt, user specifies the distance between tabs.
A pair of tabs are created.

Sound right?

All of the dimensions in blue are a lot of questions to answer in the command prompt. I don’t know if you’d really want to have that many prompts, or maybe a config box… that can wait.

it is true