Merge branches by tree of paths

Hey, I have two data trees. I would like to merge all given paths that are listed in Tree B while maintaining the structure of this tree (…0;1-…0;21). The structure is gone by using the tree branch component :frowning:

The final tree should have the structure e.g. 0;0;0;21;129 (21: path of tree B, 129, path of tree A) (1.0 MB)

Here is a solution. May I ask why such a convoluted tree structure is required ? (1.0 MB)

1 Like

Thanks magicteddy. Sure you may ask: I have a bunch of buildings that are located on different property parcels (as indicated by the numbers). To analyse the geometry of the buildings I have 4 different trees: 1. Complete and closed meshes of the buildings (volume) 2. Walls of the buildings (wall-height) 3. Roofs of the buildings (slope) 4. grounds of the buildings (floor area). All of those trees are grafted by “building”. So branch “0;129” resembles building “129”. I need to translate this “building” structure into a “parcel;building” structure to see which building (and its geometry) are on which parcel. The building data is divided at front because its very hard to disconnect e.g. the roof surfaces from the closed mesh. So I create several building-trees based upon a citygml file upfront to have a clear dataset.

In order to create the parcel;building structure I calculate the volume of the closed mesh and use the volume center-point with the [point in curve] component. This will tell me which branches (buildings) are located on which parcel. In your case: 9 is the parcel and 199 is the building and all of its geometry :slight_smile: This way I can retrieve data like “Give me all buildings/walls/roofs/grounds for parcel 102”.


1 Like