Find intersection between 3d entity and line/plane

Find intersection between 3d entity and line/plane

quan_hm
Collaborator Collaborator
455 Views
5 Replies
Message 1 of 6

Find intersection between 3d entity and line/plane

quan_hm
Collaborator
Collaborator

Hi,

 

I would like to find the intersection between a 3d entity and a line or plane, in the picture I would like to find the intersecting plane between the entity and the plane, so my ultimate purpose is to find the top position of the 3d entity but In the middle.

 

I cannot use BoundingBoxIntersectWith because it will give me the wrong position as I am only interested in the middle piece (ignore the plates at the 2 ends)

And when I use entity.IntersectWith it said the function not define, it seems to work only with 2d objects.

 

minhquanqttb_1-1691562461329.png

 

Any suggestion would be helpful.

Thank you.

 

Hoang Minh Quan - Piping design engineer
Autodesk Store for Python Catalog
0 Likes
456 Views
5 Replies
Replies (5)
Message 2 of 6

cuongtk2
Advocate
Advocate
0 Likes
Message 3 of 6

quan_hm
Collaborator
Collaborator

Hi, thank you for your feedback.

In order to work with the function I need to explode the entity which is the thing I should avoid, and even I explode to make it 3d solid it won't get the section I want, as I want to ignore the plate at the end.  

minhquanqttb_1-1691567919562.png

 

Hoang Minh Quan - Piping design engineer
Autodesk Store for Python Catalog
0 Likes
Message 4 of 6

kerry_w_brown
Advisor
Advisor

From your last post, the assembly 'may' be a block ? yes ?

 

Perhaps you could post a drawing file of the assembly.

 

Also it may be an idea if you provide a bit more information about what you want to achieve exactly.

How many different assemblies do you want to process ?
Finding the top middle of the PFC flanges would only take a couple of seconds to do manually . . . It's what your final goal is that's important though.

 

Regards,

 


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes
Message 5 of 6

quan_hm
Collaborator
Collaborator

Hi in the attachment is the drawing, its kind of a Support in Plant 3D (not block), the final goal is to find the top middle of the support (must ignore the end plate) by select the Support, I'm seeking to do it programmatically because this is a small step in another bigger program so it must be done automatically.

Thank you. 

Hoang Minh Quan - Piping design engineer
Autodesk Store for Python Catalog
0 Likes
Message 6 of 6

kerry_w_brown
Advisor
Advisor

I don't have access to an Object Enabler for Plant3D,

SO, sorry, I can't help.

//=====

If you can select the midpoint of the 2 toes ( or heels ) and find the MidPoint of those points, that will be tne mid point of the flange faces. This can be done in code, providing the edges are selectable.

Can you access the data for the Plant3D members ?? perhaps the data will help

 

Regards,


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes