Method, device and equipment for generating building model expansion drawing and storage medium
By drawing a non-straight section path on a three-dimensional building model and straightening it, the problem of generating arc path section expansion drawings in the existing technology is solved, and efficient and accurate two-dimensional expansion drawing generation is achieved.
Patent Information
- Application Number
- CN202510770024.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-12
AI Technical Summary
Existing BIM software is difficult to directly generate architectural model expansion drawings based on arc path sectioning, which makes the operation cumbersome and incompatible with actual business scenarios.
Draw a non-linear cutting path on the preset view plane of the 3D building model, cut the model along the cutting path and straighten it to obtain the reference straight line direction, and then unfold it to form a 2D unfolded view.
Without the need to stitch multiple views, the planar development corresponding to the cutting path can be generated efficiently and accurately, improving generation efficiency and accuracy.
Smart Images

Figure CN120634840A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer-aided design, and in particular to a method, device, equipment and storage medium for generating an expanded drawing of a building model. Background Art
[0002] In the field of engineering and construction, after building a building model, it is necessary to use expanded drawings of the building model in multiple directions. These expanded drawings slice through the building model from different directions to show the internal structure, spatial relationships, and design details, providing key support for design optimization, construction guidance, multi-disciplinary collaboration, and communication. Traditional BIM software only supports cross-section drawings of straight paths. However, for building cross-section drawings in the shape of broken lines, users need to create multiple cross-section drawings and manually stitch them together, which is cumbersome and unsuitable for practical business scenarios. Furthermore, for spiral staircases and cornered car ramps, users cannot create expanded drawings based on curved path sections.
[0003] Therefore, how to directly generate an expanded view of a building model obtained by arc path sectioning has become a technical problem that those skilled in the art urgently need to solve. Summary of the Invention
[0004] The object of the present invention is to provide a method, device, equipment and storage medium for generating a building model expansion drawing, which can generate a building model expansion drawing based on arc path sectioning to quickly obtain an accurate sectioning.
[0005] According to one aspect of the present invention, a method for generating an expanded view of a building model is provided, the method comprising: In response to a drawing instruction, drawing a non-linear cutting path on a preset view plane of the three-dimensional building model; Cutting the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The sectioning path is straightened to obtain a reference straight line direction, and the three-dimensional section surface is unfolded along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
[0006] Optionally, in response to the drawing instruction, drawing a non-linear cutting path on a preset view plane of the three-dimensional building model includes: In response to the drawing instruction, a plurality of route segments are drawn on a top-view surface of a three-dimensional building model having an arc-shaped structure; wherein the line segment types of the route segments include: straight line segments, arc segments, and broken line segments; Traverse each endpoint of each route segment in turn, and determine whether there are endpoints of other route segments within the set range of the currently traversed endpoint. If so, merge the currently traversed endpoint with the endpoints of other route segments until all endpoints of all route segments are traversed to obtain the cutting path.
[0007] Optionally, the straightening the sectioning path to obtain a reference straight line direction includes: The tangent direction at the starting point of the sectioning path or the straight line direction at the starting point of the sectioning path is set as the reference straight line direction.
[0008] Optionally, the step of unfolding the three-dimensional section surface along the reference straight line to obtain a two-dimensional unfolded view of the three-dimensional section surface includes: Constructing a two-dimensional unfolding plane based on the reference straight line direction and the preset cutting direction; Determine, from the three-dimensional section plane, a first cross-sectional portion located in the two-dimensional unfolding plane and a second cross-sectional portion not located in the two-dimensional unfolding plane; Parameter information of the second cross-section is acquired from the three-dimensional building model, and the second cross-section is mapped to the two-dimensional unfolding plane based on the parameter information to form the two-dimensional unfolding view.
[0009] Optionally, the acquiring parameter information of the second cross-sectional portion from the three-dimensional building model, and mapping the second cross-sectional portion to the two-dimensional unfolded plane based on the parameter information to form the two-dimensional unfolded view includes: When the second cross-sectional portion is an arc-shaped structure, obtaining the curvature radius, arc length information and position information of the second cross-sectional portion from the three-dimensional building model; Inputting the curvature radius, arc length information and position information into a preset parametric unfolding algorithm to obtain a planar unfolded portion corresponding to the second cross-sectional portion; The planar unfolded portion is arranged in the two-dimensional unfolded plane, and together with the first cross-sectional portion, constitutes the two-dimensional unfolded view.
[0010] In order to achieve the above object, the present invention further provides a device for generating an expanded view of a building model, the device comprising: A drawing module, configured to draw a non-linear cutting path on a preset view plane of the three-dimensional building model in response to a drawing instruction; a cutting module, configured to cut the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The unfolding module is used to straighten the section path to obtain a reference straight line direction, and unfold the three-dimensional section surface along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
[0011] Optionally, the drawing module is further configured to: In response to the drawing instruction, a plurality of route segments are drawn on a top-view surface of a three-dimensional building model having an arc-shaped structure; wherein the line segment types of the route segments include: straight line segments, arc segments, and broken line segments; Traverse each endpoint of each route segment in turn, and determine whether there are endpoints of other route segments within the set range of the currently traversed endpoint. If so, merge the currently traversed endpoint with the endpoints of other route segments until all endpoints of all route segments are traversed to obtain the cutting path.
[0012] Optionally, the device further includes: A determination module is used to set the tangent direction at the starting point of the sectioning path or the straight line direction at the starting point of the sectioning path as the reference straight line direction.
[0013] In order to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for generating an expanded drawing of a building model described above are implemented.
[0014] In order to achieve the above object, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for generating an expanded view of a building model as described above.
[0015] The method, device, equipment and storage medium for generating an expanded view of a building model provided by the present invention draw a non-linear cutting path on a preset view plane of a three-dimensional building model, then cut the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path, and finally straighten the cutting path to obtain a reference straight line direction, and expand the three-dimensional cutting surface along the reference straight line direction, without the need for splicing multiple views, and efficiently and accurately generating a plane expanded view corresponding to the cutting path. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings: Figure 1 An optional flowchart of the method for generating an expanded view of a building model provided in Example 1; Figure 2 A schematic diagram of a drawing path provided in Example 1; Figure 3 A schematic diagram of path merging provided in Example 1; Figure 4 A schematic diagram of a car ramp model provided in Example 1; Figure 5 A schematic diagram of a top-down drawing path of a car ramp model provided in Example 1; Figure 6 A two-dimensional expansion diagram of the car ramp model provided in Example 1; Figure 7 Another optional flowchart of the method for generating an expanded view of a building model provided in the first embodiment; Figure 8 A schematic diagram of an optional structural component of the apparatus for generating an expanded view of a building model provided in the second embodiment; Figure 9 This is a schematic diagram of an optional hardware structure of the computer device provided in Example 3. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0018] Example 1 The embodiment of the present invention provides a method for generating an expanded view of a building model, such as Figure 1 As shown, the method specifically includes the following steps: S101: In response to a drawing instruction, a non-linear cutting path is drawn on a preset view plane of a three-dimensional building model.
[0019] In this embodiment, the three-dimensional building model is a common model in the field of engineering and construction, and has a broken line shape or a curved building, such as a spiral staircase, a car ramp with a corner, and a broken line shaped building. The preset view surface may include: a front view, a top view, a left view, and a right view. Preferably, the preset view surface adopts a top view. The non-straight line state includes a broken line state and an arc state. The cutting path in the non-straight line state is a path including broken line segments and / or arc segments. The cutting path must conform to the shape of the building. For example, for a car ramp with a corner, the drawn cutting path includes a straight line segment corresponding to the straight road and an arc segment corresponding to the corner portion of the ramp. In this embodiment, there is no need to use multiple very short straight line segments to fit the arc segment, and the drawn cutting path fits the car ramp with a corner better.
[0020] S102: Sectioning the three-dimensional building model along the sectioning path and in a preset sectioning direction to obtain a three-dimensional sectioning plane of the three-dimensional building model corresponding to the sectioning path.
[0021] In this embodiment, once the user selects the longitudinal sectioning direction in the drawing software, the 3D model is sliced longitudinally along the drawn section path, resulting in a section plane of the 3D building model along the section path. The user can view the model's internal structure and structural layers from the section plane. The user can select the sectioning direction to slice vertically, perpendicular to the horizontal plane, or obliquely, at a certain angle to the horizontal plane. The section plane can be expanded in three ways: sectional, cross-sectional, and elevational.
[0022] S103: straightening the section path to obtain a reference straight line direction, and unfolding the three-dimensional section surface along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
[0023] In this embodiment, the straightening process converts a non-linear cutting path into a linear path. Specifically, the straightening process converts the broken line segments and arc segments in the cutting path into straight line segments, thereby converting the cutting path into a straight path and setting the direction of the straight path to the reference straight line direction. Furthermore, since the drawn cutting path is non-linear, the three-dimensional cutting surface cut according to the cutting path does not lie within a plane. Therefore, an unfolding process is required to flatten the three-dimensional cutting surface onto a plane along the reference straight line direction. For example, the longitudinal section of a cornered car ramp or spiral staircase is three-dimensional (3D). An unfolding process is required to flatten the three-dimensional longitudinal section onto a plane to obtain a two-dimensional unfolded view. Specifically, the unfolding process first constructs a plane based on the reference straight line direction, then meshes the three-dimensional cutting surface into multiple surface elements, and finally maps each surface element onto the plane to obtain a two-dimensional unfolded view corresponding to the three-dimensional cutting surface.
[0024] In this embodiment, the section surface after cutting along the cutting path is a three-dimensional structure. To facilitate observation, it is necessary to convert the curved, folded, or irregular surfaces in the three-dimensional section surface into a two-dimensional unfolded view. First, the cutting path is straightened using a preset algorithm to obtain a reference straight line direction, which can also be customized by the user. The three-dimensional section surface is then unfolded along the reference straight line direction to form a two-dimensional unfolded view.
[0025] This embodiment draws a non-linear cutting path on a preset view plane of a 3D building model, then cuts the 3D building model along the cutting path and in a preset cutting direction to obtain a 3D cutting plane of the 3D building model corresponding to the cutting path. Finally, the cutting path is straightened to obtain a reference straight line direction, and the 3D cutting plane is unfolded along the reference straight line direction. This eliminates the need for stitching multiple views and efficiently and accurately generates a planar unfolding view corresponding to the cutting path.
[0026] Specifically, in response to the drawing instruction in step S101, drawing a non-linear cutting path on a preset view plane of the three-dimensional building model includes: Step A1: In response to the drawing instruction, draw a plurality of route segments on a top-view surface of a three-dimensional building model having an arc structure; wherein the line segment types of the route segments include: straight line segments, arc segments, and broken line segments; Step A2: Traverse each endpoint of each route segment in turn, and determine whether there are endpoints of other route segments within the set range of the currently traversed endpoint. If so, merge the currently traversed endpoint with the endpoints of other route segments until all endpoints of all route segments are traversed to obtain the cutting path.
[0027] When selecting the viewing direction of the three-dimensional building model, the user preferably selects the top view of the three-dimensional building model, and draws multiple route segments in the top view to form a cutting path.
[0028] In this embodiment, if Figure 2 As shown, users first select the line segment type corresponding to the route segment to be drawn based on the shape of the 3D building model. Starting from one end of the model, the starting point of the current route segment is first determined, represented by an "×" shape. A straight line segment is then drawn from this starting point. To draw an arc segment, the end of the straight line segment can be used as the starting point for the arc segment, or a new starting point can be used to draw another route segment. When the user draws multiple route segments in the top view interface, these route segments are merged and connected at adjacent endpoints to form the final section path.
[0029] In this embodiment, if Figure 3As shown in the figure, after drawing each route segment in the top view of the 3D building model, the drawing software will traverse all route segments and determine whether the distance between the endpoints of adjacent route segments is less than a preset distance threshold. If so, the drawing software automatically connects the adjacent route segments at the endpoints. If not, the adjacent route segments are not connected and the traversal continues to the endpoint of the next route segment until all route segments are traversed. Alternatively, the user can manually connect each route segment, ultimately connecting all route segments to form a complete and continuous section path.
[0030] Users can swap the start and end points of a route segment, or change the direction of an entire route segment. When connecting the endpoints of adjacent route segments, if the endpoints are end-to-end, the start symbol for the endpoint that is the starting point is removed. If the endpoints are end-to-end, the user can select one end of the connected route segment as the starting point and the other as the endpoint. If the endpoints are end-to-end, the user can remove both start symbols and select one end of the connected route segment as the starting point. By drawing arcs, there is no need to use multiple very short straight lines to form a pseudo-arc, making the path more closely fit the building model and improving accuracy.
[0031] Specifically, the step S103 of straightening the section path to obtain a reference straight line direction includes: The tangent direction at the starting point of the sectioning path or the straight line direction at the starting point of the sectioning path is set as the reference straight line direction.
[0032] In this embodiment, after sectioning the 3D building model, the user selects a line as a reference line direction to unfold the 3D section plane along the reference line direction. When selecting a reference line, the tangent direction at the starting point of the sectioning path or the direction of the line at the starting point can be used as the reference line direction. Of course, in actual applications, the tangent direction at the end point of the sectioning path can also be set as the reference line direction, and this is not specifically limited here.
[0033] Specifically, the step S103 of unfolding the three-dimensional section along the reference straight line to obtain a two-dimensional unfolded view of the three-dimensional section includes: Step B1: constructing a two-dimensional unfolding plane based on the reference straight line direction and the preset cutting direction; Step B2: determining, from the three-dimensional section plane, a first section portion located on the two-dimensional unfolding plane and a second section portion not located on the two-dimensional unfolding plane; Step B3: Acquire parameter information of the second cross-section from the three-dimensional building model, and map the second cross-section to the two-dimensional unfolding plane based on the parameter information to form the two-dimensional unfolding view.
[0034] In this embodiment, a two-dimensional plane constructed from the reference line and the cutting direction is used as the two-dimensional unfolding plane of the three-dimensional section. The intersection of the three-dimensional section and the two-dimensional plane can occur in two ways: one is that a portion of the three-dimensional section overlaps with the two-dimensional unfolding plane, while the curved portion is not in the two-dimensional plane; the other is that the three-dimensional section intersects only with the two-dimensional unfolding plane, with no portion overlapping with the two-dimensional unfolding plane. The user maps the three-dimensional section onto the two-dimensional unfolding plane, which displays the internal structure of the three-dimensional building model, resulting in a two-dimensional unfolded view of the three-dimensional building model.
[0035] Furthermore, the step B3 of acquiring parameter information of the second cross-section from the three-dimensional building model and mapping the second cross-section onto the two-dimensional unfolded plane based on the parameter information to form the two-dimensional unfolded view further includes: Step C1: when the second cross-sectional portion is an arc-shaped structure, obtaining the curvature radius, arc length information and position information of the second cross-sectional portion from the three-dimensional building model; Step C2: inputting the curvature radius, arc length information and position information into a preset parameterized unfolding algorithm to obtain a planar unfolding portion corresponding to the second cross-sectional portion; Step C3: arranging the planar unfolded portion in the two-dimensional unfolded plane, and forming the two-dimensional unfolded view together with the first cross-sectional portion.
[0036] In this embodiment, when mapping a 3D section onto a 2D unfolded plane, the user needs to obtain the curvature radius, position information, and elevation information of the curved surface. These information is then input into a parametric mapping algorithm to calculate the total length of the arc and obtain a straight line path of the same length. The straight line path and the arc path have the same elevation information. By mapping the arc length of the curved surface onto the corresponding position on the straight line path, the curved surface is mapped onto a plane along the straight line path, which together with the remaining plane form a 2D unfolded image of the 3D section.
[0037] In this embodiment, if Figure 4 The figure shows a 3D model of a car ramp with a 90-degree turn. Figure 5 As shown, in order to obtain the cross-sectional unfolding view of the car ramp, the user draws a cutting path on the top view of the car ramp. The cutting path is drawn as an arc at the turning point of the car ramp, and the overall cutting path is composed of a straight line segment-an arc segment-a straight line segment. The car ramp is cut longitudinally along the cutting path perpendicular to the horizontal plane to obtain a three-dimensional cutting surface with an arc. The tangent direction at the starting point is used as the reference straight line direction, and a two-dimensional unfolding plane is formed with the longitudinal cutting direction. It can be seen from the model of the car ramp that the straight road in the leftmost part coincides with the two-dimensional unfolding plane, so it is directly used as the reference line direction. Figure 6 The leftmost straight line portion; at the turning point between the leftmost straight line and the middle straight line, the middle straight line portion is mapped to the two-dimensional unfolded plane with the length and elevation information unchanged. When processing the arc portion, the position information of the two end points of the arc segment and the curvature radius of the arc are obtained to calculate the total length of the arc segment. The straight line segment with the same total length as the arc segment is mapped to the two-dimensional unfolded plane and connected to the straight line segment in the middle part. The elevation information of the mapped straight line segment is adjusted to be the same as that of the arc segment to obtain the straight line path after the section path is straightened. The three-dimensional section surface is flattened onto the two-dimensional unfolded plane along this straight line path to form the final shape as shown in the figure. Figure 6 The two-dimensional cross-sectional expansion diagram is shown.
[0038] In this embodiment, if Figure 7 As shown in the figure, when drawing a 2D unfolded view of a 3D building model, the user first selects the desired unfolded view type. If a cross-section unfold is selected, a cutting path is drawn on the top view of the model. The model is then longitudinally sliced along the cutting path to obtain a 3D section plane. The cutting path is then straightened into a corresponding straight line, and the system generates a corresponding 2D unfolded view based on the straight line. After obtaining the unfolded view, the user can continue to adjust it, annotating the starting point, end point, and turning point in the unfolded view, as well as the line length and elevation information, ultimately obtaining a 2D unfolded view of the 3D building model that conforms to the user's annotations.
[0039] In this embodiment, a non-linear cutting path is drawn on a preset view plane of a three-dimensional building model, and then the three-dimensional building model is cut along the cutting path and in the longitudinal direction to obtain a three-dimensional cutting plane. Finally, the cutting path is straightened to obtain a reference straight line direction, and the three-dimensional cutting plane is unfolded along the reference straight line direction according to a parametric unfolding algorithm. In essence, it supports cross-sectional views of straight lines, arcs, and their combined path lines, without the need for multiple views to be spliced together, and a plane unfolding view corresponding to the cutting path is generated efficiently and accurately.
[0040] Example 2 The embodiment of the present invention provides a device for generating an expanded view of a building model, such as Figure 8 As shown, the device specifically includes the following components: A drawing module 801 is configured to draw a non-linear cutting path on a preset view plane of a three-dimensional building model in response to a drawing instruction; a cutting module 802 for cutting the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The unfolding module 803 is configured to straighten the section path to obtain a reference straight line direction, and unfold the three-dimensional section surface along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
[0041] Specifically, the drawing module 801 is used to: In response to the drawing instruction, a plurality of route segments are drawn on a top-view surface of a three-dimensional building model having an arc-shaped structure; wherein the line segment types of the route segments include: straight line segments, arc segments, and broken line segments; Traverse each endpoint of each route segment in turn, and determine whether there are endpoints of other route segments within the set range of the currently traversed endpoint. If so, merge the currently traversed endpoint with the endpoints of other route segments until all endpoints of all route segments are traversed to obtain the cutting path.
[0042] Furthermore, the drawing module 801 is further configured to: Traversing each route segment in the top-view surface in sequence, and determining whether the distance between the endpoint of the currently traversed route segment and the endpoint of the adjacent route segment is less than a preset threshold; If so, the endpoint of the currently traversed route segment is merged with the endpoint of the adjacent route segment until the traversal is completed and the section path is obtained; and / or, in response to the connection instruction, the endpoint of the currently traversed route segment is merged with the endpoint of the adjacent route segment according to the connection instruction until the traversal is completed and the section path is obtained.
[0043] Specifically, the device further includes: A determination module is used to set the tangent direction at the starting point of the sectioning path or the straight line direction at the starting point of the sectioning path as the reference straight line direction.
[0044] Specifically, the expansion module 803 is used to: Constructing a two-dimensional unfolding plane based on the reference straight line direction and the preset cutting direction; Determine, from the three-dimensional section plane, a first cross-sectional portion located in the two-dimensional unfolding plane and a second cross-sectional portion not located in the two-dimensional unfolding plane; Parameter information of the second cross-section is acquired from the three-dimensional building model, and the second cross-section is mapped to the two-dimensional unfolding plane based on the parameter information to form the two-dimensional unfolding view.
[0045] Furthermore, the expansion module 803 is further configured to: When the second cross-sectional portion is an arc-shaped structure, obtaining the curvature radius, arc length information and position information of the second cross-sectional portion from the three-dimensional building model; Inputting the curvature radius, arc length information and position information into a preset parametric unfolding algorithm to obtain a planar unfolded portion corresponding to the second cross-sectional portion; The planar unfolded portion is arranged in the two-dimensional unfolded plane, and together with the first cross-sectional portion, constitutes the two-dimensional unfolded view.
[0046] Example 3 This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Figure 9 As shown, the computer device 90 of this embodiment includes at least but not limited to: a memory 901 and a processor 902 that can be interconnected via a system bus. It should be noted that Figure 9 Computer device 90 is shown having only components 901 - 902 , but it is understood that implementing all of the illustrated components is not a requirement, and greater or fewer components may alternatively be implemented.
[0047] In this embodiment, memory 901 (i.e., a readable storage medium) includes flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, memory 901 may be an internal storage unit of computer device 90, such as the hard disk or internal memory of computer device 90. In other embodiments, memory 901 may also be an external storage device of computer device 90, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Of course, memory 901 may also include both internal storage units and external storage devices of computer device 90. In this embodiment, memory 901 is typically used to store the operating system and various application software installed on computer device 90. Furthermore, memory 901 may also be used to temporarily store various types of data that has been output or is about to be output.
[0048] In some embodiments, the processor 902 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 902 is generally used to control the overall operation of the computer device 90 .
[0049] Specifically, in this embodiment, the processor 902 is configured to execute a program of a method for generating an expanded view of a building model stored in the memory 901. When the program of the method for generating an expanded view of a building model is executed, the following steps are implemented: In response to a drawing instruction, drawing a non-linear cutting path on a preset view plane of the three-dimensional building model; Cutting the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The sectioning path is straightened to obtain a reference straight line direction, and the three-dimensional section surface is unfolded along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
[0050] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.
[0051] Example 4 This embodiment further provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App store, etc., on which a computer program is stored. When the computer program is executed by a processor, the following method steps are implemented: In response to a drawing instruction, drawing a non-linear cutting path on a preset view plane of the three-dimensional building model; Cutting the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The sectioning path is straightened to obtain a reference straight line direction, and the three-dimensional section surface is unfolded along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
[0052] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.
[0053] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0054] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0055] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0056] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for generating an expanded view of a building model, characterized in that: The method comprises: In response to a drawing instruction, drawing a non-linear cutting path on a preset view plane of the three-dimensional building model; Cutting the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The sectioning path is straightened to obtain a reference straight line direction, and the three-dimensional section surface is unfolded along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
2. The method for generating an expanded view of a building model according to claim 1, wherein: The step of drawing a non-linear cutting path on a preset view plane of the three-dimensional building model in response to the drawing instruction includes: In response to the drawing instruction, a plurality of route segments are drawn on a top-view surface of a three-dimensional building model having an arc-shaped structure; wherein the line segment types of the route segments include: straight line segments, arc segments, and broken line segments; Traverse each endpoint of each route segment in turn, and determine whether there are endpoints of other route segments within the set range of the currently traversed endpoint. If so, merge the currently traversed endpoint with the endpoints of other route segments until all endpoints of all route segments are traversed to obtain the cutting path.
3. The method for generating an expanded view of a building model according to claim 1, wherein: The straightening process of the sectioning path to obtain a reference straight line direction includes: The tangent direction at the starting point of the sectioning path or the straight line direction at the starting point of the sectioning path is set as the reference straight line direction.
4. The method for generating an expanded view of a building model according to claim 3, wherein: The step of unfolding the three-dimensional section surface along the reference straight line to obtain a two-dimensional unfolded view of the three-dimensional section surface includes: Constructing a two-dimensional unfolding plane based on the reference straight line direction and the preset cutting direction; Determine, from the three-dimensional section plane, a first cross-sectional portion located in the two-dimensional unfolding plane and a second cross-sectional portion not located in the two-dimensional unfolding plane; Parameter information of the second cross-section is acquired from the three-dimensional building model, and the second cross-section is mapped to the two-dimensional unfolding plane based on the parameter information to form the two-dimensional unfolding view.
5. The method for generating an expanded view of a building model according to claim 4, wherein: The step of acquiring parameter information of the second cross-sectional portion from the three-dimensional building model and mapping the second cross-sectional portion to the two-dimensional unfolding plane based on the parameter information to form the two-dimensional unfolding view includes: When the second cross-sectional portion is an arc-shaped structure, obtaining the curvature radius, arc length information and position information of the second cross-sectional portion from the three-dimensional building model; Inputting the curvature radius, arc length information and position information into a preset parametric unfolding algorithm to obtain a planar unfolded portion corresponding to the second cross-sectional portion; The planar unfolded portion is arranged in the two-dimensional unfolded plane, and together with the first cross-sectional portion, constitutes the two-dimensional unfolded view.
6. A device for generating an expanded view of a building model, characterized in that: The device comprises: A drawing module, configured to draw a non-linear cutting path on a preset view plane of the three-dimensional building model in response to a drawing instruction; a cutting module, configured to cut the three-dimensional building model along the cutting path and in a preset cutting direction to obtain a three-dimensional cutting surface of the three-dimensional building model corresponding to the cutting path; The unfolding module is used to straighten the section path to obtain a reference straight line direction, and unfold the three-dimensional section surface along the reference straight line direction to obtain a two-dimensional unfolded view of the three-dimensional section surface.
7. The device for generating an expanded view of a building model according to claim 6, characterized in that: The drawing module is used to: In response to the drawing instruction, a plurality of route segments are drawn on a top-view surface of a three-dimensional building model having an arc-shaped structure; wherein the line segment types of the route segments include: straight line segments, arc segments, and broken line segments; Traverse each endpoint of each route segment in turn, and determine whether there are endpoints of other route segments within the set range of the currently traversed endpoint. If so, merge the currently traversed endpoint with the endpoints of other route segments until all endpoints of all route segments are traversed to obtain the cutting path.
8. The device for generating an expanded view of a building model according to claim 6, wherein: The device further comprises: A determination module is used to set the tangent direction at the starting point of the sectioning path or the straight line direction at the starting point of the sectioning path as the reference straight line direction.
9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, 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.