Beispiel #1
0
        internal AcadPolygonMeshVertex FriendAppendVertex(double vdblObjectID, object vvar3DVertex, ref string nrstrErrMsg = "")
        {
            object[] dadecCoordinate = new object[3];
            double[] dadblCoordinate = new double[3];
            nrstrErrMsg = null;
            bool flag = false;

            dadblCoordinate[0] = Conversions.ToDouble(NewLateBinding.LateIndexGet(vvar3DVertex, new object[1]
            {
                0
            }, null));
            dadblCoordinate[1] = Conversions.ToDouble(NewLateBinding.LateIndexGet(vvar3DVertex, new object[1]
            {
                1
            }, null));
            dadblCoordinate[2] = Conversions.ToDouble(NewLateBinding.LateIndexGet(vvar3DVertex, new object[1]
            {
                2
            }, null));
            AcadPolygonMeshVertex dobjAcadPolygonMeshVertex3 = new AcadPolygonMeshVertex();
            AcadPolygonMeshVertex acadPolygonMeshVertex      = dobjAcadPolygonMeshVertex3;

            acadPolygonMeshVertex.FriendLetCoordinate       = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, dadecCoordinate, dadblCoordinate));
            acadPolygonMeshVertex.FriendLetNodeParentID     = base.NodeID;
            acadPolygonMeshVertex.FriendLetApplicationIndex = base.FriendGetApplicationIndex;
            acadPolygonMeshVertex.FriendLetDocumentIndex    = base.FriendGetDocumentIndex;
            acadPolygonMeshVertex.FriendLetDatabaseIndex    = base.FriendGetDatabaseIndex;
            acadPolygonMeshVertex.FriendLetOwnerID          = base.ObjectID;
            AcadPolygonMeshVertex acadPolygonMeshVertex2 = acadPolygonMeshVertex;
            AcadObject            nrobjAcadObject        = dobjAcadPolygonMeshVertex3;
            bool flag2 = acadPolygonMeshVertex2.FriendSetObjectID(vdblObjectID, ref nrobjAcadObject, ref nrstrErrMsg);

            dobjAcadPolygonMeshVertex3 = (AcadPolygonMeshVertex)nrobjAcadObject;
            if (flag2)
            {
                bool dblnValid = true;
            }
            else
            {
                hwpDxf_Functions.BkDXF_DebugPrint(acadPolygonMeshVertex.ObjectName + ": " + nrstrErrMsg);
            }
            acadPolygonMeshVertex = null;
            mobjDictVertices.Add("K" + Conversions.ToString(mobjDictVertices.Count), dobjAcadPolygonMeshVertex3);
            AcadPolygonMeshVertex FriendAppendVertex = dobjAcadPolygonMeshVertex3;

            dobjAcadPolygonMeshVertex3 = null;
            return(FriendAppendVertex);
        }
Beispiel #2
0
        public AcadPolygonMeshVertex AppendVertex(object vvarVertex, string nvstrHandle = null)
        {
            string dstrErrMsg = default(string);
            AcadPolygonMeshVertex AppendVertex = default(AcadPolygonMeshVertex);
            AcadPolygonMeshVertex dobjAcadPolygonMeshVertex2;

            if (!hwpDxf_Functions.BkDXF_CheckVariantForArrayReal(RuntimeHelpers.GetObjectValue(vvarVertex), 0, 2, ref dstrErrMsg))
            {
                Information.Err().Raise(50000, "AcadPolygonMesh", dstrErrMsg);
            }
            else
            {
                double ddblObjectID = (Operators.CompareString(nvstrHandle, null, TextCompare: false) != 0) ? hwpDxf_Functions.BkDXF_HexToDbl(nvstrHandle) : base.Database.FriendGetNextObjectID;
                object dvar3DVertex = RuntimeHelpers.GetObjectValue(InternCreate3DVertex(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarVertex, new object[1]
                {
                    0
                }, null)), RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarVertex, new object[1]
                {
                    1
                }, null)), RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarVertex, new object[1]
                {
                    2
                }, null)), mobjDictVertices.Count == 0));
                dobjAcadPolygonMeshVertex2 = FriendAppendVertex(ddblObjectID, RuntimeHelpers.GetObjectValue(dvar3DVertex), ref dstrErrMsg);
                if (dobjAcadPolygonMeshVertex2 == null)
                {
                    Information.Err().Raise(50000, "AcadPolygonMesh", "Der Kontrollpunkt konnte nicht hinzugefügt werden.\n" + dstrErrMsg);
                }
                else
                {
                    AppendVertex = dobjAcadPolygonMeshVertex2;
                }
            }
            dobjAcadPolygonMeshVertex2 = null;
            return(AppendVertex);
        }
Beispiel #3
0
        public static void BkAcadEntity_RemoveReactorsID(ref AcadEntity robjAcadEntity, double vdblObjectID)
        {
            switch (robjAcadEntity.ObjectName)
            {
            case "AcDbEntity":
            {
                AcadEntity dobjAcadEntity2 = robjAcadEntity;
                dobjAcadEntity2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadEntity2 = null;
                break;
            }

            case "AcDbFace":
            {
                Acad3DFace dobjAcad3DFace2 = (Acad3DFace)robjAcadEntity;
                dobjAcad3DFace2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcad3DFace2 = null;
                break;
            }

            case "AcDb3dSolid":
            {
                Acad3DSolid dobjAcad3DSolid2 = (Acad3DSolid)robjAcadEntity;
                dobjAcad3DSolid2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcad3DSolid2 = null;
                break;
            }

            case "AcDbAttributeDefinition":
            {
                AcadAttribute dobjAcadAttribute2 = (AcadAttribute)robjAcadEntity;
                dobjAcadAttribute2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadAttribute2 = null;
                break;
            }

            case "AcDbAttribute":
            {
                AcadAttributeReference dobjAcadAttributeReference2 = (AcadAttributeReference)robjAcadEntity;
                dobjAcadAttributeReference2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadAttributeReference2 = null;
                break;
            }

            case "AcDbBlockEnd":
            {
                AcadBlockEnd dobjAcadBlockEnd2 = (AcadBlockEnd)robjAcadEntity;
                dobjAcadBlockEnd2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadBlockEnd2 = null;
                break;
            }

            case "AcDbBlockBegin":
            {
                AcadBlockBegin dobjAcadBlockBegin2 = (AcadBlockBegin)robjAcadEntity;
                dobjAcadBlockBegin2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadBlockBegin2 = null;
                break;
            }

            case "AcDbBlockReference":
            {
                AcadBlockReference dobjAcadBlockReference2 = (AcadBlockReference)robjAcadEntity;
                dobjAcadBlockReference2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadBlockReference2 = null;
                break;
            }

            case "AcDbCurve":
            {
                AcadCurve dobjAcadCurve2 = (AcadCurve)robjAcadEntity;
                dobjAcadCurve2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadCurve2 = null;
                break;
            }

            case "AcDb3dPolyline":
            {
                Acad3DPolyline dobjAcad3DPolyline2 = (Acad3DPolyline)robjAcadEntity;
                dobjAcad3DPolyline2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcad3DPolyline2 = null;
                break;
            }

            case "AcDbArc":
            {
                AcadArc dobjAcadArc2 = (AcadArc)robjAcadEntity;
                dobjAcadArc2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadArc2 = null;
                break;
            }

            case "AcDbCircle":
            {
                AcadCircle dobjAcadCircle2 = (AcadCircle)robjAcadEntity;
                dobjAcadCircle2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadCircle2 = null;
                break;
            }

            case "AcDbEllipse":
            {
                AcadEllipse dobjAcadEllipse2 = (AcadEllipse)robjAcadEntity;
                dobjAcadEllipse2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadEllipse2 = null;
                break;
            }

            case "AcDbLeader":
            {
                AcadLeader dobjAcadLeader2 = (AcadLeader)robjAcadEntity;
                dobjAcadLeader2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadLeader2 = null;
                break;
            }

            case "AcDbLine":
            {
                AcadLine dobjAcadLine2 = (AcadLine)robjAcadEntity;
                dobjAcadLine2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadLine2 = null;
                break;
            }

            case "AcDbPolyline":
            {
                AcadLWPolyline dobjAcadLWPolyline2 = (AcadLWPolyline)robjAcadEntity;
                dobjAcadLWPolyline2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadLWPolyline2 = null;
                break;
            }

            case "AcDb2dPolyline":
            {
                AcadPolyline dobjAcadPolyline2 = (AcadPolyline)robjAcadEntity;
                dobjAcadPolyline2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadPolyline2 = null;
                break;
            }

            case "AcDb2dVertex":
            {
                Acad2DVertex dobjAcad2DVertex2 = (Acad2DVertex)robjAcadEntity;
                dobjAcad2DVertex2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcad2DVertex2 = null;
                break;
            }

            case "AcDb3dPolylineVertex":
            {
                Acad3DVertex dobjAcad3DVertex2 = (Acad3DVertex)robjAcadEntity;
                dobjAcad3DVertex2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcad3DVertex2 = null;
                break;
            }

            case "AcDbPolygonMeshVertex":
            {
                AcadPolygonMeshVertex dobjAcadPolygonMeshVertex2 = (AcadPolygonMeshVertex)robjAcadEntity;
                dobjAcadPolygonMeshVertex2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadPolygonMeshVertex2 = null;
                break;
            }

            case "AcDbPolyFaceMeshVertex":
            {
                AcadPolyfaceMeshVertex dobjAcadPolyfaceMeshVertex2 = (AcadPolyfaceMeshVertex)robjAcadEntity;
                dobjAcadPolyfaceMeshVertex2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadPolyfaceMeshVertex2 = null;
                break;
            }

            case "AcDbFaceRecord":
            {
                AcadFaceRecord dobjAcadFaceRecord2 = (AcadFaceRecord)robjAcadEntity;
                dobjAcadFaceRecord2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadFaceRecord2 = null;
                break;
            }

            case "AcDbRay":
            {
                AcadRay dobjAcadRay2 = (AcadRay)robjAcadEntity;
                dobjAcadRay2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadRay2 = null;
                break;
            }

            case "AcDbSpline":
            {
                AcadSpline dobjAcadSpline2 = (AcadSpline)robjAcadEntity;
                dobjAcadSpline2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadSpline2 = null;
                break;
            }

            case "AcDbXline":
            {
                AcadXline dobjAcadXline2 = (AcadXline)robjAcadEntity;
                dobjAcadXline2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadXline2 = null;
                break;
            }

            case "AcDbHatch":
            {
                AcadHatch dobjAcadHatch2 = (AcadHatch)robjAcadEntity;
                dobjAcadHatch2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadHatch2 = null;
                break;
            }

            case "AcDbMInsertBlock":
            {
                AcadMInsertBlock dobjAcadMInsertBlock2 = (AcadMInsertBlock)robjAcadEntity;
                dobjAcadMInsertBlock2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadMInsertBlock2 = null;
                break;
            }

            case "AcDbMLine":
            {
                AcadMLine dobjAcadMLine2 = (AcadMLine)robjAcadEntity;
                dobjAcadMLine2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadMLine2 = null;
                break;
            }

            case "AcDbMText":
            {
                AcadMText dobjAcadMText2 = (AcadMText)robjAcadEntity;
                dobjAcadMText2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadMText2 = null;
                break;
            }

            case "AcDbPoint":
            {
                AcadPoint dobjAcadPoint2 = (AcadPoint)robjAcadEntity;
                dobjAcadPoint2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadPoint2 = null;
                break;
            }

            case "AcDbPolyFaceMesh":
            {
                AcadPolyfaceMesh dobjAcadPolyfaceMesh2 = (AcadPolyfaceMesh)robjAcadEntity;
                dobjAcadPolyfaceMesh2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadPolyfaceMesh2 = null;
                break;
            }

            case "AcDbPolygonMesh":
            {
                AcadPolygonMesh dobjAcadPolygonMesh2 = (AcadPolygonMesh)robjAcadEntity;
                dobjAcadPolygonMesh2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadPolygonMesh2 = null;
                break;
            }

            case "AcDbSequenceEnd":
            {
                AcadSequenceEnd dobjAcadSequenceEnd2 = (AcadSequenceEnd)robjAcadEntity;
                dobjAcadSequenceEnd2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadSequenceEnd2 = null;
                break;
            }

            case "AcDbShape":
            {
                AcadShape dobjAcadShape2 = (AcadShape)robjAcadEntity;
                dobjAcadShape2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadShape2 = null;
                break;
            }

            case "AcDbText":
            {
                AcadText dobjAcadText2 = (AcadText)robjAcadEntity;
                dobjAcadText2.FriendRemoveReactorsID(vdblObjectID);
                dobjAcadText2 = null;
                break;
            }

            case "AcDbTrace":
                if (Operators.CompareString(robjAcadEntity.DXFName, "TRACE", TextCompare: false) == 0)
                {
                    AcadTrace dobjAcadTrace2 = (AcadTrace)robjAcadEntity;
                    dobjAcadTrace2.FriendRemoveReactorsID(vdblObjectID);
                    dobjAcadTrace2 = null;
                }
                else
                {
                    AcadSolid dobjAcadSolid2 = (AcadSolid)robjAcadEntity;
                    dobjAcadSolid2.FriendRemoveReactorsID(vdblObjectID);
                    dobjAcadSolid2 = null;
                }
                break;

            default:
                try
                {
                    AcadUnknownEnt dobjAcadUnknownEnt2 = (AcadUnknownEnt)robjAcadEntity;
                    dobjAcadUnknownEnt2.FriendRemoveReactorsID(vdblObjectID);
                    dobjAcadUnknownEnt2 = null;
                }
                catch (Exception ex2)
                {
                    ProjectData.SetProjectError(ex2);
                    Exception ex = ex2;
                    ProjectData.ClearProjectError();
                }
                break;
            }
        }