Exemple #1
0
        private List <Dimension> CreateDimensions(
            Document doc,
            GridParameters p,
            List <Grid> grid)
        {
            /*
             * This method create dimensions between grid axes,
             * for all orientations, one dimension line by one orientation
             */

            List <Dimension> dimensions = new List <Dimension>();

            // The view in which the dimensions will be drawn
            View view = GetView(doc);

            Orientation[] orientations = p.GetOrientations().ToArray();

            Dictionary <Orientation, List <Grid> > gridsByOrientations
                = DivideGridByOrientation(p, grid, orientations.ToList());

            foreach (Orientation orientation in orientations)
            {
                if (p.GetNumber(orientation) > 1)
                {
                    CreateDimensionForOrientation(
                        doc,
                        gridsByOrientations,
                        view,
                        p,
                        orientation);
                }
            }

            return(dimensions);
        }
Exemple #2
0
        List <Grid> CreateAxesGrid(
            Document doc,
            GridParameters p)
        {
            List <Grid> list = new List <Grid>();

            foreach (Orientation orientation in p.GetOrientations())
            {
                list.AddRange(CreateAxes(doc, p, orientation));
            }

            return(list);
        }