Add a fillet to a part in an assembly.

Add a fillet to a part in an assembly.

aaron_lucy
Contributor Contributor
889 Views
4 Replies
Message 1 of 5

Add a fillet to a part in an assembly.

aaron_lucy
Contributor
Contributor

Does anyone have a code example of how to add a fillet to a part in an assembly?  I know how to add it to the part while it is in an assembly but I do not want to modify the part file.  I want to use the fillet command in the 3D Model-> Modify Assembly. 

 

I have done a lot of googling and searching in the forums but I have not found a good code sample. Any help would be appreciated.

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

WCrihfield
Mentor
Mentor

Hi @aaron_lucy.  If you mean how to do this manually, then without going into Edit Mode of the component, create a profile sketch of the portion of the component that you want to remove, then use the Extrude command, and set it to Cut, to extrude cut that portion away from the component.  This action should result in the extrude cut feature only existing within the main assembly, and not in the referenced part.  Or you should just be able to use the Radius tool on the 3D Model tab directly from within the main assembly.  As long as you are not in edit mode of the component, the feature should be entirely contained within the assembly.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

aaron_lucy
Contributor
Contributor

I am looking to do this using the API.  I have an application that builds parts and Assemblies and I need to add a fillet to a part in an assembly.

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor
Accepted solution

Sorry, I noticed just after I posted.  Here is an example of creating a simple FilletFeature on a component within an assembly.  In this example, instead of using Pick to get the edge, I had assigned a name to that edge in the part, to make the example easier.

Sub Main
	If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then
		MsgBox("An Assembly Document must be active for this rule to work. Exiting.", vbCritical, "")
		Exit Sub
	End If
	Dim oADoc As AssemblyDocument = ThisDoc.Document
	Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
	Dim oOccs As ComponentOccurrences = oADef.Occurrences
	Dim oOcc As ComponentOccurrence = oOccs.ItemByName("TestPart1:1")
	'get edge of component to use as input for the Fillet tool
	Dim oTopEdgeProxy As EdgeProxy
	Dim oOccDoc As Document = oOcc.ReferencedDocumentDescriptor.ReferencedDocument
	Dim oNEs As NamedEntities = iLogicVb.Automation.GetNamedEntities(oOccDoc)
	Dim oTopEdge As Edge = oNEs.TryGetEntity("Top Edge")
	oOcc.CreateGeometryProxy(oTopEdge, oTopEdgeProxy)
	Dim oFilletFeats As FilletFeatures = oADef.Features.FilletFeatures
	'Dim oFilletDef As FilletDefinition = oFilletFeats.CreateFilletDefinition
	Dim oEdges As EdgeCollection = ThisApplication.TransientObjects.CreateEdgeCollection
	oEdges.Add(oTopEdgeProxy)
	'oFilletDef.AddConstantRadiusEdgeSet(oEdges, ".25 in")
	'Dim oFilletFeat As FilletFeature = oFilletFeats.Add(oFilletDef)
	Dim oFilletFeat As FilletFeature = oFilletFeats.AddSimple(oEdges, ".25 in")
End Sub

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

aaron_lucy
Contributor
Contributor

Thank you very much.  This is exactly what I was looking for.

0 Likes