Mark feature - determine if feature is front face or back face

Mark feature - determine if feature is front face or back face

rlutesD2P6K
Participant Participant
518 Views
3 Replies
Message 1 of 4

Mark feature - determine if feature is front face or back face

rlutesD2P6K
Participant
Participant

We currently use the mark function to tell our laser cutter where it should make etching marks. However, occasionally designer puts the mark feature on the wrong side of the sheet metal (opposite of the A side surface) so mark uses the back face layer on output. Currently, that tells the laser to cut the lines, which... not great.

 

I am looking to develop an ilogic checker that makes sure there are no mark functions that use the "back face" export layer so that I can flag them to the designer to fix them. I'm not seeing anything in the API as to how the software determines which layer it should be using, whether in MarkFeature, MarkFeatures or similar objects.

 

I can disable the backside layer or make it output to the same layer as the front, but then I'd be missing the etches or they'd be on the wrong side anyways, and some parts are non-symmetrical.

0 Likes
Accepted solutions (2)
519 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Hi @rlutesD2P6K.  This sounds very similar to another current forum post, but on that post it was an EmbossFeature, instead of a MarkFeature they were looking for.  Check out that post.

https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-detect-if-emboss-is-on-base-face-a... 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 4

rlutesD2P6K
Participant
Participant
Accepted solution

I got this to work with some heavy tweaking.

 

Biggest issue is there isn't a profiles object with mark. I needed to go from the markfeature -> definition -> markgeometrysetitem(x) -> geometries(x) -> parent to get to the sketch that created the mark function. after that, using the same sketch -> planarentity -> getflatpatternentity -> compare to bottomface.

 

It seems like it works well. Had to check that the correct style is in use prior to this check (through marks are fine on the wrong face) and need to check both folded and flat pattern. Still looking for edge cases that cause issues, but so far it works as expected.

Message 4 of 4

WCrihfield
Mentor
Mentor

Hi @rlutesD2P6K.  Good to hear that you got it figured out.  I had actually started working on an alternate code for this task Yesterday, but was not done with it at the end of my work day, so I set it aside.  Then this morning I had some other stuff going on, so have not gotten back to it yet.  I know what you mean.  Working with the existing MarkFeature was a lot more complicated than what I had in mind, leading to a lot more code than what I thought it might take (to be thorough, anyways).  Seems like it would be nice if they added another property (or two) and/or another method to that type of feature (or its definition related objects), to make interacting with the by code, after the fact, easier.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes