Automatic arrangement method for public lighting lamps of CAD (computer aided design) electrical lighting plan
Technical Field
The invention relates to the field of drawing related of electrical professional CAD drawings, in particular to an automatic arrangement method of public lighting lamps of a CAD electrical lighting plan.
Background
CAD construction drawing is a drawing showing the overall layout of engineering projects, the external shape, internal arrangement, structural construction, internal and external decoration, material construction, equipment, construction, etc. of a building by AutoCAD software. In building electrical construction drawings, a plan view generally macroscopically describes the geographical position and main structure of a building, and desalinates walls, doors, windows, beams and columns and the like, while electric lines are mainly described. Other pipelines such as water heating, gas and other pipelines are not arranged on the electric construction drawing.
The electric plan is to cut the building along the horizontal direction through the door and window of the building, remove the upper part, see the plane shape, size, position and thickness of the wall column, the type of door and window, the plane arrangement of the distribution equipment, lighting equipment, etc. in the building, the line trend, etc. of the building from the top to the bottom. From the representation of the plan, the plan is read along a "line" such as a power source, lead-in, distribution box, lead-out, and electrical consumer. In the reading process, the number, model specification, installation position and installation height of the electric equipment such as the power supply household device, the lighting distribution box, the lamp, the socket, the switch and the like are required to be known, and the laying position, the laying mode, the laying path, the model specification of the lead and the like of the lighting circuit are indicated.
In the existing building design construction field, the drawing of CAD drawings is mainly that an electrical designer with years of working experience manually draws an electrical lighting plan according to national electrical construction specifications and requirements of clients.
However, there are a number of problems associated with the manual placement of public lighting drawings by a designer:
1. The design period is long, and the change in the construction process cannot be responded quickly and timely. Because different spaces are required for the power density of the public lighting lamps by national regulations, a designer needs to continuously inquire the national regulations when manually drawing, calculates the area of the space for installing the public lighting lamps, calculates the quantity of the public lighting lamps which are required to be installed in the space according to the power of different public lighting lamps, and takes time for determining the quantity of the lighting lamps.
2. The manual design can cause calculation error problem, and the designer manually draws and can lead to drawing to place the position problem, brings adverse effect to the use after follow-up construction is accomplished.
3. Construction drawings are usually drawn by experienced electrical design engineers, and accumulated industry knowledge is required as a basic condition of drawing, so that the cost of manual design is high.
Disclosure of Invention
Therefore, in order to solve the above-mentioned shortcomings, the present invention provides an automatic arrangement method for CAD electric lighting plan public lighting lamps.
The invention is realized in such a way that an automatic arrangement method of the CAD electric lighting plan public lighting lamps is constructed, and the following steps are operated:
s1, arranging a public lighting lamp drawing basis data table on a lighting plan, wherein the public lighting lamp drawing basis data table is divided into a lighting threshold table of table 1, a lamp brand model table of table 2 and a public lighting lamp placing space table of table 3;
S2, formulating a logic formula for placing the number of the public lighting lamps in space according to national standard to obtain: n=ea/F/0.8/0.8; according to the formula, the number of public lighting lamps in a certain space which is calculated for the first time can be calculated, whether N is less than or equal to Y is judged, if yes, N is taken, otherwise N=N-1, the step is circulated until the calculation formula is less than or equal to Y, the minimum value of N is 1, and finally the public lighting lamp placement number in the space is determined;
S3, the CAD analysis service is abutted to obtain wall lines, doors, windows and other graphic elements on a CAD building plane drawing, and building outlines are usually surrounded by walls, doors, windows, columns and the like to form a specific closed space;
s4, scaling the CAD frame to a picture with a fixed proportion, recording the scaled proportion ratio, recording the picture elements acquired in S2, drawing the picture with the same proportion, obtaining the outline of each enclosed space by combining an image processing method with a deep learning image segmentation technology, and recording the outline coordinate information of each space and the name of each space;
S5, according to the table 3 public lighting lamp placement space table in S1, acquiring all space outlines needing to be placed with public lighting lamps from all spaces identified in S4, setting area thresholds for dividing the space outlines into rectangles by using the concept of a maximum rectangle identification algorithm in a two-dimensional matrix, and acquiring all rectangles which are larger than the area thresholds and are divided by each space outline by using a recursion algorithm;
S6, according to the number of lamps to be installed in each space calculated in the S2, reasonably distributing the number n of lamps to be placed of the rectangles segmented by each space contour according to the area ratio of all the rectangles acquired in the S5;
s7, calculating the side length of each rectangle cut out in the space, obtaining a connecting line L of the middle points of the short sides, and uniformly distributing n points on the L according to the calculated number n of public lighting lamps to be installed of each rectangle in the S6 to obtain the placement position of each public lighting lamp;
s8, acquiring the positions of all automatically arranged public lighting lamps, and translating the public lighting lamp legends formulated in the national standard to the calculated positions by utilizing coordinate transformation;
S9, converting the public lighting lamp legend placed at the png position into the position on the dwg drawing of the CAD according to the ratio of the coordinate transformation in the S4, and calling the CAD analysis service to complete the automatic arrangement of the public lighting lamp.
Preferably, table 1 illumination threshold table in S1: according to the national electrical construction specification and the electrical construction specification of each place, the lighting power density value requirements and the lighting standard values of different spaces are extracted, and are arranged into a table which is recorded as a table 1 lighting threshold value table.
Preferably, table 2 lamp brand model table in S1: and collecting the types of public lighting lamps of different brands and corresponding power/lamp luminous flux values, and arranging the values into a table which is recorded as a lamp brand type table in table 2.
Preferably, table 3 common lighting lamp placement space table in S1: and collecting the space required to draw the public lighting lamp, and recording the space as a table 3 public lighting lamp placement space table.
Preferably, the formula given in S2: n=ea/F/0.8, e being the standard value of illuminance for the corresponding space; a is the area unit of the corresponding space which is square meter; f is the luminous flux of the lamp; the first 0.8 is the utilization coefficient; the second 0.8 is the maintenance factor.
Preferably, Y in S2 is the illumination power density limit.
Preferably, the graphic element in S3 specifically refers to basic graphics such as a dotted line and an arc line when drawing a CAD drawing.
The invention has the following advantages: the invention provides an automatic arrangement method of CAD electric lighting plan public lighting lamps by improving, which has the following improvements compared with the same type of equipment:
The automatic arrangement method of the public lighting lamps of the CAD electrical lighting plan can replace a designer to automatically calculate the drawing quantity of the public lighting lamps and automatically select proper positions on a CAD drawing to carry out arrangement, is an important ring in the CAD electrical construction plan by artificial intelligence, and effectively solves the problems that the public lighting lamps in the lighting plan cannot respond to the change in the construction process in time due to manual drawing of the designer, the construction progress is influenced by long design period, and the mode that the artificial intelligence is used for replacing the manual design and the CAD electrical construction plan drawing is currently belongs to the technical blank.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Detailed Description
The following detailed description of the present invention will be provided with reference to fig. 1, in which the technical solutions of the embodiments of the present invention are clearly and completely described, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides an automatic arrangement method of CAD electric lighting plan public lighting lamps by improvement, which comprises the following steps:
s1, arranging a public lighting lamp drawing basis data table on a lighting plan, wherein the public lighting lamp drawing basis data table is divided into a lighting threshold table of table 1, a lamp brand model table of table 2 and a public lighting lamp placing space table of table 3;
Table 1 illumination threshold table: according to national electrical construction specifications and electrical construction specifications of various places, extracting lighting power density value requirements and lighting standard values of different spaces, and arranging the lighting power density value requirements and the lighting standard values into a table to be recorded as a table 1 lighting threshold value table;
table 2 lamp brand model table: collecting the types of public lighting lamps of different brands and corresponding power/lamp luminous flux values, and arranging the values into a table which is recorded as a lamp brand type table in table 2;
table 3 public lighting lamp placement space table: and collecting the space required to draw the public lighting lamp, and recording the space as a table 3 public lighting lamp placement space table.
S2, formulating a logic formula for placing the number of the public lighting lamps in space according to national standard to obtain: n=ea/F/0.8/0.8;
Wherein:
E is the standard value of illuminance of the corresponding space;
A is the area unit of the corresponding space which is square meter;
f is the luminous flux of the lamp;
The first 0.8 is the utilization coefficient;
The second 0.8 is the maintenance factor.
According to the formula, the number of public lighting lamps in a certain space which is calculated for the first time can be calculated, whether N is less than or equal to Y (lighting power density limit Y) is judged, if so, N is taken, otherwise, N=N-1, and the steps are circulated until the calculation formula is less than or equal to Y, the minimum value of N is 1, and the final public lighting lamp placement number in the space is determined;
S3, connecting CAD analysis service to obtain wall lines, doors, windows and other graphic elements (the graphic elements refer to the basic graphics such as dotted lines, arcs and the like when the CAD drawing is drawn) on the CAD building plane drawing, and the building outline is usually surrounded by walls, doors, windows, columns and the like to form a specific closed space;
s4, scaling the CAD frame to a picture with a fixed proportion, recording the scaled proportion ratio, recording the picture elements acquired in S2, drawing the picture with the same proportion, obtaining the outline of each enclosed space by combining an image processing method with a deep learning image segmentation technology, and recording the outline coordinate information of each space and the name of each space;
S5, according to the table 3 public lighting lamp placement space table in S1, acquiring all space outlines needing to be placed with public lighting lamps from all spaces identified in S4, setting area thresholds for dividing the space outlines into rectangles by using the concept of a maximum rectangle identification algorithm in a two-dimensional matrix, and acquiring all rectangles which are larger than the area thresholds and are divided by each space outline by using a recursion algorithm;
S6, according to the number of lamps to be installed in each space calculated in the S2, reasonably distributing the number n of lamps to be placed of the rectangles segmented by each space contour according to the area ratio of all the rectangles acquired in the S5;
s7, calculating the side length of each rectangle cut out in the space, obtaining a connecting line L of the middle points of the short sides, and uniformly distributing n points on the L according to the calculated number n of public lighting lamps to be installed of each rectangle in the S6 to obtain the placement position of each public lighting lamp;
s8, acquiring the positions of all automatically arranged public lighting lamps, and translating the public lighting lamp legends formulated in the national standard to the calculated positions by utilizing coordinate transformation;
S9, converting the public lighting lamp legend placed at the png position into the position on the dwg drawing of the CAD according to the ratio of the coordinate transformation in the S4, and calling the CAD analysis service to complete the automatic arrangement of the public lighting lamp.
The basic principle and main characteristics of the invention and the advantages of the invention are shown and described above, standard parts used by the invention can be purchased from market, special-shaped parts can be customized according to the description of the specification and the drawings, the specific connection modes of the parts adopt conventional means such as mature bolt rivets and welding in the prior art, the machinery, the parts and the equipment adopt conventional models in the prior art, and the circuit connection adopts conventional connection modes in the prior art, so that the description is omitted.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.