06-14-2023
08:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-14-2023
08:50 PM
Hiii.....I need to find the adjacent facec of edge or given face to do the chamfer .Can anybody suggest the code for the same?
Solved! Go to Solution.
06-14-2023
10:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-14-2023
10:18 PM
Hi @supriya_chaugule . Here's a code example to get a list of faces.
Sub main()
Dim oDoc As PartDocument = ThisApplication.ActiveDocument
Dim oFace As Face = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick the face")
If oFace Is Nothing Then Exit Sub
Dim listFaces As New List(Of Face)
listFaces.AddRange(GetAdjacentFaces(oFace))
End Sub
Private Function GetAdjacentFaces(oFace As Face) As List(Of Face)
Dim listFaces As New List(Of Face)
For Each oEdge As Edge In oFace.Edges
For Each oEdgFace As Face In oEdge.Faces
If Not oEdgFace Is oFace Then listFaces.Add(oEdgFace)
Next
Next
Return listFaces
End Function
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
06-14-2023
11:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report