12-26-2023
01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-26-2023
01:59 AM
Hello, you could use the OrientedMinimumRangeBox. In a Multibodypart you would then specify the body.
Dim compdef As ComponentDefinition = ThisDoc.Document.ComponentDefinition Dim minimumboundingbox As OrientedBox = compdef.OrientedMinimumRangeBox Dim dir1, dir2, dir3 As Double dir1 = Round(minimumboundingbox.DirectionOne.Length, 1) *10 dir2 = Round(minimumboundingbox.DirectionTwo.Length, 1) *10 dir3 = Round(minimumboundingbox.DirectionThree.Length, 1) * 10 ' '----------Show axis If needed---------- 'origin = compdef.WorkPoints.AddFixed(minimumboundingbox.CornerPoint) : origin.Name = "origin" 'dir1axis = compdef.WorkAxes.AddFixed(minimumboundingbox.CornerPoint, minimumboundingbox.DirectionOne.AsUnitVector) : dir1axis.Name = "dir1axis" 'dir2axis = compdef.WorkAxes.AddFixed(minimumboundingbox.CornerPoint, minimumboundingbox.DirectionTwo.AsUnitVector) : dir2axis.Name = "dir2axis" 'dir3axis = compdef.WorkAxes.AddFixed(minimumboundingbox.CornerPoint, minimumboundingbox.DirectionThree.AsUnitVector) : dir3axis.Name = "dir3axis" length = MaxOfMany(dir1, dir2, dir3) width = MinOfMany(dir1, dir2, dir3) height = (dir1 + dir2 + dir3) -length - width
Fanden Sie diesen Beitrag hilfreich? Fühlen Sie sich frei, diesen Beitrag zu liken.
Wurde Ihre Frage erfolgreich beantwortet? Klicken Sie dann auf die Schaltfläche LÖSUNG AKZEPTIEREN
Inventor Versionen:
2023.4.3
2025.2
Wurde Ihre Frage erfolgreich beantwortet? Klicken Sie dann auf die Schaltfläche LÖSUNG AKZEPTIEREN
Inventor Versionen:
2023.4.3
2025.2