I would like to loop over a set of bgeos that have a piece attribute and then write out each piece as a separate bgeo file. I'm sure this is super simple to do, but can't figure it out. Just jumping into PDG for the first time so any help is appreciated?
Thanks!
Work Item from Geometry Attribute
2793 4 0-
- ndasilva
- Member
- 60 posts
- Joined: July 2014
- Offline
-
- tpetrick
- Staff
- 616 posts
- Joined: May 2014
- Offline
Assuming the .bgeo files are on disk, you can first use a File Pattern node to create a work item for each .bgeo file. Set the Pattern to “$HIP/geo/*.bgeo.sc”, for example. After that, you can use the Geometry Import node to load the .bgeo files and extract data from them. That node can be configured to load geometry from “Upstream File”, so if you wire it into the File Pattern it'll load in the files there.
The geometry import can also be configured to write out the imported geometry to disk in the “Storage” section. Further down in the “Data Extraction” section, you chose to extract “Primitives” and set “Create Work Item For” to “Piece Attribute Values” and specify the attribute name. I've attached a screenshot of those parms. Note that you'll need a fairly recent build of 18.0, since the piece attribute features are fairly new.
If you set up your network with those two nodes, and wire the Geometry Import into the File Pattern, I believe it'll do what you're looking for. It'll grab all the .bgeo files from disk and then create a work item for each piece in each of the .bgeo, and store them to a separate file.
The geometry import can also be configured to write out the imported geometry to disk in the “Storage” section. Further down in the “Data Extraction” section, you chose to extract “Primitives” and set “Create Work Item For” to “Piece Attribute Values” and specify the attribute name. I've attached a screenshot of those parms. Note that you'll need a fairly recent build of 18.0, since the piece attribute features are fairly new.
If you set up your network with those two nodes, and wire the Geometry Import into the File Pattern, I believe it'll do what you're looking for. It'll grab all the .bgeo files from disk and then create a work item for each piece in each of the .bgeo, and store them to a separate file.
-
- ndasilva
- Member
- 60 posts
- Joined: July 2014
- Offline
-
- tpetrick
- Staff
- 616 posts
- Joined: May 2014
- Offline
-
- ndasilva
- Member
- 60 posts
- Joined: July 2014
- Offline
-
- Quick Links