Exemple #1
0
 internal override void Repair(DxfModelRepairer repairer)
 {
     base.Repair(repairer);
     repairer.method_1((DxfHandledObject)this, "Center", ref this.point3D_0);
     repairer.method_3((DxfHandledObject)this, "Radius", ref this.double_1);
     repairer.method_6((DxfHandledObject)this, "ZAxis", ref this.vector3D_0);
     repairer.method_3((DxfHandledObject)this, "Thickness", ref this.double_2);
 }
Exemple #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;
        }