Merge multiple geometry files into one

   2670   2   0
User Avatar
Member
918 posts
Joined: March 2014
Offline
Hello,

I tried tackling the following problem: 23 bgeo files reside in a folder. Each geo/file has a proper name attribute. I'd like to load and them all in, merge and save as a single file.

I've created a TOP network and put down a file pattern node which creates work items for all 23 files on disk. Below I place a geometry import node which gets the filepath from upstream. I set the merge operation to import and merge all. Then in the storage tab I set a single output file.

When I cook the network the single file is written, yet it contains only data of one of those files.

Any help is much appreciated.

Thank you and have a great day.
Andy
User Avatar
Staff
585 posts
Joined: May 2014
Offline
After your file pattern node you need to put a Wait for All, so that all of the files are collected into a single work item. Alternatively, on the File Pattern node itself you can disable the "Split Files into Separate Items" toggle to get a single work item with all 23 files.

PDG nodes apply their procedure for each input work item, possibly in parallel. If you want to merge a list of files, the files need to all be associated with the same work item.
User Avatar
Member
918 posts
Joined: March 2014
Offline
Thank you very much. It now works great.


Before posting here, my faulty intuition had tried a wait for all after the geometry import node and then a rop geometry output node. It failed me.

Thanks again.
  • Quick Links