A lighting circuit modeling and quantity calculation method, system, device and medium

By acquiring CAD data from two-dimensional drawings and performing regular expression matching and three-dimensional model generation, the problem of low efficiency in modeling and quantity calculation of interval lamp lighting circuits was solved, and automated modeling and accurate engineering quantity calculation were achieved.

CN119808220BActive Publication Date: 2025-10-03PINMING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology has low efficiency in calculating the quantity of modeling interval lamp lighting circuits, which requires manual drawing of wire directions before construction and is prone to errors.

Method used

By obtaining the CAD line data and text annotation data on the two-dimensional drawing, using regular expressions to match the circuit number, and combining the position relationship between the bridge and the lamps, a three-dimensional model is generated and the lighting circuit is connected to achieve automated modeling and quantity calculation.

Benefits of technology

It realizes the synchronous generation of three-dimensional models and real-time measurement of interval lighting fixture drawings, saves labor costs, and improves the accuracy and efficiency of quantity calculation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808220B_ABST
    Figure CN119808220B_ABST
Patent Text Reader

Abstract

The present application relates to a lighting circuit modeling and quantity calculation method, system, equipment and medium, wherein the method obtains 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. 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, starting from the distribution box, each lamp with the same annotation on the same circuit is connected to generate a three-dimensional path and engineering quantity for each lighting circuit. The problem of low efficiency in the modeling and quantity calculation of lighting circuits for interval lamps in the related 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 typically drawn using two-dimensional CAD (Computer-Aided Design) drawings. These drawings depict the lighting system using a "lamp-to-lamp circuit" approach, whereby only one circuit is connected to the power supply for every certain number of lamps. To simplify the drawings, the specific routing of each wire is typically not depicted in detail. Instead, a central annotation is added next to the CAD line segment to indicate the lighting path and lamp connection within that area.

[0003] While this method simplifies the drawings, it still requires manual planning of each wire's specific routing and calculations before actual construction. This is not only time-consuming and labor-intensive, but also prone to errors. Consequently, existing calculations for interval lighting circuit modeling are inefficient. 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 calculation of lighting circuit modeling for interval lamps 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] Obtain 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] Obtaining a total path of the three-dimensional model based on 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 paths of the plurality of loops;

[0009] 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;

[0010] Based on the quantity and location 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 on the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit.

[0011] In one embodiment, 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] In response to receiving a user instruction to select a CAD line in a drawing according to a calling function command, extracting data on the same layer as the CAD line and having a characteristic attribute of a straight line, a polyline, a spline curve, or an arc, thereby obtaining 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 is 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] Determining a regular expression for a circuit number in the CAD text annotation based on an annotation recognition library;

[0017] Each of the CAD text annotations is matched with a circuit number regular expression to obtain a data group in each of the CAD text annotations that matches the circuit number regular expression. Based on the data group, the circuit name and circuit number 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 labels, 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 based on the distance between the CAD line data and the bridge and the number of loops includes:

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

[0022] When a distribution box, the CAD line data and a bridge exist 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, determine whether the distance between two adjacent CAD line data is less than a second preset distance, and 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 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, determining the number and position information of each lamp on the total path based on the positional relationship between the lamp insertion point and the bridge, and based on 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 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, to determine whether the insertion point of the lamp is within the width of the bridge.

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

[0027] Determine whether the distance between the dimension annotation 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 annotation corresponding to each lamp;

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

[0029] In a second aspect, an embodiment of the present application provides a system for modeling and calculating lighting circuit quantities, the system comprising a module for acquiring line data and text annotation data, a module for determining circuit names and the number of circuits, a module for acquiring a 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 a two-dimensional drawing;

[0031] The circuit name and circuit number determination module is used to match each of the CAD text annotations with a circuit number regular expression to determine the circuit name and circuit number 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 on the memory and executable on the processor. When the processor executes the computer program, it implements a lighting circuit modeling and quantity calculation system as described in the first aspect above.

[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] The system obtains CAD line data and CAD text annotation data from a two-dimensional drawing. Each CAD text annotation is matched with a regular expression for the circuit number to determine the circuit name and number corresponding to each CAD text annotation. Based on the distance between the CAD line data and the bridge, as well as the number of circuits, the total path of the three-dimensional model is obtained, where the total path includes several circuits and the paths of several circuits. The number and location of each lamp on the total path are determined based on the positional relationship between the lamp insertion point and the bridge, as well as the distance between the lamp and the total path. Based on the number and location of each lamp on the total path, the system connects lamps with the same annotations on the same circuit starting from the distribution box, according to the shortest path between lamps, to generate a three-dimensional path and engineering quantity for each lighting circuit. This system enables the simultaneous generation of a three-dimensional model for each circuit and real-time measurement from the centrally annotated interval lamp drawings, saving staff the labor cost of drawing matching, improving the accuracy of automated quantity calculation tasks, and enhancing the efficiency of modeling and quantity calculation. This solves the problem of low efficiency in modeling and quantity calculation of interval lamp lighting circuits in related technologies.

[0039] The 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 the quantity of lighting circuits;

[0042] Figure 2 is a schematic structural diagram showing the connection between CAD data, 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 marking 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 This is a system structure block diagram of a lighting circuit modeling and 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 this application more clearly understood, the present application is described and illustrated below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely used to explain this application and are not intended to limit this application. Based on the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without making any creative efforts are within the scope of protection of this application.

[0050] Obviously, the drawings described below are merely examples or embodiments of the present application. Those skilled in the art can, without inventive effort, apply the present application to other similar scenarios based on these drawings. Furthermore, it is also understood that, although the effort involved in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, changes in design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as an insufficiency of the content disclosed in this application.

[0051] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments unless there is a conflict.

[0052] Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by a person of ordinary skill in the technical field to which this application belongs. The words "a", "an", "a", "the" and the like used in this application do not indicate a limit on quantity and may indicate the singular or plural. The terms "include", "comprise", "have" and any variations thereof used 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 that are inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The word "multiple" used in this application means two or more. "And / or" describes the positional relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, or 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 order for 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 and calculation, such as Figure 1 As shown, a lighting circuit modeling and quantity calculation method includes:

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

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

[0056] Step S103: Obtain 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 number and position information of each lamp on the total path 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.

[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 each lamp with the same label on the same circuit to generate a three-dimensional path and engineering quantity for each lighting circuit.

[0059] In summary, embodiments of the present application provide a lighting circuit modeling and quantity calculation method. This method obtains CAD line data and CAD text annotation data from a two-dimensional drawing. Each CAD text annotation is matched with a circuit number regular expression to determine the circuit name and number corresponding to each CAD text annotation. Based on the distance between the CAD line data and the bridge, as well as the number of circuits, a total path for the three-dimensional model is obtained, where the total path includes multiple circuits and the paths of multiple circuits. Based on the positional relationship between the luminaire insertion point and the bridge, and the distance between the luminaire and the total path, the number and position information of each luminaire on the total path are determined. Based on the number and position information of each luminaire on the total path, the method connects luminaires with the same annotations on the same circuit starting from the distribution box according to the shortest path between luminaires, generating a three-dimensional path and quantity for each lighting circuit. This method enables the simultaneous generation of a three-dimensional model for each circuit and real-time quantity calculation from centrally annotated interval luminaire drawings, saving staff the labor cost of drawing matching, improving the accuracy of automated quantity calculation tasks, and enhancing the efficiency of modeling and quantity calculation. This method addresses the low efficiency of interval luminaire lighting circuit modeling and quantity calculation in related technologies.

[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 an instruction from a user to select a CAD line in a drawing, extracting data on the same layer as the CAD line and having a characteristic attribute of a straight line, a polyline, a spline curve, or an arc, thereby obtaining the CAD line data;

[0063] According to the calling function command, in response to receiving the instruction of the user to select annotation data in the drawing, the CAD layer corresponding to the annotation data is picked up, and the data with the characteristic attributes of text and including numbers and letters in the CAD layer is filtered to obtain the CAD text annotation data.

[0064] Alternatively, import the 2D drawings into the BIM 3D quantity calculation software and call the function command (including pmazgdbx). The software command bar will prompt the following 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: Select the loop annotation. At this point, you need to select the annotation in the drawing. This selection includes left-clicking or right-clicking the mouse.

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

[0069] After prompt 3, click Annotation Data to select a CAD layer. The filter feature in this 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 number of letters is within a certain number, and is classified as CAD text annotation data. The number can be 3-6. In this embodiment, the number can be 5.

[0070] Step S101 restricts the extraction to data on the same layer as the selected CAD line and with specific attribute properties (such as lines, polylines, splines, and arcs). This ensures that the extracted line data is associated with the target object, avoids interference from irrelevant line data, and improves data accuracy. By filtering data with text attributes and alphanumeric or alphanumeric content, and limiting the number of letters to between 3 and 6, unnecessary text information is effectively filtered out, ensuring that the extracted text annotation data contains key information such as circuit numbers related to electrical circuits, 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 regular expression of the circuit number in the CAD text annotation based on the annotation recognition library;

[0073] Match each CAD text annotation with the circuit number regular expression to obtain the data group that meets the circuit number regular expression in each CAD text annotation. Based on the data group, determine the circuit name and circuit number corresponding to each CAD text annotation.

[0074] Optionally, after prompt 3, click the annotation data. The annotation recognition library will determine whether the annotation data contains consecutive alphanumeric characters or alphanumeric characters. If so, the circuit number regular expression will be obtained. If not, automatic recognition will not be possible, and you will need to enter the regular expression in the Circuit Name column of the Circuit Settings box before proceeding. The annotation recognition library is used to determine the circuit number regular expression in CAD text annotations, including alphanumeric characters. For example, if the annotation data clicked is "N2, N3", it contains letters and numbers, so the regular expression is "N number".

[0075] Match each CAD text annotation in the text annotation data using a circuit number regular expression. Each CAD text annotation matching the regular expression is considered a group of data. Each matching CAD text annotation may contain more than one group of data. The separators between groups of data include "space," "comma," "period," "~," "\," " / ," and "-." This determines the number of groups of numbers and circuit names matching the regular expression in each text annotation. Based on the number of circuits, the number of intervals between lighting fixtures is determined, where the number of intervals between lighting fixtures is a certain number less than the number of circuits. The number of groups of numbers represents the number of circuits in the text annotation. If there are n circuits, each circuit on that path is defined as n-1 lighting fixtures apart. For example, if the circuit number regular expression is "N number" and the CAD text annotation is "N5, N6," "N5, N6," "N5 / N6," or "N5-N6," the text annotation will be recognized as containing two groups of data: circuits N5 and N6, with each circuit separated by one lighting fixture.

[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 characters / alphanumeric characters. If so, the loop number regular expression is automatically derived, which reduces manual intervention and improves processing efficiency.

[0077] Step S103: Obtain the total path of the 3D model based on the distance between the CAD line data and the bridge, as well as the number of loops, wherein the total path includes a number of loops and the paths of the multiple loops. Specifically, it includes:

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

[0079] When a distribution box, the CAD line data and a bridge exist 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, determine whether the distance between two adjacent CAD line data is less than a second preset distance, and 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 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 FIG. 1 is a schematic diagram showing a structure in which CAD data is connected to a bridge and adjacent CAD lines according to an exemplary embodiment. Figure 2 shown

[0081] Starting with the distribution box as the starting point, the two sets of line components (the CAD line data obtained in step S101 and the existing 3D bridge model) are checked to see if they are connected. If there are always connected line components, the process continues; otherwise, the process 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, the two adjacent CAD line data are connected, and 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, and in the embodiment of the present application, 20mm can be used. The second preset distance is 0-1500mm, and 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 bridges are connected, it is through determining that the two are connected if they intersect. In each loop, it is also necessary to determine whether the distribution box and the bridge are connected, and whether the bridges are connected. The bridge refers to the laying of wires in the bridge, and the CAD lines refer to the laying of wires through 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 uses multiple judgment rules and built-in error settings to accurately determine the total path of the 3D model. This process not only improves the accuracy and continuity of path determination, but also simplifies user operations, reduces human error, 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, 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, determines the number and position information of each lamp on the total path. Specifically includes:

[0087] Step S1041: 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.

[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 luminaire's insertion point is within the bridge width and whether the closest distance between the luminaire's outer frame and the overall path CAD line is less than a first preset distance. If the luminaire's insertion point is within the bridge width and the closest distance between the luminaire's outer frame and the overall path CAD line is less than the first preset distance, the number and position information of each luminaire on the overall path are determined. The first preset distance can be 20 mm. The position information is for the luminaire on the bridge and the overall path.

[0090] S104 ensures that the luminaire's insertion point is within the bridge's width by determining whether it is within the bridge's width, thus avoiding misjudgment of the luminaire's position. By determining whether the distance between the luminaire's insertion point and the overall path is less than a first preset distance (e.g., 20 mm), the luminaire's insertion point is ensured to be on the overall path, further improving the accuracy of position determination. The number and location of each luminaire on the overall path are accurately determined. This process not only improves the accuracy of luminaire position determination and the rationality of luminaire layout, but also simplifies user operation, reduces human error, and ensures design standardization and reliability.

[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 to generate 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. If the distance is less than the preset maximum distance value, determine the CAD text mark corresponding to each lamp;

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

[0094] Optionally, Figure 5 is a schematic diagram showing lamp marking according to an exemplary embodiment, such as Figure 5 As shown, determine whether the distance between the dimension mark 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 mark 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 mark to the end node / next CAD text mark are assigned the circuit name and number represented by the mark. For example Figure 4 , the nine luminaires between the CAD text label "3AL-N1, N2" and the end node 3 are assigned circuit N1 / N2. Starting from the distribution box, the first luminaire assigned N1 / N2 is labeled N1, the second N2, the third N1, and so on to the luminaires at the end nodes. This determines the labeling of each luminaire.

[0095] Specifically, in the design drawings, each circuit under the distribution box will have a circuit number, generally a letter and a number. In the above example, N1 refers to the circuit. In the alternate lighting drawings, "3AL-N1, N2" indicates that there are two circuits, N1 and N2, at this location. These two circuits alternately connect to the lamps, meaning N1 connects to lamps 1, 3, and 5, and N2 connects to lamps 2, 4, and 6. The software handles this by first assigning N1 / N2 to lamps 1 through 6, grouping lamps with the same designation. Then, within this group, determine which lamps are 135 and which are 246.

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

[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 each lamp 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. Figure 5 In the example, starting from the distribution box, loop N1 first connects to lamps 1 and 2. Path 1 then connects from lamp 2 to lamp 3, and path 2 connects from lamp 1 to lamp 3. Comparing the distances (adding the dimension numbers), path 1 is shorter. Therefore, the 3D model and engineering quantities for loop N1 are generated based on 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 along the analyzed shortest path to the end using the three-dimensional components of the circuit. This circuit space model software will give a height attribute, and customers can also define the height themselves. The three-dimensional models of the distribution box and lamps also have height attributes. 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 originates from the distribution box, first connecting luminaires 1 and 2. It then follows path 1 (from luminaire 2 to luminaire 3) rather than path 2 (from luminaire 1 to luminaire 3) because path 1 is shorter, thus saving wires. Based on the generated 3D path, the system automatically calculates required quantities, such as wire length and number of connectors. This not only improves calculation accuracy but also significantly reduces the time and workload of manual calculations, increasing the efficiency of modeling and quantity calculations. Accurate quantity calculations enable more precise cost estimates, helping project managers better control budgets. Construction personnel can quickly and accurately complete wiring work based on detailed 3D path and quantity data, improving construction efficiency.

[0100] In summary, embodiments of the present application provide a lighting circuit modeling and quantity calculation method. This method obtains CAD line data and CAD text annotation data from a two-dimensional drawing. Each CAD text annotation is matched with a circuit number regular expression to determine the circuit name and number corresponding to each CAD text annotation. Based on the distance between the CAD line data and the bridge, as well as the number of circuits, a total path for the three-dimensional model is obtained, where the total path includes multiple circuits and the paths of multiple circuits. Based on the positional relationship between the luminaire insertion point and the bridge, and the distance between the luminaire and the total path, the number and position information of each luminaire on the total path are determined. Based on the number and position information of each luminaire on the total path, the method connects luminaires with the same annotations on the same circuit starting from the distribution box according to the shortest path between luminaires, generating a three-dimensional path and quantity for each lighting circuit. This method enables the simultaneous generation of a three-dimensional model for each circuit and real-time quantity calculation from centrally annotated interval luminaire drawings, saving staff the labor cost of drawing matching, improving the accuracy of automated quantity calculation tasks, and enhancing the efficiency of modeling and quantity calculation. This method addresses the low efficiency of interval luminaire lighting circuit modeling and quantity calculation in related technologies.

[0101] In a second aspect, an embodiment of the present application provides a system for modeling and calculating lighting circuits. 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 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 a 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 3D model based on 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 multiple 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 based on the positional relationship between the lamp insertion point 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 on the same circuit.

[0107] In summary, the lighting circuit modeling and quantity calculation system provided by the embodiment of the present application solves the problem of low efficiency in the modeling and quantity calculation of interval lamps in the related art through the module 710 for obtaining line data and text annotation data, the module 720 for determining the circuit name and the number of circuits, the module 730 for obtaining the total path, the module 740 for determining the number and position information of lamps, and the module 750 for generating models and engineering quantities. Specifically, 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 the 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 location of each luminaire along the total path, and following the shortest path between luminaires, starting from the distribution box, the system connects all luminaires with the same markings on the same circuit to generate a 3D path and engineering quantity for each lighting circuit. This system enables the simultaneous generation of 3D models for each circuit and real-time measurement from centrally labeled interval luminaire drawings. This not only reduces the labor cost of drawing matching, but also improves the accuracy of automated quantity calculation tasks and the efficiency of modeling and quantity calculation. This addresses the low efficiency of modeling and quantity calculation for interval luminaire 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 embodiments, and details already described will not be repeated. As used above, the terms "module," "unit," "subunit," etc. may refer to a combination of software and / or hardware that implements the predetermined functions. Although the devices described in the above embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0109] In a third aspect, an embodiment of the present application provides an electronic device, Figure 8 FIG 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 (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) 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), where 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 reads and executes computer program instructions stored in the memory 82 to implement any one of the lighting circuit modeling and quantity calculation methods in the above embodiments.

[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 enable communication between the various modules, devices, units, and / or devices in the embodiments of the present application. The communication port 83 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.

[0116] Bus 80 includes hardware, software, or both, and couples components of a lighting circuit modeling and calculation device. 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 the above. Bus 80 may include one or more buses, where appropriate. Although embodiments herein describe and illustrate a particular bus, this 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. 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 thereof.

[0119] In a possible embodiment, the present invention can also be implemented in the form of a program product, which includes program code. When the program product is run 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] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on the remote device.

[0121] The technical features of the above embodiments can 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 merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A lighting circuit modeling and quantity calculation method, characterized in that: The method comprises: Obtain 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; Obtaining a total path of the three-dimensional model based on 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 paths of the plurality of loops; 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; Based on the number and location information of each lamp on the total path, and according to the shortest path between the 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; The step of 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: When a distribution box and the CAD line data exist in each of the loops, determining whether the distance between the distribution box and the CAD line data is less than a first preset distance, and determining whether the distance between two adjacent CAD line data is less than a second preset distance; if the distance is less than the first preset distance and less than the second preset distance, determining that the distribution box and the CAD line data are connected, and two adjacent CAD line data are connected; determining a total path of the three-dimensional model based on the connected distribution box and the CAD line data, and the connected two adjacent CAD line data; When a distribution box, the CAD line data, and a bridge exist 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, whether the distance between two adjacent CAD line data is less than a second preset distance, and whether the distance between the CAD line data and the bridge is less than a first preset distance; if the distance 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, 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, the total path of the three-dimensional model is determined; Determining the number and position information of each lamp on the total path based on the positional relationship between the lamp insertion point and the bridge, and based on 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.

2. The method according to claim 1, characterized in that The step of obtaining CAD line data and CAD text annotation data on a two-dimensional drawing includes: Receive 2D drawings imported into BIM 3D quantity calculation software; In response to receiving a user instruction to select a CAD line in a drawing according to a calling function command, extracting data on the same layer as the CAD line and having a characteristic attribute of a straight line, a polyline, a spline curve, or an arc, thereby obtaining 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 is filtered to obtain the CAD text annotation data.

3. The method according to claim 1, characterized in that The matching of each CAD text annotation with a circuit number regular expression to determine the circuit name and circuit number corresponding to each CAD text annotation includes: Determining a regular expression for a circuit number in the CAD text annotation based on an annotation recognition library; Each of the CAD text annotations is matched with a circuit number regular expression to obtain a data group in each of the CAD text annotations that matches the circuit number regular expression. Based on the data group, the circuit name and circuit number 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, wherein Before generating a three-dimensional path and engineering quantity for each lighting circuit by connecting the lamps with the same label in the same circuit starting from the distribution box based on the shortest path between the lamps, the method further includes: Determine whether the distance between the dimension annotation 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 annotation corresponding to each lamp; Based on the CAD text annotation corresponding to each lamp, the circuit name and circuit number corresponding to each CAD text annotation are determined.

6. A lighting circuit modeling and quantity calculation system, characterized in that: The system is used to execute the method described in any one of claims 1 to 5 above, and the system includes a module for obtaining line data and text annotation data, a module for determining loop names and loop numbers, a module for obtaining total paths, 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 a two-dimensional drawing; The circuit name and circuit number determination module is used to match each of the CAD text annotations with a circuit number regular expression to determine the circuit name and circuit number 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 on the same circuit.

7. An electronic device, characterized in that: The method 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 according to any one of claims 1 to 5 when executing the computer program.

8. 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 according to any one of claims 1 to 5 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