A method for extracting hull line coordinates based on CAD

Through the secondary development of CAD, the hull line coordinates are automatically extracted and the target line is generated by using rib line interpolation, which solves the problem of low efficiency in manual acquisition of type line coordinates in the existing technology, significantly reduces labor intensity and working time, and improves the Design efficiency and quality.

CN118862312BActive Publication Date: 2024-12-20NANTONG COSCO KHI SHIP ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411328746.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-20
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

In the prior art, obtaining the coordinates of the hull type line requires manual drawing of auxiliary lines and measurement coordinates. Especially in positions where the curvature of the bow and stern type line changes greatly, the labor intensity is high, and a large amount of data is required to manually record, which is inefficient.

Method used

Through the secondary development of CAD, the coordinates of the line at any position of the hull are automatically extracted, and the target line is generated by interpolation of rib line and adjacent rib line, and the coordinate data is output to the spreadsheet file, reducing the amount of manual operation.

Benefits of technology

Automatic extraction of line coordinates is realized, reducing manual workload, significantly reducing work time, and improving design efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862312B_ABST
    Figure CN118862312B_ABST
Patent Text Reader

Abstract

The present invention discloses a hull line coordinate extraction method based on CAD, which relates to the field of ship structure design, and comprises the following steps: step S10, comprising: inputting the whole ship rib position information, and selecting the whole ship rib position line in the CAD drawing; step S20, comprising: inputting one or more target line positions X where the coordinates need to be extracted; F ; Step S30, including, automatically obtaining the target line; Step S40, including, automatically extracting the coordinates of each point on the target line; Step S50, including, outputting the coordinate data to a spreadsheet file. Through the secondary development of CAD, the line coordinates of any position of the hull are automatically extracted, and these coordinate data are reorganized according to the requirements of different standard calculation software, which replaces the traditional manual measurement method, improves the design process and reduces the amount of manual work, achieving the effect of significantly reducing the operation time and improving the design quality and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of ship structure design, and in particular to a CAD-based hull line coordinate extraction method. Background Art

[0002] When evaluating the structural strength according to the requirements of classification society regulations, the standard calculation software provided by each classification society is generally used for structural modeling. The line coordinates of the hull outer plate (i.e. the Y and Z coordinates of each point on the line) are required for modeling. Generally, the line coordinates are filled in or imported into the standard calculation software.

[0003] In order to obtain the coordinates of the lines, the traditional approach is to obtain all the two-dimensional lines whose coordinates need to be extracted through the three-dimensional model of the hull, manually draw a series of horizontal or vertical auxiliary lines in the CAD line drawing, and measure the Y and Z coordinates of the intersection of the auxiliary lines and the lines, and record them in order in a spreadsheet. According to the requirements of different standard calculation software, the coordinate data needs to be numbered, the units converted, etc., and finally these coordinate data are filled in or imported into the standard calculation software for modeling. Each ship requires multiple modeling positions. In order to obtain the line coordinates corresponding to each modeling position, it is necessary to manually draw a large number of auxiliary lines, measure coordinates, and record data, especially at positions where the curvature of the bow and stern lines changes greatly, which is labor-intensive. Summary of the invention

[0004] The purpose of the present invention is to provide a CAD-based hull line coordinate extraction method, which can automatically extract the line coordinates of any position of the hull through the secondary development of CAD, and output the coordinate data to a table file, thereby reducing labor intensity.

[0005] The above technical objectives of the present invention are achieved through the following technical solutions:

[0006] A CAD-based hull line coordinate extraction method comprises the following steps:

[0007] Step S10, including inputting the whole ship rib position information and selecting the whole ship rib position line in the CAD drawing;

[0008] Step S20 includes inputting one or more target line positions X where coordinates need to be extracted. F ;

[0009] Step S30 includes automatically obtaining a target line, and when the target line is at a position X F With a certain rib coordinate X n If the same, the rib position line n is used as the target line; when the target line position X F At rib coordinate X n and X n+1When the target line is between , the target line is generated by interpolation of rib line n and rib line n+1;

[0010] Step S40, including automatically extracting the coordinates of each point on the target profile;

[0011] Step S50 includes outputting the coordinate data to a spreadsheet file.

[0012] Furthermore, in step S10, the rib position information is input in the form of [starting rib position, ending rib position, adjacent rib position spacing], the legality of the input information is checked, and the number of rib position numbers of the entire ship and the coordinate X corresponding to each rib position number n are calculated based on the input information. n .

[0013] Furthermore, in step S10, after selecting the rib position lines of the entire ship, it is checked whether the number of rib position numbers calculated is consistent with the number of rib position lines selected. If they are inconsistent, it is required to add, delete or reselect rib position lines.

[0014] Furthermore, in step S30, the process of generating the target profile by interpolating the rib bit line n and the rib bit line n+1 includes:

[0015] Step S31, setting a step value d to control the distance between adjacent interpolation points, thereby controlling the number of generated interpolation points;

[0016] Step S32, obtaining the coordinates (Y Q1 , Z Q1 ), draw an auxiliary circle with Q1 as the center and d as the radius, and obtain the coordinates of the intersection point Q2 of the auxiliary circle and the rib position line n (Y Q2 , Z Q2 ); Draw an auxiliary circle with Q2 as the center and d as the radius, and obtain the coordinates of the intersection point Q3 of the auxiliary circle and the rib position line n (Y Q3 , Z Q3 )...Finally, get all points Q on the rib line n k The coordinates (Y Qk , Z Qk );

[0017] Step S33, according to step S32, all points P on the rib bit line n+1 are also obtained k The coordinates (Y Pk , Z Pk );

[0018] Step S34, according to Q k and P k The coordinates of all points A on the target line can be interpolated k The coordinates (Y Ak , Z Ak ).

[0019] Furthermore, in step S34, all points A on the target line k The coordinate calculation formula is as follows:

[0020] ;

[0021] .

[0022] Furthermore, the method further includes step S35 of respectively obtaining the end points of rib line n and rib line n+1, and then interpolating the end point of the target profile line according to step S34.

[0023] Furthermore, when the rib line n is used as the target profile, the step value d is set to control the number of extraction points on the target profile, and some points on the target profile are removed.

[0024] Furthermore, the process of removing some points on the target profile specifically includes:

[0025] First extract the starting point coordinates of the target line, and then extract backwards from the starting point coordinates.

[0026] The last point on the target line whose coordinates have been extracted is recorded as A K-1 , and its subsequent points are recorded as a1, a2, ...a i , their distances from the previous point are recorded as d1, d2, ...d i ;

[0027] Check (d1+d2), (d1+d2+d3), ... (d1+d2+...+d i ) is greater than the step value d, until the check is (d1+d2+…+d i ) is greater than the step value d, then a i-1 Point A K and extract its coordinates;

[0028] Repeat the above steps until all points between the start point and the end point of the target line are traversed.

[0029] Furthermore, in step S50, before outputting the data, the data is reorganized in a corresponding format according to the user's selection.

[0030] Furthermore, the method further includes step S60, which includes repeating steps S30 to S50 to extract the coordinates of each point on the next target profile until the coordinates of each point on all target profiles are extracted.

[0031] In summary, the present invention has the following beneficial effects:

[0032] The present invention utilizes the CAD secondary development program to automatically extract the coordinates of the hull lines at any position, control the number of coordinate points according to the set step value, and the output coordinate data can be used by calculation software of different specifications; this method replaces the traditional manual measurement method, improves the design process and reduces the amount of manual work, significantly reduces the operation time, and is beneficial to improving the design quality and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic flow chart of a method for extracting hull line coordinates based on CAD of the present invention;

[0034] Figure 2 It is a schematic diagram of rib position lines and lines in a hull line coordinate extraction method based on CAD of the present invention;

[0035] Figure 3 This is a schematic diagram of "line interpolation" in a CAD-based hull line coordinate extraction method of the present invention.

[0036] Figure 4 It is a schematic diagram of "extracting coordinates" in a CAD-based hull line coordinate extraction method of the present invention. DETAILED DESCRIPTION

[0037] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings, and this embodiment does not constitute a limitation of the present invention. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0038] A CAD-based method for extracting hull line coordinates, such as Figure 1 and Figure 2 As shown in the figure, the CAD secondary development program is used to realize the automatic extraction of the type line coordinates.

[0039] First of all, the definitions of "molded line" and "rib position line" are explained; at any position in the ship's length direction (X-axis), the intersection of the YZ cross section and the outer plate is the molded line, which is a multi-segment line connected by a series of coordinate points; in ship design, a series of integer rib position numbers are generally used to mark the position in the ship's length direction, and the molded lines corresponding to these rib position numbers are rib position lines, so the molded lines include rib position lines.

[0040] The method for extracting the coordinates of the type line in this embodiment includes the following steps:

[0041] Step S10, including inputting the whole ship rib position information and selecting the whole ship rib position line in the CAD drawing;

[0042] Specifically,

[0043] Step S11, open the rib line CAD drawing, input relevant information according to the prompt (in the CAD information column, it is prompted to "please enter the rib number and rib distance information in the form of [starting rib position, ending rib position, adjacent rib distance (unit: mm)]"), and input a number of continuous rib position information in the form of [starting rib position, ending rib position, adjacent rib distance];

[0044] For example, you can enter [-5,5,700], [5,30,750], [30,200,800];

[0045] Based on the input, check whether the input information is legal (whether it contains rib position 0, whether the rib position numbers are continuous, whether there are repeated rib position numbers, etc.). If it is illegal, the relevant error message will be displayed in the CAD information bar.

[0046] Step S12: Calculate the number of rib numbers of the entire ship and the coordinates X corresponding to each rib number n according to the input information. n ;

[0047] According to the input information of step S11, the number of rib numbers of the whole ship and the coordinate X corresponding to each rib number n are calculated. n For example, according to the example input in step S11, the number of rib numbers of the entire ship can be calculated to be 1+200-(-5)=206, rib number 0 corresponds to coordinate X=0, rib number 4 corresponds to coordinate X=0+4*700=2800, and rib number 7 corresponds to coordinate X=0+5*700+2*750=5000.

[0048] Step S13, select the rib position lines of the whole ship in the CAD drawing according to the prompt (a prompt similar to "Please select 206 rib position lines from FR.-5 to FR.200 in order" is displayed in the CAD information column), check whether the number of rib position numbers calculated in step S12 is consistent with the number of rib position lines selected, if not, display relevant error information in the CAD information column, and require to add, delete or reselect rib position lines; make the rib position numbers correspond to the rib position lines one by one, and find the corresponding rib position lines by the rib position number n;

[0049] Step S20 includes inputting one or more target profile positions X where coordinates need to be extracted. F ;

[0050] Specifically, a prompt "Please enter the X coordinates of all target profiles (in mm)" is displayed in the CAD information bar. According to the prompt, a series of X coordinates are input, and it is checked whether the input values ​​exceed the maximum and minimum values ​​of the X coordinates calculated in step S12. If they exceed, a relevant error message is displayed in the CAD information bar.

[0051] Step S30, including automatically acquiring a target profile;

[0052] Among them, the corresponding coordinates X of the target profile in step S20 are taken out in sequence. F , compare the X one by one F and the corresponding coordinate X of each rib number n in step S12 n ,

[0053] When the target line is at position X F With a certain rib coordinate X n Same (X F =X n ), the rib position line n is used as the target profile line, that is, the rib position line n is directly found from the rib position lines selected in step S13 as the target profile line;

[0054] When the target line is at position X F At rib coordinate X n and X n+1 When X F =X n , and only the rib position number n can be found such that X n <X F <X n+1 , then find rib line n and rib line n+1 in the rib line selected in step S13, and use these two rib lines to interpolate and generate the target profile line;

[0055] Among them, Figure 3 As shown, the specific process of generating the target profile by interpolating the rib position line n and the rib position line n+1 includes:

[0056] Step S31, the distance between adjacent interpolation points is controlled by a set step value d (the default value is 500mm), thereby controlling the number of generated interpolation points; the user can change the value of d, and the larger the value of d, the larger the distance between adjacent interpolation points, and the smaller the number of points constituting the target profile;

[0057] Step S32, calling the CAD interface to obtain the coordinates (Y Q1 , Z Q1 ), draw an auxiliary circle with Q1 as the center and d as the radius, and obtain the coordinates of the intersection point Q2 of the auxiliary circle and the rib position line n (Y Q2 , Z Q2 ); Draw an auxiliary circle with Q2 as the center and d as the radius, and obtain the coordinates of the intersection point Q3 of the auxiliary circle and the rib position line n (Y Q3 , Z Q3 )...Finally, by analogy, all points Q on the rib line n are obtained k The coordinates (Y Qk , Z Qk );

[0058] Step S33, according to step S32, all points P on the rib bit line n+1 are also obtained k The coordinates (Y Pk , Z Pk );

[0059] Step S34, according to Q k and P k The coordinates of all points A on the target line can be interpolated k The coordinates (Y Ak , Z Ak ), the calculation formula is as follows:

[0060] ;

[0061] ;

[0062] Since the lengths of rib bit line n and rib bit line n+1 are different, there may be a point Q k and point P k The number of points is slightly different, and the extra points can be discarded.

[0063] Step S35, calling the CAD interface to obtain the end points of the rib line n and the rib line n+1 respectively, and then interpolating the end point of the target profile according to step S34.

[0064] Step S36: All interpolated points A obtained in steps S34 and S35 are k By connecting them into multiple lines, you can get the target line.

[0065] Step S40, including automatically extracting the coordinates of each point on the target profile;

[0066] If the target line is obtained by interpolation in steps S31 to S36, the coordinates of each point on the target line can be directly extracted by calling the CAD interface;

[0067] If the target profile is obtained directly by using the rib position line n as the target profile in step S30, the number of extraction points on the target profile needs to be controlled according to the set step value d, and some points with relatively close spacing on the target profile need to be removed. The specific method includes:

[0068] 1) Call the CAD interface to extract the starting point coordinates of the target profile (Y A1 , Z A1 ), and then extract backwards from the starting point coordinates,

[0069] 2) If Figure 4 , record the last point on the target line whose coordinates have been extracted as A K-1 , and its subsequent points are recorded as a1, a2, ...a i, their distances from the previous point are recorded as d1, d2, ...d i ;

[0070] Check (d1+d2), (d1+d2+d3), ... (d1+d2+...+d i ) is greater than the step value d, until the check is (d1+d2+…+d i ) is greater than the step value d, then a i-1 Point A K and extract its coordinates, skipping A K-1 and A K The points between;

[0071] 3) Repeat the previous step until all points between the starting point and the end point of the target line are traversed;

[0072] 4) Call the CAD interface to extract the end point coordinates of the target profile.

[0073] Step S50, including outputting the coordinate data to a spreadsheet file;

[0074] Specifically, before outputting the data, the extracted coordinate data is reorganized in the corresponding format according to the user's choice (different classification software is used), such as numbering the coordinate data, converting units, etc., for use by different standard calculation software;

[0075] Then create a spreadsheet file on the desktop (or default location), write the reorganized coordinate data into the spreadsheet, and save the file; the spreadsheet file can be named like "FR.100+250.xlsx" or other forms, where 100 is the rib number n, 250 is X F -X n The arithmetic value of .

[0076] Step S60, finally, repeat steps S30 to S50 to extract the coordinates of each point on the next target profile, until the coordinates of each point on all target profiles are extracted.

[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions should also be deemed to fall within the protection scope of the technical solution of the present invention.

Claims

1. A CAD-based hull line coordinate extraction method, characterized in that: The following steps are included: Step S10, including inputting the whole ship rib position information and selecting the whole ship rib position line in the CAD drawing; Step S20 includes inputting one or more target line positions X where coordinates need to be extracted. F ; Step S30 includes automatically obtaining a target line, and when the target line is at a position X F With a certain rib coordinate X n If the same, the rib position line n is used as the target line; when the target line position X F At rib coordinate X n and X n+1 When the target line is between , the target line is generated by interpolation of rib line n and rib line n+1; The process of generating the target profile by interpolating the rib position line n and the rib position line n+1 includes: Step S31, setting a step value d to control the distance between adjacent interpolation points, thereby controlling the number of generated interpolation points; Step S32, obtaining the coordinates (Y Q1 , Z Q1 ), draw an auxiliary circle with Q1 as the center and d as the radius, and obtain the coordinates of the intersection point Q2 of the auxiliary circle and the rib position line n (Y Q2 , Z Q2 ); Draw an auxiliary circle with Q2 as the center and d as the radius, and obtain the coordinates of the intersection point Q3 of the auxiliary circle and the rib position line n (Y Q3 , Z Q3 ); Repeat the above steps, and finally, obtain all points Q on the rib line n k The coordinates (Y Qk , Z Qk ); Step S33, according to step S32, all points P on the rib bit line n+1 are also obtained k The coordinates (Y Pk , Z Pk ); Step S34, according to Q k and P k The coordinates of all points A on the target line are interpolated using the following formula k The coordinates (Y Ak , Z Ak ): ; ; Step S40, including automatically extracting the coordinates of each point on the target profile; When the target line is obtained by interpolation, the CAD interface is directly called to extract the coordinates of each point on the target line; When the rib line n is used as the target line, the step value d is set to control the number of points to be extracted on the target line, and some points on the target line are removed, which specifically includes: First extract the starting point coordinates of the target line, and then extract backwards from the starting point coordinates. The last point on the target line whose coordinates have been extracted is recorded as A K-1 , and its subsequent points are recorded as a1, a2, ...a i , their distances from the previous point are recorded as d1, d2, ...d i ; Check (d1+d2), (d1+d2+d3), ... (d1+d2+...+d i ) is greater than the step value d, until the check is (d1+d2+…+d i ) is greater than the step value d, then a i-1 Point A K and extract its coordinates; Repeat the above steps until all points between the starting point and the end point of the target line are traversed; Step S50 includes outputting the coordinate data to a spreadsheet file.

2. The method for extracting hull line coordinates based on CAD according to claim 1, characterized in that: In step S10, the rib position information is input in the form of [starting rib position, ending rib position, adjacent rib position spacing], the legality of the input information is checked, and the number of rib position numbers of the entire ship and the coordinate X corresponding to each rib position number n are calculated based on the input information. n .

3. The method for extracting hull line coordinates based on CAD according to claim 2, characterized in that: In step S10, after selecting the rib position lines of the entire ship, check whether the calculated number of rib position numbers is consistent with the number of selected rib position lines. If they are inconsistent, it is required to add, delete or reselect rib position lines.

4. The method for extracting hull line coordinates based on CAD according to claim 1, characterized in that: The method further includes step S35 of respectively obtaining the end points of rib line n and rib line n+1, and then interpolating the end point of the target profile line according to step S34.

5. The method for extracting hull line coordinates based on CAD according to claim 1, characterized in that: In step S50, before outputting the data, the data is reorganized in a corresponding format according to the user's selection.

6. The method for extracting hull line coordinates based on CAD according to claim 1, characterized in that: The method further includes step S60, which includes repeating steps S30 to S50 to extract the coordinates of each point on the next target profile until the coordinates of each point on all target profiles are extracted.