Question

AutoCAD text & leaders touching objects with SpatialFilter

  • 29 March 2017
  • 7 replies
  • 11 views

Badge +2

I have an AutoCAD text & leader (mleader AutoCAD object) that are on one layer and a structure they describe that is on another layer. The structure is an autocad block, which FME reads as a point located at the block insertion point. The the leader line always connects to it's strucutre's block insertion point. The text is contained in a box that connects to the leader line always in the same pattern. I want to create a workbench that will determine which text/leader objects go with which structure. So it seems like a SpatialFilter transformer set to check if the leader layer touches the block layer should be able to capture this relationship. When I try this nothing passes the filter though, why could this be?


7 replies

Userlevel 2
Badge +17

Hi @alpheus, if you use Inspector transformers to examine the leader and block features before they enter the SpatialFilter, do they touch?

Badge +2

Hi @alpheus, if you use Inspector transformers to examine the leader and block features before they enter the SpatialFilter, do they touch?

The appear to when I check them in the viewer. I also checked to enure they touch in the CAD source data.

 

 

Badge

What parameters did you set in the SpatialFilter transformer? Maybe a small sample dataset or screenshot would help?

Badge +3

FME treating blok as just insertion point is an option on the DWG reader.

Appear to touch conerneing points and lines does not mean they touch.

SpatialRelator has no tolerance option, so when using that you would need to buffer points. Waste of processing time as you can do it with a single transformer.

Point on line overlayer does have a tolerance setting. Try that one.

Other possibility: snapper wich also has tolerance.

Relate text to box.: Spatialrelator (if box is polyline, make it a area first)

Relate Textbox and blockinsertionpoint to leader: PointOnLineOverlayer with a slight tolerance (use polyline textbox of course) You can do this with just one POLO

Badge +2

FME treating blok as just insertion point is an option on the DWG reader.

Appear to touch conerneing points and lines does not mean they touch.

SpatialRelator has no tolerance option, so when using that you would need to buffer points. Waste of processing time as you can do it with a single transformer.

Point on line overlayer does have a tolerance setting. Try that one.

Other possibility: snapper wich also has tolerance.

Relate text to box.: Spatialrelator (if box is polyline, make it a area first)

Relate Textbox and blockinsertionpoint to leader: PointOnLineOverlayer with a slight tolerance (use polyline textbox of course) You can do this with just one POLO

That's the problem, I'm trying to have it both ways with the block as a point & a collection of entities. Buffering the insertion point looks like the best way to go.

 

Badge +3

If you read the dwg and set it to "Explode Blocks into Entities" it should insert the block. (when it is unchecked it will only show insertion point)

When blocks are exploded the insertion point can be accesed by autocad_entity (string): "autocad_insert" and it has the same

"autocad_block_number"

as the (parts) of the block it belongs to.

So if you realte the point to the leader, then you can have it "both ways with the block as a point & a collection of entities"

You can also of course, group the parts of a block by aggregating the blocks on "autocad_lock_number"

Not seeming to touch is a matter of accuracy/resolution. need tolerance (or if you prefer to;go buffer)

I solved a similar problem here is the workspace, you have to break up the leaders and test the first point of the leader for spatial relationship. autocad_od2filegdb.fmwt

Reply