Skip to main content
Hi,

 

 

I'm currently trying to create a mirror copy of a set of rectangles. Each rectangle needs to be mirror on one particular side to create its other half.

 

 

So far, my method has been to identify a centerpoint on the side I want inorder to use rotater transformer, but I've had limited luck getting the procedure working in the correct order when I attempt to aggregate the original rectangles with the centrepoint.

 

 

Are there any other methods or transformers I  could potentionally use?

 

 

If i'm reading this correctly, you want to clone a rectangle and offset it by its width/length so that it forms a square?

 

 

If so, I believe the following would work - in theory:
  • Get centrepoint
  • Locate distance you want to shift the rectangle
    • Potentially via GeometryCoercer to make area to line
    • Chopper to chop into 2 vertex lines
    • LengthCalculator
    • Sorter -> Sampler to find shortest length
  • Locate angle you want to shift the rectangle
  • Cloner to duplicate original rectangle. (Emphasis on original)
  • Offsetter to offset cloned rectangle by distance and angle.

Thanks for the response.

 

 

The final solution implemented was:

 

 

-TopologyBuilder instead of GeometryCoercer to break down the polygon. (GeometryCoercer couldn't change to lines for some reason)

 

-SpatialFilter to pick the right line which crosses a seperate reference box.

 

-CenterOfGravity replacer on spatial filter results.

 

-coordinateExtractor.

 

-Then I had to use featureHolder for the next step of combining the reference point and the original source

 

-Aggregator with a grouping based on an attribute part of the polygons and point.

 

-Rotater with 180degrees and attirbutes X/Y points refering to the previous coordinateExtrator.

 

 

Viola.

 

 


Reply