Cutout cleanup

Cutout cleanup

Anonymous
Not applicable
493 Views
4 Replies
Message 1 of 5

Cutout cleanup

Anonymous
Not applicable

I am trying to create a SMART truck bed that is driven by a form.  I have the bed, edging, center cut out & cut out trim all work great.  But..now I have to make a cutout for out riggers and when the cut is made there are ends of the I-beam that are outside the cut area that need to be removed as well and I am not sure how to get that done.

 

PS

I am newish to programming in iLogic so the code is a bit spaghettied.

 

Code:

' ***User Parameters***
Parameter("CL_TRT_BX") = CL_TRT_BX
Parameter("TRT_BX_HEIGHT") = TRT_BX_HEIGHT
Parameter("TRT_BX_WIDTH") = TRT_BX_WIDTH

Parameter("TRTBX_WIDTH_EDGE:1", "TRT_BX_WIDTH") = TRT_BX_WIDTH + 4
Parameter("TRTBX_HEIGHT_EDGE:1", "TRT_BX_HEIGHT") = TRT_BX_HEIGHT + 4

Parameter("FL_PNL:1", "BD_LENGTH") = TRIMED_BD_LENGTH
Parameter("LNG_EDGE:1", "TOTAL_BD_LENGTH") = TOTAL_BD_LENGTH
Parameter("RR_EDGE:1", "TOTAL_BD_WIDTH") = TOTAL_BD_WIDTH
Parameter("FRNT_EDGE:1", "TOTAL_BD_WIDTH") = TOTAL_BD_WIDTH
Parameter("SRPT_TUBE2:1", "LNG_SPPRT_TUBE_LNGTH") = LNG_SPPRT_TUBE_LNGTH




NUM_CRSS_MEMBRS = Math.Round(Val(TOTAL_BD_LENGTH / 13), 0, MidpointRounding.AwayFromZero)


If TOTAL_BD_WIDTH = 102 in Then
Patterns.AddRectangular("Component Pattern 8:1", "FL_PNL:1", 13 ul,
                        8 in, "FL_PNL:1", "Edge0")
                           
ElseIf TOTAL_BD_WIDTH > 102 in Then
Patterns.AddRectangular("Component Pattern 8:1", "FL_PNL:1", 12 ul,
                        8 in, "FL_PNL:1", "Edge0")               

End If


'ADDING TURRETBOX CUTOUT COMPONETS   NUM_CRSS_MEMBRS


Dim oAsmCompDef As AssemblyComponentDefinition
oAsmDoc= ThisApplication.ActiveDocument

Dim oDef As AssemblyComponentDefinition
oDef = oAsmDoc.ComponentDefinition

Dim oPat As OccurrencePattern
oPat = oDef.OccurrencePatterns.Item("FLOOR Pattern 8:1") 

Dim oAssemblyFeatures As Features
oAssemblyFeatures = oDef.Features

Dim oAssemblyFeature As PartFeature
'Iterate through all of the assembly features
For Each oAssemblyFeature In oAssemblyFeatures
    If oAssemblyFeature.Name  = "TURRET BOX CUT OUT" Then
   	'look at the pattern elements
   	 Dim oPatE As OccurrencePatternElement
	For Each oPatE In oPat.OccurrencePatternElements
		'look at the pattern element contents
		Dim oOcc As ComponentOccurrence
		For Each oOcc In oPatE.Occurrences
		 'add the element contents to the feature
		 oAssemblyFeature.AddParticipant(oOcc)
		Next
	Next
    End If
Next


oPat = oDef.OccurrencePatterns.Item("BEAM Pattern 9:1") 

'Iterate through all of the assembly features
For Each oAssemblyFeature In oAssemblyFeatures
    If oAssemblyFeature.Name  = "TURRET BOX CUT OUT" Then
   	'look at the pattern elements
   	 Dim oPatE As OccurrencePatternElement
	For Each oPatE In oPat.OccurrencePatternElements
		'look at the pattern element contents
		Dim oOcc As ComponentOccurrence
		For Each oOcc In oPatE.Occurrences
		 'add the element contents to the feature
		 oAssemblyFeature.AddParticipant(oOcc)
		Next
	Next
    End If
Next

oPat = oDef.OccurrencePatterns.Item("BEAM Pattern 9:1") 

'Iterate through all of the assembly features
For Each oAssemblyFeature In oAssemblyFeatures
    If oAssemblyFeature.Name  = "RR MH CUTOUT" Then
   	'look at the pattern elements
   	 Dim oPatE As OccurrencePatternElement
	For Each oPatE In oPat.OccurrencePatternElements
		'look at the pattern element contents
		Dim oOcc As ComponentOccurrence
		For Each oOcc In oPatE.Occurrences
		 'add the element contents to the feature
		 oAssemblyFeature.AddParticipant(oOcc)
		Next
	Next
    End If
Next

 

0 Likes
Accepted solutions (1)
494 Views
4 Replies
Replies (4)
Message 2 of 5

JamieVJohnson2
Collaborator
Collaborator
Accepted solution

Code what the user would do.

 

1.   Part is too long, cutting in middle will leave ends sticking out

1a.  Use a longer cut boundary, perhaps ridiculously long to ensure nothing sticks out.

1b.  Remove faces using delete face command until all stuck out faces are gone.

1c.  Separate bodies, then delete bodies.

2.  Resize part to fit within cut boundary.

3.  Resize part to not need a cut.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 3 of 5

Anonymous
Not applicable

1a - If i make the cut boundary bigger then the mfgr would make it way bigger then necessary - can't do.

1b - I have never seen an example of iLogic being used to delete a face.

1c - Not sure what you mean

2 &3 - The parts are made to the manufacturers specs, any alterations would make the drawings we send them look incorrect.

0 Likes
Message 4 of 5

JamieVJohnson2
Collaborator
Collaborator

1c.

Part document

1. Extruded box long

2. Created cut box in middle, subtracted, ended up with 2 bodies as 1 solid

3. create work plane in cut zone (anywhere should work).

4. Ran Split - selected "Split Solid", and Split Tool was work plane dividing both bodies.

5. Got 2 solid bodies.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 5 of 5

Anonymous
Not applicable

After a bit more thought I think you were correct with point 1a & 2.  By combining those ideas I do believe that if I make the I-Beams a 1/16 shorter (which don't get dimensioned on the dwgs).  I can create a 2nd cut boundary a 1/32 smaller in the length dimension and widen it to whatever width I need to remove the excess.

0 Likes