Skip to main content
Solved

How to test for 3d faces in DWG

  • May 22, 2018 9:23 PM UTC
  • 8 replies
  • 159 views

Forum|alt.badge.img

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

Best answer by rogerrapp

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.

View original
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

takashi
Celebrity
  • May 24, 2018 10:35 AM UTC

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?


fmeta
Forum|alt.badge.img
  • May 24, 2018 2:03 PM UTC

Would using the tester transformer work for your purpose?

@Value(autocad_original_entity_type) = "autocad_solid3d"

@Value(autocad_original_entity_type) = "autocad_face"

Forum|alt.badge.img
  • Author
  • Jul 18, 2018 5:37 PM UTC
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

 

 


Forum|alt.badge.img
  • Author
  • Jul 19, 2018 3:02 PM UTC

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.


takashi
Celebrity
  • Jul 20, 2018 6:00 AM UTC

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.


Forum|alt.badge.img
  • Author
  • Jul 25, 2018 8:57 PM UTC

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

 


Forum|alt.badge.img
  • Author
  • Jul 25, 2018 9:03 PM UTC

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.

Forum|alt.badge.img
  • Author
  • Best Answer
  • Jul 26, 2018 5:18 PM UTC

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.