Logic behind Edge Numbering for Chamfers

Logic behind Edge Numbering for Chamfers

philipp.rockenschaubDDSYJ
Contributor Contributor
439 Views
4 Replies
Message 1 of 5

Logic behind Edge Numbering for Chamfers

philipp.rockenschaubDDSYJ
Contributor
Contributor

Hi,

Does anyone know if there is a logic behind how the edges of a solid body are numbered?

 

I am creating parts with code and need to add chamfers and fillets. To do that I need to select the edge somehow and the only way I know how to do that is with "Surfacebody.Edges.Item(Index as Long)". But depending on the geometry, the index of the edges changes.

 

Example of one part:

philipprockenschaubDDSYJ_0-1686658606828.png

0 Likes
440 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi @philipp.rockenschaubDDSYJ.  Only the folks at Autodesk, who wrote the source code for the Inventor software might possibly be able to explain that numbering system.  Natural index numbers are generally assigned in the order that the objects they represent were originally created, or originally existed.  In situations were it seems like multiple pieces of geometry will be (or have been) created at the same time, it can be very difficult to predict (or explain) why they are in that specific order.  Did you know that you could assign a name to things like Vertex, Edge, & Face objects in a part document?  Manually, you can simply select that edge, then right click, and choose 'Assign Name...' or 'Assign Entity Name' from the right click menu.  Then when you fill in the name prompt and click OK, it will usually create a visible tag on that object, with the name you assigned it.  And it will usually create a new sub tab within the iLogic tab named 'Entities', and it will include a reference in the list to that named geometry.  Then you can find that named geometry in an iLogic rule using the iLogicVb.Automation.GetNamedGeometry method, and the associated tools under the object.

Dim oDoc As Document = ThisDoc.Document
oNEs = iLogicVb.Automation.GetNamedEntities(oDoc)
oMyNamedEntity = oNEs.TryGetEntity("Entity Name")

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

FINET_Laurent
Advisor
Advisor

Hi @philipp.rockenschaubDDSYJ 

 

What I did about this is write a little program, Ilogic rule, that ask the user (me) to manualy select an edge as an input, then start a loop that counts from 1 and check each edges (from 1 to x) and compare the start points and end points between the current one and the input one. If it matches, I return the edge internal number (current digit of the loop).

 

laurentfinetAF8M9_0-1686665845565.png

 

 

Regards,

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 4 of 5

philipp.rockenschaubDDSYJ
Contributor
Contributor
Yes, I know that you can assign names but I am trying to write a code that creates the part and a drawing of it based on some input parameters without having to select anything manually.
0 Likes
Message 5 of 5

philipp.rockenschaubDDSYJ
Contributor
Contributor
That is similar to how I do it currently. I was just hoping that someone would know the logic behind the numbering, so that I don't have to do this step if the geometry changes.
0 Likes