Hello,
Could anybody please help me create some code for creating dogbones on our sheetmetal parts? I would like the code to look at the flat pattern and find all the inside corners and blow a hole and rounded edges into them.
How could i do this?
Any advise would be greatly appreciated,
Thanks,
Hello @paul
For iLogic problems post in the Inventor Customization forum.
https://forums.autodesk.com/t5/inventor-customization/bd-p/120
You will get better help there.
I have asked for this to be moved there.
Hope you get the answer to your problem.
Thomas.
Hi @paul,
Can you provide a picture or example part file showing the feature you wish to automate the creation of?
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
See this link for more info:
It's to modify internal profiles that are designed for slot + tab fits so that the internal radius on the slot doesn't interfere with the tab + has clearance.
@MechMachineMan - I do use this add-in for Fusion - it is not to powerful - from experience I think that it does not activate with a Fusion assembly, however the idea is awesome. But I can not use this code for Inventor- correct?
@Curtis_Waguespack - please find image attached. Let me know if this is clear - thanks,
Hi @paul,
So are you like the user at this link, who wants to create the round corners on any slots, or are you wanting to create the slot and dogbone all at once?
https://forums.autodesk.com/t5/inventor-forum/creating-cnc-dog-bone-with-ifeature/td-p/6004389
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Also, if I look at the photo at that link and compare it to your screen shots it appears the centers of the relief holes are placed differently?
Hello @Curtis_Waguespack,
I have been looking at this post for a while now and I shied away from it because i do not want the i-Feature, for the simple reason - every hole size is different - and how do i create an i-feature that follows that, and i do not only need the dog-bone for the female end, but also for the male end so the rounded edge does not interfere with the second part that it butts on to.
Please let me know on your thoughts,
That is correct, it is really the methodology of placing the feature, he is using a slot to create the relief - where i am using a hole. And if you look at the fusion add-in they also use a hole, but the perimeter of the hole is at the edge of the square slot vs. the center of the hole at corner of slot...
The slot method is very standard and gives you a bit more flexibility in thin sheet-metal.
Let me know if this is clear, thanks for your efforts,
Hi @paul,
Here is an attached 2017 file with a quick attempt at this with iLogic. As written currently the holes are placed directly on the vertex.
It's still not clear to me if you are attempting to automate the placement of the holes as in this example, or complete dogbone cutouts and tabs.
In any case you play around with the example and provide feedback , and if time permits and someone hasn't provided a solution already, I'll try to have another look at some point.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Following.
I used to do it all manually. (Current company does not subscribe to keyed plates, so I don't do it anymore)
But one thing I do remember is that there are a set of rules based on the laser/plasma, and the plate thickness, the minimum radius for the holes and fillets change based on the plate thickness, so I guess something to keep in mine when developing the code.
@Curtis_Waguespack - i think this is a real good start, can you have it look for all inside corners and punch the hole? and then round all the corners?
I am only looking to create the holes and the rounded edges, nothing to do with the tabs - i need to do that manually.
Thanks for your time and effort, please let me know if this is clear,
I guess my terminology is incorrect, but creating a a corresponding pin to slot takes all the thinking out of assembly, there is no measuring to be done, just plug and play, (Weld in this case)
Kudos to @Curtis_Waguespack for gettting a solid start to the code.
@paul... careful what you wish for and how you word it...
Note, the code below is in VBA so it was easier to code and can be added to a keyboard shortcut easily.
Also Note, you can see it has mod values based on plate thickness so it automatically figures out the size (I don't know of many laser cutters who would cut holes too much smaller than plate thickness, so I just made the diam slightly larger as default.
Note: It does all of the internal edge loops. So if you have internal edges that don't meet at 90, it will dogbone those too. To fix it if you run into issues with that, you can always edit the hole feature and "un-click" the points you don't want dogbones and it should remove them and their fillets without error.
Good luck!
Sub Main() Dim oSheetMetalDoc As PartDocument Set oSheetMetalDoc = ThisApplication.ActiveEditDocument Dim oCompDef As SheetMetalComponentDefinition Set oCompDef = oSheetMetalDoc.ComponentDefinition Dim oSheetMetalFeatures As SheetMetalFeatures Set oSheetMetalFeatures = oCompDef.Features Dim oThickness As Double oThickness = 0 On Error Resume Next oThickness = oCompDef.Parameters("Thickness").Value If oThickness = 0 Then MsgBox ("Thickness not found in Params!" & vbLf & vbLf & "Please manually enter!") oThickness = InputBox("Enter plate thickness in mm" & vbLf & vbLf & "[This will be used to calculate dogbone diam]", "iLogic", "0.5") End If On Error GoTo 0 If oThickness = 0 Then Exit Sub End If oDogBoneDiamPercentOfThickness = 1.125 oFilletPercentOfDiam = 0.25 oDiam = oDogBoneDiamPercentOfThickness * oThickness oFilletSize = oFilletPerCentOfDiam & "*" & oDiam Dim oFace As Face Do Set oFace = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Select the top FACE") Loop While oFace Is Nothing Dim oRoughDogBoneSketch As Sketch Set oRoughDogBoneSketch = oCompDef.Sketches.Add(oFace, False) Dim oEdge As Edge Dim oEdgeLoop As EdgeLoop Dim oSketchPointCollection As ObjectCollection Set oSketchPointCollection = ThisApplication.TransientObjects.CreateObjectCollection On Error Resume Next For Each oEdgeLoop In oFace.EdgeLoops If oEdgeLoop.IsOuterEdgeLoop = False Then For Each oEdge In oEdgeLoop.Edges Set oHole1 = Nothing Set oHole2 = Nothing Set oHole1 = oRoughDogBoneSketch.AddByProjectingEntity(oEdge.StartVertex) Set oHole2 = oRoughDogBoneSketch.AddByProjectingEntity(oEdge.StopVertex) If Not oHole1 Is Nothing Then oSketchPointCollection.Add oHole1 End If If Not oHole2 Is Nothing Then oSketchPointCollection.Add oHole2 End If Next End If Next On Error GoTo 0 Dim oSketchPlacementDefinition As SketchHolePlacementDefinition Set oSketchPlacementDefinition = oCompDef.Features.HoleFeatures.CreateSketchPlacementDefinition(oSketchPointCollection) Call oCompDef.Features.HoleFeatures.AddDrilledByThroughAllExtent(oSketchPlacementDefinition, oDiam, kPositiveExtentDirection) 'AddFillets Dim oCircleEdges As EdgeCollection Set oCircleEdges = ThisApplication.TransientObjects.CreateEdgeCollection Dim oCircFace As Face Dim oCircEdge As Edge On Error Resume Next For Each oEdgeLoop In oFace.EdgeLoops If oEdgeLoop.IsOuterEdgeLoop = False Then For Each oEdge In oEdgeLoop.Edges If oEdge.GeometryType = kCircularArcCurve Then For Each oCircFace In oEdge.Faces If oCircFace.SurfaceType = kCylinderSurface Then For Each oCircEdge In oCircFace.Edges If oCircEdge.CurveType <> kCircleCurve Then oCircleEdges.Add oCircEdge End If Next End If Next End If Next End If Next On Error GoTo 0 Call oCompDef.Features.FilletFeatures.AddSimple(oCircleEdges, oFilletSize) End Sub
Hello Justin, Thanks for your efforts and time!!!
please see the message attached - i am getting some Set errors.
Hello Justin,
I got the rule running - Thanks a billion!!! What would i have to change to capture all the inside corners of any sheetmetal part?
Are you talking interior corners on various different flanges?
Run the rule for each face is the easy answer.... The more difficult answer is that you would need to create an algorithm to cycle through the faces and check if the face has dogbones already.
Can't find what you're looking for? Ask the community or share your knowledge.