public void Set(DXFStructure dxf, INSERT insert) { gameObject.name = "Insert_" + insert.C2; var block = dxf.BLOCKS.BLOCKList.FirstOrDefault(x => x.C2 == insert.C2); if (block == null) { Debug.Log(insert.C2); return; } DrawLINEList(dxf, block.LINEList, (float)insert.C41, (float)insert.C42); DrawLWPOLYLINEList(dxf, block.LWPOLYLINEList, (float)insert.C41, (float)insert.C42); DrawTEXTList(dxf, block.TEXTList, (float)insert.C41, (float)insert.C42); DrawCIRCLEList(dxf, block.CIRCLEList, (float)insert.C41, (float)insert.C42); DrawARCList(dxf, block.ARCList, (float)insert.C41, (float)insert.C42); //DrawINSERTList(dxf, block.INSERTList, (float)insert.C41, (float)insert.C42); DrawELLIPSEList(dxf, block.ELLIPSEList, (float)insert.C41, (float)insert.C42); this.transform.position = new Vector3((float)insert.C10, (float)insert.C20, (float)insert.C30); this.transform.localEulerAngles = new Vector3(0, 0, (float)insert.C50); this.gameObject.isStatic = true; }
protected override Property ReadSonClass(Property prop) { if (prop.Code == 0 && prop.Value != "ENDBLK") { switch (prop.Value) { //case "C3DFACE": //case "C3DSOLID": //case "ACAD_PROXY_ENTITY": case "ARC": var arc = new ARC(DXFData, prop); ARCList.Add(arc); return(arc.ReadProperties()); //case "ATTDEF": //case "ATTRIB": //case "BODY": case "CIRCLE": var circle = new CIRCLE(DXFData, prop); CIRCLEList.Add(circle); return(circle.ReadProperties()); //case "DIMENSION": case "ELLIPSE": var ellipes = new ELLIPSE(DXFData, prop); ELLIPSEList.Add(ellipes); return(ellipes.ReadProperties()); //case "HATCH": //case "HELIX": //case "IMAGE": case "INSERT": var insert = new INSERT(DXFData, prop); INSERTList.Add(insert); return(insert.ReadProperties()); //case "LEADER": //case "LIGHT": case "LINE": var line = new LINE(DXFData, prop); LINEList.Add(line); return(line.ReadProperties()); case "LWPOLYLINE": var lwpolyline = new LWPOLYLINE(DXFData, prop); LWPOLYLINEList.Add(lwpolyline); return(lwpolyline.ReadProperties()); //case "MESH": //case "MLINE": //case "MLEADERSTYLE": //case "MLEADER": //case "MTEXT": //case "OLEFRAME": //case "OLE2FRAME": //case "POINT": //case "POLYLINE": //case "RAY": //case "REGION": //case "SECTION": //case "SEQEND": //case "SHAPE": //case "SOLID": //case "SPLINE": //case "SUN": //case "SURFACE": //case "TABLE": case "TEXT": var text = new TEXT(DXFData, prop); TEXTList.Add(text); return(text.ReadProperties()); //case "TOLERANCE": //case "TRACE": //case "UNDERLAY": //case "VERTEX": //case "VIEWPORT": //case "WIPEOUT": //case "XLINE": default: return(CreateSonClass(new ENTITIE(DXFData, prop))); } } else { return(base.ReadSonClass(prop)); } }
protected override Property ReadSonClass(Property prop) { if (prop.Code == 0 && prop.Value != "ENDSEC") { switch (prop.Value) { //case "C3DFACE": //case "C3DSOLID": //case "ACAD_PROXY_ENTITY": case "ARC": var arc = new ARC(DXFData, prop); ARCList.Add(arc); return arc.ReadProperties(); //case "ATTDEF": //case "ATTRIB": //case "BODY": case "CIRCLE": var circle = new CIRCLE(DXFData, prop); CIRCLEList.Add(circle); return circle.ReadProperties(); //case "DIMENSION": case "ELLIPSE": var ellipes = new ELLIPSE(DXFData, prop); ELLIPSEList.Add(ellipes); return ellipes.ReadProperties(); //case "HATCH": //case "HELIX": //case "IMAGE": case "INSERT": var insert = new INSERT(DXFData, prop); INSERTList.Add(insert); return insert.ReadProperties(); //case "LEADER": //case "LIGHT": case "LINE": var line = new LINE(DXFData, prop); LINEList.Add(line); return line.ReadProperties(); case "LWPOLYLINE": var lwpolyline = new LWPOLYLINE(DXFData, prop); LWPOLYLINEList.Add(lwpolyline); return lwpolyline.ReadProperties(); //case "MESH": //case "MLINE": //case "MLEADERSTYLE": //case "MLEADER": //case "MTEXT": //case "OLEFRAME": //case "OLE2FRAME": //case "POINT": //case "POLYLINE": //case "RAY": //case "REGION": //case "SECTION": //case "SEQEND": //case "SHAPE": //case "SOLID": //case "SPLINE": //case "SUN": //case "SURFACE": //case "TABLE": case "TEXT": var text = new TEXT(DXFData, prop); TEXTList.Add(text); return text.ReadProperties(); //case "TOLERANCE": //case "TRACE": //case "UNDERLAY": //case "VERTEX": //case "VIEWPORT": //case "WIPEOUT": //case "XLINE": default: return CreateSonClass(new ENTITIE(DXFData, prop)); } } else { return base.ReadSonClass(prop); } }