Question

FME Equivalent of AutoCAD Transformation

  • 17 March 2017
  • 9 replies
  • 16 views

Badge

I have a transformation I use in AutoCAD that I'd like to replicate in FME. I use two source and two destination points in AutoCAD to define a shift, rotate, and scale. I tried using the VectorShifter, Rotate, and Scaler transformers in FME but the results were slightly different than when I use the transformation in AutoCAD. Am I using the right transformers in FME?

A description of the AutoCAD operation is here: https://knowledge.autodesk.com/support/autocad-map-3d/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/MAP3D-Use/files/GUID-AB726381-7DD2-49D0-9902-C1300C636A7C-htm.html


9 replies

Badge +2

Hi,

Have you tried Rubbersheeter

https://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/rubbersheeter.htm

I have attached sample work space for referencenone2none.fmw

Pratap

Badge +22

I would use the Affiner if you know your transform equation parameters or the AffineWarper if you just have control vectors.

Userlevel 2
Badge +17

The Esri CAD world file, defined here, contains the same two point transformation you want to apply to the AutoCAD data. If the .wld file has the root name as the .dwg file and is in the same folder, FME will automatically apply this transformation when reading the .dwg file.

Badge

@DaveAtSafe I tried the .wld file method and this did not seem to work. The wld file may have been read, but it did not apply the correct transformation. In AutoCAD I have: First Source Point, First Destination Point, Second Source Point, Second Destination Point. So my wld file looks like this:

First Source Point <space> First Destination Point

Second Source Point <space> Second Destination Point

Is this correct?

I am also reprojecting the drawing in FME, so I think the world file would have to be read after the reprojection, which may be the issue. Is there any way to apply the world file after FME reads the dwg file?

Badge

The Esri CAD world file, defined here, contains the same two point transformation you want to apply to the AutoCAD data. If the .wld file has the root name as the .dwg file and is in the same folder, FME will automatically apply this transformation when reading the .dwg file.

@DaveAtSafe Thanks for your help with this. I tried the .wld file method and this did not seem to work. The wld file may have been read, but it did not apply the correct transformation. In AutoCAD I have: First Source Point, First Destination Point, Second Source Point, Second Destination Point. So my wld file looks like this:

 

First Source Point <space> First Destination Point

 

Second Source Point <space> Second Destination Point

 

Is this correct?

 

In my AutoCAD workflow, I reproject the drawing first, then apply the transform. So I think I would need to do the same in FME. Is there any way to read/apply the world file after I do the reproject?

 

 

 

Badge +3

Using the Affiner as suggested is relatively easy.

Compounding the transformations into one transformation requires some math.

But you can do it using 3+2 affiners.

1 affiner to move the ojbects centre to the origin.

1 for shift, rotate, and scale

and 1 to move it back to its original spot.

Open a Affiner and click the help. The transformations are explained. Easy to use.

(moving to origin makes using them easier (rotate and scale) as arbitrary centre of transformation requires some math again...)

Badge +3

Using the Affiner as suggested is relatively easy.

Compounding the transformations into one transformation requires some math.

But you can do it using 3+2 affiners.

1 affiner to move the ojbects centre to the origin.

1 for shift, rotate, and scale

and 1 to move it back to its original spot.

Open a Affiner and click the help. The transformations are explained. Easy to use.

(moving to origin makes using them easier (rotate and scale) as arbitrary centre of transformation requires some math again...)

rotate and scale on origin prior to shifting of course...

 

 

Badge

Using the Affiner as suggested is relatively easy.

Compounding the transformations into one transformation requires some math.

But you can do it using 3+2 affiners.

1 affiner to move the ojbects centre to the origin.

1 for shift, rotate, and scale

and 1 to move it back to its original spot.

Open a Affiner and click the help. The transformations are explained. Easy to use.

(moving to origin makes using them easier (rotate and scale) as arbitrary centre of transformation requires some math again...)

@gio thanks for the suggestion. I am not clear on how to translate my source and destination points to parameters in the affiner. My AutoCAD workflow is:

 

1. Reproject (local oblique mercator to UTM83-17)

 

2. Transform using: First Source Point, First Destination Point, Second Source Point, Second Destination Point

 

 

I have got the reprojector working in FME. I just need to transform using the source and destination points I have. It sounds like the Affiner is what I need, just how do I translate the source/destination points to parameters in FME?

 

Thanks,

 

Badge +22

You should be able to create control vectors, which are 2 vertex lines from your source point to tour destination point. How exactly you do that depends on the source format of your control points.

 

 

In the AffineWarper, these control vecots go to the control port, and your cad data goes to the observe port. I have a similar workspace involving raster data.

 

 

Reply