2 Replies Latest reply on Feb 25, 2011 4:22 AM by olsmir

    How to shrink/grow a closed area in ExpeditionPCB?

    olsmir

      Hello everybody,

       

      Does anybody have a VBScript that would shrink/grow a closed area in ExpeditionPCB, much like the Grow/Shrink numerical field in the Properties dialog in the Draw Mode?

      In other words, I have a geometry object (SomeObject.Geometry.PointsArray(epcbUnitCurrent)) and need it growing on the specified value.

        • 1. Re: How to shrink/grow a closed area in ExpeditionPCB?
          Andreas.Schaefer

          Hello Oleg,

           

          the only way you can do this is using the mask engine.

          Unfortunately you will need either Fablink or an Automation Pro license to use this feature.

           

          The Keyword is Oversize (you can shrink it with a negative value)

          The your code will look like:

           

              set MaskColl=$MaskEngineObj.Masks

              # reset the collection first

              $MaskColl Delete

              $MaskColl Add

              # add Points array

              MaskEngineObj.Masks.Item(1).Shapes AddByPointsArray Length,Points,1,Units

              # oversize the shape by Size

              MaskEngineObj.Masks.Item(1) Oversize Size,1,Units

           

          regards,

          Andreas

          • 2. Re: How to shrink/grow a closed area in ExpeditionPCB?
            olsmir

            Thank you, Andreas, for the interesting method. I first tried to manually calculate the new XY coordinates of the new geometry grown/shrinked on the specified value, but it seems to be very tedious. Then I tried to invoke the Properties dialog in Draw Mode (app.Gui.ProcessCommand("File->Propertes")), but failed to access the Grow/Shrink field of the dialog. Lastly, you have recommended  another method. Thank you.

             

            Regards, Oleg