Component positioning method and device in BIM model rendering and medium

By merging independent components in the BIM model and using octree to segment the space, the problem of insufficient fluency and interactivity in large-scale BIM model rendering is solved, and efficient rendering and interactive experience is achieved.

CN119941983APending Publication Date: 2025-05-06WISDRI ENG & RES INC LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411892919.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In web-side rendering of large-scale BIM models, the existing technology is difficult to meet the requirements of fluency and interactivity, resulting in frame drops or browser crashes.

Method used

By combining multiple independent components in the BIM model that meet the merge conditions into an overall model, and using an octree to divide the space into multiple subspaces, the corresponding octree nodes are generated to achieve component positioning and interaction.

Benefits of technology

It reduces the pressure of large-scale BIM model rendering, improves user interaction experience, meets the fine interaction needs of BIM models, and significantly improves the speed of background query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941983A_ABST
    Figure CN119941983A_ABST
Patent Text Reader

Abstract

The invention discloses a component positioning method in BIM (Building Information Modeling) rendering. The component positioning method comprises the following steps: combining a plurality of independent components meeting combination conditions in a BIM into an integral model; dividing the space of the BIM model into a plurality of subspaces by using an octree, and respectively generating an octree node corresponding to each subspace; distributing each independent component to a corresponding octree node; obtaining a screen coordinate of a click point corresponding to the click action of the overall model, and converting the screen coordinate into a three-dimensional space coordinate of the click point in the BIM model; according to the three-dimensional space coordinates, obtaining the octree node with the minimum space in the octree nodes to which the click point belongs; and determining at least one independent component of which the boundary box contains the click point in the octree node with the minimum subspace as a target component corresponding to the click action. According to the method, click query of a single component is kept on the basis of the combined model, so that the requirements of fluency and interactivity are met in Web end rendering of a large-scale BIM model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of BIM model rendering, and more specifically, to a component positioning method, device and medium in BIM model rendering. Background Art

[0002] Different from the general construction industry, in the steel industry, BIM models, or building information models, usually contain a larger number of complex components and parts, which will cause great pressure in the Three.js rendering process on the Web, resulting in rendering frame drops or browser crashes.

[0003] In the rendering of BIM models on the web, facing large-scale BIM models, such as BIM models containing hundreds of thousands of component data, the currently commonly used optimization methods include LOD method (level of detail method), model level loading method and InstancedMesh optimization method. Among them:

[0004] LOD method: LOD will dynamically load model versions of different resolutions according to the camera distance, displaying low-resolution models at long distances and high-resolution models at close distances. Its disadvantages include: in BIM scenes, LOD still has a heavy burden on rendering models observed at close range, especially when there are a large number of high-resolution components in the same perspective, resource consumption is unavoidable; and LOD implementation is complex, requiring layer-by-layer storage and loading of model data, which increases the burden of storage and management.

[0005] Model hierarchical loading method: load model data in batches or divide the model into regions, and only load the model of the corresponding region within the visible range. Its disadvantages include: hierarchical loading will cause delays during initial loading and frequent region switching, affecting user experience; for large-volume BIM data, each model loading and switching will still produce significant pressure on rendering resources.

[0006] InstancedMesh optimization method: Instanced rendering of the same geometry, such as repeated beams and columns. Its disadvantages include: although it reduces repeated rendering, it still has no effect on a large number of unique components, and after instantiation, additional data structures are still required to support the selection and interaction of individual components.

[0007] In summary, although the above-mentioned existing technologies have optimized the rendering performance to a certain extent, they are still difficult to meet the requirements for fluency and interactivity in the Web-side rendering of large-scale BIM models. Summary of the invention

[0008] In response to at least one defect or improvement need in the prior art, the present application provides a component positioning method, device and medium in BIM model rendering, which is used to reduce the pressure of large-scale BIM model rendering while improving the user's interactive experience, that is, the high requirements for fluency and interactivity can still be met in the Web-side rendering of large-scale BIM models.

[0009] To achieve the above objectives, in a first aspect, the present application provides a component positioning method in BIM model rendering, comprising:

[0010] Merge multiple independent components that meet the merging conditions in the BIM model into an overall model;

[0011] Using an octree to divide the space of the BIM model into multiple subspaces, and generating an octree node corresponding to each subspace respectively;

[0012] Assign each independent component to a corresponding octree node;

[0013] Acquire the screen coordinates of a click point corresponding to a click action on the overall model, and convert the screen coordinates into three-dimensional space coordinates of the click point in the BIM model;

[0014] Acquire the octree node with the smallest subspace among the octree nodes to which the click point belongs according to the three-dimensional space coordinates;

[0015] At least one independent component whose bounding box in the octree node with the smallest subspace contains the click point is determined as the target component corresponding to the click action.

[0016] Furthermore, merging multiple independent components into an overall model includes:

[0017] Obtain the corresponding world coordinates of each independent component;

[0018] According to the world coordinates, the plurality of independent components are merged to generate a merged component corresponding to the overall model;

[0019] Generate a Mesh object corresponding to the overall model according to the merged component;

[0020] The Mesh object is added to the selected scene to replace the multiple independent components in the selected scene.

[0021] Furthermore, the using an octree to divide the space of the BIM model into a plurality of subspaces, and respectively generating an octree node corresponding to each subspace includes:

[0022] Initializing the global space of the BIM model as an octree root node;

[0023] Starting from the global space, recursively divide the space into eight subspaces according to the center point, and generate octree child nodes corresponding to the eight subspaces respectively;

[0024] If the number of independent components contained in the subspace exceeds the preset number, the subspace continues to be segmented in the above manner; otherwise, the segmentation is stopped.

[0025] Further, allocating each independent component to a corresponding octree node includes:

[0026] Check if the bounding box of the independent component is within the scope of the current node;

[0027] If the bounding box of the independent component is smaller than the current node and within the node, it is treated as an independent component of the node and stored in the component list of the node; otherwise, it is recursively assigned to a smaller child node.

[0028] Furthermore, converting the screen coordinates into the three-dimensional space coordinates of the click point in the BIM model includes:

[0029] Normalizing the screen coordinates to obtain normalized coordinates;

[0030] Mapping the normalized coordinates into the camera frustum to generate a ray;

[0031] The intersection of the ray and the Mesh object is detected, and if the intersection exists, the position coordinates of the intersection and the object information intersecting with the intersection are obtained; wherein the position coordinates of the intersection are determined as the three-dimensional space coordinates of the click point in the BIM model.

[0032] Furthermore, after adding the Mesh object to the selected scene, the following steps are also included:

[0033] The plurality of independent components are removed.

[0034] Furthermore, after the target component corresponding to the click action is determined, the method further includes:

[0035] The information of the target component is returned to the front end.

[0036] Furthermore, the processing is performed so that the plurality of independent components have a uniform material before being combined.

[0037] In a second aspect, the present application provides an electronic device comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit is enabled to perform the steps of any of the aforementioned component positioning methods.

[0038] In a third aspect, the present application provides a storage medium storing a computer program executable by an access authentication device, wherein when the computer program runs on the access authentication device, the access authentication device is enabled to execute the steps of any of the aforementioned component locating methods.

[0039] In general, the above technical solutions conceived by the present application can achieve the following beneficial effects compared with the prior art:

[0040] (1) This application realizes the combination of component model merging and interactivity retention. It reduces rendering pressure and rendering resource consumption through model merging, improves the rendering performance of the Web end, and can simultaneously combine the background space segmentation query to realize component interaction, so that even after merging, users can still obtain information about a single component by clicking on the overall model, meeting the fine interaction requirements of the BIM model. Ultimately, it can reduce the rendering pressure of large-scale BIM models while improving the user's interactive experience.

[0041] (2) This application accelerates coordinate positioning query by applying octree to click detection of large-scale BIM models, significantly improves the background query speed, and solves the problem of inability to accurately locate components after merging. It is suitable for large-scale BIM models and improves the response speed of the system.

[0042] (3) This application achieves a balance between rendering optimization and query efficiency by rendering the overall model on the front end and performing coordinate queries on the back end, and is suitable for Web-based applications of large-scale BIM models. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments 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.

[0044] Figure 1 A core flow chart of a component positioning method in BIM model rendering provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of a process for merging components provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the process of constructing an octree provided in an embodiment of the present application;

[0047] Figure 4A schematic diagram of a process for converting screen coordinates into three-dimensional space coordinates of a click point in a BIM model provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of a process for querying and locating components through the background provided in an embodiment of the present application;

[0049] Figure 6 A flowchart of a specific implementation of a component positioning method in BIM model rendering provided in an embodiment of the present application;

[0050] Figure 7 A block diagram of an electronic device provided in an embodiment of the present application and suitable for implementing the component positioning method described above. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0052] The terms "including" or "having" and any variations thereof in the specification, claims or drawings of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0053] After extensive research, the applicant found that when rendering a large-scale BIM model, the rendering pressure can be greatly reduced by merging components. However, in the prior art, after a single component is merged, it is usually impossible to obtain the relevant attribute information of the single component by clicking on the merged overall model; and in normal business needs, users often need to click to locate a certain component to view its information or perform other corresponding operations, so these components are often not allowed to be merged. In order to solve this technical problem, the present application proposes a new component positioning method for large-scale BIM model rendering. The component positioning method reduces the rendering pressure by merging independent components, and when the user wants to locate a specific independent component, the user only needs to click on the position of the independent component in the merged overall model, and the coordinates of the click point can be located in the background to achieve the positioning of the specific independent component that the user wants to locate, thereby reducing the rendering pressure of large-scale BIM models while improving the user's interactive experience.

[0054] The overall implementation logic of this application includes:

[0055] Model merging: Merge multiple independent components in the BIM model that meet the preset merging conditions to generate an overall model, thereby reducing the number of renderings of individual components, reducing resource usage, and improving rendering efficiency.

[0056] Octree spatial segmentation and background data storage: When merging models, the bounding box coordinates of each component are recorded and stored in the database or cache; the octree is used to segment the model space to speed up subsequent queries.

[0057] Mouse click detection: When a mouse click is detected, Three.js obtains the 3D spatial coordinates of the click point and passes the coordinates to the background for query.

[0058] Background query and positioning components: After receiving the coordinates in the background, the octree is used to find the spatial area to which the point belongs, and then it is further matched to the list of components in the area. Finally, the specific component where the click point is located is determined through boundary detection.

[0059] refer to Figure 1 An embodiment of the present application provides a component positioning method in BIM model rendering based on Three.js, and the component positioning method can mainly include the following steps.

[0060] Step 1: merge multiple independent components that meet preset merging conditions in the imported BIM model into an overall model, and save the coordinates of the boundary box of each independent component in the multiple independent components.

[0061] In some embodiments, specifically, the coordinates of the bounding box are determined by the minimum coordinate in the x-axis direction, the minimum coordinate in the y-axis direction, the minimum coordinate in the z-axis direction, the maximum coordinate in the x-axis direction, the maximum coordinate in the y-axis direction, and the maximum coordinate in the z-axis direction of the independent component in the world coordinate system. Similar independent components that meet the preset similarity conditions are merged into a whole.

[0062] Through the BufferGeometry and Mesh interfaces provided by Three.js, multiple independent components (component geometries) can be merged to create a more efficient rendering object.

[0063] The schematic diagram of the component merging process can be found in Figure 2 , which can generally include the following steps.

[0064] Extract independent components (component geometry) from the original component model;

[0065] Convert the component geometry into coordinates in the world coordinate system;

[0066] Merge geometry;

[0067] Generate the merged Mesh object;

[0068] Use the merged Mesh object to replace the original independent components.

[0069] The following is a detailed description of the steps of component merging.

[0070] (1) Initialize components (initialize construction geometry and materials).

[0071] Get all independent component models that need to be merged, and ensure that their materials are the same or can be unified. Otherwise, the materials need to be processed before merging.

[0072] Create a BufferGeometry object to store the merged geometry data;

[0073] Traverse each independent component model:

[0074] Execute the applyMatrix4 method on the BufferGeometry of each independent component to transform its local coordinates into the world coordinate system; this step is used to ensure the position of the components to be merged correctly;

[0075] MergeBufferGeometries is used to merge the geometric data of each component into a large geometry, that is, to obtain the overall model of the merged component.

[0076] (2) Create a Mesh object corresponding to the merged overall model.

[0077] Create a new Mesh object using the merged BufferGeometry and unified material. This merged Mesh object contains the geometry data of all the original independent components.

[0078] Add the Mesh object to the selected 3D scene to replace all previous independent components.

[0079] (3)Clear up the memory.

[0080] Remove the original separate independent components to free up memory and optimize rendering performance.

[0081] Among them, the description of Three.js and its key interfaces is as follows.

[0082] (1) Three.js: is a cross-platform JavaScript library for creating and displaying complex 3D computer graphics on web pages. It is a 3D graphics engine library that runs in the browser. It is based on JavaScript and can directly run GPU game drivers and graphics drivers for browsers. The library provides features and APIs for drawing 3D scenes in the browser.

[0083] (2) Mesh: It is a core interface in Three.js, used to represent mesh objects with geometric shapes (Geometry or BufferGeometry) and materials (Material). Mesh is one of the most basic renderable objects and is widely used in various 3D scenes.

[0084] (3) BufferGeometry: It is a core interface (geometry data structure) provided by Three.js, which is used to efficiently process large-scale geometry data and support efficient data storage and operation. Compared with the traditional Geometry class, BufferGeometry is more suitable for processing a large number of vertices and faces because it directly operates typed arrays (such as Float32Array), thereby reducing memory usage and improving performance.

[0085] (4) applyMatrix4: Transforms the vertex coordinates of the geometry into the world coordinate system for correct merging of component geometries.

[0086] (5)mergeBufferGeometries: Merge multiple BufferGeometry into a single geometry.

[0087] Step 2: Use an octree to divide the space of the BIM model into multiple subspaces, and generate an octree node corresponding to each subspace.

[0088] In some embodiments, specifically, the global space of the BIM model is initialized as the root node of the octree; starting from the global space, the space is recursively divided into eight subspaces according to the center point and eight child nodes corresponding to the eight subspaces are generated, until the number of independent components contained in the subspace is less than or equal to the preset number, the division of the subspace is stopped; wherein each octree node records: the node's own boundary, the identifier of its own parent node, the identifier of its own child node, the depth of the current node and the information of the components contained. The component information includes: the component identifier and the coordinates of the component boundary box.

[0089] like Figure 3 As shown, the construction of the octree in one embodiment of the present application includes:

[0090] Divide the global space into 8 regions;

[0091] Check the number of components in each area;

[0092] When the number of components in the region is less than or equal to the preset number threshold, it is determined that the region meets the conditions for stopping segmentation, and no more segmentation is performed, and the region is retained; otherwise, when the number of components in the region is greater than the preset number threshold, the region is further divided or segmented; the method of continuing to divide or segment is: the region, i.e., the space, is further divided into 8 sub-regions or sub-spaces; the above component number confirmation step is repeated, the segmentation is stopped, the region is retained or the segmentation is continued; wherein the segmentation can start from the center point of the region or space or from other pre-selected points. Recursive segmentation is achieved through this division or segmentation.

[0093] Exemplarily, implementing the spatial division of the octree based on Three.js may specifically include:

[0094] (1) Initialize the root node.

[0095] The root node of the octree represents the entire spatial range (such as the external bounding box of the entire scene), and each node contains a unique ID, boundary coordinates, depth information, and a list of child nodes.

[0096] (2) Recursively split nodes.

[0097] Recursively divide the space into eight subspaces according to the center point and generate eight child nodes;

[0098] Each node records its own boundaries and contains the ID of the parent node, the depth of the current node, and preliminary information of the component;

[0099] Nodes are nested and stored in MongoDB, and the identification field, _id field, is used to uniquely identify each node;

[0100] (3) Storage nodes and subnodes.

[0101] Each node is stored as a MongoDB document; each document records information such as node boundaries, child node IDs, component data, and the level (depth) of the current node;

[0102] In the component data, the component ID, location and boundary information are stored to facilitate subsequent precise positioning.

[0103] Step 3: Allocate each of the plurality of independent components to a corresponding octree node according to the coordinates of the bounding box of each of the plurality of independent components and the subspace corresponding to the octree node. In some embodiments, the following steps may be specifically included.

[0104] For each component, check whether its bounding box (bounding box) is within the range of the current node;

[0105] If the bounding box of the component is smaller than the current node's range and within the range of the node, it is taken as the component of the node and stored in the component list of the node; otherwise, it is recursively assigned to smaller child nodes.

[0106] The embodiment of the present application implements the octree spatial segmentation and background data storage of the BIM model through the aforementioned steps 2 and 3. In a specific implementation, the background database uses the NoSQL database - MongoDB. Octree storage and spatial segmentation are implemented in MongoDB, the nested structure of the document is used to recursively represent the octree nodes, and spatial indexes are used to efficiently retrieve data.

[0107] Step 4: After the BIM model is loaded into the front-end display, in response to a click action on the overall model, the screen coordinates of the click point corresponding to the click action are determined, and the screen coordinates are converted into the three-dimensional space coordinates of the click point in the BIM model.

[0108] In a specific implementation, the method responds to a user's selection or click on a single component in the overall model, such as a click using a mouse.

[0109] like Figure 4 As shown, in some embodiments, specifically, the coordinate conversion process includes:

[0110] Normalize the screen coordinates to obtain normalized coordinates;

[0111] Use the Raycaster class of Three.js to map the normalized coordinates into the camera frustum to generate a ray that extends along the direction of the camera into the three-dimensional space;

[0112] Use the intersectObject or intersectObjects method of Raycaster to detect the intersection between the ray and the Mesh object;

[0113] Determine whether the intersection exists; if so, return the position coordinates of the intersection and the object information that intersects with the intersection; otherwise, there is no intersection and no operation; wherein, the position coordinates of the intersection are determined as the three-dimensional space coordinates of the click point.

[0114] In this way, accurate conversion from screen coordinates to three-dimensional space coordinates and click detection can be achieved, which can effectively identify which component the user clicks and obtain its spatial coordinates.

[0115] Step 5: Obtain the octree node with the smallest subspace among the octree nodes to which the click point belongs according to the three-dimensional space coordinates obtained in step 4.

[0116] Step 6: Determine at least one independent component whose bounding box contains the click point in the octree node with the smallest subspace obtained in step 5 as the target component corresponding to the click action.

[0117] Furthermore, information of the target component, such as attributes, is returned to the front end.

[0118] The query or retrieval of independent components in the BIM model space is realized through the aforementioned steps 5 and 6. More specifically, when querying or retrieving, the coordinates of the point on the screen clicked by the user with the mouse, that is, the click point, are obtained, and starting from the root node, the smallest octree node containing the point is recursively queried; the spatial index of MongoDB can be used to accelerate the search for the child node where the click point is located.

[0119] This application accelerates coordinate positioning queries by applying octrees to click detection of large-scale BIM models, significantly improves the background query speed, and solves the problem of inability to accurately locate components after merging. It is suitable for large-scale BIM models and improves the system's response speed.

[0120] like Figure 5 As shown, querying and locating components through the background includes:

[0121] Octree positioning: After the user clicks to generate the coordinates of the click point, the coordinates are sent to the background. The background starts searching from the root node in the octree and gradually locates the subspace area where the click point is located until the smallest sub-area containing the point is found; specifically, it is determined whether the click point is within the range of the current node; if so, it is further determined whether the current node has child nodes. If so, the child nodes are recursively checked. If not, the smallest sub-area containing the click point is found, and the subsequent boundary detection steps are continued.

[0122] Boundary detection: Get the list of components in the sub-area; traverse the bounding boxes of the components, and for each component, determine whether the click point is within the bounding box of the component, that is, determine whether the bounding box of the component contains the coordinates of the click point, so as to further narrow the scope of the retrieved components.

[0123] Locating components: If the click point is within the bounding box of a component, the component is determined to be the clicked target, i.e., the target component, and the component identifier (component ID) of the component is returned; otherwise, continue to check the next component.

[0124] Figure 6This is a flowchart of a specific implementation of a component positioning method in a BIM model rendering based on Three.js according to an embodiment of the present application. Figure 6 As shown, the specific implementation includes:

[0125] Import BIM models;

[0126] Merge component geometries, that is, merge multiple selected independent components;

[0127] Record the bounding box and corresponding coordinates of each independent component;

[0128] Construct an octree to store space segmentation information;

[0129] Load the BIM model after merging components to the front-end display;

[0130] Responding to a user's click event, that is, an event in which the user clicks on the merged overall model in the BIM model;

[0131] Send the coordinates of the click point to the background, and use the octree query in the background;

[0132] Locate the list of components that contain the click point;

[0133] Traverse component boundaries;

[0134] Determine the component ID corresponding to the specific clicked component in the overall model;

[0135] Query the attribute information of the component;

[0136] Returns the component's attribute information to the front end.

[0137] This application achieves a balance between rendering optimization and query efficiency by rendering the overall model on the front end and performing coordinate queries on the back end, and is suitable for Web-based applications of large-scale BIM models.

[0138] This application realizes the combination of component model merging and interactivity retention. It reduces rendering pressure and rendering resource consumption through model merging, improves the rendering performance of the Web end, and can simultaneously combine the background space segmentation query to realize component interaction, so that even after merging, users can still obtain information about a single component by clicking on the overall model, meeting the fine interaction requirements of the BIM model. Ultimately, it can reduce the rendering pressure of large-scale BIM models while improving the user's interactive experience.

[0139] Figure 7 A block diagram of an electronic device suitable for implementing the component positioning method described above according to an embodiment of the present application is schematically shown. Figure 7The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0140] like Figure 7 As shown, the electronic device 1000 described in this embodiment includes: a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the component positioning method flow according to an embodiment of the present application.

[0141] In RAM 1003, various programs and data required for the operation of electronic device 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Processor 1001 performs various operations of the component positioning method flow according to the embodiment of the present application by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the component positioning method flow according to the embodiment of the present application by executing the program stored in the one or more memories.

[0142] According to an embodiment of the present application, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 may further include one or more of the following components connected to the I / O interface 1005: an input portion 1006 including a keyboard, a mouse, etc.; an output portion 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk, etc.; and a communication portion 1009 including a network interface card such as a LAN card, a modem, etc. The communication portion 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage portion 1008 as needed.

[0143] According to the component positioning method flow of the embodiment of the present application, it can be implemented as a computer software program. For example, the embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the component positioning method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present application are executed. According to the embodiment of the present application, the system, equipment, device, module and / or unit described above, etc. can be implemented by a computer program module.

[0144] The embodiments of the present application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the steps of the component positioning method according to the embodiments of the present application can be implemented.

[0145] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present application, the computer-readable storage medium may include one or more memories other than the ROM 1002 and / or RAM 1003 described above.

[0146] It should be noted that the functional modules in the various embodiments of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.

[0147] The flowchart and / or block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart and / or block diagram can represent a part of a module, program segment or code, and a part of the above-mentioned module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0148] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of the present application may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the technical features described in the various embodiments and / or claims of the present application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope of the present application.

[0149] Although the present application has been shown and described with reference to specific exemplary embodiments of the present application, it should be understood by those skilled in the art that various changes in form and details may be made to the present application without departing from the spirit and scope of the present application as defined by the appended claims and their equivalents. Therefore, the scope of the present application should not be limited to the above-mentioned embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims.

Claims

1. A component positioning method in BIM model rendering, characterized in that: include: Merge multiple independent components that meet the merging conditions in the BIM model into an overall model; Using an octree to divide the space of the BIM model into multiple subspaces, and generating an octree node corresponding to each subspace respectively; Assign each independent component to a corresponding octree node; Acquire the screen coordinates of a click point corresponding to a click action on the overall model, and convert the screen coordinates into three-dimensional space coordinates of the click point in the BIM model; Acquire the octree node with the smallest subspace among the octree nodes to which the click point belongs according to the three-dimensional space coordinates; At least one independent component whose bounding box in the octree node with the smallest subspace contains the click point is determined as the target component corresponding to the click action.

2. The component positioning method according to claim 1, characterized in that: Combining multiple independent components into an overall model includes: Obtain the corresponding world coordinates of each independent component; According to the world coordinates, the plurality of independent components are merged to generate a merged component corresponding to the overall model; Generate a Mesh object corresponding to the overall model according to the merged component; The Mesh object is added to the selected scene to replace the multiple independent components in the selected scene.

3. The component positioning method according to claim 1, characterized in that: The method of using an octree to divide the space of the BIM model into a plurality of subspaces and respectively generating an octree node corresponding to each subspace includes: Initializing the global space of the BIM model as an octree root node; Starting from the global space, recursively divide the space into eight subspaces according to the center point, and generate octree child nodes corresponding to the eight subspaces respectively; If the number of independent components contained in the subspace exceeds the preset number, the subspace continues to be segmented in the above manner; otherwise, the segmentation is stopped.

4. The component positioning method according to claim 1, characterized in that: The allocating each independent component to a corresponding octree node comprises: Check if the bounding box of the independent component is within the scope of the current node; If the bounding box of the independent component is smaller than the current node and within the node, it is treated as an independent component of the node and stored in the component list of the node; otherwise, it is recursively assigned to a smaller child node.

5. The component positioning method according to claim 2, characterized in that: The converting the screen coordinates into the three-dimensional space coordinates of the click point in the BIM model comprises: Normalizing the screen coordinates to obtain normalized coordinates; Mapping the normalized coordinates into the camera frustum to generate a ray; The intersection of the ray and the Mesh object is detected, and if the intersection exists, the position coordinates of the intersection and the object information intersecting with the intersection are obtained; wherein the position coordinates of the intersection are determined as the three-dimensional space coordinates of the click point in the BIM model.

6. The component positioning method according to claim 2, characterized in that: After adding the Mesh object to the selected scene, it also includes: The plurality of independent components are removed.

7. The component positioning method according to claim 1, characterized in that: After the target component corresponding to the click action is determined, the method further includes: The information of the target component is returned to the front end.

8. The component positioning method according to claim 1, characterized in that: Processing is performed so that the multiple independent components have a unified material before being merged.

9. An electronic device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit is enabled to execute the steps of the component positioning method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: It stores a computer program executable by an access authentication device. When the computer program runs on the access authentication device, the access authentication device is enabled to execute the steps of the component positioning method according to any one of claims 1 to 8.