Electrical drawing generation method and system
By obtaining the three-dimensional model of the electrical equipment and identifying the damaged area, the problem of equipment repairing in the prior art when generating electrical drawings is solved, and the accuracy and efficiency of the drawings are improved.
Patent Information
- Application Number
- CN202411334843.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, when generating electrical drawings, damaged equipment needs to be repaired or replaced first to obtain accurate dimensional information, resulting in low generation efficiency and high cost.
By obtaining the three-dimensional model of electrical equipment, establishing a three-dimensional rectangular coordinate system, calculating the curvature of the boundary line, identifying the high fluctuation interval as the damaged area, and simplifying the boundary curve through straight lines connecting end points to generate electrical drawings.
Improve the accuracy and reliability of drawings, reduce manual operation, improve efficiency, reduce drawing complexity, and facilitate manufacturing and maintenance.
Smart Images

Figure CN119578015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drawing generation, and in particular to a method and system for generating electrical drawings. Background Art
[0002] Electrical drawings are used to describe the connection relationships of various electrical equipment and the layout and installation of electrical equipment. The size, model, specification and other information of each device and component are usually marked in detail in electrical drawings to ensure the accuracy and usability of the drawings. They are indispensable and important information in electrical engineering, and provide detailed guidance and basis for the design, construction, commissioning and maintenance of electrical systems.
[0003] The dimensions of the equipment marked in the electrical drawings need to be accurate, that is, consistent with the actual dimensions of the equipment; however, in actual construction or use, the equipment is often damaged, which will lead to inaccurate measurements; in the prior art, the damaged equipment is often repaired or replaced before the dimensional information of the equipment is collected to generate electrical drawings. This method greatly affects the efficiency of generating electrical drawings and increases costs. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for generating electrical drawings to solve the above technical problems.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] A method for generating an electrical drawing comprises the following steps:
[0007] Step S1: obtaining a three-dimensional model of the electrical device; obtaining a contour line of the electrical device in the three-dimensional model, wherein the contour line is a boundary line of the electrical device shape;
[0008] Step S2: establishing a three-dimensional rectangular coordinate system in the three-dimensional model, obtaining an expression of each boundary line in the three-dimensional rectangular coordinate system, recorded as a boundary curve; setting an interval threshold, selecting a number of reference points on the boundary curve according to the interval threshold, obtaining the curvature of each reference point on the boundary curve, and obtaining a curvature sequence;
[0009] Step S3: setting a judgment interval, the judgment interval is the number of continuous reference points; sequentially obtaining the coefficient of variation Cv=Q / Qave in each judgment interval in the curvature sequence, wherein Q is the standard deviation of each curvature in the curvature sequence, and Qave is the average value of each curvature in the curvature sequence; selecting all judgment intervals with Cv≥Cvt, wherein Cvt is a preset coefficient of variation threshold, recorded as a high fluctuation interval; and obtaining a curve segment corresponding to the high fluctuation interval on the boundary curve, recorded as a damaged area;
[0010] Step S4: obtaining two endpoints of the damaged interval and connecting the two endpoints with a straight line to obtain a new boundary curve; obtaining the length of the new boundary curve as the length of the corresponding contour line.
[0011] As a further solution of the present invention: the process of acquiring the three-dimensional model of the electrical equipment includes:
[0012] Image data of all viewing angles of the electrical device are acquired, and the image data are imported into three-dimensional modeling software to obtain a three-dimensional model of the electrical device.
[0013] As a further solution of the present invention: when the contour line of the electrical equipment has a bifurcation, all bifurcation points on the contour line are obtained, and the boundary line between every two adjacent bifurcation points is recorded as the contour line; the bifurcation point includes the starting point and the end point of the boundary line on the electrical equipment.
[0014] As a further solution of the present invention: the interval threshold is denoted as It, and the setting range of the interval threshold is It∈[1mm, 5mm].
[0015] As a further solution of the present invention: the process of obtaining the curvature includes:
[0016] The boundary curve is converted into a parametric equation r(t)=(x(t), y(t), z(t)) in a three-dimensional rectangular coordinate system, where t is a parameter corresponding to a reference point on the boundary curve, and x(t), y(t), and z(t) are all functions of t;
[0017] The parametric equation is differentiated to obtain the tangent vector r′(t)=(x′(t), y′(t), z′(t)), where x′(t)=dx / dt, y′(t)=dy / dt, z′(t)=dz / dt; and the tangent vector is differentiated to obtain the second-order derivative r″(t)=(x″(t), y″(t), z″(t)), where x″(t)=dx / dt, y′(t)=dy / dt, z′(t)=dz / dt. 2 x / dt 2 , y″(t)=d 2 y / dt 2 , z″(t)=d 2 z / dt 2 ;
[0018] According to the second-order derivative and the tangent vector, the main line vector N(t)=r′(t)×r″(t) is obtained, and the curvature at parameter t is obtained on the boundary curve.
[0019] As a further solution of the present invention: when there are several consecutive judgment intervals that are all high fluctuation intervals, the starting point of the first judgment interval is obtained and recorded as the starting point reference point, and the end point of the last judgment interval is obtained and recorded as the end point reference point; then the interval formed by the starting point reference point and the end point reference point is directly recorded as a high fluctuation interval.
[0020] As a further solution of the present invention: when the number of endpoints of the damaged interval exceeds 2, extension lines of each curve segment are drawn through the endpoints of each curve segment according to the boundary curve, and the intersection points of the extension lines are obtained and recorded as new bifurcation points on the contour line.
[0021] As a further solution of the present invention: a system for generating electrical drawings, comprising:
[0022] Data acquisition module: obtain a three-dimensional model of the electrical equipment; obtain a contour line of the electrical equipment in the three-dimensional model, wherein the contour line is a boundary line of the electrical equipment shape;
[0023] Damage area determination module: establish a three-dimensional rectangular coordinate system in the three-dimensional model, obtain the expression of each boundary line in the three-dimensional rectangular coordinate system, record it as a boundary curve; set an interval threshold, select a number of reference points on the boundary curve according to the interval threshold, obtain the curvature of each reference point on the boundary curve, and obtain a curvature sequence;
[0024] A judgment interval is set, where the judgment interval is the number of continuous reference points; the coefficient of variation Cv=Q / Qave in each judgment interval in the curvature sequence is obtained in sequence, where Q is the standard deviation of each curvature in the curvature sequence, and Qave is the average value of each curvature in the curvature sequence; all judgment intervals with Cv≥Cvt are selected, where Cvt is a preset coefficient of variation threshold, which are recorded as high fluctuation intervals; and a curve segment corresponding to the high fluctuation interval is obtained on the boundary curve, which is recorded as a damaged area;
[0025] Size correction module: obtain the two endpoints of the damaged interval and connect the two endpoints with a straight line to obtain a new boundary curve; obtain the length of the new boundary curve as the length of the corresponding contour line.
[0026] Beneficial effects of the present invention:
[0027] Compared with the prior art, the present invention can accurately capture the boundary lines of the equipment shape by acquiring the three-dimensional model of the electrical equipment; this method improves the accuracy and reliability of the drawings, and helps to better understand and analyze the structure of the electrical equipment; by establishing a coordinate system in the three-dimensional model and automatically calculating the curvature of each boundary line, the need for manual operation is reduced, and efficiency and accuracy are improved; by setting a coefficient of variation threshold, high fluctuation ranges, that is, possible damaged areas, can be effectively identified; this helps to discover potential problem areas in advance during the design and maintenance process and conduct targeted inspections; the identified damaged areas are simplified by connecting them with straight lines to obtain new boundary curves, which not only reduces the complexity of the drawings, but also facilitates subsequent manufacturing and maintenance work. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The present invention will be further described below in conjunction with the accompanying drawings.
[0029] Figure 1 The invention discloses a flow chart of a method and system for generating an electrical drawing. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] See also Figure 1 As shown, the present invention is a method for generating an electrical drawing, comprising the following steps:
[0032] Step S1: obtaining a three-dimensional model of the electrical device; obtaining a contour line of the electrical device in the three-dimensional model, wherein the contour line is a boundary line of the electrical device shape;
[0033] As a preferred embodiment of the present invention, the process of acquiring the three-dimensional model of the electrical equipment includes:
[0034] Acquire image data of the electrical device from all viewing angles, import the image data into three-dimensional modeling software, and obtain a three-dimensional model of the electrical device;
[0035] It is understandable that the dimensional features of electrical equipment are often recorded in electrical drawings, and the length of the boundary line is the length dimensional feature of one side of the shape of the electrical equipment; the contour lines of the electrical equipment are identified in the three-dimensional model, and these contour lines represent the shape boundaries of the equipment; the various boundary lines of the electrical equipment are projected into the three-dimensional rectangular coordinate system to obtain the mathematical expression of each boundary line in the three-dimensional rectangular coordinate system; the expression is usually a curve equation, which describes the shape and position of the boundary line in the three-dimensional space; according to the obtained boundary line expression, the length of each boundary line can be calculated;
[0036] As a preferred embodiment of the present invention, when the contour line of the electrical equipment has bifurcations, all bifurcation points on the contour line are obtained, and the boundary line between each two adjacent bifurcation points is recorded as the contour line; the bifurcation points include the starting point and the end point of the boundary line on the electrical equipment;
[0037] It is understandable that when the outline of an electrical device is bifurcated, it is necessary to accurately identify and record all bifurcation points on the entire outline; specifically, it is necessary not only to capture the position of each bifurcation point, but also to pay special attention to the boundary lines between two adjacent bifurcation points; these boundary lines are also key elements that constitute the outline of the electrical device, and all boundary lines together outline the overall shape and characteristics of the device;
[0038] Step S2: establishing a three-dimensional rectangular coordinate system in the three-dimensional model, obtaining an expression of each boundary line in the three-dimensional rectangular coordinate system, recorded as a boundary curve; setting an interval threshold, selecting a number of reference points on the boundary curve according to the interval threshold, obtaining the curvature of each reference point on the boundary curve, and obtaining a curvature sequence;
[0039] It can be understood that curvature is a physical quantity that describes the degree of curvature of a curve, which reflects the degree and direction of curvature of the curve at a certain point; by calculating the curvature value of each reference point, a curvature sequence is obtained, and the curvature sequence contains the curvature information of each position on the boundary curve, reflecting the fluctuation of the boundary curve, that is, whether there are uneven and bumpy areas on the edge line of the electrical equipment;
[0040] As a preferred embodiment of the present invention, the interval threshold is denoted as It, and the setting range of the interval threshold is It∈[1mm, 5mm];
[0041] It is understandable that in order to ensure that the selected reference points can fully reflect the characteristics of the boundary curve, it is necessary to reasonably set the interval threshold; the interval threshold can be adjusted according to the specific application scenario and requirements to ensure that the selected reference points are neither too sparse, resulting in the inability to accurately reflect the shape characteristics of the boundary curve, nor too dense, resulting in waste of computing resources and inaccurate analysis results; the range of the interval threshold set in the present invention is It∈[1mm, 5mm];
[0042] As a preferred embodiment of the present invention, the process of obtaining the curvature includes:
[0043] The boundary curve is converted into a parametric equation r(t)=(x(t), y(t), z(t)) in a three-dimensional rectangular coordinate system, where t is a parameter corresponding to a reference point on the boundary curve, and x(t), y(t), and z(t) are all functions of t;
[0044] The parametric equation is differentiated to obtain the tangent vector r′(t)=(x′(t), y′(t), z′(t)), where x′(t)=dx / dt, y′(t)=dy / dt, z′(t)=dz / dt; and the tangent vector is differentiated to obtain the second-order derivative r″(t)=(x″(t), y″(t), z″(t)), where x″(t)=dx / dt, y′(t)=dy / dt, z′(t)=dz / dt. 2 x / dt 2 , y″(t)=d 2 y / dt 2 , z″(t)=d 2 z / dt 2 ;
[0045] According to the second-order derivative and the tangent vector, the main line vector N(t)=r′(t)×r″(t) is obtained, and the curvature at parameter t is obtained on the boundary curve.
[0046] It can be understood that the tangent vector is an important tool for describing the direction of the boundary curve at a certain point, and it reflects the local change trend of the curve at that point; the second-order derivative of the parametric equation provides information on the curvature of the curve and is a key step in calculating the curvature; the principal line vector is obtained by the cross product of the tangent vector and the second-order derivative, and the principal line vector is perpendicular to the plane formed by the tangent vector and the second-order derivative, thereby reflecting the principal normal direction of the curve at a certain point;
[0047] Step S3: setting a judgment interval, the judgment interval is the number of continuous reference points; sequentially obtaining the coefficient of variation Cv=Q / Qave in each judgment interval in the curvature sequence, wherein Q is the standard deviation of each curvature in the curvature sequence, and Qave is the average value of each curvature in the curvature sequence; selecting all judgment intervals with Cv≥Cvt, wherein Cvt is a preset coefficient of variation threshold, recorded as a high fluctuation interval; and obtaining a curve segment corresponding to the high fluctuation interval on the boundary curve, recorded as a damaged area;
[0048] It is worth noting that the judgment interval is denoted as m, and the setting range of the judgment interval is m≥5; the coefficient of variation is a statistic used to measure the degree of dispersion of data distribution; in the present invention, the coefficient of variation is calculated by dividing the standard deviation Q of each curvature in the curvature sequence by the average value Qave of the curvature, and the standard deviation reflects the fluctuation range of the data, while the average value provides the central trend of the data; through the ratio of these two quantities, a relative indicator, namely the coefficient of variation, can be obtained to describe the relative dispersion of the data; all high fluctuation intervals are screened out according to the preset coefficient of variation threshold Cvt; the high fluctuation interval represents the part with larger fluctuation in the curvature sequence, corresponds to the damaged area of the electrical equipment, and is selected;
[0049] As a preferred embodiment of the present invention, when there are several consecutive judgment intervals that are all high-fluctuation intervals, the starting point of the first judgment interval is obtained and recorded as the starting reference point, and the end point of the last judgment interval is obtained and recorded as the end reference point; then the interval formed by the starting reference point and the end reference point is directly recorded as a high-fluctuation interval;
[0050] It is understandable that there may be a situation where the number of reference points occupied by the damaged area exceeds the judgment interval, in which case a larger damaged interval is formed by a plurality of consecutive judgment intervals;
[0051] Step S4: obtaining two endpoints of the damaged interval and connecting the two endpoints with a straight line to obtain a new boundary curve; obtaining the length of the new boundary curve as the length of the corresponding contour line;
[0052] It can be understood that the two endpoints of the damage interval usually represent the starting position and the ending position of the damage area; the two endpoints are connected by a straight line to obtain a new boundary curve; this is to simplify the damage area, simplifying the complex shape that may have existed originally into a straight line, which helps to reduce the complexity of collecting the size of electrical equipment;
[0053] As a preferred embodiment of the present invention, when the number of endpoints of the damaged interval exceeds 2, extension lines of each curve segment are drawn through the endpoints of each curve segment according to the boundary curve, and the intersection points of the extension lines are obtained and recorded as new bifurcation points on the contour line.
[0054] A system for generating electrical drawings, comprising:
[0055] Data acquisition module: obtain a three-dimensional model of the electrical equipment; obtain a contour line of the electrical equipment in the three-dimensional model, wherein the contour line is a boundary line of the electrical equipment shape;
[0056] Damage area determination module: establish a three-dimensional rectangular coordinate system in the three-dimensional model, obtain the expression of each boundary line in the three-dimensional rectangular coordinate system, record it as a boundary curve; set an interval threshold, select a number of reference points on the boundary curve according to the interval threshold, obtain the curvature of each reference point on the boundary curve, and obtain a curvature sequence;
[0057] A judgment interval is set, where the judgment interval is the number of continuous reference points; the coefficient of variation Cv=Q / Qave in each judgment interval in the curvature sequence is obtained in sequence, where Q is the standard deviation of each curvature in the curvature sequence, and Qave is the average value of each curvature in the curvature sequence; all judgment intervals with Cv≥Cvt are selected, where Cvt is a preset coefficient of variation threshold, which are recorded as high fluctuation intervals; and a curve segment corresponding to the high fluctuation interval is obtained on the boundary curve, which is recorded as a damaged area;
[0058] Size correction module: obtain the two endpoints of the damaged interval and connect the two endpoints with a straight line to obtain a new boundary curve; obtain the length of the new boundary curve as the length of the corresponding contour line.
[0059] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for generating an electrical drawing, characterized in that: The following steps are involved: Step S1: obtaining a three-dimensional model of the electrical device; obtaining a contour line of the electrical device in the three-dimensional model, wherein the contour line is a boundary line of the electrical device shape; Step S2: establishing a three-dimensional rectangular coordinate system in the three-dimensional model, obtaining an expression of each boundary line in the three-dimensional rectangular coordinate system, recorded as a boundary curve; setting an interval threshold, selecting a number of reference points on the boundary curve according to the interval threshold, obtaining the curvature of each reference point on the boundary curve, and obtaining a curvature sequence; Step S3: setting a judgment interval, the judgment interval is the number of continuous reference points; sequentially obtaining the coefficient of variation Cv=Q / Qave in each judgment interval in the curvature sequence, wherein Q is the standard deviation of each curvature in the curvature sequence, and Qave is the average value of each curvature in the curvature sequence; selecting all judgment intervals with Cv≥Cvt, wherein Cvt is a preset coefficient of variation threshold, recorded as a high fluctuation interval; and obtaining a curve segment corresponding to the high fluctuation interval on the boundary curve, recorded as a damaged area; Step S4: obtaining two endpoints of the damaged interval and connecting the two endpoints with a straight line to obtain a new boundary curve; obtaining the length of the new boundary curve as the length of the corresponding contour line.
2. The method for generating an electrical drawing according to claim 1, characterized in that: In step S1, the process of acquiring the three-dimensional model of the electrical equipment includes: Image data of all viewing angles of the electrical device are acquired, and the image data are imported into three-dimensional modeling software to obtain a three-dimensional model of the electrical device.
3. The method for generating an electrical drawing according to claim 1, characterized in that: In step S1, when the contour line of the electrical equipment has a bifurcation, all bifurcation points on the contour line are obtained, and the boundary line between every two adjacent bifurcation points is recorded as the contour line; the bifurcation point includes the starting point and the end point of the boundary line on the electrical equipment.
4. The method for generating an electrical drawing according to claim 1, characterized in that: In step S2, the interval threshold is denoted as It, and the setting range of the interval threshold is It∈[1mm, 5mm].
5. The method for generating an electrical drawing according to claim 1, characterized in that: In step S2, the process of obtaining the curvature includes: The boundary curve is converted into a parametric equation r(t)=(x(t), y(t), z(t)) in a three-dimensional rectangular coordinate system, where t is a parameter corresponding to a reference point on the boundary curve, and x(t), y(t), and z(t) are all functions of t; The parametric equation is differentiated to obtain the tangent vector r′(t)=(x′(t), y′(t), z′(t)), where x′(t)=dx / dt, y′(t)=dy / dt, z′(t)=dz / dt; and the tangent vector is differentiated to obtain the second-order derivative r″(t)=(x″(t), y″(t), z″(t)), where x″(t)=dx / dt, y′(t)=dy / dt, z′(t)=dz / dt. 2 x / dt 2 , y″(t)=d 2 y / dt 2 , z″(t)=d 2 z / dt 2 ; According to the second-order derivative and the tangent vector, the main line vector N(t)=r′(t)×r″(t) is obtained, and the curvature at parameter t is obtained on the boundary curve.
6. The method for generating an electrical drawing according to claim 1, characterized in that: In step S3, when there are several consecutive judgment intervals that are all high fluctuation intervals, the starting point of the first judgment interval is obtained and recorded as the starting reference point, and the end point of the last judgment interval is obtained and recorded as the end reference point; then the interval formed by the starting reference point and the end reference point is directly recorded as a high fluctuation interval.
7. The method for generating an electrical drawing according to claim 1, characterized in that: In step S4, when the number of endpoints of the damaged interval exceeds 2, an extension line of each curve segment is drawn through the endpoints of each curve segment according to the boundary curve, and the intersection point of each extension line is obtained and recorded as a new bifurcation point on the contour line.
8. A system for generating electrical drawings, characterized in that: include: Data acquisition module: obtain the three-dimensional model of electrical equipment; Acquire a contour line of the electrical equipment in the three-dimensional model, wherein the contour line is a boundary line of the electrical equipment shape; Damage area determination module: establish a three-dimensional rectangular coordinate system in the three-dimensional model, obtain the expression of each boundary line in the three-dimensional rectangular coordinate system, record it as a boundary curve; set an interval threshold, select a number of reference points on the boundary curve according to the interval threshold, obtain the curvature of each reference point on the boundary curve, and obtain a curvature sequence; A judgment interval is set, where the judgment interval is the number of continuous reference points; the coefficient of variation Cv=Q / Qave in each judgment interval in the curvature sequence is obtained in sequence, where Q is the standard deviation of each curvature in the curvature sequence, and Qave is the average value of each curvature in the curvature sequence; all judgment intervals with Cv≥Cvt are selected, where Cvt is a preset coefficient of variation threshold, which are recorded as high fluctuation intervals; and a curve segment corresponding to the high fluctuation interval is obtained on the boundary curve, which is recorded as a damaged area; Size correction module: obtain the two endpoints of the damaged interval and connect the two endpoints with a straight line to obtain a new boundary curve; obtain the length of the new boundary curve as the length of the corresponding contour line.