Пример #1
0
        private static void RackAddGroupLeft(ITray rack, RackInfo rackInfo)
        {
            ITubesGroup group = rack.AddTubesGroup();

            group.SetEllipsoidForm(14.3, 14.3);  // Each tube/position is represented by a circle

            //                                                        10 tubes on X (horizontal)
            //                                                                                   15 tubes on Y (vertical)
            //                                                                                                           x, y position of the 1st tube
            //                                                                                                                 x   , y distance between tubes in x- and y-direction
            IRectangularTubeCollection rectangle = group.AddRectangle(rackInfo.TubeColumnsCount, rackInfo.TubeRowsCount, 4, 6, 15.8, 15.9);

            // EnumerationScheme.SawH means the tubes are enumerated from left to right, top to bottom
            //                                                                             A          151 - 1st tube number   , 151 - the global numerical index starts from 151 (the 1st tube)
            rectangle.AddEnumeration(EnumerationScheme.SawH, rackInfo.TubePositionNamePrefix + "%p%", rackInfo.TubeFirstNumber, rackInfo.TubeFirstNumber);

            /*
             *  10 columns x 15 rows (defined in group.AddRectangle(10, 15)
             *
             *  151 152 153 154 155 156 157 158 159 160
             *  161 162 163 164 165 166 167 168 169 170
             *  . . .
             *  291 292 293 294 295 296 297 298 299 300
             *
             *  Also, see int Position setter
             */
        }
Пример #2
0
        private String GenerateTrayDescription()
        {
            // Convert tray layout information to Chromeleon's tray description language.
            // The tray layout can either be part of your configuration XML, in which case this is static information,
            // or the driver can update the tray description dynamically when communication with the hardware is established
            // and the hardware reports a new tray layout.
            // For simplicity, the code below just shows a small subset of what can be done.

            IRackLayoutDescriptionBuilder rackLayoutDescriptionBuilder = m_InjectHandler.CreateRackLayoutDescriptionBuilder();

            if (rackLayoutDescriptionBuilder == null)
            {
                return(String.Empty);
            }

            ITray tray = rackLayoutDescriptionBuilder.AddTray("TwoSubTrays", 0, 0);

            tray.SetRectangularForm(0.0, 0.0, 332.3, 250.5);
            ITubesGroup group1 = tray.AddTubesGroup();

            group1.SetEllipsoidForm(16.2, 16.2);
            IRectangularTubeCollection rectangle1 = group1.AddRectangle(8, 12, 177.1, 17.0, 18.0, 18.0);

            rectangle1.AddEnumeration(EnumerationScheme.SawH, 1, 1);
            ITubesGroup group2 = tray.AddTubesGroup();

            group2.SetEllipsoidForm(14.3, 14.3);
            IRectangularTubeCollection rectangle2 = group2.AddRectangle(10, 15, 4.0, 6.0, 15.8, 15.9);

            rectangle2.AddEnumeration(EnumerationScheme.SawH, 151, 151);

            return(rackLayoutDescriptionBuilder.Description);
        }
Пример #3
0
        private static void RackAddGroupRight(ITray rack, RackInfo rackInfo)
        {
            ITubesGroup group = rack.AddTubesGroup();

            group.SetEllipsoidForm(16.2, 16.2);

            IRectangularTubeCollection rectangle = group.AddRectangle(rackInfo.TubeColumnsCount, rackInfo.TubeRowsCount, 177.1, 17, 18, 18);

            rectangle.AddEnumeration(EnumerationScheme.SawH, rackInfo.TubePositionNamePrefix + "%p%", rackInfo.TubeFirstNumber, rackInfo.TubeFirstNumber);
        }