Method and device for mutually converting three-dimensional model and two-dimensional drawing of ocean structure
By analyzing the 3D model in the marine structure design software and generating 2D drawings in DXF format, the problems of 2D drawings not meeting design specifications and 3D models not being able to be updated in a timely manner in the existing technology are solved, achieving efficient and accurate drawing drawing and model updating.
Patent Information
- Application Number
- CN202510707006.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-19
AI Technical Summary
Existing marine structure design software has problems such as line duplication, information inconsistency, and the inability to update modified 3D models in a timely manner when outputting 2D drawings, making the design process cumbersome and error-prone.
By establishing a 3D structural model and parsing steel structure information, the Python API ezdxf library is used to generate 2D engineering drawings in DXF format. The 3D model can be updated in a timely manner by adjusting the 2D drawings, including classifying steel structure information, drawing contours, identifying legends, constructing contours, and fusing information from multiple drawings.
It realizes the automatic extraction and classification of structural steel information, improves the efficiency and accuracy of drawing, accurately identifies the outline of structural steel, reduces the workload of designers, and ensures the synchronous update of 3D models and 2D drawings.
Smart Images

Figure CN120672941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of conversion of calculation and analysis models, and in particular to a method and device for converting a three-dimensional model of an ocean structure into a two-dimensional drawing. Background Art
[0002] In actual engineering projects, general structural software is often used to perform structural design on engineering buildings or equipment. Designers need to build a three-dimensional model and perform structural verification in the structural design software, and then design two-dimensional drawings based on the model. Although the commonly used marine structural design software can output corresponding two-dimensional drawings after building the model and performing structural verification, it still has problems such as repeated lines, inconsistent information, and difficulty in secondary modification, which cannot meet the requirements of drawing design. Currently, the entire process requires reference to the three-dimensional model to redraw the two-dimensional drawings. The design process is not only cumbersome, repetitive, and prone to errors. During the design verification stage, the drawings need to be modified multiple times, but the adjusted parts cannot be updated to the three-dimensional model in a timely manner.
[0003] Therefore, it is urgent to design a method for converting marine structure three-dimensional models and two-dimensional drawings to solve the problems that the two-dimensional drawings output by traditional marine structure design software do not meet the design specifications, and the corresponding three-dimensional model cannot be updated in time after the two-dimensional drawings are modified. Summary of the Invention
[0004] In response to the above problems, the purpose of the present invention is to provide a method and device for converting between three-dimensional models of marine structures and two-dimensional drawings, which can solve the problems of traditional marine structure design software outputting two-dimensional drawings that do not meet design specifications, and the inability to update the corresponding three-dimensional model in time after modifying the two-dimensional drawings.
[0005] To achieve the above object, the present invention adopts the following technical solutions: The method for converting a three-dimensional model of an ocean structure into a two-dimensional drawing of the ocean structure comprises: Establish a 3D structural model and output 2D engineering drawings of the specified section of the 3D structural model; Adjust 2D engineering drawings to keep the 3D structural model up to date.
[0006] In the method, preferably, the step of outputting a two-dimensional engineering drawing of a specified section of the three-dimensional structural model comprises the following steps: Conduct 3D modeling in marine structure design software, complete structural verification, and output 3D structural model files with structural information; Parsing the 3D structural model file. The system identifies the 3D structural model file output by the marine structure design software. The 3D structural model file includes steel structure information closely related to the 3D model, including structural steel model, node location, cross-sectional properties, and density. Establish a national standard information database for structural steel, and classify steel structure information based on the national standard information database for structural steel and the types of structural steel; Based on the classification of steel structure information, assign values to steel structure parameters and draw the steel structure outline; Sort the steel structure information hierarchically according to the direction of the observation angle, and filter the cross-section information of the structural steel; Use the Python API ezdxf library to write all the obtained polyline, circle, and arc parameters into a new 2D drawing file in the order they are arranged, along with other information. Apply the saveas() command to save the drawing as a two-dimensional drawing in DXF format, completing all the work of outputting two-dimensional drawings from the three-dimensional model.
[0007] The method described above preferably classifies the steel structure information, specifically as follows: According to whether they meet national standards, structural steel is divided into two categories: standard parts and non-standard parts; According to the type of structural steel, it is subdivided into: H-shaped steel, angle steel, round tube, square steel; Divide by model; The assignment of steel structure parameters is specifically as follows: Parameters are assigned based on whether the steel structure is a standard part. If it is a standard part, the system matches the corresponding structural parameters from the national standard information database based on the model. If it is a non-standard part, the system traverses the structural parameters set by the user from the input model file. The drawing of the steel structure outline is specifically as follows: According to the arrangement pattern of structural steel in space, the system automatically analyzes the graphic types mapped under different observation angles, and calculates the specific coordinates of the contour lines of the images mapped by the structural steel in the six directions of east-west, north-south, and up-down based on the position of its center line.
[0008] In the method, preferably, the hierarchical sorting of the steel structure information according to the direction of the observation angle is specifically as follows: The user inputs the specified section coordinates, and the system automatically determines whether the user's observation angle is on the left or right side of the specified section, which is represented by (0,1) in the code. When the observation angle is in different directions, the structural steel of all structures within the observation range needs to be arranged in layers according to the distance from the observation point. The screening of the cross-section information of the structural steel is specifically as follows: According to the specified section coordinate data input by the user, all structural steel information near the section is automatically filtered out. The filtering range includes: the structural steel is located in the specified section, the structural steel passes through the specified section, and a certain end face or edge of the structural steel is in contact with or parallel to the specified section. The other information to be written is specifically: Calculate the centerline coordinates of all structural steels and write the centerlines using the add_line() command; Sort the x or y values of the centerline coordinates by numerical value, and use the add_aligned_dim() command to write the corner annotation; By reading the models of all steel structures, matching the model, size, material and other information of structural steel in the national standard database in turn, and applying the add_text() command to write into the material table; The system obtains the drawing number, drawing name, project, scale and other information input by the user, writes it into the block reference named after the drawing frame through add_text(), and inserts the block reference into the drawn drawing through the add_blockref() command.
[0009] The method, preferably, wherein the adjusting of the two-dimensional engineering drawings so as to enable the three-dimensional structural model to be updated in a timely manner, comprises the following steps: Parse DXF format drawings; Identify the legend; Establishment of spatial coordinate system; Construct contour lines; Structural steel positioning; Multi-drawing information fusion; Recode the model file.
[0010] In the method, preferably, the parsing of DXF format drawings is specifically: When users upload DXF format drawings to the system, the system automatically decodes the DXF format file and uses the dxftype() == 'entity type' command in the ezdxf library to traverse the relevant parameter information of all lines, circles, arcs, block references, text, pattern fills, area coverages, and annotations; The identification legend is specifically: Legends in 2D drawings usually appear in the form of blocks. The system can directly identify the type of the block based on its name. However, for legends that do not appear in block form, the system must first identify some features that set the legend. Using these features as a reference, the system searches for other features at a certain position relative to the features, ultimately identifying the complete legend structure. The spatial coordinate system is established as follows: The system defaults to (0,0,0) as the origin of the 3D coordinate system. The user needs to enter the legend position of the positioning symbol in the system. By calculating the difference between the legend position recognized by the system and the legend position entered by the user, the relative offset position of the 2D drawing relative to the 3D model in the marine structure design software can be obtained. When the input drawing is an elevation drawing: the system calculates the y value of the smallest element in the drawing, that is, the minimum z-axis position in the 3D model; based on the drawing name, it can be determined that the drawing is located in the corresponding layer structure, that is, the position of the x-axis or y-axis in the 3D model is determined; the x value of the structure in the drawing is the specific position of the remaining axis in the 3D model.
[0011] When the input drawing is a plan view: the system calculates the x and y values in the drawing, which are the actual positions of the x and y axes in the 3D model; based on the drawing name, it can be determined that the drawing is located in the corresponding layer structure, and the position of the z axis in the 3D model can be determined.
[0012] The method, preferably, the constructing of the contour line specifically comprises the following steps: Create a recognized list and an unrecognized list to store recognized lines and unrecognized lines respectively. At the beginning, all lines are put into the recognized list. Data sorting: Traverse all the line coordinates [(x1, y1), (x2, y2)]. Assuming x1>x2, the line coordinates are adjusted to [(x2, y2), (x1, y1)]. Sort all the line coordinates by y value, and then re-sort the subclass arrays of the first sort by x value. Delete center line: Determine whether the line is a polyline based on the line type and delete the data. Delete the hatch line: Assuming that the hatch line exists in the form of a normal straight line, you need to traverse the data in sequence according to the size of the y value. If the straight line angle is the same ( ≠0 or ≠90) and appears multiple times, the group of straight lines can be determined to be hatch lines and the data group can be removed; if the hatch lines exist in the form of pattern fills, use the dxftype() == 'pattern' command to find the data group and delete it; Evaluate the value of all lines according to the following formula;
[0013]
[0014]
[0015] Identify structural contour lines: The system uses the line with the smallest y-value as the starting line, first searches for the line with the same y-value as the second valid line, then searches for the line with the same x-value as the third valid line, and so on. If the values are the same, skip them until you return to the starting line. If there are multiple lines that meet the conditions, determine their total value, and the one with the smallest total value is the optimal line. Add the starting line and all optimal lines to the sub-list of the identified list. Process non-connected contour lines. Remove identical data: The system deletes all identical contour line data by applying the list(OrderedDict.fromkeys(Recognized List)) command; Contour type determination: Determine the number of straight lines that make up the contour and whether the contour is closed. If it is not closed, discard the data.
[0016] In the method, preferably, the structural steel positioning is specifically as follows: Calculate the center point (x, y) of all contour lines. In plan view, the x value represents the relative distance of the structure in the east-west direction, and the y value represents the relative height of the structure. In elevation view, the x value represents the relative distance of the structure in the east-west or north-south direction, and the y value represents the relative height of the structure. The multi-drawing information fusion is specifically as follows: All three-view drawings containing structural steel are uploaded to the system. According to the height position of the structural steel and its arrangement order in the east-west or north-south direction, the obtained geometric data of the multi-segment lines, circles, and arcs are combined to reconstruct the three-dimensional steel structure; the geometric information of the length, width, height, and diameter of the structural steel is calculated and compared with the non-geometric information of the corresponding position. If the information matches, the steel structure information is correct; if the data does not match or the model information is missing, it will be recorded as abnormal data for further verification and processing.
[0017] In the method, preferably, the re-encoding model file is specifically: The structural steel type, model, and structural parameters are written into a new model file in sequence according to the encoding format of the model file. The original model file is parsed, and the mechanical parameters including the elastic modulus, shear modulus, and yield strength of the structural steel as well as the environmental working condition data are rewritten into the new model file. The generated file is then imported into the marine structure design software for structural modeling and rendering, completing the entire work of generating a three-dimensional model based on the two-dimensional drawing.
[0018] The present invention also provides a device for converting a three-dimensional model of an ocean structure into a two-dimensional drawing, comprising: The first processing unit is used to establish a three-dimensional structural model and output a two-dimensional engineering drawing of a specified section of the three-dimensional structural model; The second processing unit is used to adjust the two-dimensional engineering drawings so that the three-dimensional structural model can be updated in time.
[0019] The present invention has the following advantages due to the adoption of the above technical solution: (1) The present invention can extract structural steel information and classify it according to the type and property characteristics of the structural steel. The system performs geometric calculations on the extracted information based on the spatial arrangement of the structural steel, generating contour coordinate sets under different observation angles, thereby replacing the traditional method of manually measuring three-dimensional models to obtain structural steel data by designers. The present invention realizes the automated extraction, classification, and calculation of structural steel information, significantly improving the efficiency and accuracy of drawing, and solving the time-consuming and error-prone problems of the existing technology. (2) The present invention obtains drawing information by applying a DXF format file decoding method, which can accurately extract the attributes of graphic elements such as lines, circles, arcs, block references, text, and pattern fills in the drawings. This overcomes the shortcomings of traditional image recognition methods in terms of insufficient accuracy in identifying similar or overlapping lines, as well as the inability to accurately locate the starting point of a line or the position of text, and significantly improves the accuracy of two-dimensional drawing information recognition; (3) The present invention can accurately identify the cross-sectional contour line coordinates of structural steel in complex arrangements such as adjacent and stacked structures, significantly improving the accuracy of structural steel contour recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. Throughout the drawings, the same reference numerals are used to denote the same components. In the drawings: Figure 1 It is the steel structure information classification diagram in the present invention; Figure 2 It is a three-dimensional model diagram of the marine structure in the present invention; Figure 3 It is the two-dimensional drawing generated in the present invention (z-axis observation direction); Figure 4 is the two-dimensional drawing identified in the present invention; Figure 5 It is a three-dimensional model diagram of the structure generated in the present invention; Figure 6 It is the system interface for converting three-dimensional models and two-dimensional models of the present invention; Figure 7 It is a flow chart of outputting two-dimensional drawings based on a three-dimensional model in the present invention; Figure 8 It is a flow chart of generating a three-dimensional model based on a two-dimensional drawing in the present invention. DETAILED DESCRIPTION
[0021] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0022] The present invention provides a method for converting between a three-dimensional model of a marine structure and a two-dimensional drawing. By parsing the three-dimensional model data of the marine structure design software containing parameters such as structural materials and cross-sectional properties, combining the model's arrangement rules in three-dimensional space, the cross-sectional view drawing method, and the drawing requirements of actual engineering drawings, the data is written into a new two-dimensional file according to the DXF group code rules to achieve automatic output of engineering drawings. The present invention solves the problems of low efficiency and insufficient precision in the traditional drawing process, significantly improves the accuracy and efficiency of engineering drawing generation, provides efficient technical support for engineering design, and has wide application value. By parsing the encoding method of DXF format files containing various types of graphic element information such as straight lines, circles, arcs, and text in the drawings, a structural steel contour recognition method based on two-dimensional drawings is provided, which can accurately extract the coordinate data of the structural steel cross-sectional contour line. The present invention realizes the function of automatically extracting key data from two-dimensional drawings and reconstructing three-dimensional models, significantly reducing the workload of designers who manually establish three-dimensional models. For projects that lack three-dimensional models or only need to partially modify two-dimensional drawings, three-dimensional models can be quickly generated based on existing drawings.
[0023] The method for converting a three-dimensional model of an ocean structure into a two-dimensional drawing provided by the present invention comprises: S1. Establish a 3D structural model and output a 2D engineering drawing of a specified section of the 3D structural model; S2. Adjust the 2D engineering drawings so that the 3D structural model can be updated in a timely manner.
[0024] In the above embodiment, preferably, Figure 7 As shown, the output of a two-dimensional engineering drawing of a specified section of a three-dimensional structural model includes the following steps: (1) Carry out 3D modeling in the marine structure design software, complete the structure verification, and output the 3D structure model file with structure information; the 3D structure model is as follows: Figure 2 shown.
[0025] (2) parsing the three-dimensional structural model file, the system identifies the three-dimensional structural model file output by the marine structure design software, the three-dimensional structural model file includes steel structure information closely related to the three-dimensional model, the information includes structural steel model, node location, cross-sectional properties and density; (3) Establish a national standard information database for structural steel and import commonly used national standard information for structural steel into the system. The reference standards include GB / T 1591-2018, GB / T 700-2006, etc.
[0026] (4) Classify steel structure information based on the national standard information database of structural steel and the types of structural steel; (5) Based on the classification of steel structure information, assign values to steel structure parameters. (6) Draw the outline of the steel structure; (7) Sort the steel structure information hierarchically according to the direction of the observation angle; (8) Screening the cross-section information of structural steel; (9) Using the Python API ezdxf library, write the parameters of all polylines, circles, and arcs obtained in the order of arrangement into a new two-dimensional drawing file; (10) Write other information; (11) Apply the saveas() command to save the drawing as a 2D drawing in DXF format, completing all the work of outputting 2D drawings from the 3D model. The generated 2D drawings are as follows: Figure 3 shown.
[0027] In the above embodiment, preferably, the steel structure information is classified as follows: According to whether they meet national standards, structural steel is divided into two categories: standard parts and non-standard parts; According to the type of structural steel, it is subdivided into: H-shaped steel, angle steel, round tube, square steel; Classification according to different models; taking H-shaped steel as an example, it can be divided into H300300, H300150, H440300, etc. according to different models. The specific structure classification is as follows Figure 1 shown.
[0028] The assignment of steel structure parameters is specifically as follows: Parameters are assigned according to whether the steel structure is a standard part. When it is determined to be a standard part, the system matches the corresponding structural parameters from the national standard information database according to the model; when it is determined to be a non-standard part, the system traverses the structural parameters set by the user from the input model file; the data structure takes H-shaped steel as an example: [start node (x1, y1, z1), end node (x2, y2, z2), section height (H), section width (B), flange thickness (t1), web thickness (t2)].
[0029] The drawing of the steel structure outline is specifically as follows: Based on the spatial arrangement of the structural steel, the type of graphics it projects from different viewing angles is automatically analyzed. Based on the position of its centerline, the specific coordinates of the contour lines of the images projected by the structural steel in the six directions of east-west, north-south, and up-down are calculated. Taking H-shaped structural steel as an example, assuming that the structural steel is placed parallel to the x-axis, then its observed shape along the east-west direction is the letter H. The method for calculating the coordinate points of its contour lines is as shown in formula (1). All coordinate points are sorted according to the order of contour line composition and a closed polyline is generated. The polyline is saved in the format [a, b, ···, l].
[0030]
[0031] Where: hight is the section height, is the cross-section width, is the wing thickness, is the web thickness.
[0032] In the above embodiment, preferably, the hierarchical sorting of the steel structure information according to the direction of the observation angle is specifically as follows: The user inputs the specified section coordinates, and the system automatically determines whether the user's observation angle is on the left or right side of the specified section, which is represented by (0,1) in the code. When the observation angle is in different directions, the structural steel of all structures within the observation range needs to be arranged in layers according to the distance from the observation point. The screening of the cross-section information of the structural steel is specifically as follows: According to the specified section coordinate data input by the user, all structural steel information near the section is automatically filtered out. The filtering range includes: the structural steel is located in the specified section, the structural steel passes through the specified section, and a certain end face or edge of the structural steel is in contact with or parallel to the specified section. The system uses the Python API ezdxf library to write all the obtained polyline, circle, and arc parameters into a new 2D drawing file in the order of arrangement. The specific writing instructions are shown in Table 1. By applying the overlay command, the structural steel can achieve a layered masking effect in the drawing.
[0033] Table 1 Specific parameters required for writing instructions and DXF group codes for each element of a 2D drawing
[0034] The other information to be written is specifically: Calculate the centerline coordinates of all structural steels and write the centerlines using the add_line() command; Sort the x or y values of the centerline coordinates by numerical value, and use the add_aligned_dim() command to write the corner annotation; By reading the models of all steel structures, matching the model, size, material and other information of structural steel in the national standard database in turn, and applying the add_text() command to write into the material table; The system obtains the drawing number, drawing name, project, scale and other information input by the user, writes it into the block reference named after the drawing frame through add_text(), and inserts the block reference into the drawn drawing through the add_blockref() command.
[0035] In the above embodiment, preferably, Figure 8 The step of adjusting the two-dimensional engineering drawings so that the three-dimensional structural model can be updated in a timely manner includes the following steps: (1) Parsing DXF format drawings; Among them, the recognized two-dimensional drawings are as follows Figure 4 As shown; (2) Identify the legend; (3) Establishment of spatial coordinate system; (4) Constructing contour lines; (5) Structural steel positioning; (6) Multi-drawing information fusion; (7) Re-encode the model file. The re-encoded 3D model is as follows: Figure 5 shown.
[0036] In the above embodiment, preferably, the parsing of the DXF format drawing is specifically: When users upload DXF format drawings to the system, the system automatically decodes the DXF format file and uses the dxftype() == 'entity type' command in the ezdxf library to traverse the relevant parameter information of all lines, circles, arcs, block references, text, pattern fills, area coverages, and annotations; the specific parameter requirements are shown in Table 1.
[0037] The identification legend is specifically: Legends in 2D drawings usually appear in the form of blocks. The system can directly identify the type of the block based on its name. However, for legends that do not appear in block form, the system needs to first identify some features that set the legend, and then use this feature as a reference to find other feature parts at a certain position relative to this feature, and finally identify the complete legend structure. Figure 2 Take the XA section symbol in as an example: the system first identifies the insertion point position of the text feature XA, and then uses the coordinates of the point as a reference to find a circle with a radius r and a straight line with a length l within its radius a, and the complete XA section symbol can be obtained.
[0038] The spatial coordinate system is established as follows: The system defaults to (0,0,0) as the origin of the 3D coordinate system. Users need to enter the legend position of the positioning symbols in the system, such as the y-axis coordinate values corresponding to the XA and XB section symbols, and the x-axis values corresponding to the 1 and 2 section symbols. By calculating the difference between the legend position recognized by the system and the legend position entered by the user, the relative offset position of the 2D drawing relative to the 3D model in the marine structure design software can be calculated. When the input drawing is an elevation drawing: the system calculates the y value of the smallest element in the drawing, that is, the minimum z-axis position in the 3D model; based on the drawing name, it can be determined that the drawing is located in the corresponding layer structure, that is, the position of the x-axis or y-axis in the 3D model is determined; the x value of the structure in the drawing is the specific position of the remaining axis in the 3D model.
[0039] When the input drawing is a plan view: the system calculates the x and y values in the drawing, which are the actual positions of the x and y axes in the 3D model; based on the drawing name, it can be determined that the drawing is located in the corresponding layer structure, and the position of the z axis in the 3D model can be determined.
[0040] In the above embodiment, preferably, constructing the contour line specifically includes the following steps: Create a recognized list (Recognized List) and an unrecognized list (Not recognized List) to store recognized lines and unrecognized lines respectively. In the initial stage, all lines are placed in the recognized list (RecognizedList); Data sorting: Traverse all line coordinates [(x1,y1), (x2,y2)]. Assuming x1>x2, the line coordinates are adjusted to [(x2,y2), (x1,y1)]. Sort all line coordinates according to the size of the y value, and then re-sort the subclass arrays of the first sort according to the size of the x value. The array structure example is: [[(x1,y1),(x2,y2)],[(x3,y3),(x4,y4)],[[x5,y5]],...]; Delete center line: Determine whether a line is a polyline (center line) based on the line type and delete the data. Delete the hatch line: Assuming that the hatch line exists in the form of a normal straight line, you need to traverse the data in sequence according to the size of the y value. If the straight line angle is the same ( ≠0 or ≠90) and appears multiple times (>2 times), the group of lines can be determined to be hatch lines and the data group can be removed; if the hatch lines exist in the form of pattern fills, use the dxftype() == 'pattern' command to find the data group and delete it; Evaluate the value of all lines according to the following formula (4); (2) (3) (4) Identify structural contour lines: The system takes the straight line with the smallest y-value as the starting line, first searches for the straight line with the same y-value as the second valid straight line, then searches for the straight line with the same x-value as the third valid straight line, and so on; if the values are the same, skip them until returning to the starting straight line position; if there are multiple qualified straight lines, judge their total value, and the one with the smallest total value is the optimal straight line; add the starting straight line and all the optimal straight lines to the sub-category list of the identified list; process non-connected contour lines; take square steel as an example, its cross-sectional shape is a U-shaped, which does not meet the requirements of a single closed contour line, and needs to be identified separately by referring to the method of identifying the legend.
[0041] Remove identical data: The system deletes all identical contour line data by applying the list(OrderedDict.fromkeys(Recognized List)) command; Contour type determination: Determine the number of straight lines that make up the contour and whether the contour is closed. If it is not closed, the data set is discarded. The types of contours can be: rectangular, H-shaped, L-shaped, U-shaped, etc.
[0042] In the above embodiment, preferably, the structural steel is positioned as follows: Calculate the center point (x, y) of all contour lines. In plan view, the x value represents the relative distance of the structure in the east-west direction, and the y value represents the relative height of the structure. In elevation view, the x value represents the relative distance of the structure in the east-west or north-south direction, and the y value represents the relative height of the structure. The multi-drawing information fusion is specifically as follows: All three-view drawings containing structural steel are uploaded to the system. According to the height position of the structural steel and its arrangement order in the east-west or north-south direction, the obtained geometric data of the multi-segment lines, circles, and arcs are combined to reconstruct the three-dimensional steel structure; the geometric information of the length, width, height, and diameter of the structural steel is calculated and compared with the non-geometric information of the corresponding position. If the information matches, the steel structure information is correct; if the data does not match or the model information is missing, it will be recorded as abnormal data for further verification and processing.
[0043] In the above embodiment, preferably, the re-encoding model file is specifically: The structural steel type, model, and structural parameters are written into a new model file in sequence according to the encoding format of the model file. The original model file is parsed, and the mechanical parameters including the elastic modulus, shear modulus, and yield strength of the structural steel as well as the environmental working condition data are rewritten into the new model file. The generated file is then imported into the marine structure design software for structural modeling and rendering, completing the entire work of generating a three-dimensional model based on the two-dimensional drawing.
[0044] It should be noted that the system in the present invention refers to a computer system, more specifically a 3D model and CAD drawing conversion system 1.0. Its interface is as follows Figure 6 shown.
[0045] The present invention also provides a device for converting a three-dimensional model of an ocean structure into a two-dimensional drawing, comprising: The first processing unit is used to establish a three-dimensional structural model and output a two-dimensional engineering drawing of a specified section of the three-dimensional structural model; The second processing unit is used to adjust the two-dimensional engineering drawings so that the three-dimensional structural model can be updated in time.
[0046] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for converting a three-dimensional model of an ocean structure into a two-dimensional drawing, characterized in that: include: Establish a 3D structural model and output 2D engineering drawings of the specified section of the 3D structural model; Adjust 2D engineering drawings to keep the 3D structural model up to date.
2. The method according to claim 1, characterized in that Outputting a two-dimensional engineering drawing of a specified section of a three-dimensional structural model comprises the following steps: Conduct 3D modeling in marine structure design software, complete structural verification, and output 3D structural model files with structural information; Parsing the 3D structural model file. The system identifies the 3D structural model file output by the marine structure design software. The 3D structural model file includes steel structure information closely related to the 3D model, including structural steel model, node location, cross-sectional properties, and density. Establish a national standard information database for structural steel, and classify steel structure information based on the national standard information database for structural steel and the types of structural steel; Based on the classification of steel structure information, assign values to steel structure parameters and draw the steel structure outline; Sort the steel structure information hierarchically according to the direction of the observation angle, and filter the cross-section information of the structural steel; Use the Python API ezdxf library to write all the obtained polyline, circle, and arc parameters into a new 2D drawing file in the order they are arranged, along with other information. Apply the saveas() command to save the drawing as a two-dimensional drawing in DXF format, completing all the work of outputting two-dimensional drawings from the three-dimensional model.
3. The method according to claim 2, characterized in that The steel structure information is classified into: According to whether they meet national standards, structural steel is divided into two categories: standard parts and non-standard parts; According to the type of structural steel, it is subdivided into: H-shaped steel, angle steel, round tube, square steel; Divide by model; The assignment of steel structure parameters is specifically as follows: Parameters are assigned based on whether the steel structure is a standard part. If it is a standard part, the system matches the corresponding structural parameters from the national standard information database based on the model. If it is a non-standard part, the system traverses the structural parameters set by the user from the input model file. The drawing of the steel structure outline is specifically as follows: According to the arrangement pattern of structural steel in space, the system automatically analyzes the graphic types mapped under different observation angles, and calculates the specific coordinates of the contour lines of the images mapped by the structural steel in the six directions of east-west, north-south, and up-down based on the position of its center line.
4. The method according to claim 2, characterized in that The steel structure information is hierarchically sorted according to the direction of the observation angle, specifically: The user inputs the specified section coordinates, and the system automatically determines whether the user's observation angle is on the left or right side of the specified section, which is represented by (0,1) in the code. When the observation angle is in different directions, the structural steel of all structures within the observation range needs to be arranged in layers according to the distance from the observation point. The screening of the cross-section information of the structural steel is specifically as follows: According to the specified section coordinate data input by the user, all structural steel information near the section is automatically filtered out. The filtering range includes: the structural steel is located in the specified section, the structural steel passes through the specified section, and a certain end face or edge of the structural steel is in contact with or parallel to the specified section. The other information to be written is specifically: Calculate the centerline coordinates of all structural steels and write the centerlines using the add_line() command; Sort the x or y values of the centerline coordinates by numerical value, and use the add_aligned_dim() command to write the corner annotation; By reading the models of all steel structures, matching the model, size, material and other information of structural steel in the national standard database in turn, and applying the add_text() command to write into the material table; The system obtains the drawing number, drawing name, project, scale and other information input by the user, writes it into the block reference named after the drawing frame through add_text(), and inserts the block reference into the drawn drawing through the add_blockref() command.
5. The method according to claim 2, characterized in that The step of adjusting the two-dimensional engineering drawings so that the three-dimensional structural model can be updated in a timely manner includes the following steps: Parse DXF format drawings; Identify the legend; Establishment of spatial coordinate system; Construct contour lines; Structural steel positioning; Multi-drawing information fusion; Recode the model file.
6. The method according to claim 5, characterized in that The parsing of DXF format drawings is specifically as follows: When users upload DXF format drawings to the system, the system automatically decodes the DXF format file and uses the dxftype() == 'entity type' command in the ezdxf library to traverse the relevant parameter information of all lines, circles, arcs, block references, text, pattern fills, area coverages, and annotations; The identification legend is specifically: Legends in 2D drawings usually appear in the form of blocks. The system can directly identify the type of the block based on its name. However, for legends that do not appear in block form, the system must first identify some features that set the legend. Using these features as a reference, the system searches for other features at a certain position relative to the features, ultimately identifying the complete legend structure. The spatial coordinate system is established as follows: The system defaults to (0,0,0) as the origin of the 3D coordinate system. The user needs to enter the legend position of the positioning symbol in the system. By calculating the difference between the legend position recognized by the system and the legend position entered by the user, the relative offset position of the 2D drawing relative to the 3D model in the marine structure design software can be obtained. When the input drawing is an elevation: the system calculates the y-value of the smallest element in the drawing, which is the smallest z-axis position in the 3D model. The drawing name determines the location of the drawing in the corresponding layer structure, which determines the position of the x-axis or y-axis in the 3D model. The x-value of the structure in the drawing is the specific position of the remaining axis in the 3D model. When the input drawing is a plan view: the system calculates the x and y values in the drawing, which are the actual positions of the x and y axes in the 3D model; based on the drawing name, it can be determined that the drawing is located in the corresponding layer structure, and the position of the z axis in the 3D model can be determined.
7. The method according to claim 5, characterized in that The construction of the contour line specifically includes the following steps: Create a recognized list and an unrecognized list to store recognized lines and unrecognized lines respectively. At the beginning, all lines are put into the recognized list. Data sorting: traverse all the straight line coordinates [(x1, y1), (x2, y2)], assuming x1>x2, the straight line coordinates are adjusted to [(x2, y2), (x1, y1)]; sort all the straight line coordinates according to the size of the y value, and then sort the subclass array of the first sorting according to the size of the x value; Delete center line: Determine whether the line is a polyline based on the line type and delete the data. Delete the hatch line: Assuming that the hatch line exists in the form of a normal straight line, you need to traverse the data in sequence according to the size of the y value. If the straight line angle is the same ( ≠0 or ≠90) and appears multiple times, the group of straight lines can be determined to be hatch lines and the data group can be removed; if the hatch lines exist in the form of pattern fills, use the dxftype() == 'pattern' command to find the data group and delete it; Evaluate the value of all lines according to the following formula; Identify structural contour lines: The system uses the line with the smallest y-value as the starting line, first searches for the line with the same y-value as the second valid line, then searches for the line with the same x-value as the third valid line, and so on. If the values are the same, skip them until you return to the starting line. If there are multiple lines that meet the conditions, determine their total value, and the one with the smallest total value is the optimal line. Add the starting line and all optimal lines to the sub-list of the identified list. Process non-connected contour lines. Remove identical data: The system deletes all identical contour line data by applying the list(OrderedDict.fromkeys(Recognized List)) command; Contour type determination: Determine the number of straight lines that make up the contour and whether the contour is closed. If it is not closed, discard the data.
8. The method according to claim 5, characterized in that The structural steel positioning is specifically as follows: Calculate the center point (x, y) of all contour lines. In plan view, the x value represents the relative distance of the structure in the east-west direction, and the y value represents the relative height of the structure. In elevation view, the x value represents the relative distance of the structure in the east-west or north-south direction, and the y value represents the relative height of the structure. The multi-drawing information fusion is specifically as follows: All three-view drawings containing structural steel are uploaded to the system. According to the height position of the structural steel and its arrangement order in the east-west or north-south direction, the obtained geometric data of the multi-segment lines, circles, and arcs are combined to reconstruct the three-dimensional steel structure; the geometric information of the length, width, height, and diameter of the structural steel is calculated and compared with the non-geometric information of the corresponding position. If the information matches, the steel structure information is correct; if the data does not match or the model information is missing, it will be recorded as abnormal data for further verification and processing.
9. The method according to claim 5, characterized in that The re-encoding model file is specifically: The structural steel type, model, and structural parameters are written into a new model file in sequence according to the encoding format of the model file. The original model file is parsed, and the mechanical parameters including the elastic modulus, shear modulus, and yield strength of the structural steel as well as the environmental working condition data are rewritten into the new model file. The generated file is then imported into the marine structure design software for structural modeling and rendering, completing the entire work of generating a three-dimensional model based on the two-dimensional drawing.
10. A device for converting a three-dimensional model of an ocean structure into a two-dimensional drawing, characterized in that: include: The first processing unit is used to establish a three-dimensional structural model and output a two-dimensional engineering drawing of a specified section of the three-dimensional structural model; The second processing unit is used to adjust the two-dimensional engineering drawings so that the three-dimensional structural model can be updated in time.
Citation Information
Cited By
Building construction drawing design model construction method based on BIM
CN121525139A
A building construction drawing design model construction method based on BIM
CN121525139B
Non-standard embedded part structured data information providing method
CN121859421A
A method for extracting structured data of non-standard embedded parts
CN121859421B