- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello guys,
I want to get only outer edges of pipe on picture. I am using attached VBA code to do that.
Does somebody know how can I diferentiate if edge is member of outer surface of pipe and not inner surface of pipe.
I will be thankfull for any idea.
I am running Inventor 2016.
regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Klemen,
You should probably repost this in the Customization forum where it's more likely to get a response:
http://forums.autodesk.com/t5/inventor-customization/bd-p/120
Thanks
Chris

Chris Mitchell
PDMS Customer Engagment Team
Autodesk, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is here nobody who is able to understand my question? I know it is hard to get definition of outer pipe edge - but still any idea though?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Klemen,
You can get the edges through the Face.EdgeLoops, where each EdgeLoop knows if it's an outer edge collection or inner, shown by the IsOuterEdgeLoop property.
E.g.: http://forums.autodesk.com/t5/inventor-customization/flat-pattern-area/td-p/2689722
I hope this helps.
Cheers,

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to understand property "IsOuterEdgeLoop". Is this property only available in sheet metal parts?
I see sample code and it is used within flatpattern.
Dim oEdgeLoop As EdgeLoop
For Each oEdgeLoop In oFlatPattern.TopFace.EdgeLoops
If oEdgeLoop.IsOuterEdgeLoop Then
Exit For
End If
Next
The thing here is (in my specific situation) - that I have pipe, created from ordinary extrusion - and I don't have FlatPattern to work with.
What is out or in is pretty hard to decide for ordinary extrusion - is there a way to do that?
Is there a clever way to do that programatically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
No. All faces have the EdgeLoops collection with the IsOuterEdgeLoop property.
So you just have to iterate through all the faces of the solid body, then all the EdgeLoops to find all the outer edges on all the faces.

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Actually, it might not be that easy, but that should be a step in the right direction.
I also started wondering that maybe we mean different things by outer edges.
Maybe you could highlight all the edges (by selecting them in the UI) to show which edges you want to get back?
I'm also wondering why exactly you need them.

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Adam,
Big thanks for fast and prompt response.
I need edge coordinates to use their 3d coordinates to guide CNC plasma pipe cutting machine.
I am attaching picture to show what I think that outer edges are.
You can see my G+ album to check java code for rotating "pipe" gotten from inventor coordinates.
The coordinates are also from "inner" edges that I don't want to use for guiding plasma CNC.
https://plus.google.com/u/0/photos/110230689089207649183/albums/6056408207656893201
Especially check video:
and
sample of plasma cutting in action from youtube:
https://youtu.be/QoF1nxKW0vw?t=51
The edges that are important for cutting (since I don't want to take account for bevel cutting) are edges that are on outer surface of pipe.
regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What things are always the same about the models? Are the faces you need always tangentially connected?
Knowing these things might make it easier to get what you want.
This is what I have so far. In this case you still need to find one of the outer faces:
http://adndevblog.typepad.com/manufacturing/2015/05/outer-edges-of-tangentially-connected-faces.html

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Adam,
I havent even imagined, this superb level of service.
The results of your code is almost perfect - you will see that edges on outer shell that result from holes in part are not selected, but as linear edges they also must be cutted with plasma cutter.
Is there a way to select them also?
Thank you very much for fast response and anticipation how to solve this!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Also macro you posted has problem selecting straight lines. I am attaching part file for this "pipe". - see picture:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Only you know what exactly needs to be selected.
You have to try to put it into an algorithm.
So it seems it's not only outer edges of the face you want to select but also ones around holes.
Which holes do not need to be selected? Only the circular ones?

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Actually all circles on outer shell of pipe from holes NEEDS to be selected. and also all edges from extrusions from Extrude feature like triangle for example. The edges that are not to be selected are edges from pipe itselve - for example round edges in direction longitudinal of pipe - that are part of pipe itself (this edges don't need to be cutted).
I think I know what mislead you - and I am sorry for that - I should also mark circle from hole... Here is another sample to better clarify myselve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In that case you just have to remove the IsOuterEdgeLoop check and can use directly the Edges collection.
So just had to modify this function:
' Check all edges, but ignore common
' edges with other faces
Sub GetOuterEdgesOfFaces( _
faces As ObjectCollection, edges As ObjectCollection)
Dim f As Face
For Each f In faces
Dim e As Edge
For Each e In f.edges
Dim f2 As Face
For Each f2 In e.faces
If (Not f Is f2) And _
(Not IsInCollection(f2, faces)) And _
(Not IsInCollection(e, edges)) Then
Call edges.Add(e)
End If
Next
Next
Next
End Sub

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I hope I found solution (for now it works for me) - and basically I am checking feature names of edges. If they are different it means they are not part of same feature therefore they are my real edges.
"False" - "pipe" edges have both feature names same and therefore should not be selected...
I added following to your macro:
For Each e In f.edges If Not IsInCollection(e, edges) Then Debug.Print e.faces.Item(1).CreatedByFeature.Name Debug.Print e.faces.Item(2).CreatedByFeature.Name If e.faces.Item(1).CreatedByFeature.Name <> e.faces.Item(2).CreatedByFeature.Name Then Call edges.Add(e) End If End If Next e
Thank you for support...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Just thinking further for my final goal - do you think it would be possible to unroll 3d lines that I got from polygon of edge, to get flat pattern?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Here is simulation of plasma cuting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
You could build up your part as a sheetmetal:
Then you can unfold the whole thing:
Part is attached.

Adam Nagy
Autodesk Platform Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Adam,
that you for idea but I think this aproach will require few more manual steps that I want to avoid. Also my personal feelig is that metal sheet design induce some limitation from start, and one is more flexible designing orinary part.
Also I want to have as much as possible automated solution.
With few tweaks of Java code, program works pretty ok for now - and currently (still as animation on computer), it looks there are no problems with it.
It could be different story when I will put it in practice, but this is still to come and we will see this later.
If you want to check here is video of program in action.
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Adam,
your solution works brilliantly for square and rectangular pipes but for circular ones it doesn't - it enumerates precisely 0 edges.
For example pipe like this:
Could there be also solution for circular pipe not only rectangular or square?
ps: check usage of your wonderful Inventor algorithm in:
https://github.com/zhivko/PipeCutter
regards