Railway engineering arbitrary section definition system based on custom engineering language

The railway engineering arbitrary section definition system, which uses a custom engineering language, has achieved standardization and automation in railway engineering design. It has solved the problems of inconsistent data organization and low efficiency in complex geometric processing in design tools, and improved design efficiency and accuracy.

CN122241823APending Publication Date: 2026-06-19CHINA RAILWAY ERYUAN ENGINEERING GROUP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA RAILWAY ERYUAN ENGINEERING GROUP CO LTD
Filing Date
2026-03-19
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing railway engineering design tools lack unified data organization and description standards, resulting in design results with varying formats and inconsistent expressions, making them difficult to reuse and share. Furthermore, they struggle to achieve parameter-driven design and efficiently handle complex geometric relationships, leading to low design efficiency and a high susceptibility to errors.

Method used

A railway engineering arbitrary section definition system based on a custom engineering language is adopted. Geometric elements are stored through a core data structure module, the CEL parser module parses the definition file and calls the expression evaluator to perform mathematical calculations, and the geometric constraint calculation module processes geometric relationships, realizing standardized, parameterized and automated definition.

Benefits of technology

It improves the standardization and efficiency of railway engineering design, supports the direct expression of parameter relationships by mathematical formulas, automatically processes complex geometric relationships, and generates cross-sections of arbitrary shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241823A_ABST
    Figure CN122241823A_ABST
Patent Text Reader

Abstract

This application provides a system for defining arbitrary cross-sections in railway engineering based on a custom engineering language, relating to the field of railway engineering technology. The system includes: a core data structure module for storing data structures of basic geometric elements and composite cross-section structures involved in the cross-section design of railway engineering; a CEL parser module for parsing cross-section definition files generated based on the custom engineering language and identifying definition statements within the files; an expression evaluator module for safely evaluating mathematical expressions in the cross-section definition files and returning the calculation results to the CEL parser module; and a geometric constraint calculation module for calculating the positions of points and lines based on the geometric constraints involved in railway engineering to construct arbitrary cross-sections for railway engineering. This system can improve the standardization and efficiency of railway engineering design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of railway engineering technology, specifically to a railway engineering arbitrary cross-section definition system based on a custom engineering language. Background Technology

[0002] The cross-sectional design of railway engineering mainly relies on computer-aided design (CAD) software for manual drawing or parametric modeling using specific engineering software. However, existing methods generally lack unified data organization and description standards. Different designers use their own habitual drawing methods, resulting in inconsistent formats and expressions of design results, making it difficult to effectively reuse and share them across different projects or teams. When modifications or migrations of existing designs are needed, redrawing or extensive manual adjustments are often required, which is not only inefficient but also increases repetitive work.

[0003] Furthermore, traditional design tools struggle to achieve true parametric-driven design. In CAD drafting, cross-sectional geometry is composed of fixed lines. When design parameters such as track gauge, track bed thickness, and slope ratio change, designers must manually modify each line and dimension, which is not only time-consuming and labor-intensive but also prone to inconsistencies in cross-sectional geometry due to oversights. Simultaneously, existing tools typically do not support directly embedding mathematical expressions during the design process; designers must pre-calculate numerical results before inputting them, severing the intrinsic connection between design parameters and geometric representation, and reducing design flexibility and adjustability.

[0004] For complex geometric relationships commonly found in railway engineering cross-sections, such as intersections of straight lines, perpendicular relationships from a point to a line, parallel offsets, and gradient calculations, existing methods require designers to perform manual calculations or draw auxiliary lines, a tedious and error-prone process. Especially when the cross-section shape is complex or contains multiple interdependent geometric elements, the difficulty of handling these geometric constraints increases significantly, making it difficult to efficiently and accurately construct arbitrarily complex cross-sections. Therefore, a technical solution capable of addressing these problems is urgently needed. Summary of the Invention

[0005] Based on this, this application provides a railway engineering arbitrary cross-section definition system based on a custom engineering language. The system uses a core data structure module to uniformly store geometric elements, a CEL parser module to parse the custom language definition file and call an expression evaluator to perform mathematical calculations, converting the definition statements into standard geometric data; and a geometric constraint calculation module to calculate the positions of new points and lines based on geometric relationships. This enables the standardized, parameterized, and automated definition of arbitrarily complex cross-sections in railway engineering, improving the standardization and efficiency of railway engineering design.

[0006] Firstly, this application provides a railway engineering arbitrary cross-section definition system based on a custom engineering language, including:

[0007] The core data structure module is used to store the data structure of basic geometric elements and composite cross-section structures involved in the cross-sectional design of railway engineering; wherein, the basic geometric elements include points, lines and regions; and the composite cross-section structure includes track cross-sections; The CEL parser module is used to parse cross-section definition files formed based on a custom engineering language, identify the definition statements in the cross-section definition files, and if a mathematical expression is identified, call the expression evaluator module to perform calculations and convert the definition statements into basic geometric elements stored in the core data structure module based on the calculation results. The expression evaluator module is used to safely evaluate the mathematical expressions in the cross-section definition file and return the calculation results to the CEL parser module. The geometric constraint calculation module is used to perform position calculations on the points and lines stored in the core data structure module according to the geometric constraint relationships involved in the railway project, so as to determine the geometric position of new points or lines, and store the calculation results in the core data structure module or return them to the CEL parser module to construct arbitrary cross-sections of the railway project.

[0008] Optionally, the syntax rules of the custom engineering language include point definition statements, line definition statements, region definition statements, and mathematical expressions; The point definition statement is used to define a point in a two-dimensional coordinate system; the line definition statement is used to define a line segment connecting two points or a line segment defined by a point and a vector; the variable definition statement is used to define a variable that can be used in an expression; and the region definition statement is used to define a closed region composed of multiple points.

[0009] Optionally, the system further includes a superelevation rotation calculation module, used to rotate and transform points in the cross section according to the superelevation parameters in the cross section design of the railway project; the superelevation parameters include superelevation value, rotation axis and curve direction.

[0010] Optionally, the ultra-high rotation calculation module is also used to support ultra-high rotation with the track centerline or the inner rail as the rotation axis, and supports left curve, right curve or no curve direction settings.

[0011] Optionally, the syntax rules of the custom engineering language include point definition statements, line definition statements, variable definition statements, region definition statements, and mathematical expressions; The point definition statement is used to define a point in a two-dimensional coordinate system; the line definition statement is used to define a line segment connecting two points or a line segment defined by a point and a vector; the variable definition statement is used to define a variable used in an expression; and the region definition statement is used to define a closed region composed of multiple points.

[0012] Optionally, the system further includes a superelevation rotation calculation module, used to rotate and transform points in the cross section according to the superelevation parameters in the cross section design of the railway project; the superelevation parameters include superelevation value, rotation axis and curve direction.

[0013] Optionally, the ultra-high rotation calculation module is also used to support ultra-high rotation with the track centerline or the inner rail as the rotation axis, and supports left curve, right curve or no curve direction settings.

[0014] Optionally, the system further includes a component assembly frame module for combining multiple cross-sectional components to obtain a complete cross-section.

[0015] Optionally, the component assembly framework module includes: Component definition unit, used to define reusable cross-sectional components; A component assembly unit is used to assemble multiple cross-sectional components at specified positions; The parameter passing unit is used to pass common parameters between components.

[0016] Optionally, the system further includes: The visualization and export module is used to display the cross-sectional geometry obtained from the design and export the design results to an external file format.

[0017] Optionally, the visualization and export module is also used to provide real-time visualization capabilities and DXF format export capabilities.

[0018] Secondly, this application provides a railway engineering arbitrary section definition system using a custom engineering language, including: The core data structure module is used to store the data structure of basic geometric elements and composite cross-section structures involved in the cross-sectional design of railway engineering; wherein, the basic geometric elements include points, lines and regions; and the composite cross-section structure includes track cross-sections; The CEL parser module is used to parse cross-section definition files formed based on a custom engineering language, identify the definition statements in the cross-section definition files, and if a mathematical expression is identified, call the expression evaluator module to perform calculations and convert the definition statements into basic geometric elements stored in the core data structure module based on the calculation results. The expression evaluator module is used to safely evaluate the mathematical expressions in the cross-section definition file and return the calculation results to the CEL parser module. The geometric constraint calculation module is used to calculate the position of points and lines stored in the core data structure module according to the geometric constraint relationships involved in the railway project, so as to determine the geometric position of new points or lines, and store the calculation results in the core data structure module or return them to the CEL parser module to construct arbitrary cross-sections of the railway project. The superelevation rotation calculation module is used to rotate and transform points in the cross-section based on the superelevation parameters in the cross-section design of the railway project; the superelevation parameters include the superelevation value, the rotation axis, and the curve direction. The component assembly frame module is used to combine multiple cross-sectional components into a complete cross section. The visualization and export module is used to visualize the completed railway engineering cross-section in real time and export the design results as DXF format files.

[0019] Thirdly, this application provides a method for defining arbitrary cross-sections in railway engineering based on a custom engineering language, including: The data structure for storing the basic geometric elements involved in the cross-sectional design of railway engineering and the composite cross-sectional structure; wherein, the basic geometric elements include points, lines and regions; and the composite cross-sectional structure includes track cross-sections; The cross-section definition file generated based on a custom engineering language is parsed, the definition statements in the cross-section definition file are identified, and if a mathematical expression is identified, the expression evaluator module is called to perform the calculation, and the definition statement is converted into the basic geometric elements stored in the core data structure module according to the calculation result. The mathematical expressions in the cross-section definition file are evaluated securely, and the calculation results are returned to the CEL parser module. Based on the geometric constraints involved in the railway project, the positions of the points and lines stored in the core data structure module are calculated to determine the geometric positions of new points or lines. The calculation results are then stored in the core data structure module or returned to the CEL parser module to construct any cross-section of the railway project.

[0020] Compared with existing technologies, the beneficial effects of this application are as follows: The core data structure module uniformly stores basic geometric elements such as points, lines, and regions involved in railway engineering cross-sections, as well as complex structures such as track cross-sections, providing a standardized data organization foundation for cross-section definitions. The CEL parser module parses cross-section definition files written in a custom engineering language, identifies the definition statements, and calls the expression evaluator module for safe evaluation when encountering mathematical expressions. Based on the calculation results, the statements are converted into geometric elements in the core data structure module, realizing automated conversion from text description to geometric model. The expression evaluator module supports various mathematical calculations such as trigonometric functions and algebraic operations, enabling cross-section definitions to directly express parameter relationships using mathematical formulas, giving the system parametric design capabilities. The geometric constraint calculation module performs position calculations on points and lines stored in the core data structure module based on common geometric constraint relationships in railway engineering, determines the geometric position of new points or lines, and stores or returns the results, thereby enabling the processing of complex geometric relationships and the generation of cross-sections of arbitrary shapes. The aforementioned system, by constructing a complete system capable of parsing custom languages, processing mathematical expressions, and calculating geometric constraints, realizes the standardized, parameterized, and automated definition of arbitrarily complex cross-sections in railway engineering, thereby improving the standardization and efficiency of railway engineering design. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the architecture of a railway engineering arbitrary cross-section definition system based on a custom engineering language, provided in an embodiment of this application.

[0022] Figure 2 A schematic diagram illustrating the steps of the method for defining arbitrary cross-sections in railway engineering based on a custom engineering language, as provided in this application embodiment.

[0023] Figure 3 This is a schematic diagram of the parsing process of the CEL parser module provided in an embodiment of this application.

[0024] Figure 4 The flowchart of the ultra-high rotation calculation module provided in the embodiments of this application is shown.

[0025] Figure 5 This is a schematic diagram of the component assembly process of the component assembly framework module provided in the embodiments of this application.

[0026] Figure 6 A cross-sectional view of the test cases provided in the embodiments of this application. Detailed Implementation

[0027] The present application will now be described in further detail with reference to experimental examples and specific embodiments. However, this should not be construed as limiting the scope of the subject matter of the present application to the following embodiments. All technologies implemented based on the content of the present application fall within the scope of protection of the present application.

[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0029] Please refer to Figure 1 and Figure 2 , Figure 1 This is a schematic diagram of the architecture of a railway engineering arbitrary cross-section definition system based on a custom engineering language, provided in an embodiment of this application. Figure 2 This diagram illustrates the steps of a method for defining arbitrary cross-sections in railway engineering based on a custom engineering language, as provided in this embodiment. The method for defining arbitrary cross-sections in railway engineering based on a custom engineering language can be applied to a system 10 for defining arbitrary cross-sections in railway engineering based on a custom engineering language. The system 10 may include: The core data structure module 11 is used to store the data structure of basic geometric elements and composite cross-section structure involved in the cross-sectional design of railway engineering; wherein, the basic geometric elements include points, lines and regions; and the composite cross-section structure includes track cross-section.

[0030] CEL parser module 12 is used to parse cross-section definition files formed based on custom engineering language, identify definition statements in the cross-section definition files, and if a mathematical expression is identified, call the expression evaluator module to perform calculations, and convert the definition statements into basic geometric elements stored in the core data structure module 11 based on the calculation results.

[0031] The expression evaluator module 13 is used to safely evaluate the mathematical expressions in the cross-section definition file and return the calculation results to the CEL parser module 12.

[0032] The geometric constraint calculation module 14 is used to perform position calculations on the points and lines stored in the core data structure module 11 according to the geometric constraint relationships involved in the railway project, so as to determine the geometric position of new points or lines, and store the calculation results in the core data structure module 11 or return them to the CEL parser module 12 to construct arbitrary cross-sections of the railway project.

[0033] In this embodiment, the core data structure module 11 refers to a functional unit used to store and manage the geometric data involved in the cross-sectional design of railway engineering. This module defines basic geometric elements such as points, lines, and areas, as well as composite structures such as track sections. The basic geometric elements are the smallest geometric units constituting a cross-section, including points, lines, and areas. Specifically, the point definition statement defines a point in a two-dimensional coordinate system; the line definition statement defines a line segment connecting two points or a line segment defined by points and vectors; the variable definition statement defines variables that can be used in expressions; and the area definition statement defines a closed area composed of multiple points.

[0034] Specifically, a point refers to a specific location with coordinate values ​​in a two-dimensional coordinate system, used to mark key points on a cross-section, such as the midpoint of the rail top or the end point of the rail bottom; a line refers to a straight line segment connecting two points, or a ray defined by a starting point and a direction vector, used to represent the boundary of the cross-section profile, such as the rail outline or the ballast slope line; a region refers to a closed polygon formed by connecting multiple points in sequence, used to represent the parts of the cross-section that need to be filled or marked, such as the rail cross-section region or the ballast cross-section region. A composite cross-section structure refers to an overall structure with engineering significance composed of multiple basic geometric elements, including the track cross-section. A track cross-section refers to a complete cross-sectional model including railway engineering structures such as rails, sleepers, and ballast, and its geometry is described by multiple points, lines, and regions.

[0035] CEL Parser Module 12, also known as the Custom Engineering Language Parser Module, uses the Custom Engineering Language (CEL), a set of syntax rules for describing the cross-sections of railway engineering projects. This language allows for the description of the geometric structure of arbitrarily complex cross-sections in text form through statements such as variable definition, point definition, line definition, and region definition, as well as mathematical expressions. The syntax rules of the Custom Engineering Language include point definition statements for defining points in a two-dimensional coordinate system; line definition statements for defining line segments connecting two points or line segments defined by points and vectors; variable definition statements for defining variables that can be used in expressions; region definition statements for defining closed regions composed of multiple points; and mathematical expressions, supporting trigonometric functions, algebraic operations, etc.

[0036] A cross-section definition file is a text file written according to the syntax of a custom engineering language. This file contains a series of definition statements that serve as system input to generate a specific cross-section model. The definition statements in the cross-section definition file are lines of instructions written according to the syntax rules, including variable definition statements, point definition statements, line definition statements, and region definition statements. Each statement declares or defines a geometric element or variable.

[0037] CEL Parser Module 12 is used to parse cross-section definition files written in a custom engineering language. Specifically, it can include a variable parsing module for parsing and calculating variable definition statements; a point parsing module for parsing and calculating point definition statements; a line parsing module for parsing and creating line segment definitions; and a region parsing module for parsing and defining regions. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram of the parsing process of the CEL parser module provided in this embodiment of the application. The parsing process of the CEL parser module 12 specifically includes: reading the contents of the CEL file; parsing the CEL statements line by line; determining the statement type (variable, point, line, region, etc.); for variable definition statements, calling the expression evaluator to calculate the variable value; for point definition statements, calculating the point coordinates and creating a point object; for line definition statements, creating a line object; for region definition statements, defining a region object; and adding all geometric objects to the track section.

[0038] Specifically, the CEL parser module 12 performs parsing operations on the cross-section definition file by reading all its contents, analyzing the text line by line according to the syntax rules of the custom engineering language, identifying the type and components of each statement, and converting the text description into an internally processable instruction sequence. For example, when the CEL parser module 12 reads "point A=(0,0)", it identifies this as a point definition statement by analyzing the keyword "point" at the beginning of the statement, and then extracts the point name "A" and the coordinate expression "(0,0)". The process of the CEL parser module 12 identifying definition statements specifically includes determining the type of the current statement based on the keyword or syntax pattern at the beginning of the statement. For example, if the statement starts with "var", it is identified as a variable definition statement; if it starts with "point", it is identified as a point definition statement; if the expression contains mathematical operators or functions, it is identified as containing a mathematical expression. If a mathematical expression is found in the statement, the expression string is sent to the expression evaluator module 13, requesting the expression to be evaluated.

[0039] The expression evaluator module 13 is used for securely evaluating mathematical expressions. This evaluator supports: basic algebraic operations (addition, subtraction, multiplication, division, and exponentiation); trigonometric function operations (sine, cosine, tangent, and their inverse functions); hyperbolic function operations; angle-to-radian conversion functions; and other mathematical functions. The expression evaluator module 13 performs secure evaluation, including receiving a string of mathematical expressions and a set of currently valid variable values, performing syntax checks and calculations on the expression to ensure it is legal and safe, then performing the mathematical operations and returning the numerical result.

[0040] After receiving the calculation results, the CEL parser module 12 creates corresponding geometric element objects (such as point objects, line objects, and region objects) based on the parsed statement type and the calculated values, and calls the interface of the core data structure module 11 to store these objects in the memory data structure. For example, for a point definition statement, after the CEL parser module 12 calculates the coordinates of the point, it instantiates a point object, sets its name and coordinates, and then calls the "Add Point" method of the core data structure module 11 to save the object to the point collection.

[0041] The geometric constraint calculation module 14 handles the geometric relationships between points and lines in the following ways: calculating new points incrementally using dx and dy; calculating new points using gradient ratios; calculating intersections of two lines; calculating parallel offset lines; and calculating perpendicular lines. Specifically, the geometric constraint calculation module 14 performs position calculations, which means, based on common geometric constraint relationships in railway engineering cross-section design (such as increments, gradient ratios, intersections, parallel lines, and perpendicular lines), using the point and line data already stored in the core data structure module 11, solving for new point coordinates or new line equations through geometric algorithms. The geometric constraint calculation module 14 determines the geometric position of a new point or line by performing the above position calculations to obtain the precise coordinates of the new point or the equation parameters of the new line, and uses these results to generate new geometric elements.

[0042] The construction of the arbitrary cross-section of the railway project specifically includes: parsing the cross-section definition file through the CEL parser module 12, calculating the mathematical expression through the expression evaluator module 13, solving the geometric relationship through the geometric constraint calculation module 14, and uniformly storing the geometric elements through the core data structure module 11. Finally, a complete cross-section geometric model is formed in the computer memory, which can be used by subsequent modules (such as the visualization module and the export module). This model can accurately express any complex cross-section shape described by the user through a custom engineering language, thereby realizing the definition of arbitrary cross-sections.

[0043] In the above implementation process, the core data structure module uniformly stores the basic geometric elements such as points, lines, and regions involved in railway engineering cross-sections, as well as complex structures such as track cross-sections, providing a standardized data organization foundation for cross-section definition. The CEL parser module parses the cross-section definition files written in a custom engineering language, identifies the definition statements, and calls the expression evaluator module for safe evaluation when encountering mathematical expressions. Based on the calculation results, the statements are converted into geometric elements in the core data structure module, realizing automated conversion from text description to geometric model. The expression evaluator module supports various mathematical calculations such as trigonometric functions and algebraic operations, enabling cross-section definitions to directly express parameter relationships using mathematical formulas, giving the system parametric design capabilities. The geometric constraint calculation module performs position calculations on the points and lines stored in the core data structure module based on common geometric constraint relationships in railway engineering, determines the geometric position of new points or lines, and stores or returns the results, thereby enabling the handling of complex geometric relationships and the generation of cross-sections of arbitrary shapes. The aforementioned system, by constructing a complete system capable of parsing custom languages, processing mathematical expressions, and calculating geometric constraints, realizes the standardized, parameterized, and automated definition of arbitrarily complex cross-sections in railway engineering, thereby improving the standardization and efficiency of railway engineering design.

[0044] In some embodiments, the railway engineering arbitrary cross-section definition system based on a custom engineering language may further include a superelevation rotation calculation module, used to rotate points in the cross-section according to the superelevation parameters in the cross-section design of the railway engineering; the superelevation parameters include superelevation value, rotation axis, and curve direction. The superelevation rotation calculation module may also support superelevation rotation with the track centerline or inner rail as the rotation axis, and support setting left curve, right curve, or no curve direction.

[0045] Please refer to Figure 4 , Figure 4 The flowchart of the superelevation rotation calculation module provided in this application embodiment is as follows. The superelevation rotation processing flow includes: collecting all points affected by superelevation; saving the original coordinates of these points; calculating the rotation angle based on the superelevation parameters; applying rotation transformation to the points affected by superelevation; recalculating the positions of points not affected by superelevation but dependent on other points; and updating the positions of all dependent geometric elements.

[0046] When performing rotation transformation, the superelevation rotation calculation module can collect all points affected by the superelevation and save their original coordinates; then calculate the corresponding rotation angle based on the superelevation value; next, apply the rotation transformation to the points affected by the superelevation and update their spatial positions; for points not directly affected by the superelevation but whose positions are determined by other points, the module will recalculate their coordinates; finally, update the position information of all dependent geometric elements to ensure the geometric consistency of the entire cross-sectional model.

[0047] In some embodiments, the railway engineering arbitrary cross-section definition system based on a custom engineering language may further include a component assembly frame module for combining multiple cross-section components to obtain a complete cross-section. The component assembly frame module specifically includes: The component definition unit defines reusable cross-sectional components, such as rail components, sleeper components, and track bed components, supporting independent development and reuse of components. The component assembly unit assembles multiple cross-sectional components according to specified positional relationships to form a complete cross-sectional structure. The parameter transfer unit transfers common parameters between components, ensuring that different components can share the same set of design parameters (such as superelevation and gauge), maintaining overall cross-sectional consistency. Please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram of the component assembly process of the component assembly framework module provided in this application embodiment. The component assembly process may include: creating an assembly object as a container to hold multiple components; setting common parameters, including global design parameters such as superelevation axis, superelevation value, and curve direction; adding the defined cross-sectional components one by one to the assembly, and setting the relative position of each component in the assembly; after completing the addition and positioning of components, performing component assembly operations to combine the components into a complete cross-sectional model according to the set positional relationship; then, based on the previously set common parameters, applying superelevation rotation transformation to adjust the cross-sectional points of the assembly as a whole; and finally exporting the design results for subsequent visualization or engineering applications.

[0048] In some embodiments, the railway engineering arbitrary cross-section definition system based on a custom engineering language may also include a visualization and export module. This module is used to graphically present the cross-sectional geometric model generated by the design and supports outputting the design results to a common external file format, facilitating viewing, verification, and subsequent application by designers. Specifically, the visualization and export module provides real-time visualization capabilities, dynamically displaying the geometry of the cross-section during the design process. When users modify design parameters or adjust the cross-section definition, the visualization interface updates synchronously, allowing designers to instantly view the effects of modifications, promptly identify and correct design problems, and significantly improve design interactivity and intuitiveness. Simultaneously, this module supports exporting the cross-section design results to DXF format files. DXF, as a widely supported graphics exchange format, can be directly read and edited by mainstream CAD software (such as AutoCAD) and other engineering software, facilitating further processing, archiving, and collaboration with other disciplines of the design results.

[0049] For example, the following is an example of the custom engineering language syntax provided in the embodiments of this application. The custom engineering language (CEL) in this application supports the following syntax: Plaintext # Define variables var gauge = 1505 var shoulderheight = 150 # Define point point O = (0, 0) point A = O + (gauge / 2000, 0) point B = slope_from A +dy 100 ratio 1 / 1.75 # Define line line line_top = O ->A line line_bed = A + (1.75, -1) line line_shoulder = line_top parallel shoulderheight / 1000 line line_inner_rail = RO perpendicular line_bed_top_left length rtosdirection RIGHT # Define intersection point point C = intersection(line_shoulder, line_bed) # Set point properties point A affected_by_superelevation true point C affected_by_superelevation false # Define region area ballast_area = [O, A, C, B] For example, expression evaluator module 13 can specifically support the following mathematical functions: Basic trigonometric functions: sin, cos, tan; Inverse trigonometric functions: asin, acos, atan, atan2; Hyperbolic functions: sinh, cosh, tanh; Angle conversion: radians, degrees; Other functions: sqrt, pow, abs, round, min, max; Taking ballast track cross-section design as an example, the railway engineering arbitrary cross-section definition based on a custom engineering language provided in this application can quickly define complex cross-sections including sleepers, track bed, and other structures. Designers only need to write a CEL file to describe the cross-sectional geometric relationships, and the system can automatically calculate the coordinates of all points and the positions of line segments, and supports parametric adjustment and superelevation rotation calculation.

[0050] In the test cases provided in this application, there is a ballast track section on the roadbed; please refer to [link / reference]. Figure 6 , Figure 6 This is a cross-sectional view of a test case provided in an embodiment of this application. The test case sequentially includes three sub-files: a custom EL file for defining rail geometry, a custom EL file for defining sleeper geometry, and a custom EL file for defining ballast bed geometry. This test case aims to demonstrate how the system can fully describe a typical ballasted track cross-section using a custom engineering language. This cross-section consists of three core components: rails, sleepers, and ballast bed.

[0051] The custom CEL file for the rail cross-section is as follows: Plaintext # Standard 60kg / m rail section definition # Coordinate system: The origin is located at the midpoint of the top of the track, the y-axis is positive upwards, and the x-axis is positive to the right. # Define the key points of the rail point rail_bottom_center = (0, -176 / 1000)# Midpoint of rail bottom point rail_bottom_left = (-75 / 1000, -176 / 1000) # Left endpoint of rail bottom point rail_bottom_right = (75 / 1000, -176 / 1000)# Right end point of rail bottom point rail_bottom_left_top = (-75 / 1000, -164 / 1000) # Top left endpoint of rail bottom point rail_bottom_right_top = (75 / 1000, -164 / 1000) # Top right endpoint of rail bottom point rail_web_left_bottom = (-8 / 1000, -146 / 1000)# Bottom left point of the rail web point rail_web_right_bottom = (8 / 1000, -146 / 1000)# Bottom right point of the rail web point rail_web_left_top = (-8 / 1000, -42 / 1000) # Top left point of the rail web point rail_web_right_top = (8 / 1000, -42 / 1000)# Top right point of the rail web point rail_head_left = (-35 / 1000, -33 / 1000) # Left endpoint of rail head point rail_head_right = (35 / 1000, -33 / 1000) # Right end point of the rail head `point rail_head_top_left = (-35 / 1000, 0)` # Left endpoint of the top surface of the rail head. `point rail_head_top_right = (35 / 1000, 0)` # Right endpoint of the top surface of the rail head. `point rail_head_top_center = (0, 0)` # Midpoint of the top surface of the rail head. # Define rail segments line line_rail_bottom = rail_bottom_left ->rail_bottom_right line line_rail_bottom_right = rail_bottom_right ->rail_bottom_right_top line line_rail_bottom_left = rail_bottom_left ->rail_bottom_left_top line line_rail_top_right = rail_bottom_right_top ->rail_web_right_bottom line line_rail_top_left = rail_bottom_left_top ->rail_web_left_bottom line line_rail_web_left = rail_web_left_bottom ->rail_web_left_top line line_rail_web_right = rail_web_right_bottom ->rail_web_right_top line line_rail_head_bottom_left = rail_head_left ->rail_web_left_top line line_rail_head_bottom_right = rail_head_right ->rail_web_right_top line line_rail_head_left = rail_head_left ->rail_head_top_left line line_rail_head_right = rail_head_right ->rail_head_top_right line line_rail_head_top = rail_head_top_left ->rail_head_top_right # Define rail area area rail_area = [rail_bottom_center, rail_bottom_left, rail_bottom_left_top, rail_web_left_bottom, rail_web_left_top, rail_head_left, rail_head_top_left, rail_head_top_center, rail_head_top_right, rail_head_right, rail_web_right_top, rail_web_right_bottom, rail_bottom_right_top, rail_bottom_right] The custom CEL file for sleeper cross-section is as follows: Plaintext # Definition of the cross-section of the new Type III prestressed railway sleeper # Coordinate system: The origin is located at the midpoint of the top of the sleeper, the y-axis is positive upwards, and the x-axis is positive to the right. # Defining key points of sleepers point sa = (-2500 / 2000, 0)# Point on the left side of the top surface of the sleeper point sb = (-2500 / 2000, -230 / 1000)# Point on the left side of the sleeper bottom surface point sc = (2500 / 2000, -230 / 1000)# Point on the right side of the sleeper bottom surface point sd = (2500 / 2000, 0)# Point on the right side of the top surface of the sleeper # Define sleeper segment line line_sleeper_top = sd ->sa line line_sleeper_left = sa ->sb line line_sleeper_bottom = sb ->sc line line_sleeper_right = sc ->sd # Define the point affected by the superelevation point sa affected_by_superelevation true point sb affected_by_superelevation true point sc affected_by_superelevation true point sd affected_by_superelevation true # Define rail area area sleeper_area = [sa, sb, sc, sd] The custom EL file for the track bed cross-section is as follows: Plaintext # Sample CEL file of ballast track cross-section # Define variable mm var gauge = 1505 var sleeperlengh = 2500 var shoulderwidth = 400 var bedheight = 350 var bedslope = 1.75 var baseslope = 25 var railheight = 176 var fastenerheight = 10 var sleeperheight = 230 var sleeperhigher = 20 var shoulderheight = 150 var rtos = - sleeperheight + sleeperhigher var superelevation = 120 var curvedirection = -1 # Intermediate variable calculation var railsleepertop = railheight + fastenerheight + sleeperhigher var railsleeper = railheight + fastenerheight + sleeperheight var angle = asin(superelevation / gauge) var sinangle = sin(angle) var cosangle = cos(angle) var halfgauge = gauge / 2 var basepointy = (0 - halfgauge sinangle - railsleeper cosangle -bedheight + (halfgauge cosangle - railsleeper sinangle) (1 / baseslope)+railsleepertop) / 1000 var basepointx = 0 # Define basic points point O = (0, 0) # Calculate points through dx, dy increments point A = O + (0, 0) point B = A + (-sleeperlengh / 2000, 0) point D = A + (-sleeperlengh / 2000-shoulderwidth / 1000, 0) point J = A + (sleeperlengh / 2000, 0) point H = A + (sleeperlengh / 2000+shoulderwidth / 1000, 0) #point RO = O + (-gauges / 2000, 0) # Starting point below the inner rail point F = O + (basepointx, basepointy) # Define a line segment (point-to-point) line line_bed_top_left = A ->B line line_bed_top_right = J ->A # Define a line segment (point and vector) line aline_left_bed = D + (-bedslope, -1) line aline_right_bed= H + (bedslope, -1) # Define parallel lines to help determine the apex of the ballast shoulder line aline_shoulder_top = line_bed_top_left parallel shoulderheight / 1000 # Define the intersection of two lines point C = intersection(aline_shoulder_top, aline_left_bed) point I = intersection(aline_shoulder_top, aline_right_bed) # Define a line segment (point and vector) line aline_left_base = F + (-0.1 baseslope, -0.1) line aline_right_base= F + (0.1 baseslope, -0.1) # Calculate the intersection point point E = intersection(aline_left_base, aline_left_bed) point G = intersection(aline_right_base, aline_right_bed) # Define the cross-section line segments (point to point) line line_shoulder_left_inner = B ->C line line_bed_left = C ->E line line_base_left = E ->F line line_base_right = F ->G line line_bed_right = G ->I line line_shoulder_right_inner = I ->J # Set whether the point is affected by superelevation point A affected_by_superelevation true point B affected_by_superelevation true point C affected_by_superelevation false point D affected_by_superelevation true point E affected_by_superelevation false point F affected_by_superelevation false point G affected_by_superelevation false point H affected_by_superelevation true point I affected_by_superelevation false point J affected_by_superelevation true # Define the closed section of the track bed area area_ballast_bed_up = [A,B, C, D, E, F, G, H, I, J] Based on the same concept, embodiments of this application also provide another architecture for a railway engineering arbitrary cross-section definition system based on a custom engineering language, which may include: The core data structure module is used to store the data structure of basic geometric elements and composite cross-section structures involved in the cross-sectional design of railway engineering; wherein, the basic geometric elements include points, lines and regions; and the composite cross-section structure includes track cross-sections; The CEL parser module is used to parse cross-section definition files formed based on a custom engineering language, identify the definition statements in the cross-section definition files, and if a mathematical expression is identified, call the expression evaluator module to perform calculations and convert the definition statements into basic geometric elements stored in the core data structure module based on the calculation results. The expression evaluator module is used to safely evaluate the mathematical expressions in the cross-section definition file and return the calculation results to the CEL parser module. The geometric constraint calculation module is used to calculate the position of points and lines stored in the core data structure module according to the geometric constraint relationships involved in the railway project, so as to determine the geometric position of new points or lines, and store the calculation results in the core data structure module or return them to the CEL parser module to construct arbitrary cross-sections of the railway project. The superelevation rotation calculation module is used to rotate and transform points in the cross-section based on the superelevation parameters in the cross-section design of the railway project; the superelevation parameters include the superelevation value, the rotation axis, and the curve direction. The component assembly frame module is used to combine multiple cross-sectional components into a complete cross section. The visualization and export module is used to visualize the completed railway engineering cross-section in real time and export the design results as DXF format files.

[0052] It should be understood that when the various modules of the system provided in the above embodiments are working, the division of each functional module in the above description is only used as an example. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0053] The functional modules in the above embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this application.

[0054] Based on the same concept, this application also provides a method for defining arbitrary cross-sections in railway engineering based on a custom engineering language. This method can be applied to the railway engineering arbitrary cross-section definition system based on a custom engineering language provided in the above description. The method may include: The data structure for storing the basic geometric elements involved in the cross-sectional design of railway engineering and the composite cross-sectional structure; wherein, the basic geometric elements include points, lines and regions; and the composite cross-sectional structure includes track cross-sections; The cross-section definition file generated based on a custom engineering language is parsed, the definition statements in the cross-section definition file are identified, and if a mathematical expression is identified, the expression evaluator module is called to perform the calculation, and the definition statement is converted into the basic geometric elements stored in the core data structure module according to the calculation result. The mathematical expressions in the cross-section definition file are evaluated safely, and the calculation results are returned to the CEL parser module. Based on the geometric constraints involved in the railway project, the positions of the points and lines stored in the core data structure module are calculated to determine the geometric positions of new points or lines. The calculation results are then stored in the core data structure module or returned to the CEL parser module to construct any cross-section of the railway project.

[0055] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A railway engineering arbitrary cross-section definition system based on a custom engineering language, characterized in that, include: The core data structure module is used to store the data structure of basic geometric elements and composite cross-section structures involved in the cross-sectional design of railway engineering; wherein, the basic geometric elements include points, lines and regions; and the composite cross-section structure includes track cross-sections; The CEL parser module is used to parse cross-section definition files formed based on a custom engineering language, identify the definition statements in the cross-section definition files, and if a mathematical expression is identified, call the expression evaluator module to perform calculations and convert the definition statements into basic geometric elements stored in the core data structure module based on the calculation results. The expression evaluator module is used to safely evaluate the mathematical expressions in the cross-section definition file and return the calculation results to the CEL parser module. The geometric constraint calculation module is used to perform position calculations on the points and lines stored in the core data structure module according to the geometric constraint relationships involved in the railway project, so as to determine the geometric position of new points or lines, and store the calculation results in the core data structure module or return them to the CEL parser module to construct arbitrary cross-sections of the railway project.

2. The railway engineering arbitrary cross-section definition system based on a custom engineering language according to claim 1, characterized in that, The syntax rules of the custom engineering language include point definition statements, line definition statements, variable definition statements, region definition statements, and mathematical expressions; The point definition statement is used to define a point in a two-dimensional coordinate system; the line definition statement is used to define a line segment connecting two points or a line segment defined by a point and a vector; the variable definition statement is used to define a variable used in an expression; and the region definition statement is used to define a closed region composed of multiple points.

3. The railway engineering arbitrary cross-section definition system based on a custom engineering language according to claim 1, characterized in that, The system also includes a superelevation rotation calculation module, which is used to rotate and transform points in the cross section according to the superelevation parameters in the cross section design of the railway project; the superelevation parameters include superelevation value, rotation axis and curve direction.

4. The railway engineering arbitrary cross-section definition system based on a custom engineering language according to claim 3, characterized in that, The ultra-high rotation calculation module is also used to support ultra-high rotation with the track centerline or the inner rail as the rotation axis, and supports setting the left curve, right curve or no curve direction.

5. The railway engineering arbitrary section definition system based on a custom engineering language according to claim 1, characterized in that, The system also includes a component assembly frame module, which is used to combine multiple cross-sectional components to obtain a complete cross-section.

6. The railway engineering arbitrary cross-section definition system based on a custom engineering language according to claim 5, characterized in that, The component assembly framework module includes: Component definition unit, used to define reusable cross-sectional components; A component assembly unit is used to assemble multiple cross-sectional components at specified positions; The parameter passing unit is used to pass common parameters between components.

7. The railway engineering arbitrary cross-section definition system based on a custom engineering language according to claim 1, characterized in that, The system also includes: The visualization and export module is used to display the cross-sectional geometry obtained from the design and export the design results to an external file format.

8. The railway engineering arbitrary cross-section definition system based on a custom engineering language according to claim 7, characterized in that, The visualization and export module is also used to provide real-time visualization capabilities and DXF format export capabilities.

9. A railway engineering arbitrary cross-section definition system based on a custom engineering language, characterized in that, include: The core data structure module is used to store the data structure of basic geometric elements and composite cross-section structures involved in the cross-sectional design of railway engineering; wherein, the basic geometric elements include points, lines and regions; and the composite cross-section structure includes track cross-sections; The CEL parser module is used to parse cross-section definition files formed based on a custom engineering language, identify the definition statements in the cross-section definition files, and if a mathematical expression is identified, call the expression evaluator module to perform calculations and convert the definition statements into basic geometric elements stored in the core data structure module based on the calculation results. The expression evaluator module is used to safely evaluate the mathematical expressions in the cross-section definition file and return the calculation results to the CEL parser module. The geometric constraint calculation module is used to calculate the position of points and lines stored in the core data structure module according to the geometric constraint relationships involved in the railway project, so as to determine the geometric position of new points or lines, and store the calculation results in the core data structure module or return them to the CEL parser module to construct arbitrary cross-sections of the railway project. The superelevation rotation calculation module is used to rotate and transform points in the cross-section based on the superelevation parameters in the cross-section design of the railway project; the superelevation parameters include the superelevation value, the rotation axis, and the curve direction. The component assembly frame module is used to combine multiple cross-sectional components into a complete cross section. The visualization and export module is used to visualize the completed railway engineering cross-section in real time and export the design results as DXF format files.

10. A method for defining arbitrary cross-sections in railway engineering based on a custom engineering language, characterized in that, include: The data structure for storing the basic geometric elements involved in the cross-sectional design of railway engineering and the composite cross-sectional structure; wherein, the basic geometric elements include points, lines and regions; and the composite cross-sectional structure includes track cross-sections; The cross-section definition file generated based on a custom engineering language is parsed, the definition statements in the cross-section definition file are identified, and if a mathematical expression is identified, the expression evaluator module is called to perform the calculation, and the definition statement is converted into the basic geometric elements stored in the core data structure module according to the calculation result. The mathematical expressions in the cross-section definition file are evaluated securely, and the calculation results are returned to the CEL parser module. Based on the geometric constraints involved in the railway project, the positions of the points and lines stored in the core data structure module are calculated to determine the geometric positions of new points or lines. The calculation results are then stored in the core data structure module or returned to the CEL parser module to construct any cross-section of the railway project.