Illumination loop modeling and quantity calculation method, system, equipment and medium

By acquiring and matching CAD data, a three-dimensional lighting loop model is generated, which solves the problem of low calculation efficiency of the lighting loop modeling of the spacer lamp in the prior art, and realizes efficient three-dimensional modeling and engineering volume calculation.

CN119808220AActive Publication Date: 2025-04-11PINMING TECH CO LTD

Patent Information

Application Number
CN202411791637.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-11
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The calculation of the lighting circuit modeling of existing interval lamps has low efficiency, which leads to manual drawing of wire directions and calculation of the quantity before construction, which is time-consuming and labor-intensive and prone to errors.

Method used

By obtaining the CAD line data and CAD text label data on the two-dimensional drawing, matching the CAD text label and loop number regular expression, determining the loop name and number, generating the total path of the three-dimensional model based on this, and determining the number and location information of the lamps. Finally, starting from the distribution box, connecting the lamps in the same circuit, generating the three-dimensional path and engineering volume of each lighting circuit.

Benefits of technology

The centrally marked interval lamp drawings are synchronously generated by the three-dimensional model of each loop and measured in real time, saving labor costs, improving the accuracy of automated execution of calculation tasks and the efficiency of modeling calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808220A_ABST
    Figure CN119808220A_ABST
Patent Text Reader

Abstract

The invention relates to a lighting loop modeling and quantity calculation method, system and device and a medium, and the method comprises the steps: obtaining CAD line data and CAD text annotation data on a two-dimensional drawing; and matching each CAD text label with the loop number regular expression, and determining a loop name and a loop number corresponding to each CAD text label. And obtaining the total path of the three-dimensional model according to the distance between the CAD line data and the bridge and the number of loops. And determining the number and position information of each lamp on the total path according to the position relationship between the insertion point of the lamp and the bridge and the distance between the lamp and the total path. On the basis of the number and position information of the lamps on the total path, starting from the distribution box, connecting the lamps with the same label in the same loop according to the lamps and the shortest path of the lamps, and generating a three-dimensional path and engineering quantity of each lighting loop. The problem of low efficiency of interval lamp lighting loop modeling calculation in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of building electrical engineering modeling, and in particular to a lighting circuit modeling quantity calculation method, system, equipment and medium. Background Art

[0002] In building electrical engineering, the design and construction of lighting systems is a complex and tedious task. Traditional lighting system designs are usually drawn using two-dimensional CAD (Computer-Aided Design) drawings. In these drawings, the lighting system uses a "lamp-by-lamp loop" approach, that is, only one loop is connected to the power supply every certain number of lamps. In order to simplify the drawings, the specific direction of each wire is usually not described in detail on the drawings. Instead, a centralized annotation text is added next to the CAD line segment to indicate the lighting path and the connection method of the lamps in the area.

[0003] Although this method simplifies the drawings, before actual construction, the specific direction of each wire needs to be manually drawn and the quantity needs to be calculated, which is not only time-consuming and labor-intensive, but also prone to errors. Therefore, the existing interval lighting circuit modeling and quantity calculation has the problem of low efficiency. Summary of the invention

[0004] The embodiments of the present application provide a lighting circuit modeling and quantity calculation method, system, device and medium to at least solve the problem of low efficiency in the modeling and quantity calculation of interval lamps lighting circuits in the related art.

[0005] In a first aspect, an embodiment of the present application provides a lighting circuit modeling and quantity calculation method, the method comprising:

[0006] Get CAD line data and CAD text annotation data on 2D drawings;

[0007] Matching each of the CAD text annotations with a circuit number regular expression to determine the circuit name and circuit number corresponding to each of the CAD text annotations;

[0008] According to the distance between the CAD line data and the bridge, and the number of the loops, a total path of the three-dimensional model is obtained, wherein the total path includes a plurality of loops and paths of the plurality of loops;

[0009] Determine the quantity and position information of each of the lamps on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path;

[0010] Based on the quantity and position information of each lamp on the total path, according to the shortest path between the lamps, starting from the distribution box, connect the lamps with the same label in the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit.

[0011] In one embodiment, the step of obtaining CAD line data and CAD text annotation data on a two-dimensional drawing includes:

[0012] Receive 2D drawings imported into BIM 3D quantity calculation software;

[0013] According to the calling function command, in response to receiving an instruction of a user selecting a CAD line in a drawing, extracting data of the same layer as the CAD line and having a characteristic attribute of a straight line, a polyline, a spline curve, or an arc, and acquiring the CAD line data;

[0014] According to the calling function command, in response to receiving an instruction from a user to select annotation data in a drawing, the CAD layer corresponding to the annotation data is picked up, and data in the CAD layer whose characteristic attributes are text and include numbers and letters are filtered to obtain the CAD text annotation data.

[0015] In one embodiment, matching each of the CAD text annotations with a circuit number regular expression to determine the circuit name and circuit number corresponding to each of the CAD text annotations includes:

[0016] Determine the circuit number regular expression in the CAD text annotation according to the annotation recognition library;

[0017] Each of the CAD text annotations is matched with a regular expression for the circuit number, a data group that matches the regular expression for the circuit number in each of the CAD text annotations is obtained, and based on the data group, the circuit name and the number of circuits corresponding to each of the CAD text annotations are determined.

[0018] In one embodiment, after determining the number of circuits represented by each of the text annotations, the method further includes:

[0019] The number of lines connecting the interval lamps is determined according to the number of loops, wherein the number of lines connecting the interval lamps is several times less than the number of loops.

[0020] In one embodiment, obtaining the total path of the three-dimensional model according to the distance between the CAD line data and the bridge and the number of loops includes:

[0021] When there is a distribution box and the CAD line data in each of the loops, it is determined whether the distance between the distribution box and the CAD line data is less than a first preset distance, and whether the distance between two adjacent CAD line data is less than a second preset distance; if it is less than the first preset distance and less than the second preset distance, it is determined that the distribution box is connected to the CAD line data, and two adjacent CAD line data are connected; based on the connected distribution box and the CAD line data, and the connected two adjacent CAD line data, the total path of the three-dimensional model is determined;

[0022] When there is a distribution box, the CAD line data and a bridge in each of the loops, determine whether the distance between the distribution box and the CAD line data is less than the first preset distance, determine whether the distance between two adjacent CAD line data is less than the second preset distance, and determine whether the distance between the CAD line data and the bridge is less than the first preset distance; when it is less than the first preset distance and less than the second preset distance, determine that the distribution box is connected to the CAD line data, two adjacent CAD line data are connected, and the CAD line data is connected to the bridge; based on the connected distribution box and the CAD line data, the connected two adjacent CAD line data, and the connected CAD line data and the bridge, determine the total path of the three-dimensional model.

[0023] In one embodiment, the determining the quantity and position information of each of the lamps on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, includes:

[0024] Determine whether the insertion point of the lamp is within the width of the bridge, and determine whether the closest distance between the outer frame of the lamp and the CAD line of the total path is less than a first preset distance;

[0025] When the insertion point of the lamp is within the width of the bridge, and the closest distance between the outer frame of the lamp and the CAD line of the total path is less than a first preset distance, the number and position information of each lamp on the total path are determined; based on the positional relationship between the insertion point of the lamp and the bridge and based on the distance between the lamp and the total path, the number and position information of each lamp on the total path are determined to determine whether the insertion point of the lamp is within the width of the bridge.

[0026] In one embodiment, before the method connects the lamps with the same label in the same circuit based on the shortest path between the lamps, starting from the distribution box, and generates the three-dimensional path and engineering quantity of each lighting circuit, the method further includes:

[0027] Determine whether the distance between the dimension mark of the lamp and the CAD line is less than a preset maximum distance value, and if less than the preset maximum distance value, determine the CAD text mark corresponding to each lamp;

[0028] Based on the CAD text annotations corresponding to each lamp, the circuit name and the circuit number corresponding to each lamp are determined through the circuit names and circuit numbers corresponding to each CAD text annotation.

[0029] In a second aspect, an embodiment of the present application provides a system for modeling and calculating the quantity of a lighting circuit, the system comprising a module for obtaining line data and text annotation data, a module for determining the circuit name and the number of circuits, a module for obtaining the total path, a module for determining the number and location information of lamps, and a module for generating models and engineering quantities; wherein,

[0030] The module for obtaining line data and text annotation data is used to obtain CAD line data and CAD text annotation data on the two-dimensional drawing;

[0031] The module for determining the circuit name and the number of circuits is used to match each of the CAD text annotations with the circuit number regular expression to determine the circuit name and the number of circuits represented by each of the text annotations;

[0032] The total path acquisition module is used to acquire the total path of the three-dimensional model according to the distance between the CAD line data and the bridge, and the number of loops, wherein the total path includes a plurality of loops and the paths of the plurality of loops;

[0033] The module for determining the number and position information of lamps is used to determine the number and position information of each lamp on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path;

[0034] The generation model and engineering quantity module is used to generate a three-dimensional path and engineering quantity for each lighting circuit based on the number and position information of each lamp on the total path, according to the shortest path between the lamps, starting from the distribution box, connecting each lamp with the same label in the same circuit.

[0035] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a lighting circuit modeling and quantity calculation system as described in the first aspect above is implemented.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a lighting circuit modeling and quantity calculation system as described in the first aspect above.

[0037] The lighting circuit modeling and quantity calculation method, system, device and medium provided in the embodiments of the present application have at least the following technical effects.

[0038] By obtaining the CAD line data and CAD text annotation data on the two-dimensional drawing. Match each CAD text annotation with the circuit number regular expression to determine the circuit name and number of circuits corresponding to each CAD text annotation. According to the distance between the CAD line data and the bridge, and the number of circuits, the total path of the three-dimensional model is obtained, wherein the total path includes several circuits and the paths of several circuits. According to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, the number and position information of each lamp on the total path are determined. Based on the number and position information of each lamp on the total path, according to the shortest path between lamps and lamps, starting from the distribution box, connect the lamps with the same annotations on the same circuit, and generate the three-dimensional path and engineering quantity of each lighting circuit. The centralized annotated interval lamp drawings are realized to synchronously generate the three-dimensional model of each circuit and measure in real time, which not only saves the labor cost of staff for drawing matching, but also improves the accuracy of the automated execution of the quantity calculation task, and improves the efficiency of modeling and quantity calculation. The problem of low efficiency in the modeling and quantity calculation of interval lamp lighting circuits in the related technology is solved.

[0039] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 It is a flow chart for modeling and calculating quantities of lighting circuits;

[0042] Figure 2 is a schematic diagram of a structure in which CAD data is connected to a bridge and adjacent CAD lines according to an exemplary embodiment;

[0043] Figure 3 is a flowchart of step S104 according to an exemplary embodiment;

[0044] Figure 4 is a schematic diagram of a total path lamp according to an exemplary embodiment;

[0045] Figure 5 is a schematic diagram showing lamp labeling according to an exemplary embodiment;

[0046] Figure 6 is a schematic diagram showing the shortest distance between lamps according to an exemplary embodiment;

[0047] Figure 7 is a system structure block diagram of a lighting circuit modeling calculation method according to an exemplary embodiment;

[0048] Figure 8 It is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0050] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0051] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0052] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the positional relationship of the associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0053] In a first aspect, an embodiment of the present application provides a lighting circuit modeling and quantity calculation method, which is applied to the stator winding end of a steam turbine generator. Figure 1 It is a flow chart of lighting circuit modeling calculation, such as Figure 1 As shown, a lighting circuit modeling and quantity calculation method includes:

[0054] Step S101, obtaining CAD line data and CAD text annotation data on a two-dimensional drawing.

[0055] Step S102: Match each CAD text annotation with the circuit number regular expression to determine the circuit name and circuit number corresponding to each CAD text annotation.

[0056] Step S103, obtaining the total path of the three-dimensional model according to the distance between the CAD line data and the bridge, and the number of loops, wherein the total path includes a number of loops and the paths of the several loops.

[0057] Step S104: Determine the quantity and position information of each lamp on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path.

[0058] Step S105: Based on the number and location information of each lamp on the total path and the shortest path between lamps, starting from the distribution box, connect the lamps with the same label on the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit.

[0059] In summary, the embodiment of the present application provides a lighting circuit modeling and quantity calculation method, by obtaining CAD line data and CAD text annotation data on a two-dimensional drawing. Each CAD text annotation is matched with a circuit number regular expression to determine the circuit name and number of circuits corresponding to each CAD text annotation. According to the distance between the CAD line data and the bridge, and the number of circuits, the total path of the three-dimensional model is obtained, wherein the total path includes a number of circuits and the paths of the number of circuits. According to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, the number and position information of each lamp on the total path are determined. Based on the number and position information of each lamp on the total path, according to the shortest path between lamps and lamps, starting from the distribution box, each lamp with the same annotation of the same circuit is connected to generate a three-dimensional path and engineering quantity of each lighting circuit. The centrally annotated interval lamp drawings are realized to synchronously generate a three-dimensional model of each circuit and measure in real time, which not only saves the labor cost of the staff for matching drawings, but also improves the accuracy of the automated execution of the quantity calculation task, and improves the efficiency of modeling and quantity calculation. The problem of low efficiency in the modeling and quantity calculation of interval lamp lighting circuits in the related art is solved.

[0060] In one embodiment, step S101, obtaining CAD line data and CAD text annotation data on a two-dimensional drawing, specifically includes:

[0061] Receive 2D drawings imported into BIM 3D quantity calculation software;

[0062] According to the calling function command, in response to receiving the instruction of the user selecting the CAD line in the drawing, extracting the data of the same layer as the CAD line and having the characteristic attributes of straight line, polyline, spline curve and arc, and obtaining the CAD line data;

[0063] According to the calling function command, in response to receiving the instruction of the user selecting the annotation data in the drawing, the CAD layer corresponding to the annotation data is picked up, the data whose characteristic attributes are text and include numbers and letters in the CAD layer are filtered, and the CAD text annotation data is obtained.

[0064] Alternatively, import the 2D drawings into the BIM 3D quantity calculation software, call the function command (including pmazgdbx), and the software command bar will prompt in sequence:

[0065] Tip 1: Use the left mouse button to select a distribution box; at this time, the user needs to select a distribution box in the drawing.

[0066] Tip 2: Please select the CAD line (or right-click); at this time, the user needs to select the CAD line in the drawing.

[0067] Tip 3: Please select the loop annotation; at this time, the user needs to select the annotation in the drawing. The above selection includes operations such as clicking the left mouse button or clicking the right mouse button.

[0068] Click the CAD line after prompt 2 to obtain the data on the same layer as the CAD line and whose characteristic attributes are straight line, polyline, spline curve, and arc, which are classified as CAD line data.

[0069] After prompt 3, click on the annotation data to pick up the CAD layer. The feature attribute of the CAD layer is text, and the text content includes numbers and letters. The order can be changed, for example, a combination of numbers + letters or letters + numbers, where the data with letters within a certain number is classified as CAD text annotation data. The certain number can be 3-6. In the embodiment of the present application, the certain number can be 5.

[0070] Step S101 ensures that the extracted line data is associated with the target object by limiting the extraction of data with specific characteristic attributes (such as straight lines, polylines, spline curves, and arcs) on the same layer as the selected CAD line, avoiding interference from irrelevant line data and improving data accuracy. By screening data with text as the characteristic attribute and containing alphanumeric or alphanumeric characters, and limiting the number of letters to 3-6, non-essential text information is effectively filtered out, ensuring that the extracted text annotation data is key information such as the circuit number related to the electrical circuit, thereby improving data accuracy.

[0071] Step S102: Match each CAD text annotation with the circuit number regular expression to determine the circuit name and circuit number corresponding to each CAD text annotation. Specifically including:

[0072] Determine the circuit number regular expression in the CAD text annotation based on the annotation recognition library;

[0073] Each CAD text annotation is matched with the circuit number regular expression, and the data group that meets the circuit number regular expression in each CAD text annotation is obtained. Based on the data group, the circuit name and circuit number corresponding to each CAD text annotation are determined.

[0074] Optionally, click on the annotation data after prompt 3, and determine whether the annotation data contains continuous alphanumeric characters / alphanumeric characters according to the annotation recognition library. If it does, the loop number regular expression is obtained; if it does not, it cannot be automatically recognized, and you need to enter the regular expression in the loop name column in the loop setting box before you can proceed with subsequent operations. Among them, the annotation recognition library is used to determine the loop number regular expression in the CAD text annotation, including alphanumeric characters / alphanumeric characters. For example: the annotation data clicked is "N2, N3", which contains letters and numbers, so the regular expression is "N numbers".

[0075] Match each CAD text annotation in the CAD text annotation data according to the loop number regular expression. A group of data conforms to the regular expression. Each CAD text annotation conforming to the regular expression will contain more than one group of data. The separators between groups of data support "space", "comma", "colon", "~", "\", " / ", "-". Thus, it is obtained that there are several groups of numbers and loop names that conform to the regular expression in each text annotation. According to the number of loops, the number of interval lamp connections is determined, where the number of interval lamp connections is several less than the number of loops. The number of groups of numbers represents the number of loops in the text annotation. If there are n loops, it is defined as each wire loop on the path is separated by n-1 lamp connections; for example: the loop number regular expression is "N numbers", and the CAD text annotation is "N5, N6" or "N5, N6" or "N5 / N6" or "N5-N6", it is necessary to identify that the text annotation has 2 groups of data, namely N5 and N6, a total of 2 loops, and each loop is separated by 1 lamp connection.

[0076] Step S102 determines the loop number regular expression in the CAD text annotation through the annotation recognition library, and then matches each CAD text annotation with the regular expression to ensure accurate identification of the loop number. For example, the annotation data "N2, N3" will be identified as two loops N2 and N3. The number of interval lamp connections is determined according to the number of loops to ensure that the lamp connection method of each loop is reasonable and the load is balanced. For example, if there are n loops, each loop is separated by n-1 lamp connections. The annotation recognition library automatically determines whether the annotation data contains consecutive alphanumeric / alphanumeric characters. If it does, the loop number regular expression is automatically derived, which reduces manual intervention and improves processing efficiency.

[0077] Step S103: According to the distance between the CAD line data and the bridge, and the number of loops, the total path of the three-dimensional model is obtained, wherein the total path includes a number of loops and the paths of the number of loops. Specifically, it includes:

[0078] When there is a distribution box and the CAD line data in each of the loops, it is determined whether the distance between the distribution box and the CAD line data is less than a first preset distance, and whether the distance between two adjacent CAD line data is less than a second preset distance; if it is less than the first preset distance and less than the second preset distance, it is determined that the distribution box is connected to the CAD line data, and two adjacent CAD line data are connected; based on the connected distribution box and the CAD line data, and the connected two adjacent CAD line data, the total path of the three-dimensional model is determined;

[0079] When there is a distribution box, the CAD line data and a bridge in each of the loops, determine whether the distance between the distribution box and the CAD line data is less than the first preset distance, determine whether the distance between two adjacent CAD line data is less than the second preset distance, and determine whether the distance between the CAD line data and the bridge is less than the first preset distance; when it is less than the first preset distance and less than the second preset distance, determine that the distribution box is connected to the CAD line data, two adjacent CAD line data are connected, and the CAD line data is connected to the bridge; based on the connected distribution box and the CAD line data, the connected two adjacent CAD line data, and the connected CAD line data and the bridge, determine the total path of the three-dimensional model.

[0080] Optionally, Figure 2 is a schematic diagram of a structure in which CAD data is connected to a bridge and adjacent CAD lines according to an exemplary embodiment. Figure 2 Shown

[0081] The distribution box is taken as the starting point. The two groups of line components, the CAD line data obtained in step S101 and the three-dimensional bridge model already in the software, are judged whether they are connected in pairs. If there are always connected line components, the judgment continues, otherwise it stops. These line components connected in pairs from the distribution box represent the total path of all circuits under this distribution box.

[0082] Specifically, it is determined whether a distribution box and the CAD line data exist simultaneously in each of the loops. When a distribution box and the CAD line data exist simultaneously in each of the loops, it is determined whether the distance between the distribution box and the CAD line data is less than a first preset distance. If it is less than the first preset distance, it is considered that the distribution box is connected to the CAD line data. And it is determined whether the distance between two adjacent CAD line data is less than a second preset distance. If it is less than the second preset distance, it is considered that the two adjacent CAD line data are connected. Through distance judgment, it is possible to ensure the connection between the distribution box and the CAD line data, and that the two adjacent CAD line data are connected, thereby determining the path of each loop. Based on the paths of each loop, the total path of the three-dimensional model can be determined.

[0083] Determine whether a distribution box, the CAD line data and a bridge exist simultaneously in each of the loops. When a distribution box, the CAD line data and a bridge exist simultaneously in each of the loops, determine whether the distance between the distribution box and the CAD line data is less than a first preset distance. If it is less than the first preset distance, it is considered that the distribution box is connected to the CAD line data. Determine whether the distance between two adjacent CAD line data is less than a second preset distance. If it is less than the second preset distance, it is considered that the two adjacent CAD line data are connected. Determine whether the distance between the CAD line data and the bridge is less than the first preset distance. If it is less than the first preset distance, it is considered that the CAD line data is connected to the bridge. Through distance judgment, it can be ensured that the distribution box is connected to the CAD line data, that two adjacent CAD line data are connected, and that the CAD line data is connected to the bridge, thereby determining the path of each loop. Based on the paths of each loop, the total path of the three-dimensional model can be determined.

[0084] It is worth noting that the first preset distance is 0-30mm. In the embodiment of the present application, 20mm can be used. The second preset distance is 0-1500mm. In the embodiment of the present application, 1000mm can be used. To determine whether the distribution box and the bridge are connected, and whether the bridge is connected to the bridge, it is determined that the two are connected if they intersect. In each circuit, it is also necessary to determine whether the distribution box and the bridge are connected, and whether the bridge is connected to the bridge. The bridge refers to the laying of wires in the bridge, and the CAD lines refer to the laying of wires in pipes. The wires will not be broken in a path, part of them are in the pipe, part of them are in the bridge, they may all be in the pipe, or they may all be in the bridge.

[0085] Step S103 achieves accurate determination of the total path of the 3D model through multiple judgment rules and built-in error settings. This process not only improves the accuracy and continuity of path determination, but also simplifies user operations, reduces human errors, and ensures the standardization and reliability of the design.

[0086] Figure 3is a flowchart of step S104 according to an exemplary embodiment. Figure 3 As shown, step S104, according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, determine the number and position information of each lamp on the total path. Specifically including:

[0087] Step S1041, determining whether the insertion point of the lamp is within the range of the bridge width, and determining whether the shortest distance between the outer frame of the lamp and the total path CAD line is less than a first preset distance.

[0088] Step S1042, when the insertion point of the lamp is within the width of the bridge and the closest distance between the outer frame of the lamp and the CAD line of the total path is less than a first preset distance, determine the number and position information of each lamp on the total path.

[0089] Optionally, Figure 4 is a schematic diagram of a total path lamp according to an exemplary embodiment. Figure 4 As shown, it is determined whether the insertion point of the lamp is within the range of the bridge width, and whether the closest distance between the outer frame of the lamp and the CAD line of the total path is less than the first preset distance. When the insertion point of the lamp is within the range of the bridge width, and the closest distance between the outer frame of the lamp and the CAD line of the total path is less than the first preset distance, the number and position information of each lamp on the total path are determined. Among them, the first preset distance can be 20mm. Among them, the position information is when the lamp is on the bridge and the lamp is on the total path.

[0090] S104 determines whether the insertion point of the lamp is within the range of the bridge width to ensure that the insertion point of the lamp is within the range of the bridge, thereby avoiding misjudgment of the lamp position. By determining whether the distance between the insertion point of the lamp and the total path is less than a first preset distance (e.g., 20 mm), the insertion point of the lamp is ensured to be on the total path, further improving the accuracy of position judgment. The number and position information of each lamp on the total path are accurately determined. This process not only improves the accuracy of lamp position judgment and the rationality of lamp layout, but also simplifies user operation, reduces human errors, and ensures the standardization and reliability of the design.

[0091] In one embodiment, before step S105, based on the shortest path between lamps, starting from the distribution box, connecting lamps with the same label in the same circuit, and generating a three-dimensional path and engineering quantity for each lighting circuit, the method further includes:

[0092] Determine whether the distance between the dimension mark of the lamp and the CAD line is less than a preset maximum distance value, and if less than the preset maximum distance value, determine the CAD text mark corresponding to each lamp;

[0093] Based on the CAD text annotations corresponding to each lamp, the circuit name and circuit number corresponding to each lamp are determined through the circuit name and circuit number corresponding to each CAD text annotation.

[0094] Optionally, Figure 5 is a schematic diagram of lamp marking according to an exemplary embodiment. Figure 5 As shown, determine whether the distance between the dimension annotation of the lamp and the CAD line is less than the preset maximum distance value. If it is less than the preset maximum distance value, determine the CAD text annotation corresponding to each lamp. The distribution box is the starting node, and the other ends are the end nodes. There can be multiple end nodes. The lamps from the lamp pointed to by the CAD text annotation to the end node / next CAD text annotation are assigned the circuit name and number represented by the annotation. For example Figure 4 , the 9 lamps between the CAD text label "3AL-N1, N2" and the terminal node 3 will be assigned the loop N1 / N2. Starting from the distribution box as the starting node, the first lamp assigned N1 / N2 will be labeled N1, the second N2, the third N1, and so on to the lamps at the terminal nodes. This determines the labeling of each lamp.

[0095] Specifically, in the design drawings, each circuit under the distribution box will have a circuit number, which is generally a letter + number. N1 in the above example refers to the circuit. In the alternate lighting drawings, "3AL-N1, N2" according to the drawing recognition, this position has two circuits N1 and N2, and the two circuits connect lamps alternately, that is, N1 connects lamps 1, 3, and 5, and N2 connects lamps 2, 4, and 6. The software processing method is: first assign N1 / N2 to these 1 to 6 lamps, and assign the same markings as a group, and then confirm which are 135 lamps and which are 246 lamps in this group.

[0096] S104 determines the CAD text annotation corresponding to each lamp when the distance is less than the preset maximum distance value. This ensures that each lamp can be correctly associated with the corresponding circuit annotation. Based on the CAD text annotation corresponding to each lamp, the circuit name and number of circuits corresponding to each CAD text annotation are determined. This ensures the correct association between lamps and circuits, providing accurate data support for subsequent path generation and engineering quantity calculation.

[0097] Step S105: Based on the number and location information of each lamp on the total path and the shortest path between lamps, starting from the distribution box, connect the lamps with the same label on the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit.

[0098] Optionally, Figure 6is a schematic diagram showing the shortest distance between lamps according to an exemplary embodiment. Figure 6 As shown in the figure, starting from the distribution box, according to the shortest path between lamps, all lamps with the same label are connected by wires with the same name circuit, which can generate the three-dimensional path and engineering quantity of each wire and each lighting circuit under the distribution box. Among them, the shortest distance between lamps is as shown in the figure below. Figure 5 In the example, starting from the distribution box, loop N1 is first connected to lamps 1 and 2, then path 1 is from lamp 2 to lamp 3, and path 2 is from lamp 1 to lamp 3. By comparing the distance (addition of dimension numbers), path 1 is shorter. Therefore, loop N1 will generate a 3D model and engineering quantity according to path 1.

[0099] Specifically, the BIM model of each circuit is established through the BIM installation quantity calculation software. The circuit has its own three-dimensional component model style in the BIM software. Each circuit is drawn from the distribution box to the end along the analyzed shortest path using the three-dimensional components of the circuit. This circuit space model software will assign a height attribute, and the customer can also define the height himself. The three-dimensional model of the distribution box and the lamp also has a height attribute. Therefore, based on the above path, the three-dimensional path and engineering quantity of each lighting circuit can be generated. Step S105 connects the lamps through the shortest path, reducing the length of the wires and thus reducing material costs. For example, Figure 5 In the example, loop N1 starts from the distribution box, first connects lamp 1 and lamp 2, and then passes through path 1 (from lamp 2 to lamp 3) instead of path 2 (from lamp 1 to lamp 3), because path 1 is shorter, which can save wires. Through the generated three-dimensional path, the system can automatically calculate the required wire length, number of connectors and other engineering quantities. This not only improves the accuracy of the calculation, but also greatly reduces the time and workload of manual calculation, and improves the efficiency of modeling and calculation. Based on accurate engineering quantity calculation, cost estimation can be more accurate, helping project managers to better control the budget. Construction personnel can complete the wiring work quickly and accurately based on the detailed three-dimensional path and engineering quantity data, improving construction efficiency.

[0100] In summary, the embodiment of the present application provides a lighting circuit modeling and quantity calculation method, by obtaining CAD line data and CAD text annotation data on a two-dimensional drawing. Each CAD text annotation is matched with a circuit number regular expression to determine the circuit name and number of circuits corresponding to each CAD text annotation. According to the distance between the CAD line data and the bridge, and the number of circuits, the total path of the three-dimensional model is obtained, wherein the total path includes a number of circuits and the paths of the number of circuits. According to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, the number and position information of each lamp on the total path are determined. Based on the number and position information of each lamp on the total path, according to the shortest path between lamps and lamps, starting from the distribution box, each lamp with the same annotation of the same circuit is connected to generate a three-dimensional path and engineering quantity of each lighting circuit. The centrally annotated interval lamp drawings are realized to synchronously generate a three-dimensional model of each circuit and measure in real time, which not only saves the labor cost of the staff for matching drawings, but also improves the accuracy of the automated execution of the quantity calculation task, and improves the efficiency of modeling and quantity calculation. The problem of low efficiency in the modeling and quantity calculation of interval lamp lighting circuits in the related art is solved.

[0101] In a second aspect, an embodiment of the present application provides a system for calculating lighting circuit modeling. Figure 7 FIG. 1 is a block diagram of a lighting circuit modeling and calculation system according to an exemplary embodiment. Figure 7 As shown, the system includes a module 710 for obtaining line data and text annotation data, a module 720 for determining the circuit name and the number of circuits, a module 730 for obtaining the total path, a module 740 for determining the number and location information of lamps, and a module 750 for generating models and engineering quantities; wherein,

[0102] The module 710 for obtaining line data and text annotation data is used to obtain CAD line data and CAD text annotation data on the two-dimensional drawing;

[0103] The circuit name and circuit number determination module 720 is used to match each CAD text annotation with the circuit number regular expression to determine the circuit name and circuit number represented by each text annotation;

[0104] The total path acquisition module 730 is used to acquire the total path of the three-dimensional model according to the distance between the CAD line data and the bridge frame, and the number of loops, wherein the total path includes a number of loops and the paths of the number of loops;

[0105] The module 740 for determining the number and position information of lamps is used to determine the number and position information of each lamp on the total path according to the position relationship between the insertion point of the lamp and the bridge, and the distance between the lamp and the total path;

[0106] The model generation and engineering quantity module 750 is used to generate a three-dimensional path and engineering quantity for each lighting circuit based on the number and location information of each lamp on the total path, according to the shortest path between lamps, starting from the distribution box, connecting each lamp with the same label in the same circuit.

[0107] In summary, the lighting circuit modeling and quantity calculation system provided in the embodiment of the present application solves the problem of low efficiency in the modeling and quantity calculation of interval lamp lighting circuits in the related art by obtaining line data and text annotation data module 710, determining circuit name and circuit number module 720, obtaining total path module 730, determining the number and position information of lamps module 740 and generating model and engineering quantity module 750. Specifically, by obtaining CAD line data and CAD text annotation data on a two-dimensional drawing. Match each CAD text annotation with the circuit number regular expression to determine the circuit name and circuit number corresponding to each CAD text annotation. According to the distance between the CAD line data and the bridge, and the number of circuits, the total path of the three-dimensional model is obtained, wherein the total path includes several circuits and the paths of several circuits. According to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, the number and position information of each lamp on the total path are determined. Based on the number and location information of each lamp on the total path, according to the shortest path between lamps, starting from the distribution box, connect the lamps with the same annotations on the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit. The centralized annotated interval lamp drawings can be used to synchronously generate a three-dimensional model of each circuit and measure in real time, which not only saves the labor cost of staff matching drawings, but also improves the accuracy of automated execution of quantity calculation tasks and the efficiency of modeling and quantity calculation. It solves the problem of low efficiency in modeling and quantity calculation of interval lamp lighting circuits in related technologies.

[0108] It should be noted that the lighting circuit modeling and calculation system provided in this embodiment is used to implement the above-mentioned implementation mode, and the descriptions that have been made will not be repeated. As used above, the terms "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the above embodiment is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0109] In a third aspect, an embodiment of the present application provides an electronic device, Figure 8 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 8 As shown, the electronic device may include a processor 81 and a memory 82 storing computer program instructions.

[0110] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0111] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0112] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .

[0113] The processor 81 implements any one of the lighting circuit modeling and quantity calculation methods in the above embodiments by reading and executing computer program instructions stored in the memory 82.

[0114] In one embodiment, a lighting circuit modeling and calculation device may further include a communication interface 83 and a bus 80. Figure 8 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.

[0115] The communication interface 83 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 83 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0116] The bus 80 includes hardware, software or both, coupling the components of a lighting circuit modeling and calculation device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0117] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, a lighting circuit modeling and quantity calculation method provided in the first aspect is implemented.

[0118] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0119] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps of a lighting circuit modeling and quantity calculation method provided in the first aspect.

[0120] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0121] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0122] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A lighting circuit modeling and quantity calculation method, characterized in that: The method comprises: Get CAD line data and CAD text annotation data on 2D drawings; Matching each of the CAD text annotations with a circuit number regular expression to determine the circuit name and circuit number corresponding to each of the CAD text annotations; According to the distance between the CAD line data and the bridge, and the number of the loops, a total path of the three-dimensional model is obtained, wherein the total path includes a plurality of loops and paths of the plurality of loops; Determine the quantity and position information of each of the lamps on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path; Based on the quantity and position information of each lamp on the total path, according to the shortest path between the lamps, starting from the distribution box, connect the lamps with the same markings in the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit.

2. The method according to claim 1, characterized in that The step of obtaining CAD line data and CAD text annotation data on the two-dimensional drawing includes: Receive 2D drawings imported into BIM 3D quantity calculation software; According to the calling function command, in response to receiving an instruction of a user selecting a CAD line in a drawing, extracting data of the same layer as the CAD line and having a characteristic attribute of a straight line, a polyline, a spline curve, or an arc, and acquiring the CAD line data; According to the calling function command, in response to receiving an instruction from a user to select annotation data in a drawing, the CAD layer corresponding to the annotation data is picked up, and data in the CAD layer whose characteristic attributes are text and include numbers and letters are filtered to obtain the CAD text annotation data.

3. The method according to claim 1, characterized in that The step of matching each of the CAD text annotations with a circuit number regular expression to determine the circuit name and circuit number corresponding to each of the CAD text annotations includes: Determine the circuit number regular expression in the CAD text annotation according to the annotation recognition library; Each of the CAD text annotations is matched with a regular expression for the circuit number, a data group that matches the regular expression for the circuit number in each of the CAD text annotations is obtained, and based on the data group, the circuit name and the number of circuits corresponding to each of the CAD text annotations are determined.

4. The method according to claim 3, characterized in that After determining the number of circuits represented by each of the text labels, the method further includes: The number of lines connecting the interval lamps is determined according to the number of loops, wherein the number of lines connecting the interval lamps is several times less than the number of loops.

5. The method according to claim 1, characterized in that The obtaining of the total path of the three-dimensional model according to the distance between the CAD line data and the bridge and the number of loops includes: When there is a distribution box and the CAD line data in each of the loops, it is determined whether the distance between the distribution box and the CAD line data is less than a first preset distance, and whether the distance between two adjacent CAD line data is less than a second preset distance; if it is less than the first preset distance and less than the second preset distance, it is determined that the distribution box is connected to the CAD line data, and two adjacent CAD line data are connected; based on the connected distribution box and the CAD line data, and the connected two adjacent CAD line data, the total path of the three-dimensional model is determined; When there is a distribution box, the CAD line data and a bridge in each of the loops, determine whether the distance between the distribution box and the CAD line data is less than the first preset distance, determine whether the distance between two adjacent CAD line data is less than the second preset distance, and determine whether the distance between the CAD line data and the bridge is less than the first preset distance; when it is less than the first preset distance and less than the second preset distance, determine that the distribution box is connected to the CAD line data, two adjacent CAD line data are connected, and the CAD line data is connected to the bridge; based on the connected distribution box and the CAD line data, the connected two adjacent CAD line data, and the connected CAD line data and the bridge, determine the total path of the three-dimensional model.

6. The method according to claim 1, characterized in that Determining the quantity and position information of each lamp on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path, includes: Determine whether the insertion point of the lamp is within the width of the bridge, and determine whether the closest distance between the outer frame of the lamp and the CAD line of the total path is less than a first preset distance; When the insertion point of the lamp is within the width of the bridge and the closest distance between the outer frame of the lamp and the CAD line of the total path is less than a first preset distance, the number and position information of each lamp on the total path are determined.

7. The method according to claim 1, characterized in that Before the method of connecting the lamps with the same label in the same circuit based on the shortest path between the lamps, starting from the distribution box, and generating the three-dimensional path and engineering quantity of each lighting circuit, the method further includes: Determine whether the distance between the dimension mark of the lamp and the CAD line is less than a preset maximum distance value, and if less than the preset maximum distance value, determine the CAD text mark corresponding to each lamp; Based on the CAD text annotations corresponding to each lamp, the circuit name and the circuit number corresponding to each lamp are determined through the circuit names and circuit numbers corresponding to each CAD text annotation.

8. A lighting circuit modeling and quantity calculation system, characterized in that: The system includes a module for obtaining line data and text annotation data, a module for determining the name and number of circuits, a module for obtaining the total path, a module for determining the number and location information of lamps, and a module for generating models and engineering quantities; wherein, The module for obtaining line data and text annotation data is used to obtain CAD line data and CAD text annotation data on the two-dimensional drawing; The module for determining the circuit name and the number of circuits is used to match each of the CAD text annotations with the circuit number regular expression to determine the circuit name and the number of circuits represented by each of the text annotations; The total path acquisition module is used to acquire the total path of the three-dimensional model according to the distance between the CAD line data and the bridge, and the number of loops, wherein the total path includes a plurality of loops and the paths of the plurality of loops; The module for determining the number and position information of lamps is used to determine the number and position information of each lamp on the total path according to the positional relationship between the insertion point of the lamp and the bridge, and according to the distance between the lamp and the total path; The generation model and engineering quantity module is used to generate a three-dimensional path and engineering quantity for each lighting circuit based on the number and position information of each lamp on the total path, according to the shortest path between the lamps, starting from the distribution box, connecting each lamp with the same label in the same circuit.

9. An electronic device, characterized in that: The invention comprises a memory and a processor, a computer program stored in the memory and executable on the processor, and the processor implements a lighting circuit modeling and quantity calculation method as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a lighting circuit modeling and quantity calculation method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method of application of Revit parameterization family in electrical design

    CN108520082A

  • Electrical three-dimensional system illumination design method

    CN109583060A

  • Secondary component calculation method and device, computer equipment and readable storage medium

    CN112861240A

  • Electrical loop automatic analysis and drawing generation method and device based on graph algorithm

    CN113626909A

  • Lighting lamp loop division method, device and equipment and storage medium

    CN115292781A

Cited By

  • Power distribution system design method based on CAD platform

    CN120832741A