2 Replies Latest reply on Mar 4, 2013 10:46 AM by Head1

    Extracting properties of a circle or a polygonal draw object

    Head1

      Hello everybody,

       

      How to create circle or round obstruct, with arrays of coordinates, I already know.

       

        I am looking for  line code  which EXTRACTS  properties of an

                    existing circle, (x, y , dia)

          and  a  drawing object  ( all its coordinates)

       

      I believe they are writen in an array,  but I could not find  anything about it, in Automation manual.

       

      Thaks for any help.

       

         Head1.

      -----------------------------

       

        • 1. Re: Extracting properties of a circle or a polygonal draw object
          andrew_french

          This example would grab find a silkscreen circle in Expedition and store it's values.  Code is in C#.   You can modify the fabrication type to get to fit your needs.

           

          double radius, xCord, yCord;

          MGCPCB.FabricationLayerGfxs silkGfxs = ExpDoc.get_FabricationLayerGfxs(MGCPCB.EPcbFabricationType.epcbFabSilkscreen);

           

                      foreach (MGCPCB.FabricationLayerGfx silkGfx in silkGfxs)

                      {

           

                          if ((silkGfx.Geometry.IsCircle() == true)

                          {

                              radius = silkGfx.Geometry.CircleR

                              xCord = silkGfx.Geometry.CircleX

                              yCord = silkGfx.Geometry.CircleY

                          }

           

                      }

          • 2. Re: Extracting properties of a circle or a polygonal draw object
            Head1

            Hello Andrew,

               Thanks for your answer.

               Although I do not write in C#, I understand the lines.

               I am sure it works. Tomorrow I will try it.

             

                Many thanks,

                  Head1.

            --------------------------------------------------------