Skip to main content
Question

Method to mirror a shape object?


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?

 

 

2 replies

Forum|alt.badge.img+4
  • June 17, 2013
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.

  • Author
  • June 18, 2013
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.

 

 


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