How to rotate a 'grid of shapes' without losing alignement

924
5
Jump to solution
06-26-2018 07:46 AM
AleksanderStysiak
New Contributor II

HI
I split my shape along xz resulting in a grid of shapes - lets say footprints (yellow) and streets (green). I wish to be able to rotate the grid around its center, while keeping the alignment of the streets, i.e. so I keep the intersections like in Fig1. 
If I use the rotateScope, I can rotate everything but shapes start moving relative to each other (Fig2). 

Anyone can maybe help me solve this?

Thanks in advance!

Fig1

Fig2

0 Kudos
1 Solution

Accepted Solutions
CherylLau
Esri Regular Contributor

You can use split() with the noAdjust option to keep the parent scope.

Lot -->
     rotateScope(0, angle, 0)
     split(x, noAdjust) { ~w: split(z) { ~w: A. }* }*

View solution in original post

5 Replies
LR
by
Occasional Contributor III

You have to align the scope to the geometry, e.g. alignScopeToGeometry(yUp, any, longest).

0 Kudos
AleksanderStysiak
New Contributor II

Thanks for the response L R, I appreciate you taking the time. 

I am not sure where to place the alignScope...  in my code to get the desired result.

I generated this with these few lines: 

@Group("Parcel_settings") @Order(20) @Range(0,360)
attr Rotation = 90

@Group("Parcel_settings") @Order(30) @Range(10,100)
attr X_Size = 25
@Group("Parcel_settings") @Order(40) @Range(10,100)
attr Z_Size = 25
@Group("Parcel_settings") @Order(50) @Range(0,10)
attr StreetWidth= 4

Parcel-->
   alignScopeToAxes(y)
   rotateScope(0,Rotation,0)
   split(x) {

               { ~X_Size: split(z) {{ ~Z_Size: Footprint | StreetWidth: Street }* | ~Z_Size: Footprint } | StreetWidth: Street }*
               | ~X_Size: split(z) {{ ~Z_Size: Footprint | StreetWidth: Street }* | ~Z_Size: Footprint 

               }

This rotates the entire thing like shown above, but the alignment of the streets is distorted. 

If I wasn't clear before - I wish to kind of rotate the resulting grid, and preserve the right angle between streets. Not just the parcel scope. So it look like this:

0 Kudos
AleksanderStysiak
New Contributor II

hey 

do you guys maybe have any advice on how to achieve this?

Thomas Fuchs Cheryl Lau

Thanks!

0 Kudos
CherylLau
Esri Regular Contributor

You can use split() with the noAdjust option to keep the parent scope.

Lot -->
     rotateScope(0, angle, 0)
     split(x, noAdjust) { ~w: split(z) { ~w: A. }* }*
AleksanderStysiak
New Contributor II

Thank you Cheryl!

0 Kudos