Wiki source code of 12_bimutils
Version 3.1 by Bimit Administrator on 04.03.2026, 14:10
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | * [[getConnectedElementsByClassName>>path:#_Toc1]] - извлечение элементов заданного типа, находящихся в контакте с заданным типом | ||
| 2 | * [[getElementAdjacentElementsWithGap>>path:#_Toc2]] - добавление строки | ||
| 3 | |||
| 4 | (% class="box infomessage" %) | ||
| 5 | ((( | ||
| 6 | **{{id name="_Toc1"/}}getConnectedElementsByClassName** - извлечение элементов заданного типа, находящихся в контакте с данным элементом | ||
| 7 | ))) | ||
| 8 | |||
| 9 | * **bimutils.getConnectedElementsByClassName (GeometryElement, Set, double)** | ||
| 10 | |||
| 11 | **Пример использования:** | ||
| 12 | |||
| 13 | {{code language="java"}} | ||
| 14 | def conditionSpace = bim.createCondition("class", "eq", "IfcWall") | ||
| 15 | def elementSpaces = bim.getGeometryElements(conditionSpace) | ||
| 16 | def classNames = ["IfcSpace", "IfcDalle"] as Set | ||
| 17 | for(def space : elementSpaces){ | ||
| 18 | def contactedElements = bimutils.getConnectedElementsByClassName(space, classNames, 5) | ||
| 19 | // contactedElements : Использовать по своему усмотрению и в зависимости от потребностей | ||
| 20 | {{/code}} | ||
| 21 | |||
| 22 | (% class="box infomessage" %) | ||
| 23 | ((( | ||
| 24 | **{{id name="_Toc2"/}}getElementAdjacentElementsWithGap** - извлечение элементов, соседствующих с заданным элементом | ||
| 25 | ))) | ||
| 26 | |||
| 27 | * **bimutils.getElementAdjacentElementsWithGap (GeometryElement, double)** | ||
| 28 | |||
| 29 | **Пример использования:** | ||
| 30 | |||
| 31 | {{code language="java"}} | ||
| 32 | def conditionSpace = bim.createCondition("class", "eq", "IfcSpace") | ||
| 33 | def elementSpaces = bim.getGeometryElements(conditionSpace) | ||
| 34 | for(def space : elementSpaces){ | ||
| 35 | def contactedElements = bimutils.getElementAdjacentElementsWithGap(space, 5) | ||
| 36 | // contactedElements : Использовать по своему усмотрению и в зависимости от потребностей | ||
| 37 | {{/code}} |