Solved

How to test for 3d faces in DWG


Badge

I want to determine when a dwg file has a certain percentage of 3D Faces versus other solids. It doesn't appear GeometryValidator or GeometryFilter provide for this. Am I missing something there or is there another solution?

Sometimes an input model may have cylindrical shapes comprised of 3D Faces around their perimeters and defining their end caps. They look okay to the eye but are horrible to process. Wanting to distinguish those flat 3D Faces (versus other solid primitive shapes).

icon

Best answer by rogerrapp 26 July 2018, 19:18

View original

8 replies

Userlevel 2
Badge +17

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?

Badge

Would using the tester transformer work for your purpose?

@Value(autocad_original_entity_type) = "autocad_solid3d"

@Value(autocad_original_entity_type) = "autocad_face"
Badge
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

 

 

Badge

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.

Userlevel 2
Badge +17

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.

Badge

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)"?

 

Badge

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.
Badge

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.

Reply