Good morning everyone.
On this occasion I am trying to know if my element is being cut or joined, as you can see I have my element and well notice that some other element is cutting it, I only want to get TRUE if some other element is cutting it AND FALSE if nothing cuts it.
On the other hand, I also know if my element is being joined to another element, obtaining TRUE if it is joined to another element and if it is not joined to anything, a FALSE
There is the OOTB Element.GetJoinedElements node
And you could use Clockwork Element.Inserts node to get cutting voids
Hi @AM3D.BIM.STUDIO probaby OOTB element.get.joined.element could work
arhh sorry see now Mike already suggest that
The GetJoined node is not what I’m looking for.
Joins and cuts depends on types of elements that are interacting.
There are elements that cut and join (geometry) and there are voids that cut a host. Your original image appears to be a void (or is it a hidden element?) so I would expect some return from Element.Inserts
Element.Inserts node has all options default to false - try with true options on the last two
There are two utility classes in the API that can help JoinGeometryUtils
and InstanceVoidCutUtils
Get joined elements with JoinGeometryUtils.GetJoinedElements(doc, element)
this is what the Element.GetJoinedElements is doing - there there is the IsCuttingElementInJoin(doc, element1, element2)
method which you can use to find cutting status of the first element.
You could find the cutting status of elements with code like this
# Typical boilerplate here
doc = DocumentManager.Instance.CurrentDBDocument
element = UnwrapElement(IN[0])
OUT = [
JoinGeometryUtils.IsCuttingElementInJoin(doc, elem, element)
for elem in JoinGeometryUtils.GetJoinedElements(doc, element)
]
First of all, thank you very much for your answer, but I don’t know how to use Python and it is difficult for me to understand the code and on the other hand, regarding the geometry, at no time have I used union or cut or empty shape, I have only modeled it and automatically made that element thinner. He has made that cut in the element and there are many of these types of cases in the model, so I try to know which elements are being perforated or cut in order to solve them manually… I don’t know if you understood me…?
If you can, upload a sample file with indicative elements so forum members can review