6 Replies Latest reply on Oct 8, 2013 10:46 PM by babai

    Create a derived layer

    babai

      Hello All,

       

      I'm new in calibre rule writing. I want to get a derived layer which consists of a numbers of layer.

       

      like layer_final = (layer_1) + (layer_2) + (layer_3) + .......

      Here I want, any of the input layer(layer_1, layer_2 etc) is missing then no derived layer should get created.

      I think, normal OR operation is not capable of doing the same.

       

      Please help!!!!!

        • 1. Re: Create a derived layer
          chris_balcom

          Is it the intersections you want (similar to the AND operation)?

           

          Maybe just those intersections where all three layers share the same area but nothing output unless all three layers are present?

          • 2. Re: Create a derived layer
            babai

            Hello Chris,

             

            I want the area if all layers being present and derived layer should be OR of all layers.

             

            If one of the layers is absent then nothing should come as derived layer.

             

            Normal OR does following(correct me if I'm wrong) :

             

            derived_layer = OR layer_1 layer_2

             

            Here if layer_2 is absent then derived_layer will be only of  layer_1.

             

            If layer_2 is absent then derived_layer should contain nothing (what I want)

             

             

             

             

             

            • 3. Re: Create a derived layer
              chris_balcom

              If there is a shape on layer A, then a completely separate shape somewhere else on layer B, then a completely separate shape on layer C, you want the final OR result of all these shapes (but only because something exists somewhere in the design on each layer?)

               

              If one of those layers was completely empty then the final result would be completely empty too?

               

              I'm wondering if you care about the "absent layer" relative to the whole design, or relative to individual interactions in different places. For instance there might be one place in the design where the three layers interact with each other and so the OR of all three could be found. Then somewhere else in the design maybe only two of the layers interact so at that location nothing would be returned.

              • 4. Re: Create a derived layer
                babai

                If each layer is touching/intersecting with atleast one of the mentioned layers, then the derived layer should come as OR of all layers.

                If one or more layer is missing then derived layer should come as nothing.

                 

                PFA consisting diagram.

                 

                Thanks

                • 5. Re: Create a derived layer
                  chris_balcom

                  Here's one possible solution that matches your illustration:

                   

                  (((((L1 OR L2) OR L3) INTERACT L1) INTERACT L2) INTERACT L3)

                  • 6. Re: Create a derived layer
                    babai

                    Hi Chris,

                     

                    Thanks for reply. It is now doing fine.

                    I just needed to exclude the outer brackets otherwise it was giving compilation error.

                     

                    Thanks once again.