CN113255038B - Roof modeling method and system based on straight framework - Google Patents

Roof modeling method and system based on straight framework Download PDF

Info

Publication number
CN113255038B
CN113255038B CN202110558780.1A CN202110558780A CN113255038B CN 113255038 B CN113255038 B CN 113255038B CN 202110558780 A CN202110558780 A CN 202110558780A CN 113255038 B CN113255038 B CN 113255038B
Authority
CN
China
Prior art keywords
trace
straight
edge
roof
top surface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110558780.1A
Other languages
Chinese (zh)
Other versions
CN113255038A (en
Inventor
袁佳浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qunhe Information Technology Co Ltd
Original Assignee
Hangzhou Qunhe Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Qunhe Information Technology Co Ltd filed Critical Hangzhou Qunhe Information Technology Co Ltd
Priority to CN202110558780.1A priority Critical patent/CN113255038B/en
Publication of CN113255038A publication Critical patent/CN113255038A/en
Application granted granted Critical
Publication of CN113255038B publication Critical patent/CN113255038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B10/00Integration of renewable energy sources in buildings
    • Y02B10/10Photovoltaic [PV]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Architecture (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Roof Covering Using Slabs Or Stiff Sheets (AREA)

Abstract

The invention discloses a roof modeling method and a system based on a straight framework, wherein the method comprises the following steps: acquiring an original trace for the modeling, and generating a top surface trace and a bottom surface trace of the roof according to the eave structure and the original trace; generating a top surface straight skeleton and a bottom surface straight skeleton based on the top surface trace and the bottom surface trace; optimizing and adjusting the positions of the gable walls of the top straight framework and the bottom straight framework; generating a top surface by using the top surface straight framework and the top surface trace, and generating a bottom surface by using the bottom surface straight framework and the bottom surface trace; creating a side surface between the top surface and the bottom surface; if the eave structure is vertical or horizontal, performing Boolean reduction operation on an area defined by the top surface trace and the bottom surface trace to obtain a 2D complementary surface, and mapping the 2D complementary surface to the top surface and the bottom surface to obtain a 3D complementary surface; and combining the obtained top surface, bottom surface, side surface and 3D supplementary surface into a closed shell to serve as a roof body. The invention can generate roof bodies with uniform thickness and small error aiming at various roof slopes, gable walls and the like.

Description

Roof modeling method and system based on straight framework
Technical Field
The invention belongs to the technical field of building design, and particularly relates to a roof modeling method and system based on a straight framework.
Background
The roof design is an important ring in building design, in building design software, original data of automatic roof construction is a group of continuous edges with slopes, called traces, the traces are translated along the respective slopes to form a slope of the roof, a set of line segments formed by intersecting all roof surfaces is called a straight skeleton, as shown in fig. 1, a rectangle at the outermost circle is the trace, and a rectangle inside the trace is the straight skeleton.
Although the definition of the straight skeleton is generated by the intersection of the surfaces, in the roof modeling, the straight skeleton is actually generated through an algorithm according to a 2D trace, and then a roof body with the thickness is generated according to the trace and the straight skeleton, so that the roof modeling is completed.
At present, in roof generation, most of the roof generation is only described on roof straight framework generation, and the research on the modeling is less. Meanwhile, in the disclosed building method, only the bottom surface of the roof is directly and upwardly offset, and then the upper surface and the lower surface are sewn together, which cannot achieve the same thickness under the condition of different slopes, as shown in fig. 2, the thicknesses of the roof are different after trace edges with different slopes are upwardly offset. In addition, in the processing of the gable (at an angle of 90 degrees), a roof body is simply generated by generating a straight skeleton at an approximate angle of 89.99 degrees, but there is a certain error in this manner.
At present, with the continuous development of a 3D printing technology, the 3D printing technology is continuously introduced in the field of construction to visually show architectural design effects for customers, but the situation that a software design drawing does not conform to actual building construction exists, so that an architectural model obtained by 3D printing based on the software design drawing is also different from an actual building, and the experience of the customers is seriously influenced.
Disclosure of Invention
The invention aims to provide a roof modeling method and system based on a straight framework, which can generate roof bodies with uniform thickness and small errors aiming at various roof slopes, gable walls and the like.
In order to realize the purpose, the technical scheme adopted by the invention is as follows:
a straight-skeleton-based roofing method, the straight-skeleton-based roofing method comprising:
step 1, obtaining an original trace for a model, and generating a top surface trace and a bottom surface trace of a roof according to an eave structure and the original trace, wherein the method comprises the following steps:
if the eave structure is vertical, taking the original trace as a top surface trace for generating a roof top surface straight framework, horizontally offsetting each trace edge by taking the top surface trace as a basis and combining the roof thickness, and obtaining a new closed trace according to the offset trace edges as a bottom surface trace for generating a roof bottom surface straight framework;
if the eave structure is horizontal, taking the original trace as a top surface trace for generating a straight skeleton of the top surface of the roof, horizontally offsetting each trace edge by taking the top surface trace as a basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as a bottom surface trace for generating the straight skeleton of the bottom surface of the roof;
if the eave structure is orthogonal, taking the original trace as a bottom surface trace for generating a straight framework of the bottom surface of the roof, horizontally offsetting each trace edge by taking the bottom surface trace as a basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as a top surface trace for generating the straight framework of the top surface of the roof;
step 2, generating a top surface straight framework and a bottom surface straight framework based on the top surface trace and the bottom surface trace;
step 3, judging whether the original trace contains a gable or not, and directly entering the next step if the original trace does not contain the gable; otherwise, optimally adjusting the positions of the gable walls of the top straight framework and the bottom straight framework;
step 4, generating a top surface by using the top surface straight framework and the top surface trace, and generating a bottom surface by using the bottom surface straight framework and the bottom surface trace;
step 5, generating a side surface between the top surface and the bottom surface;
step 6, if the eave structure is vertical or horizontal, performing Boolean reduction operation on an area defined by the top surface trace and the bottom surface trace to obtain a 2D complementary surface, and mapping the 2D complementary surface to the top surface and the bottom surface to obtain a 3D complementary surface;
and 7, combining the obtained top surface, bottom surface, side surface and 3D complementary surface into a closed shell as a roof body.
Several alternatives are provided below, but not as an additional limitation to the above general solution, but merely as a further addition or preference, each alternative may be combined individually for the above general solution or between several alternatives without technical or logical contradictions.
Preferably, if the eave structure is vertical, taking the original trace as a top surface trace for generating a straight framework of the top surface of the roof, and horizontally offsetting each trace edge by taking the top surface trace as a basis and combining the thickness of the roof, the method includes:
traversing the top surface trace to obtain the slope theta of the trace edge with the minimum slope in the top surface trace;
let the roof thickness be t, the distance h of upward deviation when generating the top surface be t/cos theta;
traversing each trace edge in the top trace, if the slope of the trace edge is α, then the offset distance offset of the horizontal offset of the current trace edge is (t/sin α) - (h/tan α);
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge inwards by offset; if the currently traversed trace is an inner loop trace, the trace edge is shifted horizontally outward by offset.
Preferably, if the eave structure is horizontal, taking the original trace as a top surface trace for generating a straight framework of the top surface of the roof, and horizontally offsetting each trace edge by combining the thickness of the roof based on the top surface trace, the method includes:
let the roof thickness be t;
traversing each trace edge in the top trace, wherein if the slope of the trace edge is α, the offset distance offset of the horizontal offset of the current trace edge is t/sin α;
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge inwards by offset; if the currently traversed trace is an inner loop trace, the trace edge is shifted horizontally outward by offset.
Preferably, if the eave structure is orthogonal, the method of using the original trace as a bottom trace for generating a straight skeleton of the bottom of the roof and horizontally offsetting each trace edge by combining the thickness of the roof based on the bottom trace comprises:
let the roof thickness be t;
traversing each trace edge in the bottom trace, if the slope of the trace edge is α, then the offset distance offset of the horizontal offset of the current trace edge is offset-t × sin α, and the distance h of the upward offset of the slope where the trace edge is located when the top surface is generated is h-t × cos α;
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge outwards by offset; if the currently traversed trace is an inner loop trace, then the trace edge is shifted horizontally inward by offset.
Preferably, if the original trace includes a gable represented by an independent trace edge, the optimally adjusting the gable positions of the top straight skeleton and the bottom straight skeleton includes:
determining a trace edge with a slope of 90 degrees in the original trace;
taking a minimum closed loop comprising the trace edge and the nearest straight skeleton point;
traversing straight framework points in the minimum closed loop, and taking straight framework edges which are not in the minimum closed loop and take the straight framework points obtained by traversal as end points in the straight framework;
and extending the obtained straight skeleton edge, and replacing the traversed straight skeleton point with an intersection point intersected with the trace edge with the gradient of 90 degrees after extension to serve as a new straight skeleton point.
Preferably, if the original trace includes a gable represented by an adjacent trace edge, the optimally adjusting the gable positions of the top straight skeleton and the bottom straight skeleton includes:
determining two adjacent trace edges with the gradient of 90 degrees in the original trace;
taking two minimum closed rings which respectively comprise one trace edge of two adjacent trace edges and a straight framework point closest to the corresponding trace edge;
traversing straight framework points in the two minimum closed rings, and taking a straight framework edge which is in the straight framework and takes the straight framework point obtained by traversal as an end point, belongs to the minimum closed ring, and is simultaneously intersected with two adjacent trace edges with the gradient of 90 degrees;
if the consistent straight skeleton edge can be obtained, replacing the straight skeleton point obtained by traversal with the trace point of the intersection of two adjacent trace edges with the gradient of 90 degrees as a new straight skeleton point; and if the consistent straight skeleton edge cannot be acquired, taking the straight skeleton edge which is not the minimum closed loop and takes the straight skeleton point obtained by traversal in the straight skeleton as an end point, extending the acquired straight skeleton edge, and taking a first intersection point which is intersected with the trace edge with the gradient of 90 degrees after extension to replace the straight skeleton point obtained by traversal as a new straight skeleton point.
Preferably, the generating the side surface between the top surface and the bottom surface includes:
if the gable wall is included in the original trace, connecting corresponding trace edges in the top surface and the bottom surface by a horizontal or vertical or orthogonal line segment according to the eave structure;
if the gable wall is not included in the original trace, if the eave structure is vertical, connecting each trace edge in the top surface with the corresponding trace edge in the bottom surface by using a vertical line segment to generate a side surface; if the eave structure is horizontal, no side face needs to be generated; if the eave structure is orthogonal, each trace edge in the top surface and the corresponding trace edge in the bottom surface are connected by a line segment perpendicular to the two trace edges to generate a side surface.
The invention also provides a roof modeling system based on the straight skeleton, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the roof modeling method based on the straight skeleton when executing the computer program.
According to the method and the system for building the roof based on the straight framework, the trace edge is shifted, and the shifted trace edge is used as the top trace or the bottom trace, so that the problem that the thicknesses of the roofs generated by different slopes of the traces are different is solved; and the gable wall in the straight framework is adjusted, so that the conditions of the gable wall and different slopes can be correctly processed, and the roof body with uniform thickness and small error is obtained.
Drawings
FIG. 1 is a schematic diagram of a prior art trace and straight backbone;
FIG. 2 is a schematic view of a prior art roof top surface formed by directly upwardly offsetting the underside of the roof;
FIG. 3 is a schematic diagram of three structures of a vertical, horizontal and orthogonal roof structure;
FIG. 4 is a flow chart of the method of the present invention for building a roof based on a straight skeleton;
FIG. 5 is a schematic illustration of the invention with trace edge offset for a vertical eave structure;
FIG. 6 is a schematic diagram of the present invention for trace edge offset for a horizontal eave structure;
FIG. 7 is a schematic diagram of trace edge shifting for an orthogonal eave structure according to the present invention;
FIG. 8 is a schematic diagram of a straight skeleton obtained by approximating a gable wall in the prior art;
FIG. 9 is a schematic view of the straight frame of FIG. 9 after the gable optimization of the straight frame;
FIG. 10 is a schematic view of a vertical line segment joining a top surface comprising a gable to a bottom surface when creating a side surface according to the present invention;
FIG. 11 is a schematic view of the present invention showing a vertical line segment connecting top and bottom surfaces without gable wall when creating a side surface;
FIG. 12 is a schematic view of the roof body of the present invention after the facing of FIG. 10 has been performed;
FIG. 13 is a schematic view of one embodiment of the resulting roof body under the horizontal eave structure of the present invention;
FIG. 14 is a schematic view of one embodiment of a gable-containing roof body produced by the present invention;
fig. 15 is a schematic view of an embodiment of a final roof body obtained under the horizontal eave structure of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
In the present invention, including the conventional definition and nomenclature of roof construction, there is a common set of sloped continuous edges called traces used to construct roofs, each continuous edge in a trace is called a trace edge, and the end points of the trace edges are called trace points.
The trace edges include geometric line segments, angles, unique designations (which may be considered as ids), and start and end points. The traces in a roof body may be divided into outer ring traces and inner ring traces, with the outer ring traces having one and only one, and the inner ring traces may have none, one or more, depending on the roof body configuration. The outer ring trace can be understood as an outer contour, and the inner ring trace can be understood as an inner contour formed by hollowing out the inner part.
The slope surfaces of the roof are formed by the slope translation of the trace edges, a set of line segments is formed by the intersection of all the slope surfaces and is called a straight skeleton, each line segment in the straight skeleton is called a straight skeleton edge, and the end points of the straight skeleton edges are called straight skeleton points.
That is, the straight skeleton is composed of a group of straight skeleton sides and straight skeleton points, and the set of straight skeleton points is the end point set of the straight skeleton sides. The straight skeleton edge is made up of an array of refTraceCurve geometric line segments, start points, end points, and two related trace edges. The roof slope corresponding to the trace side in the array will necessarily include this straight skeleton side, i.e. the relevant trace side should be understood as the trace side present in the fracture plane in which the straight skeleton side is located.
In one embodiment, a roof modeling method based on a straight framework is provided, which supports three vertical, horizontal and orthogonal eave structures and multiple types of roof slopes such as a plane and a spherical surface shown in fig. 3, and can correctly process the situations of gable walls and different slopes.
As shown in fig. 4, the method for constructing a roof based on a straight skeleton according to the present embodiment includes the following steps:
step 1, obtaining an original trace for the modeling, and generating a top surface trace and a bottom surface trace of the roof according to the eave structure and the original trace.
The roofing method of the present embodiment is discussed with reference to the plane of the bottom surface trace of the roof as the reference plane, and therefore, the roof is considered to be offset upward from the reference plane when the roof top surface is generated. In the prior art, a uniform upward offset mode is adopted for generating a top surface for the trace edges with different slopes, but in order to overcome the problem of inconsistent roof thickness caused by the single offset, the original trace is offset, and the top surface trace and the bottom surface trace are obtained according to the offset trace, so that a roof body with consistent thickness is obtained for the trace edges with different slopes.
Note that, if the slopes in the original traces are all the same, the offset amount of each trace when the roof body is generated by the method of the present invention is 0, which means that the offset operation is not necessary.
Specifically, the top surface trace and the bottom surface trace are generated in the following manner in this embodiment:
case 1), if the eave structure is vertical, taking the original trace as a top trace for generating a straight skeleton of the top surface of the roof, horizontally offsetting each trace edge by taking the top trace as a basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as a bottom trace for generating the straight skeleton of the bottom surface of the roof.
Specifically, as shown in fig. 5, the specific offset is calculated under the vertical eave structure as follows:
traversing the top surface trace to obtain the slope theta of the trace edge with the minimum slope in the top surface trace;
let the roof thickness be t, the distance h of upward deviation when generating the top surface be t/cos theta;
traversing each trace edge in the top trace, if the slope of the trace edge is α, then the offset distance offset of the horizontal offset of the current trace edge is (t/sin α) - (h/tan α);
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge inwards by offset; if the currently traversed trace is an inner loop trace, the trace edge is shifted horizontally outward by offset.
Case 2), if the eave structure is horizontal, the original trace is used as a top trace for generating a straight framework of the top surface of the roof, each trace edge is horizontally offset by taking the top trace as a basis and combining the thickness of the roof, and a new closed trace is obtained according to the offset trace edges and used as a bottom trace for generating the straight framework of the bottom surface of the roof.
Specifically, as shown in fig. 6, the specific offset is calculated under the horizontal eave structure as follows:
let the roof thickness be t;
traversing each trace edge in the top trace, wherein if the slope of the trace edge is α, the offset distance offset of the horizontal offset of the current trace edge is t/sin α;
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge inwards by offset; if the currently traversed trace is an inner loop trace, the trace edge is shifted horizontally outward by offset.
Case 3), if the eave structure is orthogonal, taking the original trace as the bottom trace for generating the straight skeleton of the bottom surface of the roof, horizontally offsetting each trace edge by taking the bottom trace as the basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as the top trace for generating the straight skeleton of the top surface of the roof.
Specifically, as shown in fig. 7, the specific offset is calculated under the orthogonal eave structure as follows:
let the roof thickness be t;
traversing each trace edge in the bottom trace, if the slope of the trace edge is α, then the offset distance offset of the horizontal offset of the current trace edge is offset-t sin α, and the distance h of the upward offset of the slope where the trace edge is located when the top surface is generated is h-t cos α;
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge outwards by offset; if the currently traversed trace is an inner loop trace, then the trace edge is shifted horizontally inward by offset.
It should be noted that obtaining a new closed trace according to the shifted trace edge is understood to obtain an intersection point between two consecutive trace edges according to a straight line where the shifted trace edge is located, thereby forming a closed loop as a trace.
And 2, generating a top surface straight framework and a bottom surface straight framework based on the top surface trace and the bottom surface trace.
It should be noted that the process of generating a straight skeleton from a trace is not a focus of the discussion of the present invention, and the straight skeleton may be generated by using an existing method.
Step 3, judging whether the original trace contains a gable or not, and directly entering the next step if the original trace does not contain the gable; otherwise, optimizing and adjusting the positions of the gable walls of the top straight framework and the bottom straight framework.
The straight skeleton corresponding to the gable is a trace side with a slope of 90 degrees, and because the tan value of the slope is used when the straight skeleton is generated, 89.99-degree approximation processing is performed on the condition of the gable, and the straight skeleton obtained after the approximation processing is shown in fig. 8. The slope of trace edge h is 90 degrees, and straight frame points E and F on the formed ring CDEF are very close to trace edge h, but have errors.
Case 1), if the original trace contains a gable represented by an independent trace edge (if only the slope of the trace edge h is 90 degrees as shown in fig. 8), optimally adjusting the gable positions of the top straight framework and the bottom straight framework, comprising the following steps:
determining a trace edge with a slope of 90 degrees in the original trace;
taking the smallest closed loop (e.g., closed loop CDEF) that includes the trace edge and the nearest straight skeleton point (e.g., straight skeleton point E, F);
traversing a straight skeleton point in the minimum closed loop, and taking a straight skeleton side (for example, a straight skeleton side j is obtained for the straight skeleton point E) which takes the traversed straight skeleton point as an end point but does not belong to the minimum closed loop in the straight skeleton;
and extending the obtained straight skeleton edge, and replacing the traversed straight skeleton point with an intersection point intersected with the trace edge with the gradient of 90 degrees after extension to serve as a new straight skeleton point.
That is, in the case where the gable is the trace side h, it is necessary to perform error adjustment on the straight frame points E and F, as illustrated in fig. 8. Traversing all straight framework points on the ring CDEF, such as the straight framework point E, acquiring a straight framework side j which takes the straight framework point E as an end point and is not in the ring CDEF, prolonging the straight framework side j, and acquiring an intersection point G with the trace side h as a new straight framework point to replace the straight framework point E. And processing the straight framework point F to obtain a new straight framework point H to replace the straight framework point F in the same way. The adjusted and optimized straight framework is shown in fig. 9, the obtained straight framework has no error in gable approximation, and the generated roof body is more practical.
Case 2), if the original trace contains a gable represented by an adjacent trace edge (if the slopes of the trace edge h and the trace edge i are both 90 degrees as shown in fig. 8), optimally adjusting the gable positions of the top straight framework and the bottom straight framework, comprising the following steps:
determining two adjacent trace edges with the gradient of 90 degrees in the original trace;
taking two smallest closed loops (e.g., closed loop ADE and closed loop CDEF) each comprising one of two adjacent trace edges and the straight skeleton point to which the corresponding trace edge is closest;
traversing straight skeleton points (such as straight skeleton point E, F) in the two minimum closed rings, and taking a straight skeleton edge (such as a straight skeleton edge k) which belongs to the minimum closed ring and is simultaneously intersected with two adjacent trace edges with the gradient of 90 degrees in a straight skeleton by taking the traversed straight skeleton point as an end point;
if a consistent straight skeleton edge can be obtained (for example, a straight skeleton edge k obtained by corresponding to a straight skeleton point E), replacing a straight skeleton point obtained by traversal with a trace point of which two adjacent trace edges with the gradient of 90 degrees are intersected as a new straight skeleton point (namely, replacing the straight skeleton point E with a trace point D); if the corresponding straight skeleton side cannot be acquired (for example, the straight skeleton point F cannot acquire the corresponding straight skeleton side), the straight skeleton side (for example, the straight skeleton side BF) which is not belonging to the minimum closed loop and uses the straight skeleton point (for example, the straight skeleton point F) obtained through traversal in the straight skeleton is taken, the acquired straight skeleton side is extended, and the straight skeleton point obtained through traversal is replaced by the first intersection point which is intersected with the trace side with the gradient of 90 degrees after extension to serve as a new straight skeleton point (for example, the straight skeleton point H shown in fig. 9 replaces the straight skeleton point F).
Step 4, generating a top surface by using the top surface straight framework and the top surface trace, and generating a bottom surface by using the bottom surface straight framework and the bottom surface trace;
in the generation of the top surface and the bottom surface, the generation logics of the top surface and the bottom surface are similar, and the difference between the generation logics is that the straight frameworks used by the top surface and the bottom surface are different, the vertical eave structure and the orthogonal eave structure are upwardly offset by a distance h when the top surface is generated, and the horizontal eave structure is not upwardly offset when the top surface is generated.
When the top surface or the bottom surface is generated, a plane where a bottom surface trace is located is taken as a reference plane (since the bottom surface trace and the top surface trace only have horizontal offset, the plane where the bottom surface trace is located is the plane where the top surface trace is located), and a three-dimensional coordinate system is established, wherein an X axis and a Y axis in the three-dimensional coordinate system are located in the reference plane, and a Z axis is perpendicular to the reference plane, so that each trace point and a straight skeleton point of a roof located in the three-dimensional coordinate system have corresponding coordinates, since the trace and the straight skeleton are both 2D in an original state, i.e., the Z axis coordinates of the trace point and the straight skeleton point are both 0, and the top surface and the bottom surface are 3D, the main point for generating the top surface and the bottom surface is that the Z axis coordinates of each straight skeleton point are obtained through calculation.
For each straight skeleton point, traversing the straight skeleton edge taking the straight skeleton point as an end point, finding a trace edge related to the straight skeleton edge, and calculating the distance dis between the straight skeleton point and the found trace edge, wherein the Z-axis coordinate of the straight skeleton point is dis tan (angle), and the angle is the gradient of the found trace edge. And writing the calculated Z-axis coordinate in the original 2D state of the straight skeleton point to obtain a 3D coordinate corresponding to the straight skeleton point, namely converting the 2D straight skeleton into a 3D straight skeleton.
It is easy to understand that one straight skeleton point corresponds to one or more straight skeleton edges, and one straight skeleton edge corresponds to two related trace edges, so when the trace edge corresponding to the straight skeleton point is selected, any one straight skeleton edge corresponding to the straight skeleton point is taken, and any one related trace edge corresponding to the straight skeleton edge is taken to perform Z-axis coordinate calculation, and the calculated Z-axis coordinates are the same.
For the sake of understanding, fig. 8 is taken as an example to clarify two trace edges related to the straight skeleton edge, and the two related trace edges are understood as trace edges existing in a plane where the straight skeleton edge is located, for example, a straight skeleton edge j in fig. 8, and a slope surface ADE and a slope surface AEFB (after a straight skeleton point has a Z-axis coordinate, the slope surface is a 3D surface) are located on a slope surface where the trace edge existing in the slope surface ADE is a trace edge i and the trace edge existing in the surface AEFB is a trace edge f, so that two related trace edges of the straight skeleton edge j are the trace edge i and the trace edge f.
After the 2D straight skeleton is converted into the 3D straight skeleton, searching each trace edge for a ring in a mode of searching a group of edges which are connected with each other in the straight skeleton edges and contain the trace edge for forming a ring. For this ring, one plane can be generated since it is in one plane, and different planes can be generated according to the input plane type (plane, spherical, etc.). The resulting faces of all trace edges are merged into one Shell (Shell), i.e. the top or bottom face is obtained.
It is easily understood that the straight skeleton used in generating the top and bottom surfaces is a gable optimized straight skeleton. And default to the generation of the top surface is that all the surfaces are combined into one shell, then the shell is offset according to the upward offset distance h calculated in the step 1 to be used as a final top surface, the obtained shell is moved upward by the distance h in a specific vertical condition, each surface (slope surface) in the obtained shell is moved upward according to the upward movement distance h corresponding to the trace edge of the surface in an orthogonal condition, and a new shell is generated to be used as the top surface by taking a new intersection line of all the surfaces after all the surfaces are moved upward.
And 5, generating a side surface between the top surface and the bottom surface.
A side surface is understood to be a surface that establishes a relationship between the top and bottom surfaces for closing a gap between the top and bottom surfaces. In this embodiment, discussion is performed on a gable and a non-gable respectively to ensure accuracy of the generated side surface:
case 1), if the gable is included in the original trace, the corresponding trace edges in the top and bottom surfaces are connected by horizontal or vertical or orthogonal line segments, depending on the eave structure. A schematic view of a top and bottom surface comprising gable walls connected in vertical line segments is shown in fig. 10.
It should be noted that, because the trace offset is performed when the top surface trace or the bottom surface trace is generated, when the vertical line segment is used for connection in the vertical condition, the end point of the trace edge of the top surface extends downward to the horizontal plane where the corresponding trace edge of the bottom surface is located, if the trace edge has an offset, a horizontal gap exists between the added vertical line segment and the bottom surface (as shown in the lower left corner of fig. 10), and if the trace edge does not have an offset, a horizontal gap does not exist between the added vertical line segment and the bottom surface (as shown in the lower right corner of fig. 10).
Case 2), if the gable is not included in the original trace, if the eave structure is vertical, connecting each trace edge in the top surface with the corresponding trace edge in the bottom surface by using a vertical line segment to generate a side surface; if the eave structure is horizontal, no side face needs to be generated; if the eave structure is orthogonal, each trace edge in the top surface and the corresponding trace edge in the bottom surface are connected by a line segment perpendicular to the two trace edges to generate a side surface.
A schematic view of connecting top and bottom surfaces without gable walls in vertical line segments is shown in fig. 11. Similarly, where the roof structure is vertical, the vertical sections may have the same horizontal spacing as the horizontal spacing comprising the gable after joining, depending on whether the trace edges are offset.
It is easy to understand that the surface is composed of lines, and a line segment added when generating the side surface is combined with a corresponding trace edge or straight skeleton edge to obtain a surface (when a horizontal gap exists, the line segment is combined with an intersection line of the horizontal gap to obtain a surface), so the line segment added can be two line segments led out from two end points of the trace edge or straight skeleton edge, or a plurality of parallel line segments can be added on the basis of the two line segments.
And 6, if the eave structure is vertical or horizontal, performing Boolean reduction operation on an area defined by the top surface trace and the bottom surface trace to obtain a 2D complementary surface, and mapping the 2D complementary surface to the top surface and the bottom surface to obtain a 3D complementary surface.
Since the side face is not generated for the horizontal eave structure not including the gable when generating the side face, in this case, there is a horizontal face that needs to be supplemented; meanwhile, when the vertical eave structure generates a side face, a face needing to be supplemented horizontally, namely a horizontal gap, exists due to the deviation of the trace edge. It is therefore necessary to supplement the faces in both cases in order to meet the closure requirements of the roof body.
Because the faces to be supplemented cannot be accurately positioned by supplementing the faces directly based on the top face and the bottom face of 3D, in the embodiment, the supplemented faces are obtained based on 2D, and then the 2D supplemented faces are mapped to a three-dimensional coordinate system to complete 3D face supplementation.
Taking fig. 10 as an example, the surface supplementing operation is performed, the boolean subtraction operation obtains a horizontal gap position where the 2D surface is the lower left corner in fig. 10, since the trace point and the straight skeleton point both have specific coordinates in the three-dimensional coordinate system, the position information of the 2D surface can be determined, the Z-axis coordinate is filled in the position information of the 2D surface to obtain a 3D surface, and the surface supplementing (actually, a horizontal line segment that can be regarded as a supplementing end point) is performed on the position of the 3D surface to obtain a schematic diagram after the surface is supplemented as in fig. 12.
And 7, combining the obtained top surface, bottom surface, side surface and 3D complementary surface into a closed shell as a roof body. The thickness of the finally generated roof body is uniform, the condition of the gable can be well processed, and the error of the straight framework under the condition of the gable is eliminated. The obtained roof body is shown in fig. 13-15, fig. 13 is a final roof body obtained under a horizontal eave structure, and fig. 14 is a roof body including a gable wall; fig. 15 shows the resulting roof body under an upright eave configuration with an inner circular trace (not shown) in the central depression. The roof body produced by the invention has uniform thickness and small error.
The roof modeling method based on the straight framework disclosed by the embodiment overcomes the problem that the thicknesses of roofs generated by different trace slopes are different, and can correctly process the conditions of gable walls and different slopes to obtain a roof body with uniform thickness and small error, so that an accurate software design drawing is output. The method has good application prospect in the fields of building design, 3D printing of buildings, actual model display (such as building sales display and building restoration) based on software design drawings and the like.
In another embodiment, a straight-skeleton based roof construction system is provided, i.e. a computer device, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities.
The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of rooftop construction based on a straight skeleton. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (8)

1. A roof modeling method based on a straight skeleton is characterized by comprising the following steps:
step 1, obtaining an original trace for a model, and generating a top surface trace and a bottom surface trace of a roof according to an eave structure and the original trace, wherein the method comprises the following steps:
if the eave structure is vertical, taking the original trace as a top surface trace for generating a straight skeleton of the top surface of the roof, horizontally offsetting each trace edge by taking the top surface trace as a basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as a bottom surface trace for generating a straight skeleton of the bottom surface of the roof;
if the eave structure is horizontal, taking the original trace as a top surface trace for generating a straight skeleton of the top surface of the roof, horizontally offsetting each trace edge by taking the top surface trace as a basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as a bottom surface trace for generating the straight skeleton of the bottom surface of the roof;
if the eave structure is orthogonal, taking the original trace as a bottom surface trace for generating a straight framework of the bottom surface of the roof, horizontally offsetting each trace edge by taking the bottom surface trace as a basis and combining the thickness of the roof, and obtaining a new closed trace according to the offset trace edges as a top surface trace for generating the straight framework of the top surface of the roof;
step 2, generating a top surface straight framework and a bottom surface straight framework based on the top surface trace and the bottom surface trace;
step 3, judging whether the original trace contains a gable or not, and directly entering the next step if the original trace does not contain the gable; otherwise, optimally adjusting the positions of the gable walls of the top straight framework and the bottom straight framework;
step 4, generating a top surface by using the top surface straight framework and the top surface trace line, and generating a bottom surface by using the bottom surface straight framework and the bottom surface trace line;
step 5, generating a side surface between the top surface and the bottom surface;
step 6, if the eave structure is vertical or horizontal, performing Boolean reduction operation on an area defined by the top surface trace and the bottom surface trace to obtain a 2D complementary surface, and mapping the 2D complementary surface to the top surface and the bottom surface to obtain a 3D complementary surface;
and 7, combining the obtained top surface, bottom surface, side surface and 3D complementary surface into a closed shell as a roof body.
2. The method of claim 1, wherein if the eave structure is vertical, using the original trace as a top trace for generating a straight skeleton of the top surface of the roof, and horizontally offsetting each trace edge based on the top trace in combination with the thickness of the roof, comprises:
traversing the top surface trace to obtain the slope theta of the trace edge with the minimum slope in the top surface trace;
let the roof thickness be t, the distance h of upward deviation when generating the top surface be t/cos theta;
traversing each trace edge in the top trace, if the slope of the trace edge is α, then the offset distance offset of the horizontal offset of the current trace edge is (t/sin α) - (h/tan α);
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge inwards by offset; if the currently traversed trace is an inner loop trace, the trace edge is shifted horizontally outward by offset.
3. The method of claim 1, wherein if the eave structure is horizontal, using the original trace as a top trace for generating a straight skeleton of the top surface of the roof, and horizontally offsetting each trace edge based on the top trace in combination with the thickness of the roof, comprises:
let the roof thickness be t;
traversing each trace edge in the top trace, wherein if the slope of the trace edge is α, the offset distance offset of the horizontal offset of the current trace edge is t/sin α;
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge inwards by offset; if the currently traversed trace is an inner loop trace, the trace edge is shifted horizontally outward by offset.
4. The method of claim 1, wherein if the eave structures are orthogonal, using the original trace as a bottom trace for generating a straight skeleton of the bottom of the roof, and horizontally offsetting each trace edge based on the bottom trace in combination with the thickness of the roof, comprises:
let the roof thickness be t;
traversing each trace edge in the bottom trace, if the slope of the trace edge is α, then the offset distance offset of the horizontal offset of the current trace edge is offset-t × sin α, and the distance h of the upward offset of the slope where the trace edge is located when the top surface is generated is h-t × cos α;
if the trace traversed currently is an outer loop trace, horizontally shifting the trace edge outwards by offset; if the currently traversed trace is an inner loop trace, then the trace edge is shifted horizontally inward by offset.
5. The method for constructing a straight-skeleton-based roof according to claim 1, wherein if the original trace includes a gable represented by an independent trace edge, the optimally adjusting the gable positions of the top straight skeleton and the bottom straight skeleton comprises:
determining a trace edge with a slope of 90 degrees in the original trace;
taking a minimum closed loop comprising the trace edge and the nearest straight skeleton point;
traversing straight framework points in the minimum closed loop, and taking straight framework edges which are not in the minimum closed loop and take the straight framework points obtained by traversal as end points in the straight framework;
and extending the obtained straight skeleton edge, and replacing the traversed straight skeleton point with an intersection point intersected with the trace edge with the gradient of 90 degrees after extension to serve as a new straight skeleton point.
6. The method for constructing a straight-skeleton-based roof according to claim 1, wherein if the original trace includes a gable represented by an adjacent trace edge, the optimally adjusting the gable positions of the top straight skeleton and the bottom straight skeleton comprises:
determining two adjacent trace edges with the gradient of 90 degrees in the original trace;
taking two minimum closed rings which respectively comprise one trace edge of two adjacent trace edges and a straight framework point closest to the corresponding trace edge;
traversing straight framework points in the two minimum closed rings, and taking a straight framework edge which is in the straight framework and takes the straight framework point obtained by traversal as an end point, belongs to the minimum closed ring, and is simultaneously intersected with two adjacent trace edges with the gradient of 90 degrees;
if the consistent straight skeleton edge can be obtained, replacing the straight skeleton point obtained by traversal with the trace point of the intersection of two adjacent trace edges with the gradient of 90 degrees as a new straight skeleton point; and if the consistent straight skeleton edge cannot be acquired, taking the straight skeleton edge which is not the minimum closed loop and takes the straight skeleton point obtained by traversal in the straight skeleton as an end point, extending the acquired straight skeleton edge, and taking a first intersection point which is intersected with the trace edge with the gradient of 90 degrees after extension to replace the straight skeleton point obtained by traversal as a new straight skeleton point.
7. The method of claim 1, wherein creating a side surface between the top surface and the bottom surface comprises:
if the gable wall is included in the original trace, connecting corresponding trace edges in the top surface and the bottom surface by a horizontal or vertical or orthogonal line segment according to the eave structure;
if the gable wall is not included in the original trace, if the eave structure is vertical, connecting each trace edge in the top surface with the corresponding trace edge in the bottom surface by using a vertical line segment to generate a side surface; if the eave structure is horizontal, no side face needs to be generated; if the eave structure is orthogonal, each trace edge in the top surface and the corresponding trace edge in the bottom surface are connected by a line segment perpendicular to the two trace edges to generate a side surface.
8. A straightframe-based roofing system comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the straightframe-based roofing method according to any one of claims 1 to 7.
CN202110558780.1A 2021-05-21 2021-05-21 Roof modeling method and system based on straight framework Active CN113255038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110558780.1A CN113255038B (en) 2021-05-21 2021-05-21 Roof modeling method and system based on straight framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110558780.1A CN113255038B (en) 2021-05-21 2021-05-21 Roof modeling method and system based on straight framework

Publications (2)

Publication Number Publication Date
CN113255038A CN113255038A (en) 2021-08-13
CN113255038B true CN113255038B (en) 2022-05-17

Family

ID=77183688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110558780.1A Active CN113255038B (en) 2021-05-21 2021-05-21 Roof modeling method and system based on straight framework

Country Status (1)

Country Link
CN (1) CN113255038B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102004922A (en) * 2010-12-01 2011-04-06 南京大学 High-resolution remote sensing image plane extraction method based on skeleton characteristic
MX2011000812A (en) * 2010-01-21 2011-07-20 Pactiv Corp Composite roofing boards and methods for installing a composite roofing board.
CA3103845A1 (en) * 2018-06-15 2019-12-19 Geomni, Inc. Systems and methods for improved parametric modeling of structures

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2891936A1 (en) * 2005-10-11 2007-04-13 France Telecom METHODS, DEVICES AND PROGRAMS FOR TRANSMITTING A ROOF STRUCTURE AND CONSTRUCTING A THREE DIMENSIONAL REPRESENTATION OF A BUILDING ROOF THEREFROM.
US11352775B2 (en) * 2018-12-10 2022-06-07 Blue Tomato, Llc Light weight construction system based on horizontally pre-slotted panels
US11286658B2 (en) * 2018-12-10 2022-03-29 Blue Tomato, Llc Method for light weight construction using pre-slotted standard and transition panels

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX2011000812A (en) * 2010-01-21 2011-07-20 Pactiv Corp Composite roofing boards and methods for installing a composite roofing board.
CN102004922A (en) * 2010-12-01 2011-04-06 南京大学 High-resolution remote sensing image plane extraction method based on skeleton characteristic
CA3103845A1 (en) * 2018-06-15 2019-12-19 Geomni, Inc. Systems and methods for improved parametric modeling of structures

Also Published As

Publication number Publication date
CN113255038A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN109993827B (en) Elevation view identification method for converting building drawing into three-dimensional BIM model
US11989895B2 (en) Capturing environmental features using 2D and 3D scans
CN105931294A (en) Method for converting BIM entity model into multiple levels of details (LOD) GIS standardized model
CN109447326B (en) Unmanned aerial vehicle migration track generation method and device, electronic equipment and storage medium
Tang et al. An application-driven LOD modeling paradigm for 3D building models
CN104732038B (en) A kind of city ventilation gallery computational methods and system based on GIS
CN105225273B (en) The method and device of FAULT MODEL is established based on space tomography polygon
CN101154295A (en) Three-dimensional simulation electronic chart of navigation channel
CN101154313A (en) Three-dimensional simulation digital information navigation channel system and its implementing method
CN104183016A (en) Method for rapidly constructing 2.5-dimensional building model
WO2016095682A1 (en) Method and device for processing joint of digital terrain model
CN104548597A (en) Navigation grid automatic-generation method and navigation grid automatic-generation device
CN113255038B (en) Roof modeling method and system based on straight framework
CN115757604A (en) GDP (generalized projection) space-time evolution analysis method based on noctilucent image data
CN106875330B (en) Method for rotating plane model into spherical model
CN103578140A (en) Mine three-dimensional roadway fast automatic generation method based on DXF
CN105138750A (en) Scalable multi-line crossing machine body wireframe model building method
US8676546B2 (en) Grading method utilizing flow grade solution
CN116051771A (en) Automatic photovoltaic BIM roof modeling method based on unmanned aerial vehicle oblique photography model
CN116188734A (en) AR-based house graphic mapping method
CN102830960A (en) Three-dimensional simulated electronic drawing for sea channels
CN104050386B (en) Method for detection of three-dimensional size completeness based on rigid body recognition
CN109829254B (en) Method for drawing positioning line of diaphragm plate after top and bottom plates of curved steel box bridge are unfolded
CN113095012A (en) Splicing and fusing method for numerical simulation calculation results of wind power plant flow field partitions
Sugihara et al. Automatic generation of 3D building models from building polygons on digital maps

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant