# world space scope split

1445
4
06-30-2020 09:34 AM
New Contributor

Hello Everyone,

is there a way to split using world space slicer position instead if using the local scope?

I want restrict the split() on X and Y along specific world space modulo ( for example: at each 3.455 on X and 3.455 on Y ) This is what I would expect as result

however as soon as the shape isn't regular, all break loose, and the local scope kicks, and the slicing axis realigns to the local scope.

How can i force the local scope to be aligned with the world XYZ axis when splitting?

Tx

Dave.

``````GenerateThis -->
{
Width :
{
Length:
Test
}*
}*

Test -->
s('1,0,'1)
center(z)
setColor( Color )
X.‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍``````
Tags (5)
4 Replies
New Contributor

Note: I did try to use alignAxesSelector() and alignScopeToGeometry() without much success.

New Contributor

Always happens... I am writing a question, and find the answer as soon as the question is posted.

``````GenerateThis() -->
alignScopeToAxes()
{
BlockWidthModulo :
{
BlockLengthModulo:
alignScopeToAxes()
Test
}*
}*‍‍‍‍‍‍‍‍‍‍‍‍``````

Now my problem is the scope is not fully aligned with world space modulo value. I am close... but still not quite there yet...

Esri Regular Contributor

Yes, alignScopeToAxes() will align the scope to the world coordinate system.  You can then convert the scope origin to world coordinates and figure out how much you need to split out the first piece so that the rest will align to your desired grid.

``````const w=10

getScopeOriginInWorld =
[convert(x, scope, world, pos, 0, 0, 0),
convert(z, scope, world, pos, 0, 0, 0)]

getOffset(x) = case x<0: abs(x) else: w-x

Lot -->
alignScopeToAxes()
Split(getScopeOriginInWorld)

Split(point) -->