Skip to main content
Solved

How to test for 3d faces in DWG


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
Did this help you find an answer to your question?

8 replies

takashi
Evangelist
  • May 24, 2018

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

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
  • July 18, 2018
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
  • July 19, 2018

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
Evangelist
  • July 20, 2018

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
  • July 25, 2018
takashi wrote:

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
  • July 25, 2018
fmeta wrote:

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
  • July 26, 2018

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings