Ejemplo n.º 1
0
        /// <summary>
        ///  Erzeugt Site in Project
        /// </summary>
        /// <param name="model">           Projct </param>
        /// <param name="name">            Bezeichnung der Site </param>
        /// <param name="placement">       Ursprung </param>
        /// <param name="refLatitude">     Breitengrad </param>
        /// <param name="refLongitude">    Längengrad </param>
        /// <param name="refElevation">    Höhe </param>
        /// <param name="compositionType"> Bei einer Site nicht ändern </param>
        /// <returns>  </returns>
        private static IfcSite createSite(IfcStore model,
                                          string name,
                                          Axis2Placement3D placement = null,
                                          double?refLatitude         = null,
                                          double?refLongitude        = null,
                                          double?refElevation        = null,
                                          IfcElementCompositionEnum compositionType = IfcElementCompositionEnum.ELEMENT)
        {
            using (var txn = model.BeginTransaction("Create Site"))
            {
                var site = model.Instances.New <IfcSite>(s =>
                {
                    s.Name            = name;
                    s.CompositionType = compositionType;
                    if (refLatitude.HasValue)
                    {
                        s.RefLatitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLatitude.Value);
                    }
                    if (refLongitude.HasValue)
                    {
                        s.RefLongitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLongitude.Value);
                    }
                    s.RefElevation = refElevation;

                    placement         = placement ?? Axis2Placement3D.Standard;
                    s.ObjectPlacement = createLocalPlacement(model, placement);
                });

                txn.Commit();
                return(site);
            }
        }
Ejemplo n.º 2
0
        // Nur innerhalb Transaction aufrufen!
        private static IfcLocalPlacement createLocalPlacement(IfcStore model, Axis2Placement3D placement)
        {
            var lp = model.Instances.New <IfcLocalPlacement>(l => l.RelativePlacement =
                                                                 model.Instances.New <IfcAxis2Placement3D>(p =>
            {
                p.Location     = model.Instances.New <IfcCartesianPoint>(c => c.SetXYZ(placement.Location.X, placement.Location.Y, placement.Location.Z));
                p.RefDirection = model.Instances.New <IfcDirection>(d => d.SetXYZ(placement.RefDirection.X, placement.RefDirection.Y, placement.RefDirection.Z));
                p.Axis         = model.Instances.New <IfcDirection>(a => a.SetXYZ(placement.Axis.X, placement.Axis.Y, placement.Axis.Z));
            }));

            return(lp);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///  Site mit DGM
        /// </summary>
        public static IfcStore CreateSiteWithGeo(
            string projectName,
            string editorsFamilyName,
            string editorsGivenName,
            string editorsOrganisationName,
            IfcLabel siteName,
            Axis2Placement3D sitePlacement,
            Mesh mesh,
            SurfaceType surfaceType,
            double?breakDist    = null,
            double?refLatitude  = null,
            double?refLongitude = null,
            double?refElevation = null)
        {
            var model = createandInitModel(projectName, editorsFamilyName, editorsGivenName, editorsOrganisationName, out var project);
            var site  = createSite(model, siteName, sitePlacement, refLatitude, refLongitude, refElevation);
            RepresentationType             representationType;
            RepresentationIdentifier       representationIdentifier;
            IfcGeometricRepresentationItem shape;

            switch (surfaceType)
            {
            case SurfaceType.TFS:
                shape = createTriangulatedFaceSet(model, sitePlacement.Location, mesh, out representationType, out representationIdentifier);
                break;

            case SurfaceType.SBSM:
                shape = createShellBasedSurfaceModel(model, sitePlacement.Location, mesh, out representationType, out representationIdentifier);
                break;

            default:
                shape = createGeometricCurveSet(model, sitePlacement.Location, mesh, breakDist, out representationType, out representationIdentifier);
                break;
            }
            var repres = createShapeRepresentation(model, shape, representationIdentifier, representationType);
            //var terrain = createTerrain(model, "TIN", mesh.Id, null, repres);
            var terrain = createTerrain(model, "TIN", null, null, repres);

            using (var txn = model.BeginTransaction("Add Site to Project"))
            {
                site.AddElement(terrain);
                var lp = terrain.ObjectPlacement as IfcLocalPlacement;
                lp.PlacementRelTo = site.ObjectPlacement;
                project.AddSite(site);

                model.OwnerHistoryAddObject.CreationDate     = DateTime.Now;
                model.OwnerHistoryAddObject.LastModifiedDate = model.OwnerHistoryAddObject.CreationDate;

                txn.Commit();
            }

            return(model);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///  Site mit DGM
        /// </summary>
        public static IfcStore CreateSite(
            string projectName,
            string editorsFamilyName,
            string editorsGivenName,
            string editorsOrganisationName,
            IfcLabel siteName,
            Axis2Placement3D sitePlacement,
            Tin tin,
            SurfaceType surfaceType,
            double?breakDist    = null,
            double?refLatitude  = null,
            double?refLongitude = null,
            double?refElevation = null)
        {
            var model = createandInitModel(projectName, editorsFamilyName, editorsGivenName, editorsOrganisationName, out var project);
            var site  = createSite(model, siteName, sitePlacement, refLatitude, refLongitude, refElevation);
            RepresentationType             representationType;
            RepresentationIdentifier       representationIdentifier;
            IfcGeometricRepresentationItem shape;

            switch (surfaceType)
            {
            case SurfaceType.TFS:
                return(null);

            case SurfaceType.SBSM:
                shape = createShellBasedSurfaceModelViaTin(model, sitePlacement.Location, tin, out representationType, out representationIdentifier);
                break;

            default:
                shape = createGeometricCurveSetViaTin(model, sitePlacement.Location, tin, breakDist, out representationType, out representationIdentifier);
                break;
            }
            var repres = createShapeRepresentation(model, shape, representationIdentifier, representationType);

            using (var txn = model.BeginTransaction("Add Site to Project"))
            {
                site.Representation = model.Instances.New <IfcProductDefinitionShape>(r => r.Representations.Add(repres));
                project.AddSite(site);

                model.OwnerHistoryAddObject.CreationDate     = DateTime.Now;
                model.OwnerHistoryAddObject.LastModifiedDate = model.OwnerHistoryAddObject.CreationDate;

                txn.Commit();
            }

            return(model);
        }
Ejemplo n.º 5
0
        /// <summary>
        ///  Erzeugt Site in Project
        /// </summary>
        /// <param name="model">           Projct </param>
        /// <param name="name">            Bezeichnung der Site </param>
        /// <param name="placement">       Ursprung </param>
        /// <param name="refLatitude">     Breitengrad </param>
        /// <param name="refLongitude">    Längengrad </param>
        /// <param name="refElevation">    Höhe </param>
        /// <param name="compositionType"> Bei einer Site nicht ändern </param>
        /// <returns>  </returns>
        private static IfcSite createSite(IfcStore model,
                                          string name,
                                          Axis2Placement3D placement = null,
                                          double?refLatitude         = null,
                                          double?refLongitude        = null,
                                          double?refElevation        = null,
                                          IfcElementCompositionEnum compositionType = IfcElementCompositionEnum.ELEMENT)
        {
            //Serilog.Log.Logger = new LoggerConfiguration()
            //   .MinimumLevel.Debug()
            //   .WriteTo.File(System.Configuration.ConfigurationManager.AppSettings["LogFilePath"])
            //   .CreateLogger();
            using (var txn = model.BeginTransaction("Create Site"))
            {
                var site = model.Instances.New <IfcSite>(s =>
                {
                    s.Name            = name;
                    s.CompositionType = compositionType;
                    if (refLatitude.HasValue)
                    {
                        s.RefLatitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLatitude.Value);
                    }
                    if (refLongitude.HasValue)
                    {
                        s.RefLongitude = IfcCompoundPlaneAngleMeasure.FromDouble(refLongitude.Value);
                    }
                    s.RefElevation = refElevation;

                    placement         = placement ?? Axis2Placement3D.Standard;
                    s.ObjectPlacement = createLocalPlacement(model, placement);
                });
                txn.Commit();
                //Log.Information("IfcSite created");
                return(site);
            }
        }
Ejemplo n.º 6
0
        private static IfcGeographicElement createTerrain(IfcStore model, IfcLabel name, IfcIdentifier tag, Axis2Placement3D placement, IfcShapeRepresentation representation)
        {
            //begin a transaction
            using (var txn = model.BeginTransaction("Create Terrain"))
            {
                // Gelände
                var terrain = model.Instances.New <IfcGeographicElement>(s =>
                {
                    s.Name            = name;
                    s.PredefinedType  = IfcGeographicElementTypeEnum.TERRAIN;
                    s.Tag             = tag;
                    placement         = placement ?? Axis2Placement3D.Standard;
                    s.ObjectPlacement = createLocalPlacement(model, placement);
                    s.Representation  = model.Instances.New <IfcProductDefinitionShape>(r => r.Representations.Add(representation));
                });

                txn.Commit();

                return(terrain);
            }
        }
public partial class Axis2Placement3D:Placement{//======================================================================
public               Axis2Placement3D(Axis2Placement3D template,string EndOfLineComment=null):base(){AddNext();this.Location=template.Location;this.Axis=template.Axis;this.RefDirection=template.RefDirection;this.EndOfLineComment=EndOfLineComment;}
Ejemplo n.º 8
0
        /// <summary>
        /// Инициализация всех дочерних сущности для заданной сущности. Используется рекурсивно для каждого вложенного параметра.
        /// </summary>
        /// <param name="itemParam">Родительский параметр, для которого необходимо инициализировать параметры</param>
        /// <param name="entitiesDictionary">Словарь всех сущностей, полученных из STEP файла. Ключем должен быть номер сущности.</param>
        /// <param name="parentNode">Родительский узел дерева TreeView. Инициализация происходит параллельно.</param>
        /// <returns>Метод возвращает проинициализированную сущность до самого нижнего уровня.</returns>
        private IEntityModel parseItemParam(EntityParam itemParam, Dictionary <int, BaseEntity> entitiesDictionary, TreeNode parentNode)
        {
            if (mCallback != null)
            {
                currentProgress += progressStep;
                mCallback.extractionStep(currentProgress < 99 ? currentProgress : 99);
            }

            //Инициализируемый параметр
            IEntityModel newParam = null;
            //Инициализируемый дочерний узел дерева
            TreeNode childNode = null;

            //Номер сущности, хранящийся в параметре
            int itemNumber;

            if (itemParam.value.StartsWith("#") && int.TryParse(itemParam.value.Substring(1), out itemNumber))
            {
                //Сущность из словаря, получаемая по номеру
                BaseEntity nextEntity;
                if (entitiesDictionary.TryGetValue(itemNumber, out nextEntity))
                {
                    //Подбор необходимого алгоритма инициализации по имени сущности из STEP файла
                    switch (nextEntity.Name)
                    {
                    //Комментарии для одного алгоритма, далее по аналогии.
                    case Axis2Placement3D.NAME:
                        //Создание объекта для соответствующего имени сущности
                        Axis2Placement3D tempParamA2P3D = new Axis2Placement3D();

                        //Создания нового узла дерева (узлы деревьев формируются параллельно инициализации сущностей)
                        childNode = new TreeNode(tempParamA2P3D.StepName);

                        //Присвоение имени (title) объекту сущности из параметров, полученных парсером из STEP файла
                        tempParamA2P3D.Name = nextEntity.ParsedParams[0][0].value;
                        //Добавление соотвествующего узла дерева
                        childNode.Nodes.Add("Label: " + tempParamA2P3D.Name);

                        //Рекурсивный вызов метода для инициализации остальных внутренних параметров
                        tempParamA2P3D.Location     = (CartesianPoint)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamA2P3D.Axis         = (Direction)parseItemParam(nextEntity.ParsedParams[2][0], entitiesDictionary, childNode);
                        tempParamA2P3D.RefDirection = (Direction)parseItemParam(nextEntity.ParsedParams[3][0], entitiesDictionary, childNode);

                        //Присвоение абстрактной переменной текущей сущности
                        newParam = tempParamA2P3D;
                        break;

                    case ManifoldSolidBrep.NAME:
                        ManifoldSolidBrep tempParamMSB = new ManifoldSolidBrep();
                        childNode         = new TreeNode(tempParamMSB.StepName);
                        tempParamMSB.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamMSB.Name);
                        tempParamMSB.Outer = (ClosedShell)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        newParam           = tempParamMSB;
                        break;

                    case ClosedShell.NAME:
                        ClosedShell tempParamCS = new ClosedShell();
                        childNode        = new TreeNode(tempParamCS.StepName);
                        tempParamCS.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamCS.Name);
                        tempParamCS.CfsFaces = new List <Face>(nextEntity.ParsedParams[1].Count);
                        TreeNode childParamNode = new TreeNode("Cfs faces");
                        childNode.Nodes.Add(childParamNode);
                        foreach (var itemParamCS in nextEntity.ParsedParams[1])
                        {
                            IEntityModel param = parseItemParam(itemParamCS, entitiesDictionary, childParamNode);
                            tempParamCS.CfsFaces.Add((Face)param);
                        }
                        newParam = tempParamCS;
                        break;

                    case AdvancedFace.NAME:
                        AdvancedFace tempParamAF = new AdvancedFace();
                        childNode        = new TreeNode(tempParamAF.StepName);
                        tempParamAF.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamAF.Name);
                        tempParamAF.Bounds = new List <FaceBound>(nextEntity.ParsedParams[1].Count);
                        TreeNode childParamNodeAF = new TreeNode("Bounds");
                        childNode.Nodes.Add(childParamNodeAF);
                        foreach (var itemParamAFB in nextEntity.ParsedParams[1])
                        {
                            IEntityModel param = parseItemParam(itemParamAFB, entitiesDictionary, childParamNodeAF);
                            tempParamAF.Bounds.Add((FaceBound)param);
                        }
                        tempParamAF.FaceGeometry = (Surface)parseItemParam(nextEntity.ParsedParams[2][0], entitiesDictionary, childNode);
                        tempParamAF.SameSense    = nextEntity.ParsedParams[3][0].value;
                        childNode.Nodes.Add("Same sense: " + tempParamAF.SameSense);
                        newParam = tempParamAF;
                        break;

                    case FaceBound.NAME:
                        FaceBound tempParamFB = new FaceBound();
                        childNode        = new TreeNode(tempParamFB.StepName);
                        tempParamFB.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamFB.Name);
                        tempParamFB.Bound       = (Loop)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamFB.Orientation = nextEntity.ParsedParams[2][0].value;
                        childNode.Nodes.Add("Orientation: " + tempParamFB.Orientation);
                        newParam = tempParamFB;
                        break;

                    case FaceOuterBound.NAME:
                        FaceOuterBound tempParamFOB = new FaceOuterBound();
                        childNode         = new TreeNode(tempParamFOB.StepName);
                        tempParamFOB.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamFOB.Name);
                        tempParamFOB.Bound       = (Loop)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamFOB.Orientation = nextEntity.ParsedParams[2][0].value;
                        childNode.Nodes.Add("Orientation: " + tempParamFOB.Orientation);
                        newParam = tempParamFOB;
                        break;

                    case ConicalSurface.NAME:
                        ConicalSurface tempParamCoSu = new ConicalSurface();
                        childNode          = new TreeNode(tempParamCoSu.StepName);
                        tempParamCoSu.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamCoSu.Name);
                        tempParamCoSu.Position = (Axis2Placement3D)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamCoSu.Radius   = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[2][0].value);
                        childNode.Nodes.Add("Radius: " + tempParamCoSu.Radius);
                        tempParamCoSu.SemiAngle = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[3][0].value);
                        childNode.Nodes.Add("Semi angle: " + tempParamCoSu.SemiAngle);
                        newParam = tempParamCoSu;
                        break;

                    case CylindricalSurface.NAME:
                        CylindricalSurface tempParamCySu = new CylindricalSurface();
                        childNode          = new TreeNode(tempParamCySu.StepName);
                        tempParamCySu.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamCySu.Name);
                        tempParamCySu.Position = (Axis2Placement3D)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamCySu.Radius   = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[2][0].value);
                        childNode.Nodes.Add("Radius: " + tempParamCySu.Radius);
                        newParam = tempParamCySu;
                        break;

                    case EdgeLoop.NAME:
                        EdgeLoop tempParamEL = new EdgeLoop();
                        childNode        = new TreeNode(tempParamEL.StepName);
                        tempParamEL.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamEL.Name);
                        tempParamEL.EdgeList = new List <OrientedEdge>(nextEntity.ParsedParams[1].Count);
                        TreeNode childParamNodeEL = new TreeNode("Edge list");
                        childNode.Nodes.Add(childParamNodeEL);
                        foreach (var itemParamEL in nextEntity.ParsedParams[1])
                        {
                            IEntityModel param = parseItemParam(itemParamEL, entitiesDictionary, childParamNodeEL);
                            tempParamEL.EdgeList.Add((OrientedEdge)param);
                        }
                        newParam = tempParamEL;
                        break;

                    case OrientedEdge.NAME:
                        OrientedEdge tempParamOE = new OrientedEdge();
                        childNode        = new TreeNode(tempParamOE.StepName);
                        tempParamOE.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamOE.Name);
                        tempParamOE.EdgeStart   = (Vertex)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamOE.EdgeEnd     = (Vertex)parseItemParam(nextEntity.ParsedParams[2][0], entitiesDictionary, childNode);
                        tempParamOE.EdgeElement = (Edge)parseItemParam(nextEntity.ParsedParams[3][0], entitiesDictionary, childNode);
                        tempParamOE.Orientation = nextEntity.ParsedParams[4][0].value;
                        childNode.Nodes.Add("Orientation: " + tempParamOE.Orientation);
                        newParam = tempParamOE;
                        break;

                    case Edge.NAME:
                        Edge tempParamE = new Edge();
                        childNode       = new TreeNode(tempParamE.StepName);
                        tempParamE.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamE.Name);
                        tempParamE.EdgeStart = (Vertex)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamE.EdgeEnd   = (Vertex)parseItemParam(nextEntity.ParsedParams[2][0], entitiesDictionary, childNode);
                        newParam             = tempParamE;
                        break;

                    case VertexPoint.NAME:
                        VertexPoint tempParamVP = new VertexPoint();
                        childNode        = new TreeNode(tempParamVP.StepName);
                        tempParamVP.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamVP.Name);
                        tempParamVP.VertexGeometry = (CartesianPoint)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        newParam = tempParamVP;
                        break;

                    case CartesianPoint.NAME:
                        CartesianPoint tempParamCP = new CartesianPoint();
                        childNode        = new TreeNode(tempParamCP.StepName);
                        tempParamCP.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamCP.Name);
                        tempParamCP.X = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[1][0].value);
                        childNode.Nodes.Add("X: " + tempParamCP.X);
                        tempParamCP.Y = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[1][1].value);
                        childNode.Nodes.Add("Y: " + tempParamCP.Y);
                        tempParamCP.Z = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[1][2].value);
                        childNode.Nodes.Add("Z: " + tempParamCP.Z);
                        newParam = tempParamCP;
                        break;

                    case EdgeCurve.NAME:
                        EdgeCurve tempParamEC = new EdgeCurve();
                        childNode        = new TreeNode(tempParamEC.StepName);
                        tempParamEC.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamEC.Name);
                        tempParamEC.EdgeStart    = (Vertex)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamEC.EdgeEnd      = (Vertex)parseItemParam(nextEntity.ParsedParams[2][0], entitiesDictionary, childNode);
                        tempParamEC.EdgeGeometry = (Curve)parseItemParam(nextEntity.ParsedParams[3][0], entitiesDictionary, childNode);
                        tempParamEC.SameSense    = nextEntity.ParsedParams[4][0].value;
                        childNode.Nodes.Add("Same sense: " + tempParamEC.SameSense);
                        newParam = tempParamEC;
                        break;

                    case Circle.NAME:
                        Circle tempParamCi = new Circle();
                        childNode        = new TreeNode(tempParamCi.StepName);
                        tempParamCi.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamCi.Name);
                        tempParamCi.Position = (Axis2Placement3D)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamCi.Radius   = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[2][0].value);
                        childNode.Nodes.Add("Radius: " + tempParamCi.Radius);
                        newParam = tempParamCi;
                        break;

                    case Direction.NAME:
                        Direction tempParamDi = new Direction();
                        childNode        = new TreeNode(tempParamDi.StepName);
                        tempParamDi.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamDi.Name);
                        TreeNode childParamNodeDi = new TreeNode("Direction ratios");
                        childNode.Nodes.Add(childParamNodeDi);
                        tempParamDi.DirectionRatios = new List <double>(3);
                        tempParamDi.DirectionRatios.Add((double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[1][0].value));
                        tempParamDi.DirectionRatios.Add((double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[1][1].value));
                        tempParamDi.DirectionRatios.Add((double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[1][2].value));
                        childParamNodeDi.Nodes.Add(tempParamDi.DirectionRatios[0].ToString());
                        childParamNodeDi.Nodes.Add(tempParamDi.DirectionRatios[1].ToString());
                        childParamNodeDi.Nodes.Add(tempParamDi.DirectionRatios[2].ToString());
                        newParam = tempParamDi;
                        break;

                    case Line.NAME:
                        Line tempParamL = new Line();
                        childNode       = new TreeNode(tempParamL.StepName);
                        tempParamL.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamL.Name);
                        tempParamL.Pnt = (CartesianPoint)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamL.Dir = (Vector)parseItemParam(nextEntity.ParsedParams[2][0], entitiesDictionary, childNode);
                        newParam       = tempParamL;
                        break;

                    case Vector.NAME:
                        Vector tempParamV = new Vector();
                        childNode       = new TreeNode(tempParamV.StepName);
                        tempParamV.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamV.Name);
                        tempParamV.Orientation = (Direction)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamV.Magnitude   = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[2][0].value);
                        childNode.Nodes.Add("Magnitude: " + tempParamV.Magnitude);
                        newParam = tempParamV;
                        break;

                    case Plane.NAME:
                        Plane tempParamPl = new Plane();
                        childNode        = new TreeNode(tempParamPl.StepName);
                        tempParamPl.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamPl.Name);
                        tempParamPl.Position = (Axis2Placement3D)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        newParam             = tempParamPl;
                        break;

                    case ToroidalSurface.NAME:
                        ToroidalSurface tempParamTorSu = new ToroidalSurface();
                        childNode           = new TreeNode(tempParamTorSu.StepName);
                        tempParamTorSu.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add("Label: " + tempParamTorSu.Name);
                        tempParamTorSu.Position    = (Axis2Placement3D)parseItemParam(nextEntity.ParsedParams[1][0], entitiesDictionary, childNode);
                        tempParamTorSu.MajorRadius = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[2][0].value);
                        childNode.Nodes.Add("MajorRadius: " + tempParamTorSu.MajorRadius);
                        tempParamTorSu.MinorRadius = (double)doubleConverter.ConvertFromInvariantString(nextEntity.ParsedParams[3][0].value);
                        childNode.Nodes.Add("MinorRadius: " + tempParamTorSu.MinorRadius);
                        newParam = tempParamTorSu;
                        break;

                    case BoundedSurface.NAME:
                        BoundedSurface tempParamBoundSu = new BoundedSurface();
                        childNode = new TreeNode(tempParamBoundSu.StepName);
                        //tempParamBoundSu.Name = nextEntity.ParsedParams[0][0].value;
                        childNode.Nodes.Add(/*"Label: " + tempParamBoundSu.Name + */ "[Not implemented]");
                        newParam = tempParamBoundSu;
                        break;

                    default:
                        //Ошибка генерируется в том случае, если сущность не определена ни одним из алгоритмов => нужно создать новый класс сущности и прописать соответствующей ей алгоритм инициализации.
                        throw new InvalidDataException("Not found entity: " + nextEntity.Name);
                    }
                    //Добавление в родительский узел TreeView нового дочернего узла, проинициализированного в алгоритмах выше.
                    parentNode.Nodes.Add(childNode);
                }
            }
            return(newParam);
        }