Multiple offset

Multiple offset

Anonymous
Not applicable
1,301 Views
6 Replies
Message 1 of 7

Multiple offset

Anonymous
Not applicable

Does anyone have any idea how to make iLogic rulle for multiple offset ?. Properties such as: the distance between the lines, the number of offset lines, outside, inside, ...

0 Likes
1,302 Views
6 Replies
Replies (6)
Message 2 of 7

mdavis22569
Mentor
Mentor

Welcome to the forum ...

 



Not sure how well it would work ... a lot of factors go into it, that could cause problems.

 

However if you don't find any luck on this forum, try the Inventor Customazation forum

 

 

http://forums.autodesk.com/t5/inventor-customization/bd-p/120

 

 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes
Message 3 of 7

mcgyvr
Consultant
Consultant

@Anonymous wrote:

Does anyone have any idea how to make iLogic rulle for multiple offset ?. Properties such as: the distance between the lines, the number of offset lines, outside, inside, ...


You need to provide much more information.. 

Give us a graphical example or something with actual details?

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 4 of 7

Anonymous
Not applicable

Thanks guys, I'll try to explain.

 

At some sketch, I selects the curve, as in the example and I want to ofsset, 21 times, at a distance of 8 mm

 

Capture 1.JPG

0 Likes
Message 5 of 7

mcgyvr
Consultant
Consultant

@Anonymous wrote:

Thanks guys, I'll try to explain.

 

At some sketch, I selects the curve, as in the example and I want to ofsset, 21 times, at a distance of 8 mm

 

 


Ok.....

Thats a start.. Now keep going so its clear to us exactly what you want.. 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 6 of 7

Curtis_Waguespack
Consultant
Consultant

Hi s1concept,

Here is a quick ilogic example that draws a rectangle and then offsets it the distance and number of times that are specified by user input.

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

' Check to make sure a sketch is open.
If Not TypeOf ThisApplication.ActiveEditObject Is PlanarSketch Then
	MessageBox.Show("A sketch must be active.", "iLogic")
    Exit Sub
End If

' a reference to the active sketch.
Dim oSketch As PlanarSketch
oSketch = ThisApplication.ActiveEditObject

' a reference to the transient geometry collection.
Dim oTransGeom As TransientGeometry
oTransGeom = ThisApplication.TransientGeometry

' Create a rectangle
Dim oRectangleLines As SketchEntitiesEnumerator
oRectangleLines = oSketch.SketchLines.AddAsTwoPointRectangle( _
                                            oTransGeom.CreatePoint2d(0, 0), _
                                            oTransGeom.CreatePoint2d(10, -10))
                                            
' Create a new object collection
Dim oCollection As ObjectCollection
oCollection = ThisApplication.TransientObjects.CreateObjectCollection

' Add the first sketch line of the rectangle to the collection
oCollection.Add(oRectangleLines.Item(1))

' Get the sketch normal
Dim oNormalVector As UnitVector
oNormalVector = oSketch.PlanarEntityGeometry.Normal

' Get the direction of the sketch line being offset
Dim oLineDir As UnitVector2d
oLineDir = oRectangleLines.Item(1).Geometry.Direction

Dim oLineVector As UnitVector
oLineVector = oTransGeom.CreateUnitVector(oLineDir.X, oLineDir.Y, 0)

' The cross product of these vectors is the
' natural offdirection for the sketch line.
Dim oOffsetVector As UnitVector
oOffsetVector = oLineVector.CrossProduct(oNormalVector)

' Get the desired offvector (the +ve y-axis)
Dim oDesiredVector As UnitVector
oDesiredVector = oTransGeom.CreateUnitVector(0, 1, 0)

Dim bNaturalOffsetDir As Boolean

If oOffsetVector.IsEqualTo(oDesiredVector) Then
    bNaturalOffsetDir = True
Else
    bNaturalOffsetDir = False
End If

oOffset = InputBox("Enter an offset distance (in centimeters).", "iLogic", "5")
oCount = InputBox("Enter the number of offsets.", "iLogic", "1")

i = 1
Do Until i = oCount+1
oDistance = oOffset*i
Call oSketch.OffsetSketchEntitiesUsingDistance _
(oCollection, oDistance, bNaturalOffsetDir, True)
i = i + 1
Loop

EESignature

0 Likes
Message 7 of 7

Anonymous
Not applicable

Very nice. Is there a way to iLogic rule creates an offset to a selected curve?

0 Likes