Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
Submitted byAnonymouson07-23-201405:04 AM
Status:
Implemented
slot joint constraint
when applying a joint constrain on a bolt going into the center of a slot, it would be helpful if the very center of the slot would highlight as an option. today it only picks up the center points and midpoint of the walls
I've been using inventor for about 9 years on and off and I've always wished there was a better slot command. in my line of work i do a lot of slots not limited to just through slots but including counter-bored slots, counter-sunk slots, and sometimes needing to determine the size of clearance for a bolt to put in a slot. I wish there was a feature in the hole command that allowed for this to be done in one feature by either a set of points or just a single point and distance/direction. and adding this feature to the hole note in the drawing environment
I've also used other products besides Autodesk and one feature i have found very useful in other products is a mid-plane constraint; where you select the two faces of one part and two faces of another and it centers it without the need of adding a bunch of planes... also back to the slot features i wish there was an easier way to constrain a bolt into the center of a slot without the creation of a bunch of planes or axis'
The slot creation feature in sketch mode has the option for a Center Point slot where you select the center point for the slot, then the offset from the center ( essentially slot length ) and then lastly the slot diameter. The center point can be used to dimension where the slot is positioned. Would it not be easy to maintain the center point selected as an axis that can be used in an insert constraint. Even if you have to use two constraints ( mate axis, mate face ) all features are available and it can be done in just a few clicks.
Yes we can make a hole just slightly larger than the slot by a few thousandths and use IT to constrain to another part but it is not a "best practice" method because the difference is actually "seen" by CAD driven machinery be it laser cutting or machining. It would seem so easy for Inventor to simply carry forward that center point selection.
Thanks for the video. It's somewhat encouraging to see this added functionality, but unfortunately this only works for slots that have been drawn in Inventor 2018. This won't work on any parts created in older versions, so for companies like mine that constantly assemble components drawn in various versions of Inventor, trying to guess which part was drawn in 2018 and which was drawn in previous versions is unrealistic. Because of this inconsistency, I don't see us using this functionality unless we are using all new parts. Rather than changing the slots, Autodesk should add the functionality of selecting the center of the slot, to the Joint and the Constraint features. This would help companies with large databases of parts drawn in various versions of Inventor.
Dim oAllOccsCollection As ObjectCollection
Dim oHelpOcc As ComponentOccurrence
Dim oAllCOnstraintsCollection As ObjectCollection
Sub Scheibe_auf_Langloch()
On Error GoTo Ende
'Auf Bg zugreifen
Dim oApp As Inventor.Application
Set oApp = ThisApplication
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = oApp.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition
Set oAsmCompDef = oAsmDoc.ComponentDefinition
'Scheibe greifen
Dim oScheibenKreis As EdgeProxy
Set oScheibenKreis = oApp.CommandManager.Pick(kPartEdgeCircularFilter, "Select circle from placing part")
'LanglochArc greifen
Dim oLanglochArc As EdgeProxy
Set oLanglochArc = oApp.CommandManager.Pick(kPartEdgeCircularFilter, "Select arc from slot")
'Occurrence von Scheibe ermitteln
Dim oScheibeOcc As Inventor.ComponentOccurrence
Set oScheibeOcc = oScheibenKreis.Parent.Parent
'Fläche von Occurrence ermitteln
Dim oNormteilFaceProxy As FaceProxy
For Each oNormteilFaceProxy In oScheibenKreis.Faces
If oNormteilFaceProxy.SurfaceType = kPlaneSurface Then Exit For
Next
'Rechtwinklige Ursprungsebenen ermitteln
Dim oPerpendWorkPlaneProxy1 As WorkPlaneProxy
Dim oPerpendWorkPlaneProxy2 As WorkPlaneProxy
'
Dim oPlane1 As WorkPlane
Dim oWorkPlaneProxy1 As WorkPlaneProxy
Set oPlane1 = oScheibeOcc.Definition.WorkPlanes.Item(1)
Call oScheibeOcc.CreateGeometryProxy(oPlane1, oWorkPlaneProxy1)
Dim oPlane2 As WorkPlane
Dim oWorkPlaneProxy2 As WorkPlaneProxy
Set oPlane2 = oScheibeOcc.Definition.WorkPlanes.Item(2)
Call oScheibeOcc.CreateGeometryProxy(oPlane2, oWorkPlaneProxy2)
Dim oPlane3 As WorkPlane
Dim oWorkPlaneProxy3 As WorkPlaneProxy
Set oPlane3 = oScheibeOcc.Definition.WorkPlanes.Item(3)
Call oScheibeOcc.CreateGeometryProxy(oPlane3, oWorkPlaneProxy3)
'
If oApp.MeasureTools.GetAngle(oWorkPlaneProxy1, oNormteilFaceProxy) = 0 Then
Set oPerpendWorkPlaneProxy1 = oWorkPlaneProxy2
Set oPerpendWorkPlaneProxy2 = oWorkPlaneProxy3
End If
If oApp.MeasureTools.GetAngle(oWorkPlaneProxy2, oNormteilFaceProxy) = 0 Then
Set oPerpendWorkPlaneProxy1 = oWorkPlaneProxy1
Set oPerpendWorkPlaneProxy2 = oWorkPlaneProxy3
End If
If oApp.MeasureTools.GetAngle(oWorkPlaneProxy3, oNormteilFaceProxy) = 0 Then
Set oPerpendWorkPlaneProxy1 = oWorkPlaneProxy1
Set oPerpendWorkPlaneProxy2 = oWorkPlaneProxy2
End If
'Maximale Kreisfläche ermitteln
Dim oMaxCircFace As Face
Dim myList As Object
Set myList = CreateObject("System.Collections.ArrayList")
For Each oMaxCircFace In oScheibeOcc.SurfaceBodies.Item(1).Faces
If oMaxCircFace.SurfaceType = kCylinderSurface Then
myList.Add (oMaxCircFace.Geometry.Radius)
End If
Next
myList.Sort
For Each oMaxCircFace In oScheibeOcc.SurfaceBodies.Item(1).Faces
If oMaxCircFace.SurfaceType = kCylinderSurface Then
If oMaxCircFace.Geometry.Radius = myList.Item(myList.Count - 1) Then
Exit For
End If
End If
Next
Dim Durchmesser As Double
Durchmesser = Round(oMaxCircFace.Geometry.Radius * 20, 3)
'Langloch
'Langlochradius
Dim Langlochradius As Double
Langlochradius = Round(oLanglochArc.NativeObject.Geometry.Radius, 3)
'Fläche von Langloch ermitteln
Dim oLanglochFaceProxy As FaceProxy
For Each oLanglochFaceProxy In oLanglochArc.Faces
If oLanglochFaceProxy.SurfaceType = kPlaneSurface Then Exit For
Next
'Occurrence ermitteln
Dim oLanglochOcc As Inventor.ComponentOccurrence
Set oLanglochOcc = oLanglochArc.Parent.Parent
'Prüfen ob oLanglochOcc eine Occ der Bg ist
Dim oParentOcc As ComponentOccurrence
Dim IstBgOcc As Boolean
IstBgOcc = False
For Each oParentOcc In oAsmCompDef.Occurrences
If oParentOcc Is oLanglochOcc Then IstBgOcc = True
Next
If IstBgOcc = False Then
For Each oParentOcc In oAsmCompDef.Occurrences
If oParentOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
Call SearchAllOccs(oParentOcc, oLanglochOcc, 1)
If Not oHelpOcc Is Nothing Then Exit For
End If
Next
End If
'Alle Zusammenhängenden Occs in Collection
Set oAllCOnstraintsCollection = ThisApplication.TransientObjects.CreateObjectCollection
Set oAllOccsCollection = ThisApplication.TransientObjects.CreateObjectCollection
Call oAllOccsCollection.Add(oScheibeOcc)
Call SearchAllOccsInOcc(oScheibeOcc, 1)
'Alle gleichen Flächen in Collection
Dim oBodyFaceCol As FaceCollection
Set oBodyFaceCol = ThisApplication.TransientObjects.CreateFaceCollection
Dim oBodyFace As Face
For Each oBodyFace In oLanglochFaceProxy.NativeObject.Parent.Faces
On Error Resume Next
If oBodyFace.SurfaceType = kPlaneSurface Then
If oApp.MeasureTools.GetAngle(oLanglochFaceProxy.NativeObject, oBodyFace) = 0 Then
If oApp.MeasureTools.GetMinimumDistance(oLanglochFaceProxy.NativeObject, oBodyFace) = 0 Then
Call oBodyFaceCol.Add(oBodyFace)
End If
End If
End If
On Error GoTo 0
Next
On Error GoTo Ende
'Check for same Arcs
Dim oCircleProxy As EdgeProxy
Dim oCircleCollection As ObjectCollection
Set oCircleCollection = ThisApplication.TransientObjects.CreateObjectCollection
Call oCircleCollection.Add(oLanglochArc)
Dim IsConvexArc As Boolean
Dim oBodyProxy As SurfaceBodyProxy
For Each oBodyProxy In oLanglochOcc.SurfaceBodies
For Each oCircleProxy In oBodyProxy.ConvexEdges
If oCircleProxy.GeometryType = kCircularArcCurve Then
If Round(oCircleProxy.Geometry.Radius, 3) = Langlochradius _
And Round(oApp.MeasureTools.GetMinimumDistance(oCircleProxy.Geometry.Center, oLanglochFaceProxy), 5) = 0 _
And Round(oApp.MeasureTools.GetMinimumDistance(oCircleProxy.PointOnEdge, oLanglochFaceProxy), 5) = 0 _
And Round(oCircleProxy.Geometry.SweepAngle, 5) = Round(4 * Atn(1), 5) Then
Call oCircleCollection.Add(oCircleProxy)
IsConvexArc = True
End If
End If
Next
For Each oCircleProxy In oBodyProxy.ConcaveEdges
If oCircleProxy.GeometryType = kCircularArcCurve Then
If Round(oCircleProxy.Geometry.Radius, 3) = Langlochradius _
And Round(oApp.MeasureTools.GetMinimumDistance(oCircleProxy.Geometry.Center, oLanglochFaceProxy), 5) = 0 _
And Round(oApp.MeasureTools.GetMinimumDistance(oCircleProxy.PointOnEdge, oLanglochFaceProxy), 5) = 0 _
And Round(oCircleProxy.Geometry.SweepAngle, 5) = Round(4 * Atn(1), 5) Then
Call oCircleCollection.Add(oCircleProxy)
IsConvexArc = False
End If
End If
Next
Next
'Wenn Concave und Convex keine Länglöcher enthält, dann muss über die Flächen gegangen werden bei "Check for same Arcs"
If oCircleCollection.Count = 1 Then
Call Scheibe_auf_Langloch_alte_Version
GoTo Ende
End If
Dim oEdgeLineProxy As EdgeProxy
Dim oCircleProxy2 As EdgeProxy
Dim oCircleProxy3 As EdgeProxy
Dim oLanglochCollection As ObjectCollection
Set oLanglochCollection = ThisApplication.TransientObjects.CreateObjectCollection
For Each oCircleProxy In oCircleCollection
For Each oCircleProxy3 In oLanglochCollection
If oCircleProxy Is oCircleProxy3 Then
GoTo NextFor
End If
Next
For Each oEdgeLineProxy In oCircleProxy.TangentiallyConnectedEdges
If oEdgeLineProxy.CurveType = kLineCurve Then
If Round(oApp.MeasureTools.GetMinimumDistance(oEdgeLineProxy.StartVertex.Point, oLanglochFaceProxy), 3) = 0 _
And Round(oApp.MeasureTools.GetMinimumDistance(oEdgeLineProxy.StopVertex.Point, oLanglochFaceProxy), 3) = 0 Then
For Each oCircleProxy2 In oEdgeLineProxy.TangentiallyConnectedEdges
If Not oCircleProxy2 Is oCircleProxy Then
Call oLanglochCollection.Add(oCircleProxy)
Call oLanglochCollection.Add(oEdgeLineProxy)
Call oLanglochCollection.Add(oCircleProxy2)
GoTo NextFor:
End If
Next
End If
End If
Next
NextFor:
Next
'SelectSet leeren
Call oAsmDoc.SelectSet.Clear
'Durchschleifen
For i = 1 To oLanglochCollection.Count Step 3
'Prüfen ob Constraint vorhanden
Dim oConstraint As AssemblyConstraint
If IstBgOcc = True Then
For Each oConstraint In oLanglochOcc.Constraints
If oConstraint.Suppressed = False _
And oConstraint.HealthStatus = kUpToDateHealth Then
If TypeOf oConstraint.EntityOne Is EdgeProxy Then
If oConstraint.EntityOne.GeometryType = kCircularArcCurve Then
If Round(oApp.MeasureTools.GetMinimumDistance(oConstraint.EntityOne.Geometry.Center, oLanglochCollection(i).Geometry.Center), 3) = 0 Then GoTo EndEdgeLoop
End If
End If
If TypeOf oConstraint.EntityTwo Is EdgeProxy Then
If oConstraint.EntityTwo.GeometryType = kCircularArcCurve Then
If Round(oApp.MeasureTools.GetMinimumDistance(oConstraint.EntityTwo.Geometry.Center, oLanglochCollection(i).Geometry.Center), 3) = 0 Then GoTo EndEdgeLoop
End If
End If
End If
Next
Else
For Each oConstraint In oParentOcc.Constraints
If oConstraint.Suppressed = False _
And oConstraint.HealthStatus = kUpToDateHealth Then
If TypeOf oConstraint.EntityOne Is EdgeProxy Then
If oConstraint.EntityOne.GeometryType = kCircularArcCurve Then
If Round(oApp.MeasureTools.GetMinimumDistance(oConstraint.EntityOne.Geometry.Center, oLanglochCollection(i).Geometry.Center), 3) = 0 Then GoTo EndEdgeLoop
End If
End If
If TypeOf oConstraint.EntityTwo Is EdgeProxy Then
If oConstraint.EntityTwo.GeometryType = kCircularArcCurve Then
If Round(oApp.MeasureTools.GetMinimumDistance(oConstraint.EntityTwo.Geometry.Center, oLanglochCollection(i).Geometry.Center), 3) = 0 Then GoTo EndEdgeLoop
End If
End If
End If
Next
End If
'Ursprüngliche Teileanzahl festhalten
Dim occCount As Integer
occCount = oAsmCompDef.Occurrences.Count
Dim oNewScheibeOcc As ComponentOccurrence
If i <> 1 Then
'Teile einfügen
Call oAsmDoc.SelectSet.Clear
Call oAsmDoc.SelectSet.SelectMultiple(oAllOccsCollection)
ThisApplication.CommandManager.ControlDefinitions.Item("AppCopyCmd").Execute
ThisApplication.CommandManager.ControlDefinitions.Item("AppPasteCmd").Execute
'New originOcc ermitteln
For Z = occCount + 1 To oAsmCompDef.Occurrences.Count
If oAsmCompDef.Occurrences(Z).Definition.Document.PropertySets("Design Tracking Properties").Item("Part Number").value _
= oScheibeOcc.Definition.Document.PropertySets("Design Tracking Properties").Item("Part Number").value Then
Set oNewScheibeOcc = oAsmCompDef.Occurrences(Z)
Exit For
End If
Next
Else
Set oNewScheibeOcc = oScheibeOcc
End If
'Fläche von Normteil ermitteln
Dim oNativeNormteilFace As Face
Set oNativeNormteilFace = oNormteilFaceProxy.NativeObject
Dim oFace As Face
For Each oFace In oNewScheibeOcc.Definition.SurfaceBodies.Item(1).Faces
If oFace Is oNativeNormteilFace Then
Exit For
End If
Next
'ProxyFläche von Normteil ermitteln
Dim oNewNormteilFaceProxy As FaceProxy
Call oNewScheibeOcc.CreateGeometryProxy(oFace, oNewNormteilFaceProxy)
'Rechtwinklige Normteilebenen ermitteln
Dim oNativePerpendWorkPlaneProxy1 As WorkPlane
Set oNativePerpendWorkPlaneProxy1 = oPerpendWorkPlaneProxy1.NativeObject
Dim oWorkplane1 As WorkPlane
For Each oWorkplane1 In oNewScheibeOcc.Definition.WorkPlanes
If oWorkplane1 Is oNativePerpendWorkPlaneProxy1 Then
Exit For
End If
Next
Dim oNewPerpendWorkPlaneProxy1 As WorkPlaneProxy
Call oNewScheibeOcc.CreateGeometryProxy(oWorkplane1, oNewPerpendWorkPlaneProxy1)
Dim oNativePerpendWorkPlaneProxy2 As WorkPlane
Set oNativePerpendWorkPlaneProxy2 = oPerpendWorkPlaneProxy2.NativeObject
Dim oWorkplane2 As WorkPlane
For Each oWorkplane2 In oNewScheibeOcc.Definition.WorkPlanes
If oWorkplane2 Is oNativePerpendWorkPlaneProxy2 Then
Exit For
End If
Next
Dim oNewPerpendWorkPlaneProxy2 As WorkPlaneProxy
Call oNewScheibeOcc.CreateGeometryProxy(oWorkplane2, oNewPerpendWorkPlaneProxy2)
'Abhängigkeit vergebn
Dim oDoc As Document
Set oDoc = oNewScheibeOcc.Definition.Document
If IsConvexArc = True Then
If Durchmesser <= Round(oLanglochCollection(i).Geometry.Radius * 20, 3) Then
Call oAsmCompDef.Constraints.AddFlushConstraint(oNewNormteilFaceProxy, oLanglochFaceProxy, 0)
Else
Call oAsmCompDef.Constraints.AddMateConstraint(oNewNormteilFaceProxy, oLanglochFaceProxy, 0)
End If
End If
If IsConvexArc = False Then
Call oAsmCompDef.Constraints.AddMateConstraint(oNewNormteilFaceProxy, oLanglochFaceProxy, 0.1)
End If
Call oAsmCompDef.Constraints.AddMateConstraint(oNewPerpendWorkPlaneProxy1, oLanglochCollection(i), 0, kNoInference, kInferredPoint)
Call oAsmCompDef.Constraints.AddMateConstraint(oNewPerpendWorkPlaneProxy1, oLanglochCollection(i + 2), 0, kNoInference, kInferredPoint)
Call oAsmCompDef.Constraints.AddMateConstraint(oNewPerpendWorkPlaneProxy2, oLanglochCollection(i + 1), 0, kNoInference, kInferredPoint)
EndEdgeLoop:
Next
Ende:
'Selectset zurücksetzen
Call oAsmDoc.SelectSet.Clear
'update
oAsmDoc.Update
End
End Sub
Private Function SearchAllOccsInOcc(Occurrence As ComponentOccurrence, Level As Integer)
Dim oConstraint As AssemblyConstraint
For Each oConstraint In Occurrence.Constraints
Dim ConstraintVorhanden As Boolean
ConstraintVorhanden = False
For i = 1 To oAllCOnstraintsCollection.Count
If oConstraint Is oAllCOnstraintsCollection(i) Then
ConstraintVorhanden = True
Exit For
End If
Next
Call oAllCOnstraintsCollection.Add(oConstraint)
Dim oOcc As ComponentOccurrence
Set oOcc = oConstraint.AffectedOccurrenceOne
Call oAllOccsCollection.Add(oConstraint.AffectedOccurrenceOne)
If ConstraintVorhanden = False Then Call SearchAllOccsInOcc(oOcc, 1)
'------------------------------------------------
Set oOcc = oConstraint.AffectedOccurrenceTwo
Call oAllOccsCollection.Add(oConstraint.AffectedOccurrenceTwo)
If ConstraintVorhanden = False Then Call SearchAllOccsInOcc(oOcc, 1)
Next
End Function
Private Function SearchAllOccs(Occurrence As ComponentOccurrence, TargetOcc As ComponentOccurrence, Level As Integer)
Dim oOcc As ComponentOccurrence
For Each oOcc In Occurrence.Definition.Occurrences
If oOcc.Definition.Document.PropertySets("Design Tracking Properties").Item("Part Number").value _
= TargetOcc.Definition.Document.PropertySets("Design Tracking Properties").Item("Part Number").value Then
Set oHelpOcc = oOcc
Exit Function
Else
If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
Call SearchAllOccs(oOcc, TargetOcc, Level + 1)
End If
End If
Next
End Function
We work with large equipment that contains many punched slots. These slots also require bolt assemblies. The holes are typically slotted to allow for manufacturing and temperature variance. It is very time consuming for our engineers to manually constrain to these slotted features. Work features must be created manually because work/surface features are not supported in the punch iFeature tool. This would be a great place to use iMates, but those are also not supported in the punch tool (but should be). The punch iFeature author tool gives us the capability to author a center point; however, this center point cannot be used for creation of constraints or joints in an assembly.
Please allow a sketch point to be a valid selection for Joints and Constraints.
Constraining to the center of a slot is clearly a common need, as indicated by these other posts:
Sorry for that inconsistency. As you commented, Inventor 2015 supported to snap the centroid of the profile, but it may lead to unexpected result, so the behavior was changed. Below is the request for snapping center point of Slot, please cast your vote there.