Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best way to check extrusion direction

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Ruffy85
392 Views, 6 Replies

Best way to check extrusion direction

Hey Guys,

 

iam searching for a way to check if an extrusion is negativ (cutting something from my part) or positiv (add something to my part)

 

The Problem is. i need a way to get without using the Extrusion Feature. Only a way with the Solidbodies and Vertices.

 

For example: I have a box with a another box inside. The box inside is a negativ extrusion trough my complete model.

 

how can i identfy easily that the box inside is negativ? i tried also to check this with the normal vector from a face...

 

i hope you know what i mean.


Thanks for Helping

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).
6 REPLIES 6
Message 2 of 7
ekinsb
in reply to: Ruffy85

Without the feature information you can't know if a specific extrusion adds or removes material from a body because it's the feature that provides the set of faces.  However, based on your more detailed description I'm not sure that you really care about the feature but instead are more interested in the set of faces that make up the internal void of your solid.  It could have been created with an extrusion, multiple extrusions or even some other feature.

 

The first question is about what solids you have.  If you have a box inside another box, are their two bodies, one for each box or is it a single body?  If you cut a section through the model do you see a hollow box or it is two solid boxes that overlap each other?  If it's a hollow box, then what you have is a single body (SurfaceBody) made up of two shells (FaceShell) one for the outer set of surfaces and one for the inner set.  The FaceShell object supports the IsVoid property which will return the False for the outer shell and True for the inner.

 

If you have two overlapping bodies it's not as simple but should still be possible, but hopefully you have the case described above.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 7
Ruffy85
in reply to: ekinsb

Hi @ekinsb

 

Thx for your quick response.

 

I give my best to answer your questions exactly enough.

 

At first, the Quantity of Extrusions are not relevant.

My Problem is primary with one solid. If i find a solution for this with one solid i can adapt this with multibody.

 

I will give you an Example, maybe than its clear. i cannot exaclty define which geometry i have in the future.

Frage1.PNG

 

 

This is only an example. My models are much complexer. Zylinder, Cones, Torus and so on. Maybe a imported valve from a Supplier site if that helps

And my Models are 50% imported models (sat,igs,stp) where you dont have Features. (thats why i said i can´t and i will not use the informations from features, because 50% of time i dont have)

 

 

in the Pic above you see a simple box with a negative box inside. I need exactly a way to get this informations:

 

1 Solid

--> 2 Primitives

------>1 Primitive Box, Vertices Point1,Point2,Point3,Point4, Height X

------>1 negative Primitve  Box, Vertives point1, Point2, Point3, Point4, Height Y)

 

I know the Edgelcollection Object, where define my the Edges for the edgeloops(and the according points). But how can i locate that the inside box is negative box. On idea in my mind is to get all geometry which overlapps with another. But the geometry is not existent so maybe we can catch this with if Face1 crosses Face 2.

 

i also know the Sample program which checks is a face inner or outerface, But for that i have to click a face. thats not what i want.

 

Thanks for you helP!

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).
Message 4 of 7
ekinsb
in reply to: Ruffy85

What you have is much more difficult.  It's not about one shell being within another but it's about the shape of the model itself and categorizing faces based on certain criteria.  I don't think there's a general solution to this but would be more about handling particular shapes of parts.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 7
Ruffy85
in reply to: ekinsb

hm... ok thanks for you response.

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).
Message 6 of 7
ekinsb
in reply to: Ruffy85

I wish I could be more helpful, but there's not a simple answer.  What you're really looking at is some kind of feature recognition, which is not an easy problem to solve except for the simplest cases.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 7 of 7
Ruffy85
in reply to: ekinsb

@ekinsb

 

thanks, thats what i thought 😞

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report