I think the GeometryFilter can be used to classify the features according to their geometry types. How did you use the GeometryFilter in your workspace and what problem did you get from the transformer?
Would using the tester transformer work for your purpose?
@Value(autocad_original_entity_type) = "autocad_solid3d"
@Value(autocad_original_entity_type) = "autocad_face"
Hi Folks. Thanks for the previous answers but I wasn't successful when trying the suggestions. Seems this should be simple but apparently not for me.
An example of the needed transformers would be greatly appreciated.
I've attached a sample DWG model file.
I need to use the AutoCAD DWG FeatureReader (set to use Geometry and to explode any blocks) - and count solids and surfaces found in the model (this is where I'm struggling).
I'll be using the counts to determine when there are more faces than solids, as I want to avoid further processing of such models.
solids-meshes-2blocksofmeshes.dwg
I added a comment to the original inquiry I posted. But posting here as a reply as well. Hoping to stir up some good advice with an example on how to find and count AutoCAD entity types. My comment includes an example DWG file.
I think that you can classify the features into surfaces and solids, if you read the DWG dataset with Autodesk AutoCAD RealDWG DWG/DXF [realdwg] Reader, rather than Autodesk AutoCAD DWG/DXF [acad] Reader.
I think that you can classify the features into surfaces and solids, if you read the DWG dataset with Autodesk AutoCAD RealDWG DWG/DXF [realdwg] Reader, rather than Autodesk AutoCAD DWG/DXF [acad] Reader.
Hi @takashi. Thanks for the suggestion of using the RealDWG. But that still only gives me access to values in the fme_geometry (string). Those seem to be generalized values determined by FME. I need to classify using the values in the autocad_original_entity_type (string) attribute.
I can see the needed values in the Feature Information table in the Inspector. But I can't seem to get and use them. I'm still hopeful. Shouldn't I be able to use everything in the Feature Information, like the values for "autocad_original_entity_type (string)"?
Would using the tester transformer work for your purpose?
@Value(autocad_original_entity_type) = "autocad_solid3d"
@Value(autocad_original_entity_type) = "autocad_face"
Hi @fmeta. Sorry I didn't say thanks earlier. Thanks!
I would love if the Tester transformer worked. But Tester can't see those values coming from the RealDWG FeatureReader. My struggle is not being able (or not knowing how) to expose those values in the autocad_original_entity_type attributes. From your previous answer, I can see you know what I'm driving at. Any further advice will be greatly appreciated.
After much trial and error I found the answer is to use the AttributeExploder transformer. AttributeExploder exposed the needed attribute values. So my transformer flow is as follows:
Creator(geometry object) -> FeatureReader(RealDWG) -> AttributeExploder -> AttributeFilter(filter by _attr_name, add attribute value: autocad_original_entity_type) -> StatisticsCalculator(group by: attr_value, only used calculate: _count, and I only use the Summary port)
The result is a total count for each autocad_original_entity_type.
Thanks to those who tried to help and I hope this is useful to others.