7 Replies Latest reply on Feb 6, 2014 9:07 AM by MBuehler-esristaff

    Align shapeL

    norkron@gmail.com
      Hi,

      How can one align a shapeU (or U for that matter) to a street. I have a lot of shapeU objects and I want to make sure the open bit is to the back of the street. When I generate some come properly aligned but some are reversed. I couldn't find what governs the alignment and can't seem to affect them in any way.

      Cheers
      T
        • Re: Align shapeL
          thyandrecardoso
          You can play with "alignScopeToGeometry(yUp, 1)" before using the shapeL command. Or "rotate(scopeCenter, 0, 180, 0)" after building the shape and extruding. I think edge number 1 is always facing the street...

          The alignScopeToGeometry works, but depends on the lot size (tested with shapeL only). So I reckon you'd have to make some calculations about the footprint dimensions to know to which edge to align to.


          Hi,

          How can one align a shapeU (or U for that matter) to a street. I have a lot of shapeU objects and I want to make sure the open bit is to the back of the street. When I generate some come properly aligned but some are reversed. I couldn't find what governs the alignment and can't seem to affect them in any way.

          Cheers
          T
          • Re: Align shapeL
            norkron@gmail.com
            Thanks once again !

            This works although seems like some blocks prefer different edge values.
            So I had to add an attribute AlignEdge which is 1 by default and manually change it in blocks that don't behave properly with that value.

            T
            • Re: Align shapeL
              thyandrecardoso
              If it works... then it works :)

              BUT, take a look at when that happens:
              - probably it aligns differently whether you have a lot which is longer along the street edge
              OR when the lot is longer to the inside of the block (== set of lots)... Sorry for the english lol

              So, you might get around this if you "measure" the ratio between the lot's scope.sx and scope.sz. This relation will tell you how the shapeL will be built, and can help you to code the alignScopeToGeometry, or any other strategy....
              ....
              ....
              I think :)

              Anyway, glad to help. good luck.

              Thanks once again ! 

              This works although seems like some blocks prefer different edge values.  
              So I had to add an attribute AlignEdge which is 1 by default and manually change it in blocks that don't behave properly with that value.  

              T
              • Re: Align shapeL
                MBuehler-esristaff
                hi !

                if you're using the 'Dynamic City Layouts', the so-called 'First Edge' of Lots [zero-th edge] always is on a street. If it's a corner Lot, the WIDEST street defines the position on which street the First Edge is set. If both Streets are equally wide, the longest Edge is chosen.

                --> Check the StreetWidth attributes which get created on dynamic Lot shapes under the Object Attr tab in the Inspector.

                In your case :
                The First Edge defines always the direction of scope.sx. Thus, a ShapeL is always oriented the same way, with the First Edge being the bottom Line of the two lines of an 'L'.

                If you want to change that direction, use Andre's input by comparing ratio or something else..
                • Re: Align shapeL
                  pltsltesri
                  I found that the L or U shape was always on the side of the building that was on the up slope of the terrain. So far I have not had one case where that is not so, is it coincidence or is that the case?
                  • Re: Align shapeL
                    pltsltesri
                    By the way, what is scopeCenter? I can't find any reference to it in the CGA grammer help.
                    • Re: Align shapeL
                      MBuehler-esristaff
                      scopeCenter is the 'center of the scope'.

                      learn more about the scope here:
                      http://forums.arcgis.com/threads/44417-CGA-Understanding-the-concept-of-the-scope


                      the scope is a crucial thing to understand when coding in CGA ..

                      ok ?

                      matt