Exemple #1
0
 public Class731(
     ProcessedGraphics processedGraphics,
     GraphicsConfig graphicsConfig,
     ProcessedGraphicElementBlock block,
     Matrix4D toWcsTransform)
 {
     this.processedGraphics_0            = processedGraphics;
     this.graphicsConfig_0               = graphicsConfig;
     this.processedGraphicElementBlock_0 = block;
     this.matrix4D_0 = toWcsTransform;
     this.matrix4D_1 = ProcessedGraphics.smethod_1(toWcsTransform);
 }
Exemple #2
0
            public void Visit(GraphicElement2 visitee)
            {
                GraphicElement1 graphicElement1_1 = (GraphicElement1)null;
                GraphicElement1 graphicElement1_2 = (GraphicElement1)null;

                ProcessedGraphics.Class733 class733_1;
                if (this.processedGraphics_0.dictionary_0.TryGetValue(visitee, out class733_1))
                {
                    graphicElement1_1 = class733_1.GraphicElementWithoutLineType;
                    graphicElement1_2 = class733_1.method_0(this.matrix4D_1);
                }
                if (ProcessedGraphics.smethod_0(visitee.LineType))
                {
                    if (graphicElement1_1 == null)
                    {
                        graphicElement1_1 = (GraphicElement1)visitee;
                        ProcessedGraphics.Class733 class733_2 = new ProcessedGraphics.Class733()
                        {
                            GraphicElementWithoutLineType = graphicElement1_1
                        };
                        this.processedGraphics_0.dictionary_0.Add(visitee, class733_2);
                    }
                }
                else
                {
                    if (graphicElement1_2 == null)
                    {
                        GraphicElement1 graphicElementWithoutLineType = (GraphicElement1)null;
                        if (graphicElement1_1 == null)
                        {
                            graphicElementWithoutLineType = new GraphicElement1(new WW.Cad.Drawing.Surface.Geometry(), visitee.Color);
                            if (visitee.Geometry.HasExtrusion)
                            {
                                graphicElementWithoutLineType.Geometry.Extrusion = visitee.Geometry.Extrusion;
                            }
                        }
                        graphicElement1_2 = new GraphicElement1(new WW.Cad.Drawing.Surface.Geometry(), visitee.Color);
                        if (visitee.Geometry.HasExtrusion)
                        {
                            graphicElement1_2.Geometry.Extrusion = visitee.Geometry.Extrusion;
                        }
                        ProcessedGraphics.Class731.Class732 class732 = new ProcessedGraphics.Class731.Class732(this.graphicsConfig_0, graphicElementWithoutLineType, graphicElement1_2, this.matrix4D_1, visitee.LineType, visitee.LineTypeScale, visitee.Plinegen);
                        foreach (IPrimitive primitive in (List <IPrimitive>)visitee.Geometry)
                        {
                            primitive.Accept((IPrimitiveVisitor)class732);
                        }
                        if (graphicElement1_1 == null)
                        {
                            graphicElement1_1 = graphicElementWithoutLineType;
                        }
                    }
                    if (class733_1 == null)
                    {
                        class733_1 = new ProcessedGraphics.Class733()
                        {
                            GraphicElementWithoutLineType = graphicElement1_1
                        };
                        this.processedGraphics_0.dictionary_0.Add(visitee, class733_1);
                    }
                    class733_1.GraphicElementsWithLineType.Add(new Pair <Matrix4D, GraphicElement1>(this.matrix4D_1, graphicElement1_2));
                }
                if (graphicElement1_1 != null && graphicElement1_1.Geometry.Count > 0)
                {
                    this.processedGraphicElementBlock_0.GraphicElements.Add(graphicElement1_1);
                }
                if (graphicElement1_2 == null || graphicElement1_2.Geometry.Count <= 0)
                {
                    return;
                }
                this.processedGraphicElementBlock_0.GraphicElements.Add(graphicElement1_2);
            }
Exemple #3
0
            public void Visit(GraphicElementInsert visitee)
            {
                ProcessedGraphicElementBlock second = (ProcessedGraphicElementBlock)null;
                Matrix4D matrix4D = ProcessedGraphics.smethod_1(visitee.InsertCells[0, 0].Transform);

                ProcessedGraphics.Class734 class734;
                if (this.processedGraphics_0.dictionary_2.TryGetValue(visitee.UnclippedBlock, out class734))
                {
                    second = class734.method_0(matrix4D);
                }
                bool flag;

                if (!(flag = second != null))
                {
                    second = new ProcessedGraphicElementBlock(visitee.UnclippedBlock.Transform);
                }
                if (class734 == null)
                {
                    class734 = new ProcessedGraphics.Class734();
                    this.processedGraphics_0.dictionary_2.Add(visitee.UnclippedBlock, class734);
                }
                class734.Blocks.Add(new Pair <Matrix4D, ProcessedGraphicElementBlock>(matrix4D, second));
                ProcessedGraphicElementInsert graphicElementInsert = new ProcessedGraphicElementInsert()
                {
                    UnclippedBlock = second
                };

                if (!flag)
                {
                    GraphicElementInsert.InsertCell insertCell = visitee.InsertCells[0, 0];
                    ProcessedGraphics.Class731      class731   = new ProcessedGraphics.Class731(this.processedGraphics_0, this.graphicsConfig_0, graphicElementInsert.UnclippedBlock, this.matrix4D_0 * insertCell.Transform);
                    foreach (IGraphicElement graphicElement in visitee.UnclippedBlock.GraphicElements)
                    {
                        graphicElement.Accept((IGraphicElementVisitor)class731);
                    }
                }
                int length1 = visitee.InsertCells.GetLength(0);
                int length2 = visitee.InsertCells.GetLength(1);

                graphicElementInsert.InsertCells = new ProcessedGraphicElementInsert.InsertCell[length1, length2];
                for (int index1 = 0; index1 < length1; ++index1)
                {
                    for (int index2 = 0; index2 < length2; ++index2)
                    {
                        GraphicElementInsert.InsertCell insertCell = visitee.InsertCells[index1, index2];
                        graphicElementInsert.InsertCells[index1, index2] = new ProcessedGraphicElementInsert.InsertCell(insertCell.Transform)
                        {
                            ClippedBlock = graphicElementInsert.UnclippedBlock
                        };
                    }
                }
                if (visitee.AttributeBlock != null)
                {
                    ProcessedGraphicElementBlock graphicElementBlock;
                    if (this.processedGraphics_0.dictionary_1.TryGetValue(visitee.AttributeBlock, out graphicElementBlock))
                    {
                        graphicElementInsert.AttributeBlock = graphicElementBlock;
                    }
                    else
                    {
                        graphicElementInsert.AttributeBlock = new ProcessedGraphicElementBlock(visitee.AttributeBlock.Transform);
                        foreach (IGraphicElement graphicElement in visitee.AttributeBlock.GraphicElements)
                        {
                            GraphicElement1 graphicElement1 = graphicElement as GraphicElement1;
                            if (graphicElement1 != null)
                            {
                                graphicElementInsert.AttributeBlock.GraphicElements.Add(graphicElement1);
                            }
                        }
                        this.processedGraphics_0.dictionary_1.Add(visitee.AttributeBlock, graphicElementBlock);
                    }
                    graphicElementInsert.AttributeBlockCells = visitee.AttributeBlockCells;
                }
                this.processedGraphicElementBlock_0.Inserts.Add(graphicElementInsert);
            }