Drawing generation method, device, equipment and medium based on building information model
Through the automatic conversion technology of building information model, the problems of low efficiency and error-prone conversion of traditional drawings are solved, and efficient and accurate drawing generation is achieved, which is suitable for guidance for building construction.
Patent Information
- Application Number
- CN202411368814.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-29
AI Technical Summary
In traditional methods, drawing conversion efficiency is low and error-prone, and it is necessary to manually re-draw the drawings according to the 3D model, resulting in inaccurate construction guidance.
By obtaining building information models, determining target components, using preset bounding box generation algorithms and camera visual parameters, generating two-dimensional views, automatically converting them into drawings, improving conversion efficiency and accuracy.
No manual drawing is required, which significantly improves the efficiency and accuracy of drawing conversion and ensures the accuracy of construction guidance.
Smart Images

Figure CN118887078B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a drawing generation method, device, equipment and medium based on a building information model. Background Art
[0002] In the practical application of construction projects, drawing representation and 3D modeling are two essential links. 3D modeling is an effective way to explore the shape and confirm the correct combination of various components during the design stage, but in construction, drawings are the tools and standards to guide construction, so 3D models must be converted into drawings.
[0003] However, in traditional practices, drawings must be redrawn manually based on the model with the help of software, and dimensions must be marked on the drawings. Drawing conversion is inefficient and prone to errors. Summary of the invention
[0004] The embodiments of the present application provide a drawing generation method, device, equipment and medium based on a building information model, which can improve the efficiency and accuracy of drawing conversion.
[0005] In a first aspect, an embodiment of the present application provides a drawing generation method based on a building information model, which includes: obtaining a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component;
[0006] Determining a target component from the target building information model, the target component being a component in the target building information model that currently needs to be converted into a drawing;
[0007] Determine a target bounding box of the target component based on a preset bounding box generation algorithm;
[0008] Determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box;
[0009] Obtain camera vision parameter determination rules and projection plane determination rules corresponding to a plurality of different preset viewing angles;
[0010] Based on the target three-dimensional coordinate system, according to the camera vision parameter determination rules, the projection plane determination rules, the bounding box center point position of the target bounding box and the bounding box diagonal length, respectively determine the camera vision parameters and the projection plane of each preset viewing angle;
[0011] For each of the preset viewing angles, a projection camera is set according to the camera vision parameters, and a two-dimensional view of the target component on a corresponding projection plane is acquired through the projection camera to obtain a plurality of target two-dimensional views;
[0012] A target drawing corresponding to the target component is generated according to the plurality of target two-dimensional views and component information corresponding to the target component.
[0013] In some embodiments, the target three-dimensional coordinate system is the original coordinate system of the target building information model, and the target bounding box is a rectangular box; determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box includes:
[0014] Determine a plane consisting of the longest side and the second longest side in the target bounding box as a first plane;
[0015] Determine a plane formed by the second longest side and the third longest side in the target bounding box as a second plane;
[0016] Determine a plane consisting of the longest side and the third longest side in the target bounding box as a third plane;
[0017] Keeping the relative position between the target component and the target bounding box unchanged, aligning the first plane with the xy plane in the target three-dimensional coordinate system, aligning the second plane with the yz plane in the target three-dimensional coordinate system, and aligning the third plane with the xz plane in the target three-dimensional coordinate system, to obtain the position of the target component in the target three-dimensional coordinate system;
[0018] Among them, the xy plane is composed of the x-axis and y-axis of the target three-dimensional coordinate system, the yz plane is composed of the y-axis and z-axis of the target three-dimensional coordinate system, and the xz plane is composed of the x-axis and z-axis of the target three-dimensional coordinate system.
[0019] In some embodiments, the target bounding box is a cuboid box; determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box includes:
[0020] Aligning the x-axis of the original coordinate system of the target building information model with the longest side of the target bounding box, aligning the y-axis of the original coordinate system with the second longest side of the target bounding box, and aligning the x-axis of the original coordinate system with the third longest side of the target bounding box to obtain the target three-dimensional coordinate system;
[0021] The position of the target component in the target three-dimensional coordinate system is determined.
[0022] In some embodiments, the plurality of different preset viewing angles include a plan view, a front view, a right view, and an axonometric view, the plurality of target two-dimensional views include a plan view, a front view, a right view, and an axonometric view, and the camera vision parameters include a camera position parameter, a camera illumination direction parameter, and a camera upward direction parameter;
[0023] The camera visual parameter determination rule corresponding to the plane view angle includes the plane view camera illumination direction parameter, the plane view camera upward direction parameter and the plane view camera position parameter calculation rule;
[0024] The camera visual parameter determination rule corresponding to the front view angle includes a front view camera illumination direction parameter, a front view camera upward direction parameter and a front view camera position parameter calculation rule;
[0025] The camera visual parameter determination rule corresponding to the right view angle includes a right view camera illumination direction parameter, a right view camera upward direction parameter and a right view camera position parameter calculation rule;
[0026] The camera visual parameter determination rule corresponding to the axonometric viewing angle includes an axonometric camera illumination direction parameter, an axonometric camera upward direction parameter, and an axonometric camera position parameter calculation rule.
[0027] In some embodiments, the coordinates of the plane view camera illumination direction parameter in the target three-dimensional coordinate system are (0, 0, -1), the coordinates of the plane view camera upward direction parameter in the target three-dimensional coordinate system are (0, 1, 0), and the plane view camera position parameter calculation rule is to determine the plane view camera position parameter based on a first position calculation formula, and the first position calculation formula is: ;
[0028] Wherein, W1 is the position parameter of the plane view camera, P is the center point position of the bounding box, L is the diagonal length of the bounding box, and Z1 is the illumination direction parameter of the plane view camera;
[0029] The coordinates of the illumination direction parameter of the front view camera in the target three-dimensional coordinate system are (0, -1, 0), and the coordinates of the upward direction parameter of the front view camera in the target three-dimensional coordinate system are (0, 0, 1). The calculation rule of the position parameter of the front view camera is to determine the position parameter of the front view camera based on the second position calculation formula, and the second position calculation formula is:
[0030] ;
[0031] Wherein, W2 is the position parameter of the front view camera, and Z2 is the illumination direction parameter of the front view camera;
[0032] The coordinates of the right view camera illumination direction parameter in the target three-dimensional coordinate system are (-1, 0, 0), and the coordinates of the right view camera upward direction parameter in the target three-dimensional coordinate system are (0, 0, 1). The right view camera position parameter calculation rule is to determine the right view camera position parameter based on the third position calculation formula, and the third position calculation formula is:
[0033] ;
[0034] Wherein, W3 is the position parameter of the right view camera, and Z3 is the illumination direction parameter of the right view camera;
[0035] The coordinates of the irradiation direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, -1), and the coordinates of the upward direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, 1). The axonometric camera position parameter calculation rule is to determine the axonometric camera position parameter based on the fourth position calculation formula, and the fourth position calculation formula is:
[0036] ;
[0037] Among them, W4 is the position parameter of the axonometric camera, and Z4 is the illumination direction parameter of the axonometric camera.
[0038] In some embodiments, the projection plane determination rule corresponding to the plan view angle is to determine a plane located on the first origin and perpendicular to the plane view camera illumination direction as the projection plane corresponding to the plan view angle, the plane view camera illumination direction is the direction indicated by the plane view camera illumination direction parameter, and the first origin is determined based on a first origin calculation formula, and the first origin calculation formula is:
[0039] ;
[0040] Wherein, D1 is the first origin;
[0041] The projection plane determination rule corresponding to the front view angle is to determine the plane located on the second origin and perpendicular to the illumination direction of the front view camera as the projection plane corresponding to the front view angle, the illumination direction of the front view camera is the direction indicated by the illumination direction parameter of the front view camera, and the second origin is determined based on the second origin calculation formula, and the second origin calculation formula is:
[0042] ;
[0043] Wherein, D2 is the second origin;
[0044] The projection plane determination rule corresponding to the right view angle is to determine the plane located on the third origin and perpendicular to the illumination direction of the right view camera as the projection plane corresponding to the right view angle, the illumination direction of the right view camera is the direction indicated by the illumination direction parameter of the right view camera, and the third origin is determined based on the third origin calculation formula, and the third origin calculation formula is:
[0045] ;
[0046] Wherein, D3 is the third origin;
[0047] The projection plane determination rule corresponding to the axonometric drawing is to determine the plane located on the fourth origin and perpendicular to the illumination direction of the axonometric camera as the projection plane corresponding to the axonometric drawing, the illumination direction of the axonometric camera is the direction indicated by the illumination direction parameter of the axonometric camera, and the fourth origin is determined based on the fourth origin calculation formula, and the fourth origin calculation formula is:
[0048] ;
[0049] Wherein, D4 is the fourth origin.
[0050] In some embodiments, determining the target bounding box of the target component based on a preset bounding box generation algorithm includes:
[0051] Determine the longest side of the target component according to the component information of the target component, and determine the longest side of the component as the first axis;
[0052] Determine a surface of the target component that is perpendicular to the first axis as a target surface, and determine the longest side of the target surface as a second axis;
[0053] determining a third axis based on the first axis and the second axis;
[0054] Creating a component three-dimensional coordinate system according to the first axis, the second axis, and the third axis;
[0055] The target bounding box is generated for the target component in the component three-dimensional coordinate system using an AABB bounding box algorithm.
[0056] In a second aspect, the embodiment of the present application further provides a drawing generation device based on a building information model, which includes:
[0057] A transceiver unit, used to obtain a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component;
[0058] A processing unit is used to determine a target component from the target building information model, wherein the target component is a component in the target building information model that currently needs to be converted into a drawing; determine a target bounding box of the target component based on a preset bounding box generation algorithm; determine the position of the target component in a target three-dimensional coordinate system according to the target bounding box; obtain camera vision parameter determination rules and projection plane determination rules corresponding to multiple different preset viewing angles; based on the target three-dimensional coordinate system, determine the camera vision parameters and projection plane of each preset viewing angle according to each of the camera vision parameter determination rules, each of the projection plane determination rules, the position of the center point of the target bounding box and the diagonal length of the bounding box; for each of the preset viewing angles, set a projection camera according to the camera vision parameters, and obtain a two-dimensional view of the target component on the corresponding projection plane through the projection camera to obtain multiple target two-dimensional views; generate a target drawing corresponding to the target component according to the multiple target two-dimensional views and the component information corresponding to the target component.
[0059] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0060] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and wherein the program instructions can implement the above method when executed by a processor.
[0061] The embodiment of the present application provides a drawing generation method, device, equipment and medium based on a building information model. The method includes: obtaining a target building information model, the target building information model includes multiple components and component information corresponding to each component; determining a target component from the target building information model, the target component is a component in the target building information model that currently needs to be converted into a drawing; determining a target bounding box of the target component based on a preset bounding box generation algorithm; determining the position of the target component in a target three-dimensional coordinate system according to the target bounding box; obtaining camera visual parameter determination rules and projection plane determination rules corresponding to multiple different preset perspectives; based on the target three-dimensional coordinate system, determining the camera visual parameters and projection plane of each preset perspective according to each of the camera visual parameter determination rules, each of the projection plane determination rules, the center point position of the target bounding box and the diagonal length of the bounding box; for each of the preset perspectives, setting a projection camera according to the camera visual parameters, and obtaining a two-dimensional view of the target component on the corresponding projection plane through the projection camera to obtain multiple target two-dimensional views; generating a target drawing corresponding to the target component according to the multiple target two-dimensional views and the component information corresponding to the target component. Through the embodiments of the present application, the target components in the target building information model can be automatically converted into corresponding drawings without manual drawing, thereby improving the efficiency and accuracy of drawing conversion. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0063] Figure 1 A schematic diagram of a process flow of a drawing generation method based on a building information model provided in an embodiment of the present application;
[0064] Figure 2 A schematic diagram of a drawing obtained based on original coordinates in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of a drawing obtained based on a target three-dimensional coordinate system in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of a scenario of generating a two-dimensional view of a drawing generation method based on a building information model provided in an embodiment of the present application;
[0067] Figure 5A schematic diagram of a process of generating a two-dimensional view of a drawing generation method based on a building information model provided in an embodiment of the present application;
[0068] Figure 6 A schematic diagram of a sub-drawing annotation of a drawing generation method based on a building information model provided in an embodiment of the present application;
[0069] Figure 7 A schematic block diagram of a drawing generation device based on a building information model provided in an embodiment of the present application;
[0070] Figure 8 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0073] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0074] It should be further understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0075] The embodiments of the present application provide a drawing generation method, device, equipment and medium based on a building information model.
[0076] The executor of the drawing generation method based on building information model may be the drawing generation device based on building information model provided in the embodiment of the present application, or a computer device integrated with the drawing generation device based on building information model, wherein the drawing generation device based on building information model may be implemented in hardware or software, and the computer device may be a terminal or a server.
[0077] Figure 1 Schematic diagram of the process of generating drawings based on building information model provided by the embodiment of the present application. Figure 1 As shown, the method includes the following steps S110-S180.
[0078] S110: Acquire a target building information model, where the target building information model includes a plurality of components and component information corresponding to each component.
[0079] The component information includes the component number, name and size information (such as length, width and height).
[0080] S120: Determine a target component from the target building information model, where the target component is a component in the target building information model that currently needs to be converted into a drawing.
[0081] Among them, the target component is the component in the target building information model specified by the user that currently needs to be converted into drawings, wherein the target component includes at least one component in the target building information model, for example, two adjacent components in the target building information model or all components in the target building information model. When it is all the components in the target building information model, the generated drawing is the drawing corresponding to the target building information model, that is, the overall drawing.
[0082] The target component may also be each independent component in the target building information model. In this case, corresponding drawings need to be generated for each component in the target building information model.
[0083] S130. Determine a target bounding box of the target component based on a preset bounding box generation algorithm.
[0084] In some embodiments, in order to generate a bounding box that is more suitable for the target component, so that the camera vision parameters generated by the bounding box and the drawing size obtained by the projection plane are more reasonable, the target bounding box of the target component is determined by the following steps:
[0085] The longest side of the target component is determined according to the component information of the target component, and the longest side of the component is determined as the first axis; the surface of the target component that is perpendicular to the first axis is determined as the target surface, and the longest side of the target surface is determined as the second axis; the third axis is determined according to the first axis and the second axis; a component three-dimensional coordinate system is created according to the first axis, the second axis and the third axis; and the target bounding box is generated for the target component in the component three-dimensional coordinate system using an axially parallel bounding box (AABB) bounding box algorithm.
[0086] Specifically, the first axis and the second axis are cross-multiplied to obtain the third axis, and then the bounding box of the target component is calculated in the three-dimensional coordinate system of the component using the AABB bounding box algorithm.
[0087] The AABB bounding box algorithm is a classic bounding box algorithm with high execution efficiency and good stability. The sides of the bounding box generated by the AABB bounding box algorithm are parallel to the coordinate axes corresponding to the model coordinate system. If the bounding box is calculated directly based on the original coordinate system of the target building information model, the calculated bounding box has poor tightness with the corresponding model and is not sufficiently fitted to the model. However, the bounding box is calculated by the method provided in the embodiment of the present application. Since the present application recreates the component three-dimensional coordinate system of the component, the longest side of the component is parallel to the first axis of the component three-dimensional coordinate system. Therefore, the AABB bounding box algorithm is performed based on the recreated component three-dimensional coordinate system. The sides of the target bounding box obtained are parallel to the longest side of the target component. The generated target bounding box will fit the target component better, making the camera visual parameters generated by the bounding box and the drawing size obtained by the projection plane more reasonable.
[0088] S140: Determine the position of the target component in a target three-dimensional coordinate system according to the target bounding box.
[0089] In this embodiment, if the target component is directly converted to a drawing based on the original coordinate system of the target building information model (i.e., the coordinate system of the modeling software), since the position and angle of the target component in the original coordinate system are not the best position and angle displayed on the drawing, Figure 2 For example, Figure 2 As shown, Figure 2 This is a drawing schematic diagram for directly converting the target component based on the original coordinate system. When the target component is tilted in the space of the original coordinate system, the user cannot intuitively obtain the component information through the plan view, front view, right view and axonometric view obtained with the original coordinate system as a reference, such as Figure 3 As shown, Figure 3After adjusting the positional relationship between the target 3D coordinate system and the target component, a drawing schematic diagram of drawing conversion of the target component based on the target 3D coordinate system is provided. The user can intuitively obtain component information by obtaining the plan view, front view, right view and axonometric view of the target component through the target 3D coordinate system after adjusting the positional relationship.
[0090] Among them, determining the position of the target component in the target three-dimensional coordinate system in the present application is to adjust the relative position between the target component and the target three-dimensional coordinate system, wherein the target three-dimensional coordinate system is the reference coordinate system for drawing conversion in this embodiment.
[0091] Specifically, in this embodiment, the position of the target component in the target three-dimensional coordinate system can be determined by any one of the following two methods:
[0092] In the first method, the target three-dimensional coordinate system is the original coordinate system of the target building information model, and the target bounding box is a rectangular box; and determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box comprises:
[0093] Determine a plane composed of the longest side and the second longest side in the target bounding box as a first plane; determine a plane composed of the second longest side and the third longest side in the target bounding box as a second plane; determine a plane composed of the longest side and the third longest side in the target bounding box as a third plane; keep the relative position between the target component and the target bounding box unchanged, align the first plane with the xy plane in the target three-dimensional coordinate system, align the second plane with the yz plane in the target three-dimensional coordinate system, align the third plane with the xz plane in the target three-dimensional coordinate system, and obtain the position of the target component in the target three-dimensional coordinate system; wherein the xy plane is composed of the x-axis and y-axis of the target three-dimensional coordinate system, the yz plane is composed of the y-axis and z-axis of the target three-dimensional coordinate system, and the xz plane is composed of the x-axis and z-axis of the target three-dimensional coordinate system.
[0094] In this embodiment, the position of the target component in the target three-dimensional coordinate system is determined by adjusting the position of the target component in the target three-dimensional coordinate system, and the position of the target component in the target three-dimensional coordinate system space is adjusted so that the target component is projected based on the target three-dimensional coordinate system, so that the optimal position and angle of the target component can be reflected on the drawing.
[0095] In the second embodiment, the target bounding box is a rectangular parallelepiped box; and determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box includes:
[0096] The target three-dimensional coordinate system is obtained by aligning the x-axis of the original coordinate system of the target building information model with the longest side of the target bounding box, aligning the y-axis of the original coordinate system with the second longest side of the target bounding box, and aligning the x-axis of the original coordinate system with the third longest side of the target bounding box; and determining the position of the target component in the target three-dimensional coordinate system.
[0097] In this embodiment, the three-dimensional coordinate system of the target component needs to be adjusted, and the target component is projected based on the adjusted target three-dimensional coordinate system. The optimal position and angle of the target component can also be reflected on the drawing.
[0098] S150, obtaining camera vision parameter determination rules and projection plane determination rules corresponding to a plurality of different preset viewing angles.
[0099] In this embodiment, the multiple different preset viewing angles may be projection angles specified in advance by the user for the target component, or may be projection angles of a system model.
[0100] In this embodiment, the camera vision parameter determination rules and projection plane determination rules corresponding to the multiple different preset viewing angles may be data pre-stored in the memory of the computer device, or may be external data (such as an external storage device);
[0101] When the camera vision parameter determination rules and projection plane determination rules corresponding to multiple different preset viewing angles are data pre-stored in the memory of a computer device, it is only necessary to call the corresponding data from the memory. When the data comes from the outside, the corresponding data is called from the outside when in use.
[0102] Among them, W4 is the position parameter of the axonometric camera, and Z4 is the illumination direction parameter of the axonometric camera.
[0103] S160. Based on the target three-dimensional coordinate system, according to the camera vision parameter determination rules, the projection plane determination rules, the bounding box center point position of the target bounding box and the bounding box diagonal length, respectively determine the camera vision parameters and projection plane of each preset viewing angle.
[0104] In this embodiment, in the target three-dimensional coordinate system, the camera vision parameters of each preset viewing angle and the projection plane of each preset viewing angle are determined respectively.
[0105] Among them, in this embodiment, multiple different preset perspectives include a plan view perspective, a front view perspective, a right view perspective and an axonometric view perspective, multiple target two-dimensional views include a plan view, a front view, a right view perspective and an axonometric view, and the camera visual parameters include a camera position parameter, a camera illumination direction parameter and a camera upward direction parameter; the camera position parameter is used to indicate the position where the camera is placed, which determines the size and position of the component in the picture; the camera illumination direction parameter is used to indicate the direction in which the camera is facing; the camera upward direction parameter is used to indicate the upward direction of the camera, which determines the direction of the component in the picture.
[0106] The camera visual parameter determination rule corresponding to the plane view angle includes the plane view camera illumination direction parameter, the plane view camera upward direction parameter and the plane view camera position parameter calculation rule;
[0107] The camera visual parameter determination rule corresponding to the front view angle includes a front view camera illumination direction parameter, a front view camera upward direction parameter and a front view camera position parameter calculation rule;
[0108] The camera visual parameter determination rule corresponding to the right view angle includes a right view camera illumination direction parameter, a right view camera upward direction parameter and a right view camera position parameter calculation rule;
[0109] The camera visual parameter determination rule corresponding to the axonometric viewing angle includes an axonometric camera illumination direction parameter, an axonometric camera upward direction parameter, and an axonometric camera position parameter calculation rule.
[0110] Furthermore, the coordinates of the plane view camera illumination direction parameter in the target three-dimensional coordinate system are (0, 0, -1), the coordinates of the plane view camera upward direction parameter in the target three-dimensional coordinate system are (0, 1, 0), and the plane view camera position parameter calculation rule is to determine the plane view camera position parameter based on the first position calculation formula, and the first position calculation formula is: (1);
[0111] Wherein, W1 is the position parameter of the plane view camera, P is the center point position of the bounding box, L is the diagonal length of the bounding box, and Z1 is the illumination direction parameter of the plane view camera;
[0112] The coordinates of the illumination direction parameter of the front view camera in the target three-dimensional coordinate system are (0, -1, 0), and the coordinates of the upward direction parameter of the front view camera in the target three-dimensional coordinate system are (0, 0, 1). The calculation rule of the position parameter of the front view camera is to determine the position parameter of the front view camera based on the second position calculation formula, and the second position calculation formula is:
[0113] (2);
[0114] Wherein, W2 is the position parameter of the front view camera, and Z2 is the illumination direction parameter of the front view camera;
[0115] The coordinates of the right view camera illumination direction parameter in the target three-dimensional coordinate system are (-1, 0, 0), and the coordinates of the right view camera upward direction parameter in the target three-dimensional coordinate system are (0, 0, 1). The right view camera position parameter calculation rule is to determine the right view camera position parameter based on the third position calculation formula, and the third position calculation formula is:
[0116] (3);
[0117] Wherein, W3 is the position parameter of the right view camera, and Z3 is the illumination direction parameter of the right view camera;
[0118] The coordinates of the irradiation direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, -1), and the coordinates of the upward direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, 1). The axonometric camera position parameter calculation rule is to determine the axonometric camera position parameter based on the fourth position calculation formula, and the fourth position calculation formula is:
[0119] (4);
[0120] Among them, W4 is the position parameter of the axonometric camera, and Z4 is the illumination direction parameter of the axonometric camera.
[0121] In this embodiment, the projection plane of each preset viewing angle is determined in the following manner:
[0122] The projection plane determination rule corresponding to the plan view angle is to determine the plane located on the first origin and perpendicular to the plan view camera illumination direction as the projection plane corresponding to the plan view angle, the plan view camera illumination direction is the direction indicated by the plan view camera illumination direction parameter, and the first origin is determined based on the first origin calculation formula, and the first origin calculation formula is:
[0123] ;
[0124] Wherein, D1 is the first origin;
[0125] The projection plane determination rule corresponding to the front view angle is to determine the plane located on the second origin and perpendicular to the illumination direction of the front view camera as the projection plane corresponding to the front view angle, the illumination direction of the front view camera is the direction indicated by the illumination direction parameter of the front view camera, and the second origin is determined based on the second origin calculation formula, and the second origin calculation formula is:
[0126] ;
[0127] Wherein, D2 is the second origin;
[0128] The projection plane determination rule corresponding to the right view angle is to determine the plane located on the third origin and perpendicular to the illumination direction of the right view camera as the projection plane corresponding to the right view angle, the illumination direction of the right view camera is the direction indicated by the illumination direction parameter of the right view camera, and the third origin is determined based on the third origin calculation formula, and the third origin calculation formula is:
[0129] ;
[0130] Wherein, D3 is the third origin;
[0131] The projection plane determination rule corresponding to the axonometric drawing is to determine the plane located on the fourth origin and perpendicular to the illumination direction of the axonometric camera as the projection plane corresponding to the axonometric drawing, the illumination direction of the axonometric camera is the direction indicated by the illumination direction parameter of the axonometric camera, and the fourth origin is determined based on the fourth origin calculation formula, and the fourth origin calculation formula is:
[0132] ;
[0133] Wherein, D4 is the fourth origin.
[0134] S170. For each of the preset viewing angles, a projection camera is set according to the camera vision parameters, and a two-dimensional view of the target component on a corresponding projection plane is acquired through the projection camera to obtain a plurality of target two-dimensional views.
[0135] For easier understanding, see Figure 4 , Figure 4 A schematic diagram of a scenario for generating a two-dimensional view provided by the present application, wherein: Figure 4 The coordinate system shown in is the target three-dimensional coordinate system, where the camera position parameter W is (a, b, c), the camera illumination direction parameter Z is (a`, b`, c`), and the camera upward direction parameter S is (a``, b``, c``).
[0136] In computer graphics, the basic unit for calculating projection is point. Even if the final projection is a line, a surface or a geometric body, their feature points are connected after projection. However, due to the different spatial positions of the various parts of the component model, there must be an occlusion relationship after projection, which is reflected on the drawing. Therefore, the smallest unit of projection is selected as the surface. While projecting all the component surfaces in the component model on the plane, the original depth of each surface (relative to the depth of the camera) is recorded. Once there is overlap between surfaces, it means that there is an occlusion relationship. At this time, the original depth of the occluded part is used. The surface at a deeper depth is occluded, and its edge line will become a dotted line or no longer displayed (depending on the user's settings for the drawing). That is, when generating the target two-dimensional view, this application will filter the edges of the overlapping surfaces using the original depths of each plane in the two-dimensional view.
[0137] For example, Figure 5 When (a) in the figure is projected from a plane, the resulting image is as follows: Figure 5 As shown in (b) in (b), since the depth of plane 1 in (b) is greater than the depth of plane 2, the edge line of the overlapping part of plane 1 and plane 2 should be blocked, that is, the edge line of plane 1 overlapping with plane 2 is not displayed, and we get Figure 5 (c) in the figure is the target two-dimensional view of the corresponding viewing angle.
[0138] S180, generating a target drawing corresponding to the target component according to the plurality of target two-dimensional views and component information corresponding to the target component.
[0139] In this embodiment, the target two-dimensional views of the target component from different perspectives are placed in different sub-drawings respectively, and then the target two-dimensional views in each sub-drawing are annotated, and a component list corresponding to the target component is generated according to the component information of the target component. Finally, each sub-drawing and the component list are laid out according to preset layout rules to obtain a target drawing containing multiple sub-drawings and a component list.
[0140] Among them, when the executing subject computer device is specifically a server, after the target drawing is generated, the target drawing needs to be sent to the user terminal.
[0141] Specifically, the target 2D views in each sub-drawing are annotated using the following methods:
[0142] like Figure 6 As shown, for each sub-drawing, take the intersection points of all solid lines in the target two-dimensional view in the sub-drawing, project each intersection point onto a straight line on the left and a straight line on the bottom of the entire sub-drawing, remove duplicate points, connect these points from left to right and from bottom to top, and mark the distance, where the marked distance can be calculated based on the corresponding component information, and the axonometric drawing does not need to be marked.
[0143] Specifically, the component list is generated by the following method:
[0144] Since component modeling often uses information models, each component is composed of multiple geometric bodies. The information of the geometric bodies in the component (name, length, width, height, number, etc.) is already included in the component information of the component model, and this information also needs to be reflected on the drawing. Therefore, the index of each geometric body (corresponding number) needs to be marked on the axonometric drawing so that the user can clearly understand the position of each geometric body in the component through the index. The specific method is to find the center point of each geometric body, and then project the center point on the sub-drawing of the axonometric drawing in the form of a digital index, and then generate a component list with the corresponding specific information in a table. The component list contains the number, name, length, width and height information of each geometric body in the target component.
[0145] Specifically, each sub-drawing and the component list are typeset by the following method:
[0146] According to the preset layout rules, the sub-drawings corresponding to the plan view, front view, right view and axonometric view are arranged in the layout of upper left, lower left, lower right and upper right, and the component list is placed at the bottom. According to the above layout, the generated sub-drawings and component list are placed in the overall drawing to obtain the target drawing.
[0147] In summary, through the embodiments of the present application, the target components in the target building information model can be automatically converted into corresponding drawings without manual drawing, thereby improving the efficiency and accuracy of drawing conversion. In addition, through the present application, a component list can be automatically generated through component information without manual calculation, thereby improving the accuracy of the component list.
[0148] Figure 7 is a schematic block diagram of a drawing generation device 700 based on a building information model provided in an embodiment of the present application. Figure 7 As shown, corresponding to the above drawing generation method based on building information model, the present application also provides a drawing generation device 700 based on building information model. The drawing generation device 700 based on building information model includes a unit for executing the above drawing generation method based on building information model. The drawing generation device 700 based on building information model can be configured in a server or a terminal. Figure 7 The drawing generation device 700 based on building information model includes a transceiver unit 701, which is used to obtain a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component;
[0149] The processing unit 702 is used to determine a target component from the target building information model, where the target component is a component in the target building information model that currently needs to be converted into a drawing; determine a target bounding box of the target component based on a preset bounding box generation algorithm; determine the position of the target component in a target three-dimensional coordinate system according to the target bounding box; obtain camera vision parameter determination rules and projection plane determination rules corresponding to multiple different preset viewing angles; based on the target three-dimensional coordinate system, determine the camera vision parameters and projection plane of each preset viewing angle according to each camera vision parameter determination rule, each projection plane determination rule, the center point position of the target bounding box, and the diagonal length of the bounding box; for each preset viewing angle, set a projection camera according to the camera vision parameters, and obtain a two-dimensional view of the target component on the corresponding projection plane through the projection camera to obtain multiple target two-dimensional views; generate a target drawing corresponding to the target component according to the multiple target two-dimensional views and the component information corresponding to the target component.
[0150] In some embodiments, the target three-dimensional coordinate system is the original coordinate system of the target building information model, and the target bounding box is a rectangular box; when the processing unit 702 executes the step of determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box, it is specifically used to:
[0151] Determine a plane composed of the longest side and the second longest side in the target bounding box as a first plane; determine a plane composed of the second longest side and the third longest side in the target bounding box as a second plane; determine a plane composed of the longest side and the third longest side in the target bounding box as a third plane; keep the relative position between the target component and the target bounding box unchanged, align the first plane with the xy plane in the target three-dimensional coordinate system, align the second plane with the yz plane in the target three-dimensional coordinate system, align the third plane with the xz plane in the target three-dimensional coordinate system, and obtain the position of the target component in the target three-dimensional coordinate system; wherein the xy plane is composed of the x-axis and y-axis of the target three-dimensional coordinate system, the yz plane is composed of the y-axis and z-axis of the target three-dimensional coordinate system, and the xz plane is composed of the x-axis and z-axis of the target three-dimensional coordinate system.
[0152] In some embodiments, the target bounding box is a cuboid box; when the processing unit 702 executes the step of determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box, it is specifically used to:
[0153] The target three-dimensional coordinate system is obtained by aligning the x-axis of the original coordinate system of the target building information model with the longest side of the target bounding box, aligning the y-axis of the original coordinate system with the second longest side of the target bounding box, and aligning the x-axis of the original coordinate system with the third longest side of the target bounding box; and determining the position of the target component in the target three-dimensional coordinate system.
[0154] In some embodiments, the plurality of different preset viewing angles include a plan view, a front view, a right view, and an axonometric view, the plurality of target two-dimensional views include a plan view, a front view, a right view, and an axonometric view, and the camera vision parameters include a camera position parameter, a camera illumination direction parameter, and a camera upward direction parameter;
[0155] The camera visual parameter determination rule corresponding to the plane view angle includes the plane view camera illumination direction parameter, the plane view camera upward direction parameter and the plane view camera position parameter calculation rule;
[0156] The camera visual parameter determination rule corresponding to the front view angle includes a front view camera illumination direction parameter, a front view camera upward direction parameter and a front view camera position parameter calculation rule;
[0157] The camera visual parameter determination rule corresponding to the right view angle includes a right view camera illumination direction parameter, a right view camera upward direction parameter and a right view camera position parameter calculation rule;
[0158] The camera visual parameter determination rule corresponding to the axonometric viewing angle includes an axonometric camera illumination direction parameter, an axonometric camera upward direction parameter, and an axonometric camera position parameter calculation rule.
[0159] In some embodiments, the coordinates of the plane view camera illumination direction parameter in the target three-dimensional coordinate system are (0, 0, -1), the coordinates of the plane view camera upward direction parameter in the target three-dimensional coordinate system are (0, 1, 0), and the plane view camera position parameter calculation rule is to determine the plane view camera position parameter based on a first position calculation formula, and the first position calculation formula is:
[0160] ;
[0161] Wherein, W1 is the position parameter of the plane view camera, P is the center point position of the bounding box, L is the diagonal length of the bounding box, and Z1 is the illumination direction parameter of the plane view camera;
[0162] The coordinates of the illumination direction parameter of the front view camera in the target three-dimensional coordinate system are (0, -1, 0), and the coordinates of the upward direction parameter of the front view camera in the target three-dimensional coordinate system are (0, 0, 1). The calculation rule of the position parameter of the front view camera is to determine the position parameter of the front view camera based on the second position calculation formula, and the second position calculation formula is:
[0163] ;
[0164] Wherein, W2 is the position parameter of the front view camera, and Z2 is the illumination direction parameter of the front view camera;
[0165] The coordinates of the right view camera illumination direction parameter in the target three-dimensional coordinate system are (-1, 0, 0), and the coordinates of the right view camera upward direction parameter in the target three-dimensional coordinate system are (0, 0, 1). The right view camera position parameter calculation rule is to determine the right view camera position parameter based on the third position calculation formula, and the third position calculation formula is:
[0166] ;
[0167] Wherein, W3 is the position parameter of the right view camera, and Z3 is the illumination direction parameter of the right view camera;
[0168] The coordinates of the irradiation direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, -1), and the coordinates of the upward direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, 1). The axonometric camera position parameter calculation rule is to determine the axonometric camera position parameter based on the fourth position calculation formula, and the fourth position calculation formula is:
[0169] ;
[0170] Among them, W4 is the position parameter of the axonometric camera, and Z4 is the illumination direction parameter of the axonometric camera.
[0171] In some embodiments, the projection plane determination rule corresponding to the plan view angle is to determine a plane located on the first origin and perpendicular to the plane view camera illumination direction as the projection plane corresponding to the plan view angle, the plane view camera illumination direction is the direction indicated by the plane view camera illumination direction parameter, and the first origin is determined based on a first origin calculation formula, and the first origin calculation formula is:
[0172] ;
[0173] Wherein, D1 is the first origin;
[0174] The projection plane determination rule corresponding to the front view angle is to determine the plane located on the second origin and perpendicular to the illumination direction of the front view camera as the projection plane corresponding to the front view angle, the illumination direction of the front view camera is the direction indicated by the illumination direction parameter of the front view camera, and the second origin is determined based on the second origin calculation formula, and the second origin calculation formula is:
[0175] ;
[0176] Wherein, D2 is the second origin;
[0177] The projection plane determination rule corresponding to the right view angle is to determine the plane located on the third origin and perpendicular to the illumination direction of the right view camera as the projection plane corresponding to the right view angle, the illumination direction of the right view camera is the direction indicated by the illumination direction parameter of the right view camera, and the third origin is determined based on the third origin calculation formula, and the third origin calculation formula is:
[0178] ;
[0179] Wherein, D3 is the third origin;
[0180] The projection plane determination rule corresponding to the axonometric drawing is to determine the plane located on the fourth origin and perpendicular to the illumination direction of the axonometric camera as the projection plane corresponding to the axonometric drawing, the illumination direction of the axonometric camera is the direction indicated by the illumination direction parameter of the axonometric camera, and the fourth origin is determined based on the fourth origin calculation formula, and the fourth origin calculation formula is:
[0181] ;
[0182] Wherein, D4 is the fourth origin.
[0183] In some embodiments, when executing the step of determining the target bounding box of the target component based on a preset bounding box generation algorithm, the processing unit 702 is specifically configured to:
[0184] The longest side of the target component is determined according to the component information of the target component, and the longest side of the component is determined as the first axis; the surface of the target component that is perpendicular to the first axis is determined as the target surface, and the longest side of the target surface is determined as the second axis; the third axis is determined according to the first axis and the second axis; a component three-dimensional coordinate system is created according to the first axis, the second axis and the third axis; and the target bounding box is generated for the target component in the component three-dimensional coordinate system using an AABB bounding box algorithm.
[0185] The drawing generation device 700 based on the building information model provided by the embodiment of the present application can automatically convert the target components in the target building information model into corresponding drawings without manual drawing, thereby improving the efficiency and accuracy of drawing conversion.
[0186] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned drawing generation device 700 based on building information model and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.
[0187] The above-mentioned drawing generation device based on building information model can be implemented in the form of a computer program. The computer program can be used in Figure 8 Runs on the computer device shown.
[0188] See also Figure 8 , Figure 8 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal or a server.
[0189] See also Figure 8 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0190] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a drawing generation method based on a building information model.
[0191] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0192] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a drawing generation method based on a building information model.
[0193] The network interface 505 is used to communicate with other devices over the network. Figure 8 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0194] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:
[0195] Acquire a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component;
[0196] Determining a target component from the target building information model, the target component being a component in the target building information model that currently needs to be converted into a drawing;
[0197] Determine a target bounding box of the target component based on a preset bounding box generation algorithm;
[0198] Determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box;
[0199] Obtain camera vision parameter determination rules and projection plane determination rules corresponding to a plurality of different preset viewing angles;
[0200] Based on the target three-dimensional coordinate system, according to the camera vision parameter determination rules, the projection plane determination rules, the bounding box center point position of the target bounding box and the bounding box diagonal length, respectively determine the camera vision parameters and the projection plane of each preset viewing angle;
[0201] For each of the preset viewing angles, a projection camera is set according to the camera vision parameters, and a two-dimensional view of the target component on a corresponding projection plane is acquired through the projection camera to obtain a plurality of target two-dimensional views;
[0202] A target drawing corresponding to the target component is generated according to the plurality of target two-dimensional views and component information corresponding to the target component.
[0203] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0204] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0205] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:
[0206] Acquire a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component;
[0207] Determining a target component from the target building information model, the target component being a component in the target building information model that currently needs to be converted into a drawing;
[0208] Determine a target bounding box of the target component based on a preset bounding box generation algorithm;
[0209] Determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box;
[0210] Obtain camera vision parameter determination rules and projection plane determination rules corresponding to a plurality of different preset viewing angles;
[0211] Based on the target three-dimensional coordinate system, according to the camera vision parameter determination rules, the projection plane determination rules, the bounding box center point position of the target bounding box and the bounding box diagonal length, respectively determine the camera vision parameters and the projection plane of each preset viewing angle;
[0212] For each of the preset viewing angles, a projection camera is set according to the camera vision parameters, and a two-dimensional view of the target component on a corresponding projection plane is acquired through the projection camera to obtain a plurality of target two-dimensional views;
[0213] A target drawing corresponding to the target component is generated according to the plurality of target two-dimensional views and component information corresponding to the target component.
[0214] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0215] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0216] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0217] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0218] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0219] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A drawing generation method based on building information model, characterized in that: include: Acquire a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component; Determining a target component from the target building information model, the target component being a component in the target building information model that currently needs to be converted into a drawing; Determine a target bounding box of the target component based on a preset bounding box generation algorithm; Determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box; Obtain camera vision parameter determination rules and projection plane determination rules corresponding to a plurality of different preset viewing angles; Based on the target three-dimensional coordinate system, according to the camera vision parameter determination rules, the projection plane determination rules, the bounding box center point position of the target bounding box and the bounding box diagonal length, respectively determine the camera vision parameters and the projection plane of each preset viewing angle; For each of the preset viewing angles, a projection camera is set according to the camera vision parameters, and a two-dimensional view of the target component on a corresponding projection plane is acquired through the projection camera to obtain a plurality of target two-dimensional views; Generate a target drawing corresponding to the target component according to the plurality of target two-dimensional views and component information corresponding to the target component; The plurality of different preset viewing angles include a plan view, a front view, a right view, and an axonometric view; the plurality of target two-dimensional views include a plan view, a front view, a right view, and an axonometric view; and the camera vision parameters include a camera position parameter, a camera illumination direction parameter, and a camera upward direction parameter; The camera visual parameter determination rule corresponding to the plane view angle includes the plane view camera illumination direction parameter, the plane view camera upward direction parameter and the plane view camera position parameter calculation rule; The camera visual parameter determination rule corresponding to the front view angle includes a front view camera illumination direction parameter, a front view camera upward direction parameter and a front view camera position parameter calculation rule; The camera visual parameter determination rule corresponding to the right view angle includes a right view camera illumination direction parameter, a right view camera upward direction parameter and a right view camera position parameter calculation rule; The camera visual parameter determination rule corresponding to the axonometric viewing angle includes the axonometric camera illumination direction parameter, the axonometric camera upward direction parameter and the axonometric camera position parameter calculation rule; The coordinates of the plane view camera illumination direction parameter in the target three-dimensional coordinate system are (0, 0, -1), the coordinates of the plane view camera upward direction parameter in the target three-dimensional coordinate system are (0, 1, 0), and the plane view camera position parameter calculation rule is to determine the plane view camera position parameter based on the first position calculation formula, and the first position calculation formula is: ; in, is the camera position parameter of the plane image, is the center point position of the bounding box, is the diagonal length of the bounding box, is the illumination direction parameter of the plane camera; The coordinates of the illumination direction parameter of the front view camera in the target three-dimensional coordinate system are (0, -1, 0), and the coordinates of the upward direction parameter of the front view camera in the target three-dimensional coordinate system are (0, 0, 1). The calculation rule of the position parameter of the front view camera is to determine the position parameter of the front view camera based on the second position calculation formula, and the second position calculation formula is: ; in, is the front view camera position parameter, is the illumination direction parameter of the front view camera; The coordinates of the right view camera illumination direction parameter in the target three-dimensional coordinate system are (-1, 0, 0), and the coordinates of the right view camera upward direction parameter in the target three-dimensional coordinate system are (0, 0, 1). The right view camera position parameter calculation rule is to determine the right view camera position parameter based on the third position calculation formula, and the third position calculation formula is: ; in, is the right view camera position parameter, is the illumination direction parameter of the right view camera; The coordinates of the irradiation direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, -1), and the coordinates of the upward direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, 1). The axonometric camera position parameter calculation rule is to determine the axonometric camera position parameter based on the fourth position calculation formula, and the fourth position calculation formula is: ; in, is the axonometric camera position parameter, is the illumination direction parameter of the axonometric camera.
2. The method according to claim 1, characterized in that The target three-dimensional coordinate system is the original coordinate system of the target building information model, and the target bounding box is a rectangular parallelepiped box; Determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box includes: Determine a plane consisting of the longest side and the second longest side in the target bounding box as a first plane; Determine a plane formed by the second longest side and the third longest side in the target bounding box as a second plane; Determine a plane consisting of the longest side and the third longest side in the target bounding box as a third plane; Keeping the relative position between the target component and the target bounding box unchanged, aligning the first plane with the xy plane in the target three-dimensional coordinate system, aligning the second plane with the yz plane in the target three-dimensional coordinate system, and aligning the third plane with the xz plane in the target three-dimensional coordinate system, to obtain the position of the target component in the target three-dimensional coordinate system; Among them, the xy plane is composed of the x-axis and y-axis of the target three-dimensional coordinate system, the yz plane is composed of the y-axis and z-axis of the target three-dimensional coordinate system, and the xz plane is composed of the x-axis and z-axis of the target three-dimensional coordinate system.
3. The method according to claim 1, characterized in that: The target bounding box is a cuboid box; determining the position of the target component in the target three-dimensional coordinate system according to the target bounding box includes: Aligning the x-axis of the original coordinate system of the target building information model with the longest side of the target bounding box, aligning the y-axis of the original coordinate system with the second longest side of the target bounding box, and aligning the x-axis of the original coordinate system with the third longest side of the target bounding box to obtain the target three-dimensional coordinate system; The position of the target component in the target three-dimensional coordinate system is determined.
4. The method according to claim 1, characterized in that: The projection plane determination rule corresponding to the plan view angle is to determine the plane located on the first origin and perpendicular to the plan view camera illumination direction as the projection plane corresponding to the plan view angle, the plan view camera illumination direction is the direction indicated by the plan view camera illumination direction parameter, and the first origin is determined based on the first origin calculation formula, and the first origin calculation formula is: ; in, is the first origin; The projection plane determination rule corresponding to the front view angle is to determine the plane located on the second origin and perpendicular to the illumination direction of the front view camera as the projection plane corresponding to the front view angle, the illumination direction of the front view camera is the direction indicated by the illumination direction parameter of the front view camera, and the second origin is determined based on the second origin calculation formula, and the second origin calculation formula is: ; in, is the second origin; The projection plane determination rule corresponding to the right view angle is to determine the plane located on the third origin and perpendicular to the illumination direction of the right view camera as the projection plane corresponding to the right view angle, the illumination direction of the right view camera is the direction indicated by the illumination direction parameter of the right view camera, and the third origin is determined based on the third origin calculation formula, and the third origin calculation formula is: ; in, is the third origin; The projection plane determination rule corresponding to the axonometric drawing is to determine the plane located on the fourth origin and perpendicular to the illumination direction of the axonometric camera as the projection plane corresponding to the axonometric drawing, the illumination direction of the axonometric camera is the direction indicated by the illumination direction parameter of the axonometric camera, and the fourth origin is determined based on the fourth origin calculation formula, and the fourth origin calculation formula is: ; in, is the fourth origin.
5. The method according to any one of claims 1 to 4, characterized in that The step of determining the target bounding box of the target component based on a preset bounding box generation algorithm includes: Determine the longest side of the target component according to the component information of the target component, and determine the longest side of the component as the first axis; Determine a surface of the target component that is perpendicular to the first axis as a target surface, and determine the longest side of the target surface as a second axis; determining a third axis based on the first axis and the second axis; Creating a component three-dimensional coordinate system according to the first axis, the second axis, and the third axis; The target bounding box is generated for the target component in the component three-dimensional coordinate system using an AABB bounding box algorithm.
6. A drawing generation device based on building information model, characterized in that: include: A transceiver unit, used to obtain a target building information model, wherein the target building information model includes a plurality of components and component information corresponding to each component; A processing unit, configured to determine a target component from the target building information model, wherein the target component is a component in the target building information model that currently needs to be converted into a drawing; Determine a target bounding box of the target component based on a preset bounding box generation algorithm; Determine the position of the target component in the target three-dimensional coordinate system according to the target bounding box; obtain camera vision parameter determination rules and projection plane determination rules corresponding to multiple different preset viewing angles; based on the target three-dimensional coordinate system, determine the camera vision parameters and projection planes of each preset viewing angle according to each camera vision parameter determination rule, each projection plane determination rule, the center point position of the target bounding box and the diagonal length of the bounding box; for each preset viewing angle, set a projection camera according to the camera vision parameters, and obtain a two-dimensional view of the target component on the corresponding projection plane through the projection camera to obtain multiple target two-dimensional views; Generate a target drawing corresponding to the target component according to the plurality of target two-dimensional views and component information corresponding to the target component; The plurality of different preset viewing angles include a plan view, a front view, a right view, and an axonometric view; the plurality of target two-dimensional views include a plan view, a front view, a right view, and an axonometric view; and the camera vision parameters include a camera position parameter, a camera illumination direction parameter, and a camera upward direction parameter; The camera visual parameter determination rule corresponding to the plane view angle includes the plane view camera illumination direction parameter, the plane view camera upward direction parameter and the plane view camera position parameter calculation rule; The camera visual parameter determination rule corresponding to the front view angle includes a front view camera illumination direction parameter, a front view camera upward direction parameter and a front view camera position parameter calculation rule; The camera visual parameter determination rule corresponding to the right view angle includes a right view camera illumination direction parameter, a right view camera upward direction parameter and a right view camera position parameter calculation rule; The camera visual parameter determination rule corresponding to the axonometric viewing angle includes the axonometric camera illumination direction parameter, the axonometric camera upward direction parameter and the axonometric camera position parameter calculation rule; The coordinates of the plane view camera illumination direction parameter in the target three-dimensional coordinate system are (0, 0, -1), the coordinates of the plane view camera upward direction parameter in the target three-dimensional coordinate system are (0, 1, 0), and the plane view camera position parameter calculation rule is to determine the plane view camera position parameter based on the first position calculation formula, and the first position calculation formula is: ; in, is the camera position parameter of the plane image, is the center point position of the bounding box, is the diagonal length of the bounding box, is the illumination direction parameter of the plane camera; The coordinates of the illumination direction parameter of the front view camera in the target three-dimensional coordinate system are (0, -1, 0), and the coordinates of the upward direction parameter of the front view camera in the target three-dimensional coordinate system are (0, 0, 1). The calculation rule of the position parameter of the front view camera is to determine the position parameter of the front view camera based on the second position calculation formula, and the second position calculation formula is: ; in, is the front view camera position parameter, is the illumination direction parameter of the front view camera; The coordinates of the right view camera illumination direction parameter in the target three-dimensional coordinate system are (-1, 0, 0), and the coordinates of the right view camera upward direction parameter in the target three-dimensional coordinate system are (0, 0, 1). The right view camera position parameter calculation rule is to determine the right view camera position parameter based on the third position calculation formula, and the third position calculation formula is: ; in, is the right view camera position parameter, is the illumination direction parameter of the right view camera; The coordinates of the irradiation direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, -1), and the coordinates of the upward direction parameter of the axonometric camera in the target three-dimensional coordinate system are (-1, 1, 1). The axonometric camera position parameter calculation rule is to determine the axonometric camera position parameter based on the fourth position calculation formula, and the fourth position calculation formula is: ; in, is the axonometric camera position parameter, is the illumination direction parameter of the axonometric camera.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the drawing generation method based on the building information model as described in any one of claims 1 to 5 is implemented.
8. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the drawing generation method based on a building information model as described in any one of claims 1 to 5.
