04-14-2022
02:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-14-2022
02:16 PM
Here is an iLogic version of this. Open a new part and paste this into a new iLogic rule and it will add 2 solid cylinders, but it joins them into a single solid. I'm not sure if that is acceptable for your purposes?
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oPartDoc As PartDocument oPartDoc = ThisDoc.Document ' a reference to the component definition. Dim oCompDef As PartComponentDefinition oCompDef = oPartDoc.ComponentDefinition ' a reference to the TransientBRep object. Dim oTransientBRep As TransientBRep oTransientBRep = ThisApplication.TransientBRep ' Create bottom and top points for the first cylinder. Dim oBottomPt As Point oBottomPt = ThisApplication.TransientGeometry.CreatePoint(0, 1, 0) Dim oTopPt As Point oTopPt = ThisApplication.TransientGeometry.CreatePoint(0, 3, 0) ' Create bottom and top points for the second cylinder. Dim oBottomPt2 As Point oBottomPt2 = ThisApplication.TransientGeometry.CreatePoint(0, 5, 0) Dim oTopPt2 As Point oTopPt2 = ThisApplication.TransientGeometry.CreatePoint(0, 7, 0) ' Create the cylinder body. Dim oCylinder As SurfaceBody oCylinder = oTransientBRep.CreateSolidCylinderCone(oBottomPt, oTopPt, 0.5, 0.5, 0.5) Dim oCylinder2 As SurfaceBody oCylinder2 = oTransientBRep.CreateSolidCylinderCone(oBottomPt2, oTopPt2, 0.5, 0.5, 0.5) 'join the 2 cylinders Call oTransientBRep.DoBoolean(oCylinder, oCylinder2, BooleanTypeEnum.kBooleanTypeUnion) ' Create a base feature with the result body. Dim oBaseFeature As NonParametricBaseFeature oBaseFeature = oCompDef.Features.NonParametricBaseFeatures.Add(oCylinder)