Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

How to make a slotted hole

jan_diddenjan_didden Member Posts: 12

New user here, progressing slowly.

How do I make a slotted hole? It would look like two opposing half circles connected by two straight lines. Something like the attached which I found in an existing design. Grateful for any pointers.

Jan Didden

Best Answer

Answers

  • glen_dewsburyglen_dewsbury Member Posts: 1,264 PRO

    Slot tool.

    image.png
  • jan_diddenjan_didden Member Posts: 12

    Yes, I know that slot tool. My question was how to actually make a slot on a sketch. Do I first have to draw a line or a point? Just clicking the slot tool and then trying to draw doesn't give me anything.

    Jan

  • Oliver_CouchOliver_Couch Member Posts: 230 PRO

    Yes, you first need a line. Then use the slot tool on the line -it uses the line as a centreline for the slot, with the radii centred on the endpoints of the line.

  • glen_dewsburyglen_dewsbury Member Posts: 1,264 PRO

    You can also select splines and arcs, not just a line.

    Have you tried the learning center? This and many other sketching techniques are covered in sketch training for free.

    Also if you hover the mouse over the tool selection you'll get a brief description. In this instance the description is "make a slot by selecting line, spline or arc". They can be used in combination as well.

    https://learn.onshape.com/

    image.png
  • jan_diddenjan_didden Member Posts: 12

    Yes, I got that far. Drew a line on a sketch and put a slot around it. But I keep getting error messages like 'not fully defined' and the slot remains red in the list of items. I can extrude it 'through all' and it looks OK but the outline remains in blue and I can't get the dimensions/position to display.

    Jan

  • glen_dewsburyglen_dewsbury Member Posts: 1,264 PRO

    @jan_didden

    Is the centerline selected for the slot completely constrained? See the difference between sketch 1 & 2 in this example. Sketch 2 shows as not fully constrained even though its the same. In sketch 1 the centerline is constrained.

    If you are seeing red in the sketch feature list post a link to your document for a review since something else is wrong. Maybe something over defined?

    https://cad.onshape.com/documents/ac0ecfe4f301c56899904542/w/f485e7914d309ca0473669c7/e/d63eab67f229ebc830cb3e5c

    image.png
  • jan_diddenjan_didden Member Posts: 12

    Hmmm. I need to learn what 'constrained' means, and how to manipulate it.Thanks guys, I now have a direction!

    Jan

  • Ste_WilsonSte_Wilson Member Posts: 551 EDU
    Answer ✓
  • jan_diddenjan_didden Member Posts: 12

    With help from my friend Cor van Doorn, I have it like I want. Had some error messages like 'not completely regenerated' and 'undefined' but now understood their origin and solved them. I also understand why all elements have to be constrained to something, that was a new concept I needed some time to grok. Onwards, always onwards!

    Jan

  • jelte_steur_infojelte_steur_info Member Posts: 638 PRO

    Since google leads people here when asked 'how to create a slot'
    there's a new featurescript. make a hole (with the hole feature) and turn it into a slot.

    hole to slot feature

    give it a try and let me know if it works for you.

  • SebastianMaklarySebastianMaklary Member Posts: 23 PRO

    @jelte_steur_info Great, that custom feature is just what I needed but it doesn't work on sheet metal models, which is where I need it. Do you know of any way that this can be adjusted to work with sheet metal?

  • jelte_steur_infojelte_steur_info Member Posts: 638 PRO

    I’ll look into it

  • jelte_steur_infojelte_steur_info Member Posts: 638 PRO

    @SebastianMaklary :
    I'm afraid there's no good way to make it work on sheet metal.
    I tried the most crude way manually , but it doesn't result in a proper shaped slot. (it does end up making a cut, but straight.

    I'm afraid the hole feature is the only non-perpendicular cut that onshape allows in sheet metal… for now…

    @Derek_Van_Allen_BD: I believe you've tested the edges of sheet metal functionality with featurescript. do you see any option to create a slotted slot-hole with e.g. countersink geometry?



    image.png
  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 626 PRO

    @jelte_steur_info @SebastianMaklary From a manufacturing perspective I do have some objections about countersinking a slot in sheet metal, but bullying the Onshape sheet metal kernel in general is something I can get behind no matter the application. There are a few more ways to get non-perpendicular geometry to build in a sheet metal environment but they all come with caveats. Well 2 main ones. Firstly how much do you care about your tool being limited to only planar surfaces? Secondly how much do you care about the flat pattern environment showing the same features as the 3d view? The form feature allows you to willfully violate most of the sheet metal kernel's checking because it assumes you've got a forming die that does whatever you've desired to introduce to your model at the locations specified, but it requires a bit of setup in a secondary studio and configuration settings, and does not work on curved surfaces nor add geometry to the flat patterns, only a sketch representation drawn by you.

    I did get excited the update that allowed countersunk geometry in holes last year and was looking into turning off some of the guards and flags set by the registerSheetMetalBooleanTools call that allows it to work to see if I could coax it into working on more cases than pure planar geometry or to use it for additive operations instead of subtractive but I recall running into engine side limitations with my experiments. It's been awhile since I made the attempt though and I do need to look into alternatives for my kerfinator script so I could get back into it.

  • lanalana Onshape Employees Posts: 752 image

    bullying the Onshape sheet metal kernel in general is something I can get behind no matter the application

    😐️

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 626 PRO

    😆Don't get me wrong. I love the sheet metal environments in Onshape, it was one of the core reasons we switched to the software as an improvement from every other CAD system we were using before. It's just that the more useful a tool is the more I look for ways to use it outside the developers' original intended use case.

  • jelte_steur_infojelte_steur_info Member Posts: 638 PRO

    @SebastianMaklary I guess finishing the sheet metal part and use hole to slot afterwards if that fits your flow?

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 626 PRO

    @lana Looks like I got support for countertweeped holes working in sheet metal

    image.png

    Is there any way to get registerSheetMetalBooleanTools to support curved surfaces or union operations? How much of that function is kernel side vs featurescript side? I got a kerf bending script that would be massively more efficient if I could support one or both of those things instead of trying to run the math manually and implement a non-sheet-metal unfolder.

  • lanalana Onshape Employees Posts: 752 image

    @Derek_Van_Allen_BD Unfortunately, curved surfaces support is not available yet and most of the matter is on the core side. In order to support this we'll have to create and manage separate instances of the tool for curved wall and for flat. We have customer requests to support such holes, - so some time in a future.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 626 PRO

    @lana I don't imagine that additive tools are on that same roadmap, or opening up the general sheet metal engine to support "non-traditional" sheet metal geometry like pockets or kerf cuts, are they? As a sheet goods manufacturer our company uses the sheet metal tools to do a lot of non-sheet metal things which is why I'm always bullying the kernel. Stuff like this. There are also numerous threads on these boards of people looking for live hinge geometry for 3d printing or like V groove cuts for bending ACM sheets which I've been asked to make custom features for that the sheet metal engine is tantalizingly close to allowing but I get blocked by an @ level function that stops me from going all the way.

  • lanalana Onshape Employees Posts: 752 image

    @lana I don't imagine that additive tools are on that same roadmap, or opening up the general sheet metal engine to support "non-traditional" sheet metal geometry like pockets or kerf cuts, are they? As a sheet goods manufacturer our company uses the sheet metal tools to do a lot of non-sheet metal things which is why I'm always bullying the kernel. Stuff like this

    I don't expect we'll prioritize this sort of functionality any time soon. We might expose more surface types through opWrap ( it has unwrap option : flip destination and source) . If we get it to respect topology of the target( when wrapping) /source (when unwrapping) that is pretty much all that you'll need to build your own tools around it. Still unlikely in the near future - sorry.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 626 PRO
    edited January 8

    Oh that's alright, improvements to opWrap would definitely cover a lot of the use cases I'm looking to explore. And I would say that not having direct utility support for some of the things I've been getting into lately has forced me to learn a lot about b-spline definition and opened some doors in the process of writing my own surfacing functions that I would probably have skipped over otherwise. I did spend some time messing with opWrap trying to get it to work in reverse since I saw those options in there. Had some early success but set it down to work on other stuff for awhile.

  • SebastianMaklarySebastianMaklary Member Posts: 23 PRO

    @jelte_steur_info and @Derek_Van_Allen_BD Thank you a lot for doing what you do but I think you might have misunderstood what I was looking for. I don't need to add 3D features or countersunk slots to a sheet metal feature but just to have an easy way of creating a slot from a hole to give some manufacturing tolerance in one direction. We often have a bunch of holes which then in a future revision needs to be changed to slots to make assembly easier as the physical assembly is otherwise overconstrained and small errors in the bending allowance means that the holes don't line up.

    I am still only interested in perpendicular cuts that are cut with the lasercutter based off of a DXF exported from the flat pattern view but would just like to be able to easily make a cylindrical hole into a slot like the original featurescript from Jelte does.

  • jelte_steur_infojelte_steur_info Member Posts: 638 PRO
    edited January 24

    I've been working on a sheet metal model for the the straight slot 'slot to hole' function and have the sketch rendering properly.
    the whole thing will work completely different than the existing function.

    Now i just have to make the cut happen in featurescript but i'm afraid it's not as easy as opExtrude opBoolean.

    @Derek_Van_Allen_BD : how does one cut from the sheet metal model? or where can i find the proper documentation? AI wasn't very helpful on this topic…
    do you have a regular custom feature i could study to see how this could work? your black market one is a mystery to me…

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 626 PRO

    @jelte_steur_info the sauce is all in the registerSheetMetalBooleanTools() function which is otherwise only used in the standard library Hole feature. It's also marked for internal use only and doesn't come with a lot of documentation or any other examples of usage so most of my understanding is coming from experimentation and pure educated guessery.

    The way it seems to work is it takes whatever tool body you've got passed to it and makes a copy on the flat pattern of the sheet metal part in the same location as the 3d model and does booleans for both the 3d view and the flat view while bypassing all the normal sanity checks that the sheet metal engine runs in the background. The registerSheetMetalBooleanTools() function has guards to prevent you from registering tools that interact with side walls, rolled walls, rips, joints, or corners which I assume is partly to prevent entity association bugs when you modify those elements (an issue I'm far too familiar with) and for rolled surfaces they would actually need to be doing some warping of the tool body that gets spawned into the 2d view to flex and deform it to match what the 3d tool is doing and respect the K factor of your unfolded piece. I would wager that the same exact framework is being used for the sheet metal form tools as well for the sketch placement on the flat patterns, but the front facing functions are slightly different and no additive geometry is being brought to the flat pattern view in that case, only sketches. Both tools have the same restrictions though.

    As for how you use it, the ~100 some lines of code in the Black Market Boolean example is really as simple as it gets. Do the rest of your feature as you normally would and make sure the target is ActiveSheetMetal.YES before invoking the registerSheetMetalBooleanTools and the engine should just take care of things for you.

Sign In or Register to comment.