Method, equipment, product and medium for rapid placement of object models based on BIM models
By using multimodal bonding vectors and collision detection algorithms in BIM modeling, the object model is quickly placed, which solves the problems of low efficiency and poor adaptability in traditional methods, and achieves efficient and accurate object model placement.
Patent Information
- Application Number
- CN202411933805.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-26
Smart Images

Figure CN119378082B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital twin technology, and specifically to a method, equipment, product and medium for rapid placement of object models based on a BIM model. Background Art
[0002] At a time when building information modeling (BIM) technology is widely used in construction projects, the accuracy and efficiency of BIM modeling have become key factors affecting the collaborative work of multiple links such as building design, construction and management. In the actual BIM modeling process, the need to place object models in batches is common. Take high-rise buildings as an example. In a 100-story building project, according to fire safety regulations, an object model "fire extinguisher" needs to be placed at a fixed position on each floor. The traditional solution is to set the same X and Y coordinates for each fire extinguisher, and set the Z coordinate according to the height difference of the floors to achieve multi-floor model settings.
[0003] However, in actual scenarios, the design of each floor is difficult to be completely consistent with the high complexity and diversity. For example, due to the influence of floor height, the structural load-bearing requirements of the building's functional zoning, or the special space design intention, the height of different floors may vary significantly; at the same time, the internal room layout structure will also change due to the difference in the use functions of different floors, such as the space division between commercial floors, office floors, and residential floors is completely different. These differentiation factors between floors have caused serious drawbacks in the modeling method of traditional batch placement of object models.
[0004] Therefore, in the BIM modeling process, the differentiation factors of each floor have become one of the technical difficulties that restrict the efficient batch placement of object models. In order to meet the actual needs of complex and changing building scenes, it is urgent to optimize and improve the existing batch placement object model processing methods to break through the current technical bottleneck and improve the efficiency of BIM modeling. Summary of the invention
[0005] In view of this, in order to solve the problem of low efficiency in object model placement of BIM models, a method, device, product and medium for rapid placement of object models based on BIM models are provided.
[0006] According to one aspect of an embodiment of the present application, a method for rapid placement of an object model based on a BIM model is disclosed, the method comprising:
[0007] Step 1: Select an object model and calculate the AABB collision box of the object model;
[0008] Step 2: construct a fitting vector of the multimodal object model;
[0009] Step 3: performing collision detection and fitting calculation on the object model, moving the object model according to the overlap value obtained by the fitting calculation and the value of the fitting vector, and adjusting the fit between the object model and the target;
[0010] Step 31: Use the AABB collision detection algorithm to determine whether the object model overlaps with the target;
[0011] Step 32: If yes, then the object model and the target are fitted and calculated to obtain an overlap value, and the fit between the object model and the target is adjusted according to the overlap value;
[0012] Step 33: if not, moving the object model to fit the target according to the value of the fit vector;
[0013] Step 4: updating the position of the object model, and generating position models for the object model in batches, and setting the batch-generated position models at positions in corresponding BIM models according to the positions of the object models.
[0014] According to one aspect of the embodiment of the present application, step 33 includes:
[0015] Determining whether the object model fits the target;
[0016] If not, the shortest distance Δd from the object model to the target is obtained according to the value of the fitting vector, the object model is adjusted to move in the positive direction, and the new coordinate of the object model is obtained = the current coordinate + Δd;
[0017] If it fits, proceed to step 4.
[0018] According to one aspect of the embodiment of the present application, the step 32 further includes:
[0019] Step 32A: If yes, calculate the overlap value of the object model and the target, and the overlap value has overlap in the X, Y and Z directions;
[0020] The object model is scaled down in proportion so that the overlap value of the object model is zero in at least one of the X, Y and Z directions, and then the object model is adjusted to fit.
[0021] According to one aspect of the embodiment of the present application, the step 33 further includes:
[0022] Step 33A: If not, calculating the overlap values of the object model and the target in the X, Y and Z directions, and the overlap values are non-overlapping in the X, Y and Z directions;
[0023] The object model is then proportionally enlarged so that the overlap value of the object model is zero in at least one of the X, Y and Z directions, and then the object model is adjusted to fit.
[0024] According to one aspect of an embodiment of the present application, the BIM model includes a gradient-changing scene, and step 4 includes:
[0025] Adapting to the scene of gradient change, outputting the initial position information of the object model, and sequentially generating the initial position information of the position model corresponding to the gradient change;
[0026] The position model is pre-displayed in the scene of the BIM model according to the initial position information of the position model.
[0027] According to one aspect of an embodiment of the present application, the initial position information is initial coordinate information; and step 4 further includes:
[0028] Update the initial coordinate information of the object model according to the overlap value and the value of the fitting vector, and obtain the end point coordinate information;
[0029] Batch updating the endpoint coordinate information of the position model according to the endpoint coordinate information;
[0030] The position model is pre-displayed at a position in the BIM model scene and adjusted to a corresponding end position.
[0031] According to one aspect of an embodiment of the present application, the fitting vector includes a fitting vector in a one-dimensional direction and / or a fitting vector in a two-dimensional direction.
[0032] According to one aspect of an embodiment of the present application, a computer device is disclosed, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0033] According to one aspect of an embodiment of the present application, a computer program product is disclosed, including a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0034] According to one aspect of an embodiment of the present application, a computer-readable storage medium is disclosed, on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented.
[0035] The method of this embodiment introduces multi-modal fitting vectors and fitting calculations to provide a directional basis for automatic fitting in modeling to meet the needs of complex BIM scenarios. It can also ensure the accurate placement of batch-generated models in multiple different scenarios, such as multi-floor or multi-room scenarios, thereby improving the efficiency of automatic placement of BIM modeling.
[0036] Furthermore, compared with the more conventional placement methods that may rely on simple coordinate settings, this method takes into account multiple factors such as the collision between the object model and the target and the fit relationship, and is more in line with the actual complex BIM model scene. It can effectively deal with the position relationship between different objects and avoid problems such as inaccurate placement due to the traditional method that does not fully consider the mutual influence between objects. It realizes batch generation and setting of position models, which can significantly improve work efficiency and reduce the tedious operation of setting one by one when handling the placement of a large number of identical or similar object models. It has good applicability for the placement of many repeated objects in large and complex construction projects.
[0037] On the other hand, through collision detection and fit calculation, the overlap value and fit vector are used to finely adjust the position of the object model, which can ensure the accuracy of the placement of the object model in the BIM model, making it more in line with the actual architectural space logic and design requirements, and effectively avoiding the unreasonable placement of the model, such as suspension, embedding in the wall, etc. In constructing multi-modal fit vectors, it can adapt to the placement requirements of object models in a variety of different situations and complex environments. Regardless of the target scenes with different structures and different spatial layouts, the fit operation can be performed well, making this method have strong versatility and flexible application capabilities.
[0038] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0039] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0041] Figure 1 It is a flow chart of a method for rapid placement of an object model based on a BIM model provided according to an embodiment of the present application.
[0042] Figure 2 is based on Figure 1 A spatial schematic diagram of the fitting vectors shown in the corresponding embodiment.
[0043] Figure 3 is based on Figure 1 A schematic diagram of moving the object model direction based on the fitting vector shown in the corresponding embodiment.
[0044] Figure 4 It is a schematic diagram showing a fitting state of an object model in a concave BIM model space according to an embodiment.
[0045] Figure 5 It is a flow chart of a method for collision detection, fitting calculation and moving object model according to an embodiment.
[0046] Figure 6 It is a schematic diagram of an application example of a BIM building model according to another embodiment.
[0047] Figure 7 is based on Figure 6 Schematic diagram of an application example of a BIM building model from another angle.
[0048] Figure 8 is based on Figure 6 A cross-sectional view of an application example of each floor in a BIM building model is shown. DETAILED DESCRIPTION
[0049] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0050] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0051] Combined with Figure 1 , a rapid placement method based on the object model in the BIM model, including
[0052] Step 1: Select the object model and calculate the AABB collision box of the object model.
[0053] The object model is a geometric model in the BIM (Building Information Modeling) model scene. It is a geometric model that uses mathematics to describe the geometric shape and structure of the object, including point, line, surface, and body geometric elements. Compared with traditional models, such as image models, it is a model expressed in pixels; the object model using geometric models can be calculated and deduced through geometric mathematical methods, and the position of the object model can be moved and adjusted so that it can reach the corresponding position and fit the target.
[0054] Specifically, there are many scenes in the BIM model, for example, each floor, each room can be a scene, the lawn or trees around the building can be a scene, etc. Here, the object model selected in the scene of the BIM model, such as the object model of the geometric structure that needs to be placed in multiple floors or multiple room spaces, can be any object model such as a table, a chair, etc.
[0055] The traversal performed on the object model obtains all vertex data of the object model, calculates the maximum and minimum values of all vertex data, and generates an AABB collision box that contains all vertices and is aligned with the minimum axis. The AABB collision box calculation method is as follows:
[0056] First, extract the vertex coordinates of the object model: traverse the geometric data of the object model and obtain all vertex data, that is, (x, y, z) vertex data.
[0057] Secondly, calculate the boundaries of the object model: calculate the maximum and minimum values of all vertex data and define the upper and lower bounds of the AABB collision box:
[0058] min=(x min , y min , z min ), max=(x max , y max , z max ).
[0059] Finally, generate the AABB collision box: calculate the vertex data and obtain the maximum and minimum values, and generate a cuboid from the maximum and minimum values. Each side of the cuboid is parallel to the coordinate axis. This cuboid is the smallest AABB collision box.
[0060] Step 2: Construct the fitting vector of the multimodal object model.
[0061] Combined with Figure 2 and 3, the fit vector (Vector L) is used to describe the fit direction of the object model relative to other objects in three-dimensional space. That is, in the BIM model, the fit vector is used to describe the moving direction of object models such as tables and chairs in the space scene, including the one-dimensional and two-dimensional multi-modal expression of the fit state in the specified axis. Therefore, the one-dimensional or two-dimensional fit state of the object model in different axes constructs a multi-modal fit vector.
[0062] For the fit state of the object model in the one-dimensional direction of the specified axis, the resulting fit vector is as follows:
[0063] Fitting vector Vector L = (Lx, Ly, Lz), where each component value is -1, 0 or 1;
[0064] Specific numerical expression: 1 means positive fit; −1 means negative fit; 0 means no fit.
[0065] The one-dimensional fit vector is used to express the fit status of the object model in the BIM model space. It can express the fit status of the object model and the direction of the object model's movement or adjustment only through simple vector values. The fit vector only focuses on the relative relationship between the object model and the target. The calculation method is simplified to the judgment and adjustment of the fit direction. Compared with the complex mathematical calculation processing method of the traditional model, the calculation is simpler and the processing logic is simpler. Moreover, the calculation results of the fit vector are usually directly visualized, and users can view the fit effect between the object model and the target through intuitive adjustments.
[0066] Combined with a specific application example, the parameters of the one-dimensional directional fit vector are explained to indicate the back-to-back fit state of the object model and the direction of fit movement.
[0067] The fit vector Vector L indicates the state and direction of the object model fit, as follows:
[0068] Take the fitting vector Vector L = (0, 0, 0) as an example, where each value represents the three directions of X, Y, and Z. 1 represents the positive direction; -1 represents the negative direction; and 0 represents that no fitting is required on the axis. That is, the fitting vector Vector L = (0, 0, 0) in the example means that the object is suspended in the air.
[0069] Therefore, the meaning of the value of the object model's fitting vector Vector L is shown in the following table:
[0070] Vector L value Description (1,0,0) Close to the object along the positive X direction of the object (-1,0,0) Close to the object along the negative X direction of the object (0,1,0) Close to the object along the positive Y direction of the object (0,-1,0) Close to the object along the negative Y direction of the object (0,0,1) Close to the object along the positive Z direction of the object (0,0,-1) Close to the object along the negative Z direction of the object (0,0,0) The object is suspended in the air, not supported by anything
[0071] Furthermore, combined with Figure 4To meet more complex scenarios, a two-dimensional vector direction of the X, Y, and Z axes is provided to express the fit state of the object model. For example, there is a need to fit in both the positive and negative directions of the same axis, that is, a sphere of a geometric model is embedded in a concave BIM model space, and is close to the positive and negative directions of the X axis at the same time, so that the walls on both sides of the model space fit. Therefore, in order to enhance the applicability and flexibility of the object model, the two-dimensional vector V x ,V y ,V z , constituting another dimension of the multimodal fitting vector.
[0072] The fitting vector L of the two-dimensional vector ’ The settings are as follows:
[0073] L ’ =(V x , V y , V z );
[0074] Among them, V x =(p x , n x ), V y =(p y , n y ), V z =(p z , n z );
[0075] V x , V y , V z It is a two-dimensional vector, which represents the fit status of the object model in the positive and negative directions on the X, Y, and Z axes of the BIM model space, that is, whether the object model fits the target in the BIM model space.
[0076] That is: p x and n x They represent the fitting relationship in the positive and negative directions of the X axis, and their values are 0 or 1. x =1: indicates that the object fits in the positive direction of the X axis, and the corresponding 0 indicates that it does not fit in the positive direction of the X axis. x =1: indicates that the object fits in the negative direction of the X axis, and the corresponding 0 indicates that the object does not fit in the negative direction of the X axis.
[0077] Based on this, we can get:
[0078] p y and n y Respectively represent the fit relationship in the positive and negative directions of the Y axis, with values of 0 or 1; p y=1: indicates that the object fits in the positive direction of the Y axis, and the corresponding 0 indicates that it does not fit in the positive direction of the Y axis. y =1: indicates that the object fits in the negative direction of the Y axis, and the corresponding 0 indicates that the object does not fit in the negative direction of the Y axis.
[0079] p z and n z Respectively represent the fitting relationship in the positive and negative directions of the Z axis, and the value is 0 or 1; p z =1: indicates that the object fits in the positive direction of the Z axis, and the corresponding 0 indicates that the object does not fit in the positive direction of the Z axis. z =1: indicates that the object fits in the negative direction of the Z axis, and the corresponding 0 indicates that the object does not fit in the negative direction of the Z axis.
[0080] Combined with specific application examples, in the BIM model, if the target of the object model is a special geometric structure scene, for example, there is a hollow cube model scene in the BIM model space, and the object model is a sphere of a geometric model, and it is set exactly in the hollow cube model scene, and the six faces of the sphere and the cube model are all tangent (i.e. fit). Then the three axes X, Y, and Z are fit in both the positive and negative directions of the corresponding axes, which is used for spatial fit calculation expression, which meets the multi-scenario application of the BIM model.
[0081] For example, V x =(p x , n x ), namely V x (1, 0) represents the object is close to the object along the positive x direction; V x (0, 1) represents the object is close to the object along the negative X direction; V x (0, 0) means that there is no object to rely on along the positive and negative directions of the X axis; V x (1, 1) means that there are objects in both the positive and negative directions along the X axis; V y , V z And so on.
[0082] At this time, the fitting vector Vector L ’ =(V x , V y , V z ), the meanings of the following values within its range are shown in the following table:
[0083] Vector L' value Description (Vx(1,0),0,0) Close to the object along the positive X direction of the object (Vx(0,1),0,0) Close to the object along the negative X direction of the object (0, Vy (1, 0), 0) Close to the object along the positive Y direction of the object (0, Vy (0, 1), 0) Close to the object along the negative Y direction of the object (0, 0, Vz (1, 0)) Close to the object along the positive Z direction of the object (0, 0, Vz (0, 1)) Close to the object along the negative Z direction of the object (0,0,0) The object is suspended in the air, not supported by anything
[0084] Fitting vectors In the BIM model space, the object model is expressed through geometric data, such as the coordinate information of the model's vertex coordinates, center coordinates, etc. This coordinate information provides a mathematical basis for constructing fitting vectors, and also provides a mathematical basis for constructing multi-modal (one-dimensional or two-dimensional direction of a specified axis) fitting vectors. Compared with traditional image models, the corresponding coordinate information must be independently assigned to the image model with a specific coordinate system and coordinate value, which will increase the mathematical complexity of the image model and is not conducive to the replication and operation of the object model.
[0085] Step 3: Perform collision detection on the object model and perform fitting calculation, move the object model according to the overlap value and the value of the fitting vector obtained by the fitting calculation, and adjust the fit between the object model and the target.
[0086] In the BIM model space, the fit is determined through collision detection and fit calculation between the object model and the target. That is, the overlapping part of the object model (such as a table in a geometric model) and the target (a wall in the space) is calculated, and then the object model is moved and adjusted based on the result of the fit calculation and the value of the fit vector to achieve fit between the fit surface of the object model and the fit surface of the target, without allowing the object model to pass through the fit surface of the target or to be suspended, or other inappropriate or erroneous fit situations.
[0087] Combined with Figure 5 , the specific methods of collision detection, fitting calculation and moving object model are as follows:
[0088] Step 31: Use AABB collision detection to determine whether the object model overlaps with the target.
[0089] The collision detection of the AABB collision box of the object model is specifically the overlap between the object model and the target in the X, Y, and Z axes. For example, the overlap between the chair and the wall in the BIM model in the X, Y, and Z axes, such as overlap, fit (one of the non-overlapping situations), and detachment (the second non-overlapping situation).
[0090] Step 32: If yes, then the object model and the target are fitted together and the overlap value is obtained, and the fit between the object model and the target is adjusted according to the overlap value.
[0091] Specifically, the overlapping area between the AABB collision box of the object model and the target is calculated, that is, the overlapping area between the object model and the target in each axis X, Y, and Z in the BIM space is calculated:
[0092] Overlap area on the X axis:
[0093]
[0094] Correspondingly, the overlapping area of the Y axis and the Z axis is:
[0095] ,
[0096]
[0097] Then the object model is translated along the direction of the minimum overlap axis, that is, starting from the smallest overlap amount among the three axes X, Y, and Z, and then moving in turn along the axes until the object model and the target no longer overlap. The moving direction is: = , the translation distance is the absolute value of the overlap.
[0098] Specifically, in the BIM model, the object model chair and the target wall are calculated to overlap in the X, Y, and Z axes, that is, whether there is an overlapping area between the chair and the wall. If there is an overlap, the amount of overlap is the amount that the chair needs to be translated, in the opposite direction.
[0099] Step 33: If not, the object model is moved to fit with the target according to the value of the fit vector.
[0100] Specifically, the AABB collision box of the object model passes the collision detection, and if there is no overlap on the X, Y, and Z axes, the object model is not embedded in the target, such as a wall in the BIM model.
[0101] Therefore, it is necessary to further determine whether the object model fits the target, that is, to determine whether it fits according to the value of the fit vector, so as to provide support for setting object models in batches.
[0102] If it fits, go to step 4.
[0103] If it does not fit, the position of the object model is adjusted according to the value of the fit vector until it fits with the target.
[0104] Specifically, the shortest distance Δd from the object model to the target (such as a wall) is obtained according to the value of the fitting vector, and the object model is adjusted to move in the positive direction, that is, the new coordinates of the object model = the current coordinates + Δd. Correspondingly, the new coordinates in the direction of the fitting vector = the current coordinates + Δd, which is also the direction and distance of the object model's movement. This process can be displayed through image rendering. The movement of the visualized object model provides a good experience for the user and improves the user's control experience. After completing this step, proceed to the next step 4.
[0105] Step 4: Update the position of the object model, and generate a position model for the object model in batches, and set the batch-generated position model at the position in the corresponding BIM model according to the position of the object model.
[0106] Update the position of the object model in the BIM model space, and generate position models of the object model in batches at different scene positions, and set the batch position models at corresponding positions in the BIM model space based on the position of the object model.
[0107] Specifically, based on the position information of the object model, such as a chair model, the position model can be generated in batches in the BIM model. The geometric data of the position model, such as the dimension and size, is the same as that of the object model, but the position data is different, that is, the chairs are "copied" in batches at different positions in the BIM scene and fit together.
[0108] The technical solution of this embodiment is adopted, by introducing multi-modal fitting vectors and fitting calculations, to provide directional basis for automatic fitting in modeling, and to support multi-axial fitting requirements. The collision calculation is simplified through AABB collision detection, and the algorithm efficiency is improved, providing an efficient and accurate solution for modeling in complex BIM building scenes.
[0109] In the specific application scenario of this embodiment, compared with the model duplication in the traditional BIM model, manual operation is required to directly copy and paste the model at the corresponding position of each layer, which is cumbersome and has low precision, resulting in low efficiency. The solution of this embodiment introduces new technical means such as fitting vectors and fitting calculations, which only requires copying the object model once, and the remaining position models will be automatically copied and pasted in the corresponding scene, greatly improving the generation efficiency.
[0110] In other embodiments, the BIM model includes scenes with gradient changes, such as gradient changes in floors. The building has the first floor to the third floor, and the lengths of the floors decrease successively.
[0111] Specifically, adapting to the scene of gradient change, outputting the initial position information of the object model, and sequentially generating the initial position information of the position model corresponding to the gradient change;
[0112] The location model is pre-displayed in the scene of the BIM model according to the initial location information of the location model.
[0113] According to the gradient change scene, such as the gradient change of each floor, based on the initial position information of the object model, the location model is generated accordingly, and the initial position information of the location model is obtained, and the location model is pre-displayed in the BIM model scene according to the initial position information. The location model is pre-displayed in different BIM scenes with gradient changes, so that the location model can be pre-displayed in an approximate position, so that the user can know the approximate position of the location model on each floor, and have a more intuitive expectation for the next operation, thereby improving the operation efficiency.
[0114] Furthermore, the initial position information is initial coordinate information; the specific steps also include:
[0115] Update the initial coordinate information of the object model according to the overlap value and the value of the fitting vector, and obtain the end point coordinate information;
[0116] Batch update the endpoint coordinate information of the location model according to the endpoint coordinate information;
[0117] Adjust the position of the position model pre-displayed in the BIM model scene to the corresponding end position.
[0118] Specifically, in order to obtain more accurate location information, the initial coordinate information is the coordinate information. The end point coordinate information of the object model can be calculated by combining the overlap value and the value of the fitting vector, and the original initial coordinate information is updated synchronously. Correspondingly, the coordinate information of the position model updated in batches is the end point coordinate information. At this time, based on the preview of the initial coordinate information in the BIM model scene, the updated end point coordinate information is obtained, and the position model is adjusted to the end point position to achieve placement at different positions in the BIM model scene.
[0119] By adopting the solution of this embodiment, the generation of the position model can be prevented from "jumping". The position model first appears at the approximate position of the corresponding scene in the BIM model, and then the position model is accurately adjusted to the precise position in the BIM model based on precise calculations.
[0120] Through this solution, the position of the object model can be quickly adjusted to adapt to the needs of complex BIM scenarios, and the position of the batch-generated location models can be accurately placed in multiple different scenarios, such as multi-floor or multi-room scenarios, thereby improving the efficiency of the automated layout of BIM modeling.
[0121] In addition, this solution reduces unnecessary calculations and improves efficiency by using AABB and fitting vectors, and can also respond to the fitting requirements of gradient-changing scenes in real time.
[0122] In other embodiments, if step 3 cannot converge to the fit between the object model and the target, it means that the object model is too large or too small at the corresponding position in the BIM model space, and the fit setting cannot be achieved.
[0123] Based on this, step 32 further includes:
[0124] Step 32A: If yes, calculate the overlap value of the object model and the target, and the overlap value overlaps in the X, Y and Z directions, then scale down the object model so that the overlap value of the object model in at least one of the X, Y and Z directions is zero, and then adjust the object model to fit.
[0125] In this solution, the value of the proportional reduction of the object model should be the range value of the reduction ratio with the shortest distance Δd overlapping the object model to the target, and the reduction ratio value Ps=(D-Δd) / D, where D is the original axis size of the object model, and the original axis is the center wheelbase.
[0126] If the object model cannot be aligned after adjustment, the overlap values of the object model in at least two directions, X, Y, and Z, are set to zero, and the object model is aligned to the target surface accordingly. This is a relatively compromise method. Although it cannot completely fit all surfaces, it at least ensures that the object model is placed in the most reasonable position in the BIM model scene.
[0127] In other embodiments, if the overlap values in the X, Y, and Z directions cannot converge to zero in all or two directions, the object model is not displayed at the position corresponding to the BIM model, and a prompt is displayed to inform the user to manually adjust the object model.
[0128] Further, step 33 includes step 33A:
[0129] If not, calculate the overlap values of the object model and the target in the X, Y and Z directions, and if the overlap values do not overlap in the X, Y and Z directions, then the object model is proportionally enlarged so that the overlap value of the object model is zero in at least one direction of X, Y and Z, and then the object model is adjusted to fit. In this solution, the value of the object model being proportionally enlarged should be within the range of the enlargement ratio with the shortest distance Δd from the object model to the target, and the enlargement ratio value Pb=(D+Δd) / D, where D is the original axis size of the object model, and the original axis is the center wheelbase.
[0130] If the object model cannot be fitted after adjustment, the overlap values of the object model in at least two directions, X, Y and Z, are set to zero, and the object model is fitted to the target surface accordingly. This is a relatively compromise method, which at least ensures that the object model is placed in the most reasonable position in the BIM model scene.
[0131] In other embodiments, if the overlap values in the X, Y, and Z directions cannot converge to zero in all or two directions, the object model is not displayed at the position corresponding to the BIM model, and a prompt is displayed to inform the user to manually adjust the object model.
[0132] By adopting the method of this embodiment, the object model can adaptively adjust the size of the model, provide support for rapid batch copying of object models, and place them in different floors or rooms, thereby improving production efficiency.
[0133] In one embodiment, in a more complex BIM model scene, the surface of the target may be composed of multiple curved surfaces, such as curved walls or irregular concave and convex walls. Therefore, after step 2, the following specific solutions are also included:
[0134] The surface of the target is divided into multiple small fitting surfaces, and the normal vectors Va of the multiple small fitting surfaces are calculated respectively.
[0135] Find the intersection with the surface of the object model along the direction of the normal vector Va of the small fitting surface, and obtain the focus J of the surface of the object model.
[0136] The surface of the object model is divided using the focus J as a reference point, and a normal vector Vb of the divided surface of the object model is obtained.
[0137] When the normal vector Va of the small fitting surface is in the opposite direction to the normal vector Vb of the object model division surface, the surface of the target and the object model can be fitted.
[0138] Through the method steps of this solution, the target surface and the object model are divided into small fitting surfaces, so that the complex or irregular surface can be accurately analyzed point by point or at the regional level. In addition, direct overall fitting may cause errors due to local irregularities, and this refinement method can make local adjustments to achieve more accurate global matching.
[0139] In addition, this solution is suitable for curved, concave, convex or irregularly shaped surfaces in BIM models. By calculating the normal vector (such as the normal direction) face by face, it can effectively deal with complex surface fitting problems that are difficult to solve with traditional methods. Furthermore, the normal vector directions of Va and Vb ensure that the two surfaces can effectively interact and cooperate, rather than simply geometrically contact.
[0140] Now combine with Figures 6 to 8 A specific embodiment illustrates the application of this solution. The attached figure shows a BIM building model, which is a three-story building. Each floor of the building becomes shorter from bottom to top, and is stepped. Now it is required to place a table tennis table at the right end of each floor of the building, and it should be close to the wall and floor.
[0141] Specifically, a table tennis table object model of a certain floor is selected, and the AABB collision box of the table tennis table object model is calculated. The fitting vector is used to describe the fitting direction of the table tennis table object model relative to the wall and the floor in three-dimensional space.
[0142] Perform collision detection on the object model ping-pong table with the wall and floor to obtain the overlap between the object model ping-pong table and the wall and floor. Then obtain the corresponding overlap value through fitting calculation, and move the object model ping-pong table to fit the wall and floor in combination with the value of the fitting vector.
[0143] Update the position of the ping-pong table in the object model of this floor, and batch generate position models of the ping-pong table in other different floors for this object model, that is, multiple ping-pong tables with the same shape and structure, and set them at the right side of each floor in the BIM model, against the wall and the floor, to complete the rapid duplication of the model that can be copied multiple times at one time, thereby improving the efficiency of BIM modeling.
[0144] In an exemplary embodiment, the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0145] In an exemplary embodiment, the present application further provides a computer program product, including a computer program, wherein the computer program implements the steps of the above-mentioned method when executed by a processor.
[0146] In an exemplary embodiment, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described above are implemented.
[0147] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation method of the present application.
[0148] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the above method embodiment.
[0149] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0150] The program product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0151] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0152] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0153] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0154] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0155] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0156] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.
[0157] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. A method for rapid placement of object models based on a BIM model, characterized in that: The method comprises: Step 1: Select an object model and calculate the AABB collision box of the object model; Step 2: Construct a multimodal fit vector of the object model; the fit vector is used to describe the fit direction of the object model relative to other objects in three-dimensional space, and the fit vector is Vector L = (Lx, Ly, Lz), where each component value is -1, 0 or 1; specific numerical expression: 1 is positive fit; -1 is negative fit; 0 is no fit; Step 3: performing collision detection and fitting calculation on the object model, moving the object model according to the overlap value obtained by the fitting calculation and the value of the fitting vector, and adjusting the fit between the object model and the target; Step 4: updating the position of the object model, and generating position models for the object model in batches, and setting the batch-generated position models at positions in corresponding BIM models according to the positions of the object models; The step 3 comprises: Step 31: Use the AABB collision detection algorithm to determine whether the object model overlaps with the target; Step 32: If yes, then the object model and the target are fitted and calculated to obtain an overlap value, and the fit between the object model and the target is adjusted according to the overlap value; Step 33: if not, moving the object model to fit the target according to the value of the fit vector; The step 32 further comprises: Step 32A: If yes, calculate the overlap value of the object model and the target, and the overlap value has overlap in the X, Y and Z directions; The object model is scaled down in proportion so that the overlap value of the object model is zero in at least one of the X, Y and Z directions, and then the object model is adjusted to fit; The step 33 further comprises: Step 33A: If not, calculating the overlap values of the object model and the target in the X, Y and Z directions, and the overlap values are non-overlapping in the X, Y and Z directions; The object model is then proportionally enlarged so that the overlap value of the object model is zero in at least one of the X, Y and Z directions, and then the object model is adjusted to fit.
2. The method according to claim 1, characterized in that Step 33 includes: Determining whether the object model fits the target; If not, the shortest distance Δd from the object model to the target is obtained according to the value of the fitting vector, the object model is adjusted to move in the positive direction, and the new coordinate of the object model is obtained = the current coordinate + Δd; If it fits, proceed to step 4.
3. The method according to claim 1, characterized in that The BIM model includes a gradient-changing scene, and step 4 includes: Adapting to the scene of gradient change, outputting the initial position information of the object model, and sequentially generating the initial position information of the position model corresponding to the gradient change; The position model is pre-displayed in the scene of the BIM model according to the initial position information of the position model.
4. The method according to claim 3, characterized in that The initial position information is initial coordinate information; the step 4 also includes: Update the initial coordinate information of the object model according to the overlap value and the value of the fitting vector, and obtain the end point coordinate information; Batch updating the endpoint coordinate information of the position model according to the endpoint coordinate information; The position model is pre-displayed at a position in the BIM model scene and adjusted to a corresponding end position.
5. The method according to claim 1, characterized in that The fitting vector includes a fitting vector in one-dimensional direction and / or a fitting vector in two-dimensional direction.
6. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
A home layout 3D collision detection method and system
CN109740234A
Digital model construction method, computer program product and electronic equipment
CN117876642A