Skip to main content
Question

Convert CAD text to Bounding Polygon?

  • November 5, 2019
  • 2 replies
  • 162 views

joshuadamron
Contributor
Forum|alt.badge.img+7

Howdy,

I am reading with an AutoCAD .dwg and I need FME to generate a bounding polygon around annotation text as the text it appears in Inspector.

I used the BoundingBoxReplacer to generate a polygon for the extents of the text, however as you can see in the screen capture below the bounding box output is significantly smaller than the text as the text appears in the Inspector.

 

Can someone please help me understand how FME is deciding the size/extents of the bounding box? What do I need to do get a bounding box output that matches up with the actual text extents??

 

Please see the attached data if needed:

Thank you!

 

2 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 5, 2019

Have you tried using a TextStroker transformer, before generating the bounding box, using the BoundingBoxAccumulator (group by the id of the text)?

Hope this helps.


joshuadamron
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 5, 2019
erik_jan wrote:

Have you tried using a TextStroker transformer, before generating the bounding box, using the BoundingBoxAccumulator (group by the id of the text)?

Hope this helps.

TextStroker it is! I've never had opportunity to use that one before, thank you for pointing me in the right direction.

 

It took a couple of tries to get the font/size/padding/width parameter's sorted but I got it pretty close for the most part.

For the next person hunting for this solution, here's the parameters I ended up with:

 


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