Select to view content in your preferred language

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

1208
5
06-26-2018 07:46 AM
Emerging Contributor

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?

Fig1

Fig2

Tags (4)
1 Solution

Accepted Solutions
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. }* }*‍‍‍``````
5 Replies
by
Frequent Contributor

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

Emerging Contributor

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:

Emerging Contributor

hey

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

Thanks!

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. }* }*‍‍‍``````
Emerging Contributor

Thank you Cheryl!