/// <summary> /// Handle a dimension entity. /// </summary> /// <remarks> /// Same as <see cref="HandleEntity"/>, but removes the associated block, too, if the dimension is removed. /// </remarks> /// <param name="dim">Dimension entity.</param> private void HandleDimension(DxfDimension dim) { if (HandleEntity(dim)) { // can remove block, too DxfBlock block = dim.Block; if (block != null) { model.Blocks.Remove(block); } } }
public static void DrawTopRFTLeftDims(DxfModel model, int nSpans, double[] comSpanVals) { //04.TopRFT Left Dims/*----------------*/ DxfLayer TopRFTDimLayerLt = new DxfLayer("DIMENSIONSTopRFTLt"); model.Layers.Add(TopRFTDimLayerLt); DxfBlock blockTopRFTDimLt = new DxfBlock("ALIGNED_DIMENSIONSTopRFTLt"); model.Blocks.Add(blockTopRFTDimLt); DxfInsert insertTopRFTDimLt = new DxfInsert(blockTopRFTDimLt, new Point3D(0, DXFPoints.startPointsTop[0].Y + 0.15, 0)); insertTopRFTDimLt.Layer = TopRFTDimLayerLt; model.Entities.Add(insertTopRFTDimLt); { DxfDimension.Aligned[] TopRFTDimArrLt = new DxfDimension.Aligned[nSpans + 1]; for (int i = 1; i < TopRFTDimArrLt.Length - 2; i++) { // Dimension with text aligned with dimension line. DxfDimension.Aligned dimension = new DxfDimension.Aligned(model.CurrentDimensionStyle); dimension.DimensionStyleOverrides.ArrowSize = 0.2d; dimension.DimensionStyleOverrides.TextInsideHorizontal = false; dimension.DimensionStyleOverrides.TextAboveDimensionLine = true; dimension.Layer = TopRFTDimLayerLt; dimension.DimensionLineLocation = new Point3D(0, 0, 0); dimension.ExtensionLine1StartPoint = new Point3D(DXFPoints.endPointsTop[i - 1].X - Math.Max(0.33 * DXFRebar.Ln[i - 1], 0.33 * DXFRebar.Ln[i]) - 0.25, 0, 0); dimension.ExtensionLine2StartPoint = new Point3D(DXFPoints.endPointsTop[i - 1].X, 0, 0); dimension.UseTextMiddlePoint = true; dimension.TextMiddlePoint = new Point3D(comSpanVals[0] + 0.50 * (DXFPoints.endPointsTop[i - 1].X - Math.Max(0.33 * DXFRebar.Ln[i - 1], 0.33 * DXFRebar.Ln[i]) - 0.25 + DXFPoints.endPointsTop[i - 1].X), 0.2d, 0d); blockTopRFTDimLt.Entities.Add(dimension); } //Case of Cantilever at end if (GeometryEditorVM.GeometryEditor.RestraintsCollection[RFTCanvas.SpanVals.Length].SelectedRestraint != Restraints.NoRestraints) { // Dimension with text aligned with dimension line. DxfDimension.Aligned dimension = new DxfDimension.Aligned(model.CurrentDimensionStyle); dimension.DimensionStyleOverrides.ArrowSize = 0.2d; dimension.DimensionStyleOverrides.TextInsideHorizontal = false; dimension.DimensionStyleOverrides.TextAboveDimensionLine = true; dimension.Layer = TopRFTDimLayerLt; dimension.DimensionLineLocation = new Point3D(0, 0, 0); dimension.ExtensionLine1StartPoint = new Point3D(DXFPoints.endPointsTop[TopRFTDimArrLt.Length - 1 - 1].X - Math.Max(0.33 * DXFRebar.Ln[TopRFTDimArrLt.Length - 1 - 1], 0.33 * DXFRebar.Ln[TopRFTDimArrLt.Length - 1]) - 0.25, 0, 0); dimension.ExtensionLine2StartPoint = new Point3D(DXFPoints.endPointsTop[TopRFTDimArrLt.Length - 1 - 1].X, 0, 0); dimension.UseTextMiddlePoint = true; dimension.TextMiddlePoint = new Point3D(comSpanVals[0] + 0.50 * (DXFPoints.endPointsTop[TopRFTDimArrLt.Length - 1 - 1].X - Math.Max(0.33 * DXFRebar.Ln[TopRFTDimArrLt.Length - 1 - 1], 0.33 * DXFRebar.Ln[TopRFTDimArrLt.Length - 1]) - 0.25 + DXFPoints.endPointsTop[TopRFTDimArrLt.Length - 1 - 1].X), 0.2d, 0d); blockTopRFTDimLt.Entities.Add(dimension); } } }
protected override void vmethod_1() { base.vmethod_1(); List <Class289> class289List1 = new List <Class289>(); foreach (string key in this.dictionary_4.Keys) { List <Class289> class289List2 = this.dictionary_4[key]; List <DxfBlock> dxfBlockList; if (this.dictionary_3.TryGetValue(key, out dxfBlockList)) { if (dxfBlockList.Count > 1) { for (int index = 0; index < dxfBlockList.Count; ++index) { DxfBlock dxfBlock = dxfBlockList[index]; if (dxfBlock.BlockBegin == null) { dxfBlock.BlockBegin = index >= class289List2.Count ? (DxfBlockBegin)class289List2[class289List2.Count - 1].HandledObject : (DxfBlockBegin)class289List2[index].HandledObject; } if (dxfBlock.BlockEnd == null) { dxfBlock.BlockEnd = index >= class289List2.Count ? class289List2[class289List2.Count - 1].BlockEnd : class289List2[index].BlockEnd; } } class289List1.AddRange((IEnumerable <Class289>)class289List2); } else if (dxfBlockList.Count == 1) { DxfBlock dxfBlock = dxfBlockList[0]; if (dxfBlock.BlockBegin == null) { dxfBlock.BlockBegin = (DxfBlockBegin)class289List2[class289List2.Count - 1].HandledObject; } if (dxfBlock.BlockEnd == null) { dxfBlock.BlockEnd = class289List2[class289List2.Count - 1].BlockEnd; } class289List1.Add(class289List2[class289List2.Count - 1]); } } else { class289List1.AddRange((IEnumerable <Class289>)class289List2); } } foreach (Class259 class259 in class289List1) { class259.ResolveReferences((Class374)this); } }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfBlockBegin handledObject = this.HandledObject as DxfBlockBegin; if (handledObject == null) { return; } DxfBlock block = handledObject.Block; bool flag = false; if (block == null) { block = new DxfBlock(this.Name); flag = true; } block.BlockBegin = handledObject; if (this.dxfBlockEnd_0 == null) { this.dxfBlockEnd_0 = new DxfBlockEnd(); } block.BlockEnd = this.dxfBlockEnd_0; if (this.nullable_3.HasValue) { block.Flags = this.nullable_3.Value; } if (this.dxfEntityCollection_0 != null) { block.method_10(this.dxfEntityCollection_0); } block.method_8(this.vector3D_0); if (this.string_3 != null) { block.Description = this.string_3; } if (this.string_4 != null) { block.ExternalReference = this.string_4; } block.BlockEnd = this.dxfBlockEnd_0; if (this.nullable_4.HasValue) { block.IsExternalReferenceUnloaded = this.nullable_4.Value; } if (!flag) { return; } modelBuilder.Model.method_38(block, (IList <DxfMessage>)modelBuilder.Messages, true); }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); if (this.DynamicBlockHandle == 0UL) { return; } DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.DynamicBlockHandle); if (dxfBlock == null) { throw new Exception("Cannot resolve handle."); } this.BlockRepresentationData.DynamicBlock = dxfBlock; }
protected override void vmethod_0() { DxfBlock dxfBlock = DxfBlock.smethod_2(this.Model, !this.Model.Header.Handling, false); if (dxfBlock == null) { return; } dxfBlock.method_10(this.Model.Entities); if (dxfBlock.Layout == null) { return; } dxfBlock.Layout.method_9(this.Model.Entities, false); }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfBlockBegin handledObject = this.HandledObject as DxfBlockBegin; if (handledObject == null) { return; } DxfBlock block = handledObject.Block; if (block == null || this.string_2 == null) { return; } block.method_9(this.string_2); }
private void method_3(Class374 modelBuilder, DxfBlock block, DxfEntity entity) { DxfViewport dxfViewport = entity as DxfViewport; if (dxfViewport != null) { this.list_2.Add(dxfViewport); } else { if (!modelBuilder.LoadUnknownObjects && entity is DxfUnknownEntity) { return; } block.Entities.Add(entity); } }
internal static DxfBlock smethod_0( CloneContext cloneContext, DxfBlock from, bool ownsBlock) { if (from == null) { return((DxfBlock)null); } if (!ownsBlock && cloneContext.SourceModel == cloneContext.TargetModel) { return(from); } DxfBlock dxfBlock = (DxfBlock)cloneContext.GetExistingClone((IGraphCloneable)from); string str = from.Name; if (dxfBlock == null && !from.IsReallyAnonymous) { cloneContext.TargetModel.Blocks.TryGetValue(str, out dxfBlock); if (dxfBlock != null && cloneContext.RenameClashingBlocks && cloneContext.SourceModel != cloneContext.TargetModel) { str = Class906.smethod_1 <DxfBlock>((KeyedDxfHandledObjectCollection <string, DxfBlock>)cloneContext.TargetModel.Blocks, str, cloneContext.TargetModel.Header.Dxf13OrHigher); dxfBlock = (DxfBlock)null; } } if (dxfBlock == null) { switch (cloneContext.ReferenceResolutionType) { case ReferenceResolutionType.CloneMissing: DxfBlock block = (DxfBlock)from.Clone(cloneContext); block.Name = str; if (!cloneContext.CloneExact) { cloneContext.TargetModel.method_38(block, (IList <DxfMessage>)null, false); } dxfBlock = block; break; case ReferenceResolutionType.FailOnMissing: throw new DxfException(string.Format("Could not resolve reference to block with name {0}", (object)str)); } } return(dxfBlock); }
private void method_1(DxfDimension dimension) { this.class599_0.method_0(dimension.EntityType, 1U); if ((this.handlingFlags_0 & EntityCounter.HandlingFlags.IncludeDimensionBlocks) == (EntityCounter.HandlingFlags) 0) { return; } DxfBlock block = dimension.Block; if (block == null) { return; } foreach (DxfEntity entity in (DxfHandledObjectCollection <DxfEntity>)block.Entities) { entity.Accept((IEntityVisitor)this); } }
public void Visit(DxfTable table) { this.method_0((DxfEntity)table); if ((this.handlingFlags_0 & EntityCounter.HandlingFlags.IncludeTableBlocks) == (EntityCounter.HandlingFlags) 0) { return; } DxfBlock block = table.Block; if (block == null) { return; } foreach (DxfEntity entity in (DxfHandledObjectCollection <DxfEntity>)block.Entities) { entity.Accept((IEntityVisitor)this); } }
public void Draw(DxfBlock block, bool applyBlockBaseTransformation) { if (this.bool_0) { GraphicElementBlock2 graphicElementBlock; if (this.graphics_0.GetGraphicElementBlock2(block, this.surface_1.Layer, this.surface_1.ByBlockColor, this.surface_1.ByBlockLineType, out graphicElementBlock)) { this.graphicElementInsert_0.UnclippedBlock = graphicElementBlock; block.DrawInternal((DxfInsert.Interface46) this, applyBlockBaseTransformation); } else { this.graphicElementInsert_0.UnclippedBlock = graphicElementBlock; } graphicElementBlock.Transform = block.BaseTransformation; } this.insertCell_0.ClippedBlock = this.graphicElementInsert_0.UnclippedBlock; }
public void InsertWithNonMatchingNameReturnsNoEntities() { // similar to the above test except that the entity is added to the block _after_ the name binding var block = new DxfBlock(); block.Name = "some-block"; var insert = new DxfInsert(); insert.Name = "some-other-block"; var file = new DxfFile(); file.Blocks.Add(block); file.Entities.Add(insert); // no entities because the block names differ Assert.Null(insert.Entities); }
internal void method_0( DxfTableContent tableContent, double width, double height, double rotation, double horizontalMargin, double verticalMargin) { DxfBlock valueObject = this.ValueObject as DxfBlock; if (valueObject == null) { this.dxfContentFormat_0.method_6(1.0); } else { DxfInsert dxfInsert = new DxfInsert(valueObject); foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>) this.dxfTableAttributeCollection_0) { if (dxfTableAttribute.AttributeDefinition != null) { DxfAttribute dxfAttribute1 = new DxfAttribute(dxfTableAttribute.AttributeDefinition); dxfAttribute1.Text = dxfTableAttribute.Value; DxfAttribute dxfAttribute2 = dxfAttribute1; dxfAttribute2.AlignmentPoint1 = dxfAttribute2.AlignmentPoint1 - valueObject.BasePoint; if (dxfAttribute1.AlignmentPoint2.HasValue) { DxfAttribute dxfAttribute3 = dxfAttribute1; WW.Math.Point3D? alignmentPoint2 = dxfAttribute3.AlignmentPoint2; WW.Math.Vector3D basePoint = valueObject.BasePoint; dxfAttribute3.AlignmentPoint2 = alignmentPoint2.HasValue ? new WW.Math.Point3D?(alignmentPoint2.GetValueOrDefault() - basePoint) : new WW.Math.Point3D?(); } } } BoundsCalculator boundsCalculator = new BoundsCalculator(); boundsCalculator.GetBounds(tableContent.Model, (DxfEntity)dxfInsert); Bounds3D bounds = boundsCalculator.Bounds; Matrix4D transform = Transformation4D.Translation(valueObject.BasePoint) * Transformation4D.RotateZ(rotation) * Transformation4D.Translation(-valueObject.BasePoint); bounds.Transform(transform); Vector2D vector2D = new Vector2D((width - 2.0 * horizontalMargin) / bounds.Delta.X, (height - 2.0 * verticalMargin) / bounds.Delta.Y); this.dxfContentFormat_0.BlockScale = System.Math.Min(vector2D.X, vector2D.Y); } }
public void Visit(DxfInsert insert) { if (!this.method_0((DxfEntity)insert)) { return; } this.class599_0.method_0("ATTRIB", (uint)insert.Attributes.Count); if ((this.handlingFlags_0 & EntityCounter.HandlingFlags.FollowInserts) == (EntityCounter.HandlingFlags) 0) { return; } DxfBlock block = insert.Block; if (block == null) { return; } int multiplicator = (int)insert.ColumnCount * (int)insert.RowCount; EntityCounter.Class599 class5990_1; if (!this.idictionary_0.TryGetValue(block, out class5990_1)) { EntityCounter.Class599 class5990_2 = this.class599_0; EntityCounter.SpaceFlags spaceFlags0 = this.spaceFlags_0; try { this.class599_0 = new EntityCounter.Class599(); this.spaceFlags_0 = EntityCounter.SpaceFlags.AllSpaces; foreach (DxfEntity entity in (DxfHandledObjectCollection <DxfEntity>)block.Entities) { entity.Accept((IEntityVisitor)this); } } finally { class5990_1 = this.class599_0; this.class599_0 = class5990_2; this.spaceFlags_0 = spaceFlags0; this.idictionary_0[block] = class5990_1; } } this.class599_0.method_1(class5990_1, multiplicator); }
private void method_3(Class374 modelBuilder, DxfPolyfaceMesh mesh, int vertexIndex) { DxfBlock objectSoftReference = mesh.OwnerObjectSoftReference as DxfBlock; if (objectSoftReference != null) { ((Class318)modelBuilder.method_5(objectSoftReference.Handle)).method_1((DxfEntity)mesh); } this.IsValid = false; modelBuilder.Messages.Add(new DxfMessage(DxfStatus.InvalidMeshFaceVertexIndex, Severity.Error, "target", (object)mesh) { Parameters = { { "VertexIndex", (object)vertexIndex } } }); }
public void method_2() { if (this.hashSet_0 == null) { return; } DxfBlock handledObject = (DxfBlock)this.HandledObject; DxfEntityCollection entities = handledObject.Entities; DxfEntity[] array = entities.ToArray(); handledObject.Deactivate(); entities.Clear(); foreach (DxfEntity dxfEntity in array) { if (!this.hashSet_0.Contains(dxfEntity)) { entities.Add(dxfEntity); } } handledObject.method_11(); }
public void Test1() { DxfModel model = new DxfModel(DxfVersion.Dxf14); // Create block. DxfBlock block = new DxfBlock("TEST_BLOCK"); model.Blocks.Add(block); block.Entities.Add(new DxfCircle(EntityColors.Blue, Point3D.Zero, 2d)); block.Entities.Add(new DxfLine(EntityColors.Red, Point3D.Zero, new Point3D(-1, 2, 1))); block.Entities.Add(new DxfLine(EntityColors.Green, Point3D.Zero, new Point3D(2, 0, 1))); // Insert block at 3 positions. model.Entities.Add(new DxfInsert(block, new Point3D(1, 0, 0))); model.Entities.Add(new DxfInsert(block, new Point3D(3, 1, 0))); model.Entities.Add(new DxfInsert(block, new Point3D(2, -3, 0))); DxfInsert dxfInsert = new DxfInsert(); dxfInsert.InsertionPoint = new Point3D(10,10,0); model.Entities.Add(dxfInsert); DxfWriter.Write("DxfWriteInsertTest.dxf", model, false); }
public bool GetGraphicElementBlock2( DxfBlock block, DxfLayer layer, EntityColor byBlockColor, DxfLineType byBlockLineType, out GraphicElementBlock2 graphicElementBlock) { Graphics.BlockInfo blockInfo; bool flag; if (this.dictionary_1.TryGetValue(block, out blockInfo)) { graphicElementBlock = blockInfo.GetGraphicElementBlock(layer, byBlockColor, byBlockLineType); if (graphicElementBlock == null) { flag = true; graphicElementBlock = new GraphicElementBlock2(block.BaseTransformation, layer, byBlockColor, byBlockLineType); blockInfo.GraphicElementBlocks.Add(graphicElementBlock); } else { flag = false; } } else { graphicElementBlock = new GraphicElementBlock2(block.BaseTransformation, layer, byBlockColor, byBlockLineType); this.dictionary_1.Add(block, new Graphics.BlockInfo() { GraphicElementBlocks = { graphicElementBlock } }); flag = true; } return(flag); }
/// <summary> /// Get the block with an insertion with a layer different from the keep layer. /// </summary> /// <param name="insertLayer">The insert layer.</param> /// <returns>The block.</returns> private DxfBlock WithDifferentLayer(DxfLayer insertLayer) { if (blockWithDifferentLayerInsert == null) { // CloneContext cc = new CloneContext(visitor.model, ReferenceResolutionType.CloneMissing); CloneContext cc = new CloneContext(visitor.model, visitor.model, ReferenceResolutionType.CloneMissing); blockWithDifferentLayerInsert = (DxfBlock)original.Clone(cc); cc.ResolveReferences(); if (blockWithKeepLayerInsert != null) { // need different name for block blockWithDifferentLayerInsert.Name += "-DIFF"; } if (!visitor.HandleEntityCollection(blockWithDifferentLayerInsert.Entities, insertLayer)) { // no layer 0 entitites, so no need to have diffent blocks blockWithKeepLayerInsert = blockWithDifferentLayerInsert; } } return(blockWithDifferentLayerInsert); }
protected virtual void CopyFrom(DrawContext from) { this.dxfModel_0 = from.dxfModel_0; this.dxfLayout_0 = from.dxfLayout_0; this.graphicsConfig_0 = from.graphicsConfig_0; this.dxfLayer_0 = from.dxfLayer_0; this.dxfLayer_1 = from.dxfLayer_1; this.dxfEntity_0 = from.dxfEntity_0; this.dxfBlock_0 = from.dxfBlock_0; this.drawContext_0 = from.drawContext_0; this.dxfEntity_1 = from.dxfEntity_1; this.entityColor_0 = from.entityColor_0; this.dxfColor_0 = from.dxfColor_0; this.transparency_0 = from.transparency_0; this.dxfLineType_0 = from.dxfLineType_0; this.short_0 = from.short_0; this.int_0 = from.int_0; this.int_1 = from.int_1; this.dxfWipeoutVariables_0 = from.dxfWipeoutVariables_0; this.dictionary_0 = from.dictionary_0; this.double_0 = from.double_0; this.double_1 = from.double_1; }
protected void DrawWave(DataTable dt, DxfModel model, DxfBlock block) { for (int i = 1; i < dt.Rows.Count; i++) { //高度换算比例尺 ScaleConversion dac = new ScaleConversion(); double spY = dac.getPaintNumber(double.Parse(dt.Rows[i - 1][0].ToString()), 500); //起始点x 深度 double spX = double.Parse(dt.Rows[i - 1][1].ToString()) / 1000; //起始点y 波速 double epY = dac.getPaintNumber(double.Parse(dt.Rows[i][0].ToString()), 500); //结束点x double epX = double.Parse(dt.Rows[i][1].ToString()) / 1000; //结束点y DxfLineType drillCodeLineType = new DxfLineType("TestLine1" + i); model.LineTypes.Add(drillCodeLineType); DxfLine drillCodeine = new DxfLine(); drillCodeine.Start = new Point3D(134 + spX * 5, -23 - spY, 0d); drillCodeine.End = new Point3D(134 + epX * 5, -23 - epY, 0d); //drillCodeine.Color = EntityColors.Gray; drillCodeine.LineType = drillCodeLineType; block.Entities.Add(drillCodeine); } }
internal Bounds3D method_1(DxfTable table) { DxfBlock valueObject = this.ValueObject as DxfBlock; if (valueObject == null) { return((Bounds3D)null); } DxfInsert dxfInsert = new DxfInsert(valueObject); foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>) this.dxfTableAttributeCollection_0) { if (dxfTableAttribute.AttributeDefinition != null) { DxfAttribute dxfAttribute1 = new DxfAttribute(dxfTableAttribute.AttributeDefinition); dxfAttribute1.Text = dxfTableAttribute.Value; DxfAttribute dxfAttribute2 = dxfAttribute1; dxfAttribute2.AlignmentPoint1 = dxfAttribute2.AlignmentPoint1 - valueObject.BasePoint; if (dxfAttribute1.AlignmentPoint2.HasValue) { DxfAttribute dxfAttribute3 = dxfAttribute1; WW.Math.Point3D? alignmentPoint2 = dxfAttribute3.AlignmentPoint2; WW.Math.Vector3D basePoint = valueObject.BasePoint; dxfAttribute3.AlignmentPoint2 = alignmentPoint2.HasValue ? new WW.Math.Point3D?(alignmentPoint2.GetValueOrDefault() - basePoint) : new WW.Math.Point3D?(); } } } BoundsCalculator boundsCalculator = new BoundsCalculator(); boundsCalculator.GetBounds(table.Content.Model, (DxfEntity)dxfInsert); Bounds3D bounds = boundsCalculator.Bounds; Matrix4D transform = Transformation4D.Translation(valueObject.BasePoint) * Transformation4D.RotateZ(this.dxfContentFormat_0.Rotation) * Transformation4D.Translation(-valueObject.BasePoint); bounds.Transform(transform); return(bounds); }
internal static DxfLayout smethod_4( DxfModel model, DxfBlock paperSpaceBlockRecord, bool useFixedHandles) { if (paperSpaceBlockRecord.Layout != null) { return(paperSpaceBlockRecord.Layout); } DxfLayout dxfLayout = new DxfLayout(paperSpaceBlockRecord); if (useFixedHandles) { dxfLayout.SetHandle(38UL); } dxfLayout.Name = "Layout2"; dxfLayout.StandardScaleType = (short)16; dxfLayout.Options = LayoutOptions.PaperSpaceLinetypeScaling; dxfLayout.TabOrder = 2; dxfLayout.Limits = new Rectangle2D(0.0, 0.0, 12.0, 9.0); paperSpaceBlockRecord.Layout = dxfLayout; model.Layouts.Add(dxfLayout); return(dxfLayout); }
public static void DrawLnetDims(DxfModel model, int nSpans, double[] comSpanVals) { //02. Ln Dims/*----------------*/ DxfLayer lnspanLayer = new DxfLayer("DIMENSIONSLn"); model.Layers.Add(lnspanLayer); DxfBlock blockLnSpan = new DxfBlock("ALIGNED_DIMENSIONSLn"); model.Blocks.Add(blockLnSpan); DxfInsert insertLn = new DxfInsert(blockLnSpan, new Point3D(0, -0.5, 0)); insertLn.Layer = lnspanLayer; model.Entities.Add(insertLn); { DxfDimension.Aligned[] LnDimArr = new DxfDimension.Aligned[nSpans]; for (int i = 0; i < LnDimArr.Length; i++) { // Dimension with text aligned with dimension line. DxfDimension.Aligned dimension = new DxfDimension.Aligned(model.CurrentDimensionStyle); dimension.DimensionStyleOverrides.ArrowSize = 0.2d; dimension.DimensionStyleOverrides.TextInsideHorizontal = false; dimension.DimensionStyleOverrides.TextAboveDimensionLine = true; dimension.Layer = lnspanLayer; dimension.DimensionLineLocation = new Point3D(0, 0, 0); dimension.ExtensionLine1StartPoint = new Point3D(DXFPoints.startPointsBot[i].X, 0, 0); dimension.ExtensionLine2StartPoint = new Point3D(DXFPoints.endPointsBot[i].X, 0, 0); dimension.UseTextMiddlePoint = true; dimension.TextMiddlePoint = new Point3D(comSpanVals[0] + 0.50 * (comSpanVals[i] + comSpanVals[i + 1]), 0.2d, 0d); blockLnSpan.Entities.Add(dimension); } } }
public static void DrawTopRFTRightDims(DxfModel model, int nSpans, double[] comSpanVals) { //03. TopRFT Right Dims/*----------------*/ DxfLayer TopRFTDimLayerRt = new DxfLayer("DIMENSIONSTopRFTRt"); model.Layers.Add(TopRFTDimLayerRt); DxfBlock blockTopRFTDimRt = new DxfBlock("ALIGNED_DIMENSIONSTopRFTRt"); model.Blocks.Add(blockTopRFTDimRt); DxfInsert insertTopRFTDimRt = new DxfInsert(blockTopRFTDimRt, new Point3D(0, DXFPoints.startPointsTop[0].Y + 0.15, 0)); insertTopRFTDimRt.Layer = TopRFTDimLayerRt; model.Entities.Add(insertTopRFTDimRt); { DxfDimension.Aligned[] TopRFTDimArrRt = new DxfDimension.Aligned[nSpans + 1]; for (int i = 1; i < TopRFTDimArrRt.Length - 1; i++) { // Dimension with text aligned with dimension line. DxfDimension.Aligned dimension = new DxfDimension.Aligned(model.CurrentDimensionStyle); dimension.DimensionStyleOverrides.ArrowSize = 0.2d; dimension.DimensionStyleOverrides.TextInsideHorizontal = false; dimension.DimensionStyleOverrides.TextAboveDimensionLine = true; dimension.Layer = TopRFTDimLayerRt; dimension.DimensionLineLocation = new Point3D(0, 0, 0); dimension.ExtensionLine1StartPoint = new Point3D(DXFPoints.startPointsTop[i].X, 0, 0); dimension.ExtensionLine2StartPoint = new Point3D(DXFPoints.startPointsTop[i].X + Math.Max(0.33 * DXFRebar.Ln[i - 1], 0.33 * DXFRebar.Ln[i]) + 0.25, 0, 0); dimension.UseTextMiddlePoint = true; dimension.TextMiddlePoint = new Point3D(comSpanVals[0] + 0.50 * (DXFPoints.startPointsTop[i].X + DXFPoints.startPointsTop[i].X + Math.Max(0.33 * DXFRebar.Ln[i - 1], 0.33 * DXFRebar.Ln[i]) + 0.25), 0.2d, 0d); blockTopRFTDimRt.Entities.Add(dimension); } } }
public static void DrawTopRFTLeftDims(DxfModel model, int nSpans, double thickness, double[] Ln, Point2D[] endPointsTop, double[] comSpanVals) { //04.TopRFT Left Dims/*----------------*/ DxfLayer TopRFTDimLayerLt = new DxfLayer("DIMENSIONSTopRFTLt"); model.Layers.Add(TopRFTDimLayerLt); DxfBlock blockTopRFTDimLt = new DxfBlock("ALIGNED_DIMENSIONSTopRFTLt"); model.Blocks.Add(blockTopRFTDimLt); DxfInsert insertTopRFTDimLt = new DxfInsert(blockTopRFTDimLt, new Point3D(0, thickness + 0.15, 0)); insertTopRFTDimLt.Layer = TopRFTDimLayerLt; model.Entities.Add(insertTopRFTDimLt); { DxfDimension.Aligned[] TopRFTDimArrLt = new DxfDimension.Aligned[nSpans + 1]; for (int i = 1; i < TopRFTDimArrLt.Length - 1; i++) { // Dimension with text aligned with dimension line. DxfDimension.Aligned dimension = new DxfDimension.Aligned(model.CurrentDimensionStyle); dimension.DimensionStyleOverrides.ArrowSize = 0.2d; dimension.DimensionStyleOverrides.TextInsideHorizontal = false; dimension.DimensionStyleOverrides.TextAboveDimensionLine = true; dimension.Layer = TopRFTDimLayerLt; dimension.DimensionLineLocation = new Point3D(0, 0, 0); dimension.ExtensionLine1StartPoint = new Point3D(endPointsTop[i - 1].X - Math.Max(0.33 * Ln[i - 1], 0.33 * Ln[i]) - 0.25, 0, 0); dimension.ExtensionLine2StartPoint = new Point3D(endPointsTop[i - 1].X, 0, 0); dimension.UseTextMiddlePoint = true; dimension.TextMiddlePoint = new Point3D(comSpanVals[0] + 0.50 * (endPointsTop[i - 1].X - Math.Max(0.33 * Ln[i - 1], 0.33 * Ln[i]) - 0.25 + endPointsTop[i - 1].X), 0.2d, 0d); blockTopRFTDimLt.Entities.Add(dimension); } } }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfDimensionStyle handledObject = (DxfDimensionStyle)this.HandledObject; if (this.ulong_2 != 0UL) { DxfTextStyle dxfTextStyle = modelBuilder.method_4 <DxfTextStyle>(this.ulong_2); if (dxfTextStyle != null) { handledObject.TextStyle = dxfTextStyle; } } else if (!string.IsNullOrEmpty(this.string_0)) { DxfTextStyle textStyleWithName = modelBuilder.Model.GetTextStyleWithName(this.string_0); if (textStyleWithName != null) { handledObject.TextStyle = textStyleWithName; } } if (this.ulong_3 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_3); handledObject.LeaderArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_1)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_1); handledObject.LeaderArrowBlock = blockWithName; } if (this.ulong_4 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_4); handledObject.ArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_2)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_2); handledObject.ArrowBlock = blockWithName; } if (this.ulong_5 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_5); handledObject.FirstArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_3)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_3); handledObject.FirstArrowBlock = blockWithName; } if (this.ulong_6 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_4 <DxfBlock>(this.ulong_6); handledObject.SecondArrowBlock = dxfBlock; } else if (!string.IsNullOrEmpty(this.string_4)) { DxfBlock blockWithName = modelBuilder.Model.GetBlockWithName(this.string_4); handledObject.SecondArrowBlock = blockWithName; } if (this.ulong_7 != 0UL) { handledObject.DimensionLineLineType = modelBuilder.method_4 <DxfLineType>(this.ulong_7); } else if (!string.IsNullOrEmpty(this.string_5)) { handledObject.DimensionLineLineType = modelBuilder.Model.GetLineTypeWithName(this.string_5); } if (this.ulong_8 != 0UL) { handledObject.FirstExtensionLineLineType = modelBuilder.method_4 <DxfLineType>(this.ulong_8); } else if (!string.IsNullOrEmpty(this.string_6)) { handledObject.FirstExtensionLineLineType = modelBuilder.Model.GetLineTypeWithName(this.string_6); } if (this.ulong_9 != 0UL) { handledObject.SecondExtensionLineLineType = modelBuilder.method_4 <DxfLineType>(this.ulong_9); } else { if (string.IsNullOrEmpty(this.string_7)) { return; } handledObject.SecondExtensionLineLineType = modelBuilder.Model.GetLineTypeWithName(this.string_7); } }
public static void smethod_0( DxfDimensionStyleOverrides dimensionStyle, DxfExtendedData extendedData, Class374 modelBuilder) { DxfExtendedData.ValueCollection valueCollection = (DxfExtendedData.ValueCollection)null; for (int index1 = 0; index1 < extendedData.Values.Count; ++index1) { DxfExtendedData.String @string = extendedData.Values[index1] as DxfExtendedData.String; if (@string != null && @string.Value == "DSTYLE") { int index2 = index1 + 1; if (index2 < extendedData.Values.Count) { valueCollection = extendedData.Values[index2] as DxfExtendedData.ValueCollection; break; } break; } } if (valueCollection == null) { return; } for (int index1 = 0; index1 < valueCollection.Count; index1 += 2) { DxfExtendedData.Int16 int16 = valueCollection[index1] as DxfExtendedData.Int16; if (int16 != null) { short num = int16.Value; int index2 = index1 + 1; if (index2 < valueCollection.Count) { IExtendedDataValue extendedDataValue = valueCollection[index2]; switch (num) { case 3: dimensionStyle.PostFix = ((DxfExtendedData.String)extendedDataValue).Value; continue; case 4: dimensionStyle.AlternateDimensioningSuffix = ((DxfExtendedData.String)extendedDataValue).Value; continue; case 5: string blockName1 = ((DxfExtendedData.String)extendedDataValue).Value; if (!string.IsNullOrEmpty(blockName1)) { dimensionStyle.ArrowBlock = Class309.smethod_1(modelBuilder, blockName1); continue; } continue; case 6: string blockName2 = ((DxfExtendedData.String)extendedDataValue).Value; if (!string.IsNullOrEmpty(blockName2)) { dimensionStyle.FirstArrowBlock = Class309.smethod_1(modelBuilder, blockName2); continue; } continue; case 7: string blockName3 = ((DxfExtendedData.String)extendedDataValue).Value; if (!string.IsNullOrEmpty(blockName3)) { dimensionStyle.SecondArrowBlock = Class309.smethod_1(modelBuilder, blockName3); continue; } continue; case 40: dimensionStyle.ScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 41: dimensionStyle.ArrowSize = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 42: dimensionStyle.ExtensionLineOffset = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 43: dimensionStyle.DimensionLineIncrement = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 44: dimensionStyle.ExtensionLineExtension = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 45: dimensionStyle.Rounding = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 46: dimensionStyle.DimensionLineExtension = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 47: dimensionStyle.PlusTolerance = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 48: dimensionStyle.MinusTolerance = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 49: dimensionStyle.FixedExtensionLineLength = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 50: dimensionStyle.JoggedRadiusDimensionTransverseSegmentAngle = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 69: dimensionStyle.TextBackgroundFillMode = (DimensionTextBackgroundFillMode)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 70: dimensionStyle.TextBackgroundColor = Color.CreateFromColorIndex(((DxfExtendedData.Int16)extendedDataValue).Value); continue; case 71: dimensionStyle.GenerateTolerances = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 72: dimensionStyle.LimitsGeneration = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 73: dimensionStyle.TextInsideHorizontal = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 74: dimensionStyle.TextOutsideHorizontal = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 75: dimensionStyle.SuppressFirstExtensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 76: dimensionStyle.SuppressSecondExtensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 77: dimensionStyle.TextVerticalAlignment = (DimensionTextVerticalAlignment)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 78: dimensionStyle.ZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 79: dimensionStyle.AngularZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 90: dimensionStyle.ArcLengthSymbolPosition = (ArcLengthSymbolPosition)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 140: dimensionStyle.TextHeight = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 141: dimensionStyle.CenterMarkSize = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 142: dimensionStyle.TickSize = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 143: dimensionStyle.AlternateUnitScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 144: dimensionStyle.LinearScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 145: dimensionStyle.TextVerticalPosition = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 146: dimensionStyle.ToleranceScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 147: dimensionStyle.DimensionLineGap = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 148: dimensionStyle.AlternateUnitRounding = ((DxfExtendedData.Double)extendedDataValue).Value; continue; case 170: dimensionStyle.AlternateUnitDimensioning = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 171: dimensionStyle.AlternateUnitDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 172: dimensionStyle.TextOutsideExtensions = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 173: dimensionStyle.SeparateArrowBlocks = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 174: dimensionStyle.TextInsideExtensions = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 175: dimensionStyle.SuppressOutsideExtensions = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 176: short colorIndex1 = ((DxfExtendedData.Int16)extendedDataValue).Value; dimensionStyle.DimensionLineColor = Color.CreateFromColorIndex(colorIndex1); continue; case 177: short colorIndex2 = ((DxfExtendedData.Int16)extendedDataValue).Value; dimensionStyle.ExtensionLineColor = Color.CreateFromColorIndex(colorIndex2); continue; case 178: short colorIndex3 = ((DxfExtendedData.Int16)extendedDataValue).Value; dimensionStyle.TextColor = Color.CreateFromColorIndex(colorIndex3); continue; case 179: dimensionStyle.AngularDimensionDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 271: dimensionStyle.DecimalPlaces = Convert.ToInt16(extendedDataValue.ValueObject); continue; case 272: dimensionStyle.ToleranceDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 273: dimensionStyle.AlternateUnitFormat = (AlternateUnitFormat)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 274: dimensionStyle.AlternateUnitToleranceDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 275: dimensionStyle.AngularUnit = (AngularUnit)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 276: dimensionStyle.FractionFormat = (FractionFormat)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 277: dimensionStyle.LinearUnitFormat = (LinearUnitFormat)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 278: dimensionStyle.DecimalSeparator = (char)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 279: dimensionStyle.TextMovement = (TextMovement)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 280: dimensionStyle.TextHorizontalAlignment = (DimensionTextHorizontalAlignment)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 281: dimensionStyle.SuppressFirstDimensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 282: dimensionStyle.SuppressSecondDimensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1; continue; case 283: dimensionStyle.ToleranceAlignment = (ToleranceAlignment)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 284: dimensionStyle.ToleranceZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 285: dimensionStyle.AlternateUnitZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 286: dimensionStyle.AlternateUnitToleranceZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 288: dimensionStyle.CursorUpdate = (CursorUpdate)((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 290: dimensionStyle.IsExtensionLineLengthFixed = ((DxfExtendedData.Int16)extendedDataValue).Value != (short)0; continue; case 340: DxfTextStyle dxfTextStyle = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfTextStyle; if (dxfTextStyle != null) { dimensionStyle.TextStyle = dxfTextStyle; continue; } continue; case 341: DxfBlock dxfBlock1 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock; if (dxfBlock1 != null) { dimensionStyle.LeaderArrowBlock = dxfBlock1; continue; } continue; case 342: DxfBlock dxfBlock2 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock; if (dxfBlock2 != null) { dimensionStyle.ArrowBlock = dxfBlock2; continue; } continue; case 343: DxfBlock dxfBlock3 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock; if (dxfBlock3 != null) { dimensionStyle.FirstArrowBlock = dxfBlock3; continue; } continue; case 344: DxfBlock dxfBlock4 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock; if (dxfBlock4 != null) { dimensionStyle.SecondArrowBlock = dxfBlock4; continue; } continue; case 345: DxfLineType dxfLineType1 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfLineType; if (dxfLineType1 != null) { dimensionStyle.DimensionLineLineType = dxfLineType1; continue; } continue; case 346: DxfLineType dxfLineType2 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfLineType; if (dxfLineType2 != null) { dimensionStyle.FirstExtensionLineLineType = dxfLineType2; continue; } continue; case 347: DxfLineType dxfLineType3 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfLineType; if (dxfLineType3 != null) { dimensionStyle.SecondExtensionLineLineType = dxfLineType3; continue; } continue; case 371: dimensionStyle.DimensionLineWeight = ((DxfExtendedData.Int16)extendedDataValue).Value; continue; case 372: dimensionStyle.ExtensionLineWeight = ((DxfExtendedData.Int16)extendedDataValue).Value; continue; default: continue; } } } else { modelBuilder.Messages.Add(new DxfMessage(DxfStatus.InvalidXDataValueType, Severity.Warning, "ValueType", (object)valueCollection[index1].GetType()) { Parameters = { { "ExpectedValueType", (object)typeof(DxfExtendedData.Int16) }, { "Target", (object)dimensionStyle } } }); break; } } }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfInsertBase handledObject = (DxfInsertBase)this.HandledObject; if (this.ulong_6 != 0UL) { DxfBlock dxfBlock = modelBuilder.method_3(this.ulong_6) as DxfBlock; if (dxfBlock != null) { handledObject.Block = dxfBlock; } else { modelBuilder.Messages.Add(new DxfMessage(DxfStatus.UnresolvedReference, Severity.Warning) { Parameters = { { "Type", (object)"BLOCK_RECORD" }, { "Handle", (object)this.ulong_6 }, { "Insert", (object)handledObject }, { "InsertHandle", (object)handledObject.Handle } } }); } } else if (!string.IsNullOrEmpty(this.string_2)) { handledObject.Block = modelBuilder.Model.GetBlockWithName(this.string_2); if (handledObject.Block == null) { modelBuilder.Messages.Add(new DxfMessage(DxfStatus.UnresolvedReference, Severity.Warning) { Parameters = { { "Type", (object)"BLOCK_RECORD" }, { "Name", (object)this.string_2 }, { "Insert", (object)handledObject }, { "InsertHandle", (object)handledObject.Handle } } }); } } if (this.ulong_7 != 0UL) { for (Class285 entityBuilder = modelBuilder.method_6(this.ulong_7); entityBuilder != null; entityBuilder = modelBuilder.method_7(entityBuilder)) { handledObject.Attributes.Add((DxfAttribute)entityBuilder.Entity); if ((long)entityBuilder.HandledObject.Handle == (long)this.ulong_8) { break; } } } else if (this.list_1 != null) { foreach (ulong handle in this.list_1) { DxfAttribute dxfAttribute = modelBuilder.method_4 <DxfAttribute>(handle); if (dxfAttribute != null) { handledObject.Attributes.Add(dxfAttribute); } } } if (this.ulong_9 == 0UL) { return; } DxfSequenceEnd dxfSequenceEnd = modelBuilder.method_4 <DxfSequenceEnd>(this.ulong_9); if (dxfSequenceEnd == null) { return; } handledObject.AttributesSeqEnd = dxfSequenceEnd; }
public override void ResolveReferences(Class374 modelBuilder) { base.ResolveReferences(modelBuilder); DxfSortEntsTable handledObject = (DxfSortEntsTable)this.HandledObject; if (this.ulong_2 != 0UL) { DxfHandledObject dxfHandledObject = modelBuilder.method_3(this.ulong_2); DxfBlock dxfBlock = dxfHandledObject as DxfBlock; if (dxfBlock != null) { handledObject.OwnerBlock = dxfBlock; } else if (dxfHandledObject != null) { this.dxfMessageCollection_0.Add(new DxfMessage(DxfStatus.WrongType, Severity.Warning, "ExpectedType", (object)typeof(DxfBlock)) { Parameters = { { "ObjectType", (object)dxfHandledObject.GetType() }, { "Object", (object)dxfHandledObject } } }); } else { this.dxfMessageCollection_0.Add(new DxfMessage(DxfStatus.UnresolvedReference, Severity.Warning, "Handle", (object)this.ulong_2)); } } foreach (Pair <ulong> pair in this.list_1) { DxfHandledObject dxfHandledObject = modelBuilder.method_3(pair.First); DxfEntity entity = dxfHandledObject as DxfEntity; if (entity != null) { handledObject.method_9(entity, pair.Second); } else if (dxfHandledObject != null) { this.dxfMessageCollection_0.Add(new DxfMessage(DxfStatus.WrongType, Severity.Warning, "ExpectedType", (object)typeof(DxfEntity)) { Parameters = { { "ObjectType", (object)dxfHandledObject.GetType() }, { "Object", (object)dxfHandledObject } } }); } else { this.dxfMessageCollection_0.Add(new DxfMessage(DxfStatus.UnresolvedReference, Severity.Warning, "Handle", (object)this.ulong_2)); } } }