Railway line profile mapping method based on control pattern
By customizing control style files and building management dictionaries, the lack of flexibility in existing methods for mapping railway line horizontal and vertical profiles has been solved, achieving universality and scalability across different railway grades and design stages, and improving mapping efficiency and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA RAILWAY DESIGN GRP CO LTD
- Filing Date
- 2022-09-19
- Publication Date
- 2026-06-12
AI Technical Summary
The existing methods for generating horizontal and vertical profiles of railway lines have few control parameters that users can modify, resulting in a lack of flexibility and requiring extensive manual modifications when map output requirements change.
By customizing control style files, constructing a control style management dictionary, creating custom objects in AutoCAD, setting the current control style according to design requirements, drawing and decomposing custom entities of line horizontal and vertical profiles, and realizing the classification, definition and management of parameters.
Without modifying the basic design data, it achieves universality and scalability across different railway grades and design stages, improves mapping efficiency and quality, and meets special mapping requirements.
Smart Images

Figure CN115544612B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway design technology, and in particular to a method for generating horizontal and vertical profile maps of railway lines based on control patterns. Background Technology
[0002] The creation of railway line horizontal and vertical profile maps is a crucial step in railway line design, directly impacting the standardization and quality of the design deliverables. However, previous methods for creating these maps were generally tailored to specific needs, with most logic fixed within the code. Users had limited control parameters to modify, resulting in a lack of flexibility. Consequently, significant manual modifications were required whenever map requirements changed. In railway design, the standards for horizontal and vertical profile maps vary across different railway grades and design stages. Therefore, it is necessary to research a universal and widely applicable method for creating railway line horizontal and vertical profile maps. Summary of the Invention
[0003] The purpose of this invention is to provide a method for generating horizontal and vertical profile maps of railway lines based on control patterns, in order to solve the technical problem that existing horizontal and vertical profile mapping methods have few control parameters that users can modify, lack flexibility, and require a lot of manual modifications once the map output requirements change.
[0004] This invention provides a method for generating horizontal and vertical profile maps of railway lines based on control patterns, comprising the following steps:
[0005] S1. Customized control style file: Define the parameters of various line equipment in the horizontal and vertical profiles and save them as control style files;
[0006] S2. Construct a control style management dictionary: Create a named object dictionary in AutoCAD to manage control style objects;
[0007] S3. Construct custom control style objects based on control style files: Read the control style file, create custom control style objects in AutoCAD, and add them to the control style management dictionary;
[0008] S4. Set the current control style: In the control style management dictionary, select the control style object with the same file name as the specified style object as the current control style object according to the design requirements;
[0009] S5. Construct a dictionary of horizontal and vertical profiles of the railway line: Create a dictionary of named objects in AutoCAD to manage the horizontal and vertical profile objects of the railway line.
[0010] S6. Construct custom entities for the horizontal and vertical profiles of the railway line;
[0011] S7. Draw custom entities for the horizontal and vertical profiles of the line according to the current control style;
[0012] S8. Decompose the custom entity of the horizontal and vertical profile of the line: Convert the custom entity of the horizontal and vertical profile into a normal entity.
[0013] As one embodiment of the present invention, S1 specifically includes: classifying and defining the drawing items, fonts, line types, line widths, colors, drawing scales, accuracy positions, left and right side annotations, drawing spacing, and legend parameters of various line equipment in the horizontal and vertical sections according to the drawing standards of different railway grades and different design stages, and saving them as control style files in the form of INI files.
[0014] As one embodiment of the present invention, in S1, the classification definition specifically includes:
[0015] Define the item drawing switch, define the items to be drawn; define the specific drawing content of each item, including font, line type, line width, color, drawing scale, precision setting, left and right side annotations, drawing spacing, and legend parameters;
[0016] The entry drawing switches include a planar drawing switch and a longitudinal section drawing switch;
[0017] Font parameters include large font name, small font name, text height, aspect ratio, rotation angle, and color;
[0018] Line type parameters include line type name, line type scale, line width, and color;
[0019] The plot scaling is a global parameter.
[0020] In one embodiment of the present invention, in S2, the management of control style objects includes: mapping control style names to control style objects, and encoding the entity object of the current control style.
[0021] As one embodiment of the present invention, in S3, constructing the control style custom object specifically includes:
[0022] First, read the list of all control style files from the specified directory; then, read the control style files in sequence, search for the control style object in the control style management dictionary based on the control style file name, and if the object exists, update the existing control style object; otherwise, create a new control style object, initialize it with the parameters in the control style file, and add it to the control style management dictionary.
[0023] As one embodiment of the present invention, in S5, the management of the line horizontal and vertical profile objects includes the encoding of entity objects of each line plane, longitudinal profile, current line plane, and longitudinal profile.
[0024] As one embodiment of the present invention, in S6, constructing the custom entity of the horizontal and vertical profile of the line specifically includes:
[0025] Read the relevant parameters for the horizontal and vertical profile design of the line from the data file, including the line name, intersection coordinates, curve data, chainage breaks, gradient, ground line, main technical standards, longitudinal and transverse ratio of the profile, and scale; read the line equipment parameters, including large and medium bridges, small bridges and culverts, stations, tunnels, leveling points, and grade-separated intersections.
[0026] If the corresponding horizontal and vertical profile dictionary already exists in the dictionary, the existing entity is opened and the relevant design parameters are updated. Otherwise, a new custom entity is created, initialized with the design parameters, and the entity is added to the dictionary.
[0027] As one embodiment of the present invention, in S7, drawing the custom entity of the line horizontal and vertical profile according to the current control style specifically includes:
[0028] First, determine whether to draw a certain item based on the current control style. If it is necessary to draw, read the relevant parameters of the corresponding item in the control style and draw the custom entity of that item accordingly.
[0029] When drawing a custom entity, for each independent element in the custom entity, create a corresponding temporary ordinary entity, copy the relevant attributes of the element and display them, and then destroy the temporary ordinary entity.
[0030] As one embodiment of the present invention, custom entity drawing includes drawing the horizontal alignment of the line, curve data, mileage and chainage break markings, longitudinal profile slope lines, ground lines, grids, design columns, and line equipment information;
[0031] The specific entries to be drawn, as well as the font, color, line type, width, precision position, legend, left and right side annotations, and drawing scale parameters for each entry, are determined by the current control style.
[0032] In one embodiment of the present invention, in S8, for each independent element in the custom entity of the horizontal and vertical profile, a corresponding ordinary entity is created, the element-related attributes are copied, and the entity is added to AutoCAD, and then the custom entity is deleted.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] This invention classifies and defines in detail the drawing parameters of various line equipment in the horizontal and vertical profiles of railway lines in the form of control styles. During the drawing and decomposition of custom entities in the horizontal and vertical profiles of railway lines, control styles are used to control the drawing items and set the drawing parameters, generating a horizontal and vertical profile drawing that meets the requirements. This method can generate horizontal and vertical profile drawings of railway lines of different railway grades and different design stages without modifying the basic design data. For special drawing requirements, it can also be achieved through custom control styles, which has strong versatility and scalability, and can significantly improve the efficiency and quality of drawing. Attached Figure Description
[0035] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0036] Figure 1 A flowchart illustrating the method for generating horizontal and vertical profiles of railway lines provided in this embodiment of the invention. Detailed Implementation
[0037] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0038] The components of the embodiments of the invention described and shown in the accompanying drawings can typically be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention.
[0039] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0040] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0041] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0042] The following is combined with Figure 1 As shown, the embodiments of the present invention provide a method for generating railway line horizontal and vertical profile maps based on control styles, including the following steps: customizing a control style file, constructing a control style management dictionary, constructing a control style custom object based on the control style file, setting the current control style, constructing a railway line horizontal and vertical profile dictionary, constructing a railway line horizontal and vertical profile custom entity, drawing the railway line horizontal and vertical profile custom entity based on the current control style, and decomposing the railway line horizontal and vertical profile custom entity.
[0043] Based on the above-mentioned method for generating horizontal and vertical profiles of railway lines, the feature of this embodiment of the invention is that it can generate horizontal and vertical profiles of railway lines of different grades and different design stages without modifying the basic design data. For special drawing requirements, it can also be achieved by customizing the control style, which has strong versatility and scalability.
[0044] Specifically, S1, custom control style file
[0045] Based on the standards for drawing horizontal and vertical profiles of different railway grades and design stages, the drawing items, fonts, line types, line widths, colors, drawing scales, accuracy positions, left and right side annotations, drawing spacing, and legend parameters of various line equipment in the horizontal and vertical profiles are classified and defined, and saved as control style files in the form of INI files.
[0046] When defining control styles, first define the item drawing switch. The drawing status of each item may be inconsistent in the plane and longitudinal profile, so the plane drawing switch and longitudinal profile drawing switch need to be defined separately. For a specific item, you also need to define the font, line type, line width, color, drawing scale, precision positioning, left and right side annotations, drawing spacing, and legend parameters. Among them, the font parameters include the large font name, small font name, text height, aspect ratio, rotation angle, and color. The line type parameters include the line type name, line type scale, line width, and color. The drawing scale is a global parameter that applies to all items. A specific design stage in a railway grade corresponds to a control style file.
[0047] S2. Construct a control style management dictionary
[0048] In AutoCAD, create a named object dictionary to manage control style objects, including the mapping between control style names and control style objects, and the entity object code of the current control style.
[0049] The control style management dictionary is created using AutoCAD's named object dictionary. This dictionary, by default, establishes a mapping between object names and pointers, and provides comprehensive interfaces for adding, searching, modifying, and deleting objects, thus meeting the requirements of control style management. By extending the named object dictionary, it becomes possible to set the current control style and retrieve the current control object.
[0050] S3. Construct a custom control style object based on the control style file.
[0051] By reading the control style file, a custom control style object is created in AutoCAD and added to the control style management dictionary. The control style object is an AutoCAD custom object, whose parameters correspond one-to-one with those in the control style file, and its name is the control style file name.
[0052] The construction steps are as follows: First, read the list of all control style files from the specified directory. Then, read the control style files in order. Search for the control style object in the control style management dictionary based on the control style file name. If the object exists, update the existing control style object. Otherwise, create a new control style object, initialize it with the parameters in the control style file, and add it to the control style management dictionary.
[0053] S4. Set the current control style
[0054] In the control style management dictionary, select a control style object with the same filename as the specified style object, based on design requirements, and use it as the current control style object.
[0055] S5. Construct a dictionary of horizontal and vertical profiles of the railway line.
[0056] Create a named object dictionary in AutoCAD to manage the horizontal and vertical profile objects of the railway line, including the entity object codes for each railway plane, vertical profile, and the current railway plane and vertical profile.
[0057] The railway alignment and longitudinal profile dictionary is derived from the named object dictionary in AutoCAD. It manages railway alignment and longitudinal profile objects, and establishes a mapping between railway alignment and longitudinal profile names and pointers to alignment and longitudinal profile objects. It can add, modify, and delete railway alignment and longitudinal profile objects, as well as set and retrieve the current railway alignment and longitudinal profile.
[0058] S6. Construct custom entities for the horizontal and vertical profiles of the railway line.
[0059] Read the relevant parameters for the horizontal and vertical profile design of the railway line from the data file, including the line name, intersection coordinates, curve data, chainage breaks, gradient, ground line, main technical standards, longitudinal and transverse ratios, and scale. Read the equipment parameters of the railway line, including large and medium bridges, small bridges and culverts, stations, tunnels, leveling points, and grade-separated intersections. Search the horizontal and vertical profile dictionary of the railway line based on the line name. If the corresponding horizontal and vertical profile entity already exists in the dictionary, open the existing entity and update the relevant design parameters. Otherwise, create a new custom entity, initialize it with the design parameters, and add the entity to the dictionary.
[0060] S7. Draw custom entities for the horizontal and vertical profiles of the line according to the current control style.
[0061] First, determine whether to draw a certain item based on the current control style. If it is necessary to draw, read the relevant parameters of the corresponding item in the control style and draw the item accordingly. Draw the line alignment, curve data, mileage and chainage break markings, longitudinal profile slope lines, ground lines, grids, design columns, and line equipment information respectively. The font, color, line type, width, precision position, legend, left and right side of the annotations, and map scale parameters of each item are determined by the current control style.
[0062] AutoCAD provides an interface for drawing custom entities, but entities drawn using this method will have their display positions shifted after being decomposed into ordinary entities, affecting the aesthetics of the drawing. To ensure that the graphic display is completely consistent before and after decomposing a custom entity, when drawing a custom entity, for each independent element in the custom entity, a corresponding temporary ordinary entity is created, the element's relevant attributes are copied and displayed, and then the temporary ordinary entity is destroyed.
[0063] S8, Decompose the horizontal and vertical profiles of the railway line into custom entities
[0064] The process of creating custom entities for the decomposed horizontal and vertical profiles is similar to that of creating custom entities. The custom entities are converted into ordinary entities. Specifically, for each independent element in the custom entity, a corresponding ordinary entity is created, the relevant attributes of the element are copied, and the entity is added to AutoCAD. Then, the custom entity is deleted.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating horizontal and vertical profile maps of railway lines based on control patterns, characterized in that, Includes the following steps: S1. Customized control style file: Define the parameters of various line equipment in the horizontal and vertical profiles and save them as control style files; S2. Construct a control style management dictionary: Create a named object dictionary in AutoCAD to manage control style objects; S3. Construct custom control style objects based on control style files: Read the control style file, create custom control style objects in AutoCAD, and add them to the control style management dictionary; S4. Set the current control style: In the control style management dictionary, select the control style object with the same file name as the specified style object as the current control style object according to the design requirements; S5. Construct a dictionary of horizontal and vertical profiles of the railway line: Create a dictionary of named objects in AutoCAD to manage the horizontal and vertical profile objects of the railway line. S6. Construct custom entities for the horizontal and vertical profiles of the railway line; S7. Draw custom entities for the horizontal and vertical profiles of the line according to the current control style; S8. Decompose the custom entity of the horizontal and vertical profile of the line: Convert the custom entity of the horizontal and vertical profile into a normal entity. In S3, constructing a custom object that controls styles specifically includes: First, read the list of all control style files from the specified directory; then read the control style files in order, search for the control style object in the control style management dictionary based on the control style file name, and if the object exists, update the existing control style object; otherwise, create a new control style object, initialize it with the parameters in the control style file, and add it to the control style management dictionary. In S7, drawing custom entities for the horizontal and vertical profiles of a railway line based on the current control style specifically includes: First, determine whether to draw a certain item based on the current control style. If it is necessary to draw, read the relevant parameters of the corresponding item in the control style and draw the custom entity of that item accordingly. When drawing a custom entity, for each independent element in the custom entity, create a corresponding temporary ordinary entity, copy the relevant attributes of the element and display them, and then destroy the temporary ordinary entity.
2. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 1, characterized in that, S1 specifically includes: according to the drawing standards of horizontal and vertical profiles of different railway grades and different design stages, classifying and defining the drawing items, fonts, line types, line widths, colors, drawing scales, accuracy positions, left and right side annotations, drawing spacing, and legend parameters of various line equipment in the horizontal and vertical profiles, and saving them as control style files in the form of INI files.
3. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 2, characterized in that, In S1, the classification definition specifically includes: Define the item drawing switch and define the items to be drawn; for a specific item, you also need to define the font, line type, line width, color, drawing scale, precision setting, left and right side annotations, drawing spacing, and legend parameters. The entry drawing switches include a planar drawing switch and a longitudinal section drawing switch; Font parameters include large font name, small font name, text height, aspect ratio, rotation angle, and color; Line type parameters include line type name, line type scale, line width, and color; The plot scaling is a global parameter.
4. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 1, characterized in that, In S2, managing control style objects includes: mapping control style names to control style objects, and encoding the entity object of the current control style.
5. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 1, characterized in that, In S5, the management of line horizontal and vertical profile objects includes the encoding of entity objects for each line horizontal and vertical profile.
6. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 1, characterized in that, In S6, constructing custom entities for railway line horizontal and vertical profiles specifically includes: Read the relevant parameters for the horizontal and vertical profile design of the line from the data file, including the line name, intersection coordinates, curve data, chainage breaks, gradient, ground line, main technical standards, longitudinal and transverse ratio of the profile, and scale; read the line equipment parameters, including large and medium bridges, small bridges and culverts, stations, tunnels, leveling points, and grade-separated intersections. If the corresponding horizontal and vertical profile dictionary already exists in the dictionary, the existing entity is opened and the relevant design parameters are updated. Otherwise, a new custom entity is created, initialized with the design parameters, and the entity is added to the dictionary.
7. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 1, characterized in that, Custom entity drawing includes drawing the horizontal alignment of the line, curve data, mileage and chainage break annotations, longitudinal profile slope lines, ground lines, grids, design columns, and line equipment information; The specific entries to be drawn, as well as the font, color, line type, width, precision position, legend, left and right side annotations, and drawing scale parameters for each entry, are determined by the current control style.
8. The method for generating railway line horizontal and vertical profile maps based on control patterns according to claim 1, characterized in that, In S8, for each independent element in a custom entity for horizontal and vertical profiles, create a corresponding ordinary entity, copy the element's relevant attributes, add it to AutoCAD, and then delete the custom entity.