BIM (Building Information Modeling) shell extraction method and device based on outer side surface and electronic equipment
By building the surface and setting light sources outside the BIM model, and merging the shell object model with ray collision detection, the problem of shell missing in the existing technology is solved, and efficient extraction and rendering of the BIM shell is achieved.
Patent Information
- Application Number
- CN202411868932.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art BIM shell extraction method based on internal designated point emission lines in heterogeneous building scenarios can easily lead to the loss of shells.
Using a BIM shell extraction method based on the outer side, by constructing at least six outer side faces on the outside of the BIM model and setting a plurality of first and second light sources on these faces, the shell object model and the shell model are merged using ray collision detection.
It effectively retains the full appearance triangle of BIM, reduces the amount of data of the shell model, avoids the problem of shell loss, and is suitable for rendering of macro and meso-CIM scenes.
Smart Images

Figure CN119600226A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a BIM shell extraction method, device and electronic device based on an outer surface. Background Art
[0002] As one of the important data sources in the three-dimensional digital base, the geometric model data of BIM (Building Information Model) plays an important role in the construction of CIM (City Information Modeling) and smart cities. The component data of BIM is generally in the hundreds of thousands, and the number of triangles is in the millions to tens of millions. The characteristics of BIM data are that there are many components and many faces in the model. Therefore, BIM data is not suitable for rendering and display in the macro and meso scenes of CIM and smart cities.
[0003] At present, one technology is based on the solution of emitting rays from internal specified points. Specifically, the rays are emitted from the specified points inside the BIM, and the rays are scattered 360 degrees. The last triangle face penetrated by the rays is extracted as the outer shell triangle face, and the geometry is reconstructed to realize the construction of the outer shell.
[0004] This solution can solve the problem of shell extraction of regular models, but it usually results in the loss of shells when faced with heterogeneous buildings. Summary of the invention
[0005] In order to solve the above problems, the purpose of the embodiments of the present application is to provide a BIM shell extraction method, device and electronic device based on the outer surface.
[0006] In a first aspect, an embodiment of the present application provides a BIM shell extraction method based on an outer surface, comprising:
[0007] Construct at least six external surfaces on the outside of the BIM model;
[0008] A plurality of first light sources are arranged on the outer side surface; wherein the irradiation direction of the first light source is directed toward the BIM model and is perpendicular to the outer side surface, and the plurality of first light sources are arranged at a first spacing;
[0009] Merging each ray of the first light source with the intersecting shell object in the BIM model to obtain a shell object model;
[0010] A plurality of second light sources are arranged on the outer side; wherein the irradiation direction of the second light sources is directed toward the housing object model and is perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; and the second spacing is smaller than the first spacing;
[0011] The first triangular face where each ray of the second light source intersects with the shell object model is merged to obtain a shell model.
[0012] In a second aspect, the embodiment of the present application further provides a BIM shell extraction device based on the outer surface, comprising:
[0013] An external surface construction module, used to construct at least six external surfaces on the outside of the BIM model;
[0014] A first light source setting module, used to set a plurality of first light sources on the outer side; wherein the irradiation direction of the first light source is directed toward the BIM model and is perpendicular to the outer side, and the plurality of first light sources are arranged at a first spacing;
[0015] An object model generation module, used for merging each ray of the first light source with the intersecting shell object in the BIM model to obtain a shell object model;
[0016] A second light source setting module is used to set a plurality of second light sources on the outer side; wherein the irradiation direction of the second light source is directed toward the shell object model and is perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; and the second spacing is smaller than the first spacing;
[0017] The shell model generating module is used to merge the first triangular surface where each ray of the second light source intersects with the shell object model to obtain the shell model.
[0018] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and one or more programs, wherein the one or more programs are stored in the memory and configured so that the processor executes the steps of the method of the first aspect.
[0019] In the solution provided in the first aspect of the embodiment of the present application, at least six outer side surfaces are constructed on the outside of the BIM model; a plurality of first light sources are arranged on the outer side surface; wherein the irradiation direction of the first light source is pointing in the direction of the BIM model and perpendicular to the outer side surface, and the plurality of first light sources are arranged at a first spacing; each ray of the first light source is merged with the shell object intersecting in the BIM model to obtain a shell object model; a plurality of second light sources are arranged on the outer side surface; wherein the irradiation direction of the second light source is pointing in the direction of the shell object model and perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; the second spacing is smaller than the first spacing; each ray of the second light source is merged with the first triangular surface intersecting with the shell object model to obtain a shell model; compared with the method in the related art in which the emission line based on the internal specified point will cause the loss of the shell, by constructing the outer side surface in the external space of the BIM model, the shell triangular surface of the BIM shell object fusion model is captured and the shell model is generated by the theory of ray collision detection, the full amount of appearance triangular surfaces of the BIM are retained, and at the same time, the amount of data of the shell model is reduced as much as possible by removing the side and inner surfaces of the monomer object.
[0020] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 A flow chart of a BIM shell extraction method based on an outer surface provided in Example 1 of the present application is shown;
[0023] Figure 2 A schematic diagram of light rays of the light source arranged at a first spacing is shown when the six surfaces of the outer hexahedron in Example 1 of the present application are used as the outer surface;
[0024] Figure 3 A schematic diagram of light rays of the light source arranged at a second spacing is shown when the six surfaces of the outer hexahedron in Example 1 of the present application are used as the outer surface;
[0025] Figure 4 A schematic diagram of light rays of a light source arranged at a first spacing in a symmetrical structure of Example 1 of the present application is shown;
[0026] Figure 5 A schematic diagram of light rays of the light source arranged at a second spacing in the symmetrical structure of Example 1 of the present application is shown;
[0027] Figure 6 A schematic diagram of the structure of a BIM shell extraction device based on the outer surface provided in Example 2 of the present application is shown;
[0028] Figure 7 A schematic diagram of the structure of an electronic device provided in Example 3 of the present application is shown. DETAILED DESCRIPTION
[0029] The execution subject of the BIM shell extraction method based on the outer side surface provided by the present invention is a processor that can extract the BIM shell based on the outer side surface.
[0030] In the present invention, a shell object is composed of a plurality of triangular faces. For example, if the shell object is a window component, the triangular faces may be the outer glass and the inner glass of the window. If the shell object is a wall component, the triangular faces may be the outer wall and the inner wall of the wall.
[0031] The present invention obtains a shell object model composed of a plurality of shell objects by intersecting the first light source with the BIM model. For example, the shell object model includes window components and wall components.
[0032] The present invention obtains a shell model composed of triangular faces on the side of the shell object closest to the light source by intersecting the second light source with the shell object model. For example, the shell model is generated by merging the outer glass of the window and the outer wall of the wall. In other words, the shell model is composed of triangular faces on the side of the shell object closest to the light source.
[0033] Example 1
[0034] See also Figure 1 The flowchart of a BIM shell extraction method based on the outer side provided in the embodiment shown in the figure includes the following specific steps:
[0035] Step 100: Construct at least six external surfaces on the outside of the BIM model.
[0036] The purpose of the embodiment of the present invention is to display only the BIM shell instead of full rendering in macro and meso scenes, thereby improving the rendering efficiency of the digital base.
[0037] In the above step 100, the outside of the BIM model refers to the external space outside the entire BIM model, or the space enclosed by some hollow structures inside the BIM model, or the space semi-enclosed by some symmetrical structures inside the BIM model. For example, the symmetrical structure can be a tower structure.
[0038] The outer surface is a flat surface on which a light source can be placed.
[0039] An outer hexahedron can be constructed outside the BIM model to surround the BIM model; the six faces of the outer hexahedron are the outer side faces. The rays of the light source placed on the outer side face can intersect with the triangular face of the BIM.
[0040] It is also possible to construct a hexahedron in the space surrounded by the hollow structure of the BIM model, and the six faces of the hexahedron are the outer sides. The rays of the light source placed on the outer side can intersect with the triangular faces of the hollow structure.
[0041] It is also possible to construct an outer side surface between two symmetrical structures of the BIM model, and the rays of the light source placed on the outer side surface can intersect with the triangular surface of the symmetrical structure.
[0042] Optionally, step 100 may include steps (11) to (13):
[0043] Step (11): traverse and read the vertex coordinates of each component in the BIM model to obtain the minimum and maximum values of all vertex coordinates on the X-axis, Y-axis and Z-axis.
[0044] Step (12): Construct an outer hexahedron based on the coordinates of eight points obtained by combining the three minima and the three maxima.
[0045] Step (13): The six faces of the outer hexahedron are respectively used as outer side faces.
[0046] In the above step (11), the minimum and maximum values of all vertex coordinates on the X-axis, Y-axis and Z-axis can be expressed as minimum value [Xmin, Ymin, Zmin] and maximum value [Xmax, Ymax, Zmax]. Among them, Xmin refers to the minimum value of all vertex coordinates on the X-axis, Ymin refers to the minimum value of all vertex coordinates on the Y-axis, and Zmin refers to the minimum value of all vertex coordinates on the Z-axis. Xmax refers to the maximum value of all vertex coordinates on the X-axis, Ymax refers to the maximum value of all vertex coordinates on the Y-axis, and Zmax refers to the maximum value of all vertex coordinates on the Z-axis.
[0047] In the above step (12), a fixed value is subtracted from the minimum value, and a fixed value D is added to the maximum value. For example, the fixed value may be 5 meters. The coordinates of the eight points can be represented by a two-dimensional array as follows: [[Xmin-5, Ymin-5, Zmin-5], [Xmin-5, Ymax+5, Zmin-5], [Xmax+5, Ymax+5, Zmin-5],
[0048] [Xmax+5,Ymin-5,Zmin-5],[Xmin-5,Ymin-5,Zmax+5],[Xmin-5,Ymax+5,Zmax+5],[Xmax+5,Ymax+5,Zmax+5],[Xmax+5,Ymax+5,Zmax+5]]. According to the coordinates of the eight points, the corresponding six faces are obtained in order to construct the outer hexahedron. Subtract a fixed value from the minimum value and add a fixed value to the maximum value to generate the coordinates of the eight points of the outer hexahedron, which can avoid the outer side surface from coinciding with the specific surface of the model.
[0049] Optionally, step 100 may further include step (21) to step (22):
[0050] Step (21): Determine the first component and the second component belonging to the relative structure in the BIM model.
[0051] Step (22): Construct an outer surface between the first component and the second component based on the coordinates of the vertices of the first component on the side close to the second component and the coordinates of the vertices of the second component on the side close to the first component.
[0052] Optionally, step (21) may include step (2111):
[0053] Step (2111): determining the first component and the second component that belong to a relative structure in the BIM model according to the special identification of the component in the BIM model; wherein the special identification indicates that the first component and the second component are a relative structure.
[0054] Optionally, step (21) may further include step (2121):
[0055] Step (2121): construct an outer bounding box of each component in the BIM model; if the outer bounding boxes of two adjacent components do not overlap, the two adjacent components are determined as the first component and the second component belonging to a relative structure in the BIM model.
[0056] In the above step (2121), an outer bounding box is constructed according to the maximum and minimum values of the vertex coordinates of each component in the BIM model. Generally, there is no gap between two adjacent components, so at least one face of the outer bounding boxes of the two adjacent components overlaps. However, there is a gap between two components belonging to opposite structures, and the outer bounding boxes of the two components belonging to opposite structures do not overlap.
[0057] Optionally, step (22) may include steps (2211) to (2212):
[0058] Step (2211): The side of the first component close to the second component is used as the first side, and the side of the second component close to the first component is used as the second side.
[0059] Step (2212): A plane obtained by translating the vertex coordinates of the side with a larger area between the first side surface and the second side surface on the coordinate axis is used as the outer side surface between the first component and the second component.
[0060] In the above step (2211), the side surface of the first component close to the second component and the side surface of the second component close to the first component may be a triangle, or a rectangle or other polygons.
[0061] If the areas of the first side surface and the second side surface are equal, the plane between the first component and the second component, ie, the outer side surface, is obtained by translating the vertex coordinates of the first side surface or the second side surface on the coordinate axis.
[0062] If the areas of the first side surface and the second side surface are not equal, the plane between the first component and the second component, that is, the outer side surface, is obtained by translating the vertex coordinates of the side surface with a larger area between the first and second side surfaces on the coordinate axis.
[0063] In the embodiment of the present invention, the user can also specify an outer side for the relative structure. The relative structure is obtained by constructing an outer bounding box on the outside of the component, obtaining a special mark, or by a user-specified method, so as to maximize the coverage of the shell extraction and achieve full coverage of conventional BIM and special BIM data support. It has strong data compatibility.
[0064] Step 102: multiple first light sources are arranged on the outer side surface; wherein the irradiation direction of the first light source is directed toward the BIM model and is perpendicular to the outer side surface, and the multiple first light sources are arranged at a first spacing.
[0065] In the above step 102, if the outer side surface is the six sides of the outer hexahedron, the irradiation direction of the first light source is the direction of the BIM model inside the outer hexahedron. Figure 2 As shown, multiple light sources are placed on the six faces of the outer hexahedron. The irradiation direction of the light source is directed toward the BIM model and is perpendicular to the outer side face, and the light sources are arranged according to the first spacing.
[0066] If the outer side surfaces are six faces of a hexahedron constructed in the hollow structure of the BIM model, the irradiation direction of the first light source is toward the direction of the outer hollow structure of the hexahedron.
[0067] If the outer side surface is a plane constructed between two symmetrical structures of the BIM model, the irradiation direction of the first light source is respectively directed toward the two structures of the symmetrical structure.
[0068] The first spacing can be set according to actual needs. The plurality of first light sources can be arranged at the first spacing in both the horizontal and vertical directions of the outer side surface.
[0069] Optionally, when step 100 includes steps (21) to (22), step 102 may include step (1):
[0070] Step (1): a plurality of first light sources are arranged on the outer surface; wherein the illumination direction of half of the first light sources is directed toward the first component; and the illumination direction of the other half of the first light sources is directed toward the second component.
[0071] like Figure 4 As shown, an outer side is constructed between the two towers. The outer side is divided into 12 grids according to the first spacing. Two light sources are placed on the vertex coordinates of each grid, and the illumination direction of one light source is directed to the first component, that is, the tower on the left; the illumination direction of the other light source is directed to the second component, that is, the tower on the right.
[0072] Step 104: Merge each ray of the first light source with the intersecting shell object in the BIM model to obtain a shell object model.
[0073] In the above step 104, when each ray of the first light source of the embodiment of the present invention is emitted to the BIM model, the ray intersects with the triangular surface of the BIM model. The shell object to which the triangular surface belongs can be obtained through the ID of the intersecting triangular surface.
[0074] Among them, a shell object is composed of multiple triangular faces. Each triangular face has a unique ID. The BIM data records the correspondence between a shell object and multiple triangular face IDs.
[0075] Optionally, step 104 may include steps (1) to (2):
[0076] Step (1): Calculate the distance between the intersecting shell object and the first light source through the intersection of each ray of the first light source and the shell object in the BIM, and take the shell object with the shortest distance as the closest shell object of the ray.
[0077] Step (2): Merge the nearest shell objects of each ray to obtain a shell object model.
[0078] In the above step (1), when the ray is directed toward the BIM model, it will intersect with multiple shell objects. In the embodiment of the present invention, the external structure of the building is obtained, so among the multiple shell objects intersected by the ray and the BIM model, the shell object closest to the light source is selected for merging.
[0079] The shell object with the shortest distance refers to the shell object closest to the light source, which is the outermost structure of the building.
[0080] The shell objects with the shortest distance can be summarized into a specified path for easy merging. The shell object model is a three-dimensional model.
[0081] Step 106: Arrange a plurality of second light sources on the outer side surface; wherein the irradiation direction of the second light sources is directed toward the shell object model and is perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; and the second spacing is smaller than the first spacing.
[0082] In the above step 106, if the outer side surface is the six sides of the outer hexahedron, the irradiation direction of the second light source is the direction of the BIM model inside the outer hexahedron. Figure 3 As shown, multiple light sources are placed on the six faces of the outer hexahedron. The irradiation direction of the light source is directed toward the BIM model and is perpendicular to the outer side face, and the light sources are arranged according to the second spacing.
[0083] If the outer side surfaces are six faces of a hexahedron constructed in the hollow structure of the BIM model, the irradiation direction of the second light source is toward the direction of the outer hollow structure of the hexahedron.
[0084] If the outer side surface is a plane constructed between two symmetrical structures of the BIM model, the irradiation direction of the second light source is respectively directed toward the two structures of the symmetrical structure.
[0085] like Figure 5 As shown, an outer side is constructed between the two towers. The outer side is divided into a plurality of grids according to the second spacing. Two light sources are placed on the vertex coordinates of each grid, and the illumination direction of one light source is directed to the first component, that is, the tower on the left; the illumination direction of the other light source is directed to the second component, that is, the tower on the right.
[0086] The second spacing can be set according to actual needs. The plurality of second light sources can be arranged at the second spacing in both the horizontal and vertical directions of the outer side surface.
[0087] The second spacing of the embodiment of the present invention is smaller than the first spacing. The smaller the spacing between light sources, the denser the light. The shell object model is quickly obtained by relatively sparse light, avoiding excessive amount of calculation; and then the shell model is obtained from the shell object model by relatively dense light, which can solve the problem of obtaining relatively fine triangular faces. For example, in order to display the spherical object on the Roman column in the shell model, the Roman column is first obtained by relatively sparse light, and then the Roman column is illuminated by relatively dense light to obtain the shell model containing the spherical object on the Roman column.
[0088] Optionally, when step 100 includes steps (21) to (22), step 106 may include step (1):
[0089] Step (1): arranging a plurality of second light sources on the outer surface, comprising:
[0090] A plurality of second light sources are arranged on the outer side; wherein the irradiation direction of half of the second light sources is directed toward the first component; and the irradiation direction of the other half of the second light sources is directed toward the second component.
[0091] like Figure 5 As shown, an outer side is constructed between the two towers. The outer side is divided into a plurality of grids according to the second spacing. Two light sources are placed on the vertex coordinates of each grid, and the illumination direction of one light source is directed to the first component, that is, the tower on the left; the illumination direction of the other light source is directed to the second component, that is, the tower on the right.
[0092] The embodiment of the present invention obtains the shell object and the shell triangle surface based on the equally spaced uniform rays, so that the shell surface is constructed more accurately and efficiently.
[0093] Step 108: Merge the first triangular face where each ray of the second light source intersects with the shell object model to obtain a shell model.
[0094] In the above step 108, when the ray is shot toward the shell object model, it will intersect with multiple triangular faces in the same shell object. The embodiment of the present invention is to obtain the external structure of the building, so among the multiple triangular faces intersected by the ray and the same shell object, the triangular face closest to the light source is selected as the shell triangular face for merging. The first triangular face intersected by each ray of the second light source with the shell object model refers to the shell triangular face closest to the light source, which can represent the outermost structure of the building. Finally, the shell model is composed of shell triangular faces.
[0095] In the embodiment of the present invention, all triangular faces obtained by the intersection of rays and the shell object model are merged into a shell model. This model not only retains the full amount of BIM appearance triangular faces, but also reduces the amount of data of the shell model as much as possible by eliminating the side and inner surfaces of the monomer object, thereby removing obstacles for the rendering of BIM data in macro and meso CIM scenarios.
[0096] The embodiment of the present invention realizes the automatic acquisition of the BIM shell object model, effectively avoids the data correlation between the shell model acquisition and the BIM model, and has strong feasibility.
[0097] In summary, an embodiment of the present invention provides a BIM shell extraction method based on outer side surfaces, which constructs at least six outer side surfaces on the outer side of a BIM model; a plurality of first light sources are arranged on the outer side surfaces; wherein the irradiation direction of the first light source is directed toward the BIM model and is perpendicular to the outer side surface, and the plurality of first light sources are arranged at a first spacing; each ray of the first light source is merged with the shell object intersecting in the BIM model to obtain a shell object model; a plurality of second light sources are arranged on the outer side surfaces; wherein the irradiation direction of the second light source is directed toward the shell object model and is perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; the second spacing is smaller than the first spacing; each ray of the second light source is merged with the first triangular face intersecting with the shell object model to obtain a shell model; compared with the method in the related art in which the shell is lost by emitting rays based on an internal specified point, the outer side surface is constructed in the external space of the BIM model, and the shell triangular faces of the BIM shell object fusion model are captured and a shell model is generated by the theory of ray collision detection, thereby retaining the full amount of appearance triangular faces of the BIM, and at the same time reducing the amount of data of the shell model as much as possible by removing the side faces and inner faces of the monomer object.
[0098] Example 2
[0099] A BIM shell extraction method based on the outer surface provided in Example 1 of the present invention is described in detail above. This method can also be implemented by a corresponding device. A BIM shell extraction device based on the outer surface provided in Example 2 of the present invention is described in detail below.
[0100] The BIM shell extraction device based on the outer surface provided in the second embodiment is used to execute the BIM shell extraction method based on the outer surface proposed in the first embodiment.
[0101] See also Figure 6 FIG. 1 is a schematic diagram showing a structure of a BIM shell extraction device based on an outer surface provided by an embodiment of the present invention. Figure 6 As shown, the BIM shell extraction device based on the outer side includes:
[0102] The outer surface construction module 300 is used to construct at least six outer surfaces on the outer side of the BIM model.
[0103] Optionally, the outer side surface construction module 300 includes a first outer side surface construction submodule 3000:
[0104] The outer hexahedron construction submodule 3000 is used to traverse and read the vertex coordinates of each component in the BIM model, obtain the minimum and maximum values of all vertex coordinates on the X-axis, Y-axis and Z-axis; construct an outer hexahedron according to the eight point coordinates obtained by combining three minimum values and three maximum values; and use the six faces of the outer hexahedron as outer side faces.
[0105] Optionally, the outer side surface construction module 300 further includes a second outer side surface construction submodule 3002:
[0106] The second outer side surface construction submodule 3002 is used to determine the first component and the second component that belong to the relative structure in the BIM model; and construct the outer side surface between the first component and the second component according to the coordinates of the vertices of the first component close to the second component and the coordinates of the vertices of the second component close to the first component.
[0107] Optionally, the second outer side surface constructing submodule 3002 includes a first relative structure determining unit 30020:
[0108] The first relative structure determining unit 30020 is used to determine the first component and the second component that belong to the relative structure in the BIM model according to the special identification of the component in the BIM model; wherein the special identification indicates that the first component and the second component are relative structures.
[0109] Optionally, the second outer side surface constructing submodule 3002 further includes a second relative structure determining unit 30022:
[0110] The second relative structure determination unit 30022 is used to construct an outer bounding box of each component in the BIM model; if the outer bounding boxes of two adjacent components do not overlap, the two adjacent components are determined as the first component and the second component belonging to the relative structure in the BIM model.
[0111] Optionally, the second outer side surface constructing submodule 3002 further includes a second outer side surface constructing unit 30024:
[0112] The second outer side surface construction unit 30024 is used to use the side surface of the first component close to the second component as the first side surface, and the side surface of the second component close to the first component as the second side surface; and use the plane obtained by translating the vertex coordinates of the larger side surface between the first side surface and the second side surface on the coordinate axis as the outer side surface between the first component and the second component.
[0113] The first light source setting module 302 is used to set a plurality of first light sources on the outer side; wherein the irradiation direction of the first light source is toward the direction of the BIM model and is perpendicular to the outer side, and the plurality of first light sources are arranged at a first spacing.
[0114] Optionally, the first light source setting module 302 includes a bidirectional light source setting submodule 3020:
[0115] The bidirectional light source setting submodule 3020 is used to set a plurality of first light sources on the outer side; wherein the illumination direction of half of the first light sources is directed toward the first component; and the illumination direction of the other half of the first light sources is directed toward the second component.
[0116] The object model generation module 304 is used to combine the rays of the first light source with the intersecting shell objects in the BIM model to obtain a shell object model.
[0117] The second light source setting module 306 is used to set multiple second light sources on the outer side; wherein the irradiation direction of the second light source is toward the shell object model and perpendicular to the outer side surface, and the multiple second light sources are arranged at a second spacing; the second spacing is smaller than the first spacing.
[0118] Optionally, the second light source setting module 306 includes a bidirectional light source setting submodule 3060:
[0119] A plurality of second light sources are arranged on the outer side; wherein the irradiation direction of half of the second light sources is directed toward the first component; and the irradiation direction of the other half of the second light sources is directed toward the second component.
[0120] The shell model generating module 308 is used to merge the first triangular face where each ray of the second light source intersects with the shell object model to obtain the shell model.
[0121] Optionally, the shell model generation module 308 includes a nearest shell object calculation submodule 3080:
[0122] The nearest shell object calculation submodule 3080 is used to calculate the distance between the intersecting shell object and the first light source through the intersection point of each ray of the first light source and the shell object in the BIM model, and take the shell object with the shortest distance as the nearest shell object of the ray;
[0123] The closest shell objects of each ray are merged to obtain the shell object model.
[0124] In summary, an embodiment of the present invention provides a BIM shell extraction device based on outer side surfaces, which constructs at least six outer side surfaces on the outer side of a BIM model; a plurality of first light sources are arranged on the outer side surfaces; wherein the irradiation direction of the first light source is directed to the direction of the BIM model and perpendicular to the outer side surface, and the plurality of first light sources are arranged at a first spacing; each ray of the first light source is merged with the shell object intersecting in the BIM model to obtain a shell object model; a plurality of second light sources are arranged on the outer side surfaces; wherein the irradiation direction of the second light source is directed to the direction of the shell object model and perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; the second spacing is smaller than the first spacing; each ray of the second light source is merged with the first triangular surface intersecting with the shell object model to obtain a shell model; compared with the method in the related art in which the shell is lost by emitting rays based on an internal specified point, the outer side surface is constructed in the external space of the BIM model, and the shell triangular surface of the BIM shell object fusion model is captured and a shell model is generated by the theory of ray collision detection, thereby retaining the full amount of appearance triangular surfaces of the BIM, and at the same time reducing the amount of data of the shell model as much as possible by removing the side surfaces and inner surfaces of the monomer object.
[0125] Example 3
[0126] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the heart sound restoration method based on in-ear noise reduction headphones described in the above embodiment 1 are executed. The specific implementation can be found in method embodiment 1, which will not be described in detail here.
[0127] In addition, see Figure 7 The structural diagram of an electronic device shown in FIG. 1 is a schematic diagram of a structure of an electronic device. This embodiment further provides an electronic device, which includes a bus 51 , a processor 52 , a transceiver 53 , a bus interface 54 , a memory 55 and a user interface 56 . The electronic device includes a memory 55 .
[0128] In this embodiment, the electronic device further includes: one or more programs stored in the memory 55 and executable on the processor 52, configured so that the processor executes the one or more programs to perform steps 100 to 106.
[0129] The transceiver 53 is used to receive and send data under the control of the processor 52.
[0130] Among them, the bus architecture (represented by bus 51), bus 51 can include any number of interconnected buses and bridges, and bus 51 links various circuits including one or more processors represented by processor 52 and memory represented by memory 55. Bus 51 can also link various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, so this embodiment will not be further described. Bus interface 54 provides an interface between bus 51 and transceiver 53. Transceiver 53 can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. For example: transceiver 53 receives external data from other devices. Transceiver 53 is used to send data processed by processor 52 to other devices. Depending on the nature of the computing system, a user interface 56, such as a keypad, display, speaker, microphone, joystick, can also be provided.
[0131] The processor 52 is responsible for managing the bus 51 and general processing, such as running the general operating system 551 as mentioned above. The memory 55 can be used to store data used by the processor 52 when performing operations.
[0132] Optionally, the processor 52 may be, but is not limited to: a central processing unit, a single-chip microcomputer, a microprocessor or a programmable logic device.
[0133] It can be understood that the memory 55 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 55 of the system and method described in the present embodiment is intended to include, but is not limited to, these and any other suitable types of memory.
[0134] In some implementations, the memory 55 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 551 and application programs 552 .
[0135] Among them, the operating system 551 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 552 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 552.
[0136] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A BIM shell extraction method based on the outer surface, characterized in that: include: Constructing at least six outer side surfaces on the outer side of the BIM model; A plurality of first light sources are arranged on the outer side surface; wherein the irradiation direction of the first light source is directed toward the BIM model and is perpendicular to the outer side surface, and the plurality of first light sources are arranged at a first spacing; Merging each ray of the first light source with the intersecting shell object in the BIM model to obtain a shell object model; A plurality of second light sources are arranged on the outer side surface; wherein the irradiation direction of the second light sources is directed toward the shell object model and is perpendicular to the outer side surface, and the plurality of second light sources are arranged at a second spacing; and the second spacing is smaller than the first spacing; The first triangular face where each ray of the second light source intersects with the shell object model is merged to obtain a shell model.
2. The method according to claim 1, characterized in that The step of constructing at least one outer side surface on the outer side of the BIM model comprises: Traversing and reading the vertex coordinates of each component in the BIM model, and obtaining the minimum and maximum values of all the vertex coordinates on the X-axis, Y-axis and Z-axis; Constructing an outer hexahedron according to the coordinates of eight points obtained by combining the three minimum values and the three maximum values; The six faces of the outer hexahedron are respectively used as the outer side faces.
3. The method according to claim 2, characterized in that The constructing at least one outer side surface on the outer side of the BIM model further comprises: Determining a first component and a second component belonging to a relative structure in the BIM model; An outer surface is constructed between the first member and the second member according to the coordinates of the vertices of the first member on the side close to the second member and the coordinates of the vertices of the second member on the side close to the first member.
4. The method according to claim 3, characterized in that Determining the first component and the second component belonging to the relative structure in the BIM model includes: A first component and a second component belonging to a relative structure in the BIM model are determined according to a special identifier of the component in the BIM model; wherein the special identifier indicates that the first component and the second component are a relative structure.
5. The method according to claim 4, characterized in that The determining of the first component and the second component belonging to the relative structure in the BIM model further includes: Constructing an outer bounding box of each component in the BIM model; If the outer bounding boxes of two adjacent components do not overlap, the two adjacent components are determined as a first component and a second component belonging to a relative structure in the BIM model.
6. The method according to claim 3, characterized in that The step of constructing an outer side surface between the first member and the second member comprises: The side surface of the first member close to the second member is taken as the first side surface, and the side surface of the second member close to the first member is taken as the second side surface; A plane obtained by translating the vertex coordinates of the side surface with a larger area between the first side surface and the second side surface on the coordinate axis is used as the outer side surface between the first component and the second component.
7. The method according to claim 3, characterized in that The plurality of first light sources are arranged on the outer side, including: A plurality of first light sources are arranged on the outer side; wherein the illumination direction of half of the first light sources is directed toward the first component; and the illumination direction of the other half of the first light sources is directed toward the second component; The plurality of second light sources are arranged on the outer side, including: A plurality of second light sources are arranged on the outer side; wherein the illumination direction of half of the second light sources is directed toward the first component; and the illumination direction of the other half of the second light sources is directed toward the second component.
8. The method according to claim 1, characterized in that The step of merging the rays of the first light source with the intersecting shell objects in the BIM model to obtain a shell object model includes: Calculate the distance between the intersecting shell object and the first light source through the intersection point of each ray of the first light source and the shell object in the BIM model, and take the shell object with the shortest distance as the closest shell object of the ray; The nearest shell objects of each ray are merged to obtain a shell object model.
9. A BIM shell extraction device based on the outer surface, characterized in that: include: An outer surface construction module, used to construct at least one outer surface on the outer side of the BIM model; A first light source setting module, used to set a plurality of first light sources on the outer side; wherein the irradiation direction of the first light source is directed toward the BIM model and is perpendicular to the outer side, and the plurality of first light sources are arranged at a first spacing; An object model generation module, configured to combine the rays of the first light source with the intersecting shell objects in the BIM model to obtain a shell object model; A second light source setting module is used to set a plurality of second light sources on the outer side; wherein the irradiation direction of the second light source is directed toward the direction of the shell object model and is perpendicular to the outer side, and the plurality of second light sources are arranged at a second spacing; and the second spacing is smaller than the first spacing; The shell model generating module is used to merge the first triangular face where each ray of the second light source intersects with the shell object model to obtain a shell model.
10. An electronic device, characterized in that: The electronic device includes a memory, a processor and one or more programs, wherein the one or more programs are stored in the memory and are configured so that the processor executes the steps of the method according to any one of claims 1 to 8.