Exemplo n.º 1
0
 protected virtual void VisitInsertBase(DxfInsertBase insert)
 {
     this.VisitInsertingEntity((DxfEntity)insert, insert.Block);
     foreach (DxfEntity attribute in (IEnumerable <DxfAttribute>)insert.Attributes)
     {
         attribute.Accept((IEntityVisitor)this);
     }
 }
Exemplo n.º 2
0
        private void Repair(DxfModelRepairer repairer, DxfInsertBase insert, List <DxfBlock> blockChain)
        {
            repairer.method_1((DxfHandledObject)this, "InsertionPoint", ref this.insertionPoint);
            repairer.method_6((DxfHandledObject)this, "ZAxis", ref this.vector3D_0);
            repairer.method_3((DxfHandledObject)this, "Rotation", ref this.rotation);
            repairer.method_5((DxfHandledObject)this, "ScaleFactor", ref this.scaleFactor);
            DxfBlock   block = insert.Block;
            List <int> intList;

            if (block == null || repairer.BlockToEntityRemovalIndices.TryGetValue(block, out intList))
            {
                return;
            }
            repairer.BlockToEntityRemovalIndices.Add(block, (List <int>)null);
            blockChain.Add(block);
            for (int index = 0; index < block.Entities.Count; ++index)
            {
                DxfInsertBase entity = block.Entities[index] as DxfInsertBase;
                if (entity != null)
                {
                    if (blockChain.Contains(entity.Block))
                    {
                        if (intList == null)
                        {
                            intList = new List <int>();
                        }
                        intList.Add(index);
                        repairer.Messages.Add(new DxfMessage(DxfStatus.RecursiveBlockInsertRemoved, Severity.Error)
                        {
                            Parameters =
                            {
                                {
                                    "Block",
                                    (object)block
                                },
                                {
                                    "BlockName",
                                    (object)block.Name
                                }
                            }
                        });
                    }
                    else
                    {
                        this.Repair(repairer, entity, blockChain);
                    }
                }
            }
            blockChain.RemoveAt(blockChain.Count - 1);
            if (intList == null)
            {
                return;
            }
            repairer.BlockToEntityRemovalIndices[block] = intList;
        }
Exemplo n.º 3
0
 private void CopyFrom(DxfInsertBase from, CloneContext cloneContext)
 {
     base.CopyFrom((DxfHandledObject)from, cloneContext);
     this.Block = Class906.smethod_0(cloneContext, from.Block, false);
     this.activeDxfHandledObjectCollection_0.Clear();
     foreach (DxfHandledObject dxfHandledObject in (DxfHandledObjectCollection <DxfAttribute>)from.activeDxfHandledObjectCollection_0)
     {
         this.activeDxfHandledObjectCollection_0.Add((DxfAttribute)dxfHandledObject.Clone(cloneContext));
     }
     this.insertionPoint = from.insertionPoint;
     this.scaleFactor    = from.scaleFactor;
     this.rotation       = from.rotation;
     this.vector3D_0     = from.vector3D_0;
     this.AttributesSeqEnd.CopyFrom((DxfHandledObject)from.AttributesSeqEnd, cloneContext);
 }