Building model generation system, method, apparatus, and medium

By constructing a building model generation system, automating polygon decomposition and ring direction standardization, and combining multiple height generation modes, the system solves the problems of low modeling efficiency and complex parameter adjustment in existing technologies, and achieves efficient and diversified building model generation.

CN122391534APending Publication Date: 2026-07-14HANGZHOU YIZHI MICRO TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU YIZHI MICRO TECH CO LTD
Filing Date
2026-04-08
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing 3D modeling software suffers from low efficiency in batch building model creation, inability to flexibly meet complex needs, incompatibility with GIS data, complex modeling parameter adjustments, and inability to dynamically calculate building height, resulting in significant deviations between the generated models and the real scene. The operation process is cumbersome and the user threshold is high.

Method used

The system constructs an architectural model generation system, including a vector import module, an architectural outline generation module, a height calculation module, an extrusion modeling module, and a user interaction module. It supports multiple height generation modes, automates polygon decomposition and ring direction standardization, calculates height by combining image brightness and attribute fields, and provides a visual interface to simplify operation.

Benefits of technology

It improves the efficiency of building modeling, enables dynamic and diversified generation of building heights, simplifies the operation process, lowers the threshold for use, and improves the geometric accuracy and realism of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391534A_ABST
    Figure CN122391534A_ABST
Patent Text Reader

Abstract

The application discloses a building model generation system, method, device and medium, and relates to the field of building modeling.The system comprises a vector data import module, a building contour generation module, a height calculation module, an extrusion modeling module and a user interaction module.The vector data import module supports importing vector data and can complete multi-component polygon disassembly and ring direction standardization processing.The contour generation module converts the coordinate data after standardization processing into a polygon building base suitable for a three-dimensional software and completes the adaptation through a coordinate scaling factor.The height calculation module provides multiple height generation modes and realizes dynamic and diversified generation of building heights.The extrusion modeling module encapsulates a three-dimensional software bottom polygon extrusion command, completes conversion from a plane base to a three-dimensional block, and generates a three-dimensional building block with a top surface.The user interaction module integrates all the functions in a visual interface and supports intuitive parameter adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of architectural modeling and processing technology, and in particular to an architectural model generation system, method, device and medium. Background Technology

[0002] Currently, creating batch architectural models in 3D modeling software (such as Maya) typically involves artists manually creating polygonal patches based on survey data or Geographic Information System (GIS) information, then using an extrusion tool to extrude the required height to form the building blocks. For surrounding landscape buildings in large scenes (such as digital cities or game levels), this process requires manual creation bit by bit, which is inefficient. Some buildings requiring large batches are created in batches using Python scripts to generate surrounding landscapes, but even after generation, the height of each building still needs to be manually set, or a single fixed height needs to be used, which cannot flexibly handle complex requirements. Summary of the Invention

[0003] This application provides a building model generation system, method, device, and medium. Through modules such as vector data import module, building outline generation module, height calculation module, extrusion modeling module, and user interaction module, it constructs a fully automated modeling pipeline from data input to 3D model output, which improves the efficiency of building modeling and supports dynamic and diversified generation of building height.

[0004] In a first aspect, this application provides a building model generation system, the building model generation system comprising: The vector import module is used to read the building vector file input by the user and parse it to obtain a set of features. The features in the set of features are then decomposed into polygons and their ring directions are standardized to obtain a set of polygons with a uniform format. The outline generation module is used to create a one-to-one corresponding building base in the 3D building software based on the coordinate information of each polygon in the polygon set and the coordinate scaling factor input by the user. Among them, for polygons containing inner rings, a building base with inner rings is generated by splicing facets. The height calculation module is used to calculate the extrusion height of each building base according to the height generation mode selected by the user, combined with polygon area, attribute fields, image brightness or random range.

[0005] The extrusion modeling module is used to receive each of the building bases and their corresponding extrusion heights, and to extrude each of the building bases along a preset direction to a corresponding height to generate a three-dimensional building block with a top surface; The user interaction module provides a visual interface for users to input configuration parameters and receive feedback on the generated building results.

[0006] In an alternative embodiment of the first aspect, the building model generation system further includes a curve sampling module, the curve sampling module being used for: If the user does not provide the building vector file or the 3D building software already has curves, the existing curve selected by the user is sampled to obtain a set of sampling points. A closed polygon is generated based on the set of sampling points, and the closed polygon is output to the contour generation module, so that the contour generation module and the extrusion modeling module can process and generate the 3D building block in sequence.

[0007] In one alternative implementation of the first aspect, the vector import module is specifically used for: The composite polygon in the feature set is split into multiple independent single polygons; Based on the outer ring coordinates of each polygon, calculate the signed area of ​​each polygon. If the signed area is negative, reverse the point order of the outer ring of the corresponding polygon. If the signed area is negative, keep the point order of the outer ring of the corresponding polygon unchanged.

[0008] In one alternative embodiment of the first aspect, the contour generation module is specifically used for: Receive a set of polygons with a uniform format output by the vector import module; Extract the outer ring coordinate set for each polygon in the polygon set; The outer coordinate set is scaled using the user-input coordinate scaling factor to obtain a new coordinate set; If the first and last points of the new coordinate set do not coincide, add the first point to the last point to close the polygon. In 3D architectural software, create planar polygon patches, map the two-dimensional coordinates of the new coordinate set onto a preset plane, and generate and output the building base.

[0009] In one alternative implementation of the first aspect, the height generation mode is an area weight mode, a random height mode, a floor field mode, or an image brightness mode.

[0010] In one alternative embodiment of the first aspect, the height calculation module is specifically used for: When the height generation mode is the area weight mode, the extrusion height is calculated based on the area of ​​the outer ring of the polygon. When the height generation mode is set to random height mode, the extrusion height is randomly determined based on the height range set by the user. When the height generation mode is floor field mode, the extrusion height is calculated based on the attribute fields in the building vector file; When the height generation mode is image brightness mode, the extrusion height is obtained based on the average brightness mapping of the image.

[0011] In one alternative embodiment of the first aspect, the curve sampling module is specifically used for: Calculate the arc length of the existing curve and determine the number of sampling points to fit based on the arc length; The existing curve is uniformly sampled according to the number of sampling points, and the two-dimensional coordinates of the preset plane are extracted to generate a closed polygon.

[0012] Secondly, this application provides a method for generating architectural models, based on the architectural model generation system provided in the first aspect, the method comprising: Read the user-input building vector file and parse it to obtain a set of features. Perform polygon decomposition and ring direction standardization on the features in the set of features to obtain a polygon set with a uniform format. Based on the coordinate information of each polygon in the polygon set, and combined with the coordinate scaling factor input by the user, a one-to-one corresponding building base is created in the 3D building software. Among them, for polygons containing inner rings, a building base with inner rings is generated by splicing facets. Based on the user-selected height generation mode, the extrusion height is calculated for each of the building bases, taking into account polygon area, attribute fields, image brightness, or a random range.

[0013] Receive each of the building bases and their corresponding extrusion heights, and extrude each of the building bases to a corresponding height along a preset direction to generate a three-dimensional building block with a top surface; It provides a visual interface for users to input configuration parameters and receive feedback on the generated building results.

[0014] Thirdly, this application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the building model generation method as provided in the second aspect.

[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the building model generation method provided in the second aspect.

[0016] The architectural model generation system, method, equipment, and medium provided in this application have at least the following beneficial effects: This system comprises modules for vector data import, building outline generation, height calculation, extrusion modeling, and user interaction. The vector import module supports importing vector data and automatically performs polygon decomposition of multiple components and circumferential standardization, ensuring the geometric accuracy of the imported model from the outset. The outline generation module converts the standardized coordinate data into a polygonal building base adapted to 3D software, using coordinate scaling factors to achieve unit adaptation, providing a foundation for subsequent modeling. The height calculation module offers multiple height generation modes, enabling dynamic and diverse generation of building heights, overcoming the drawbacks of a single fixed height. The extrusion modeling module encapsulates the underlying polygon extrusion commands of the 3D software, automatically converting a planar base into a 3D block, generating a 3D building block with a top surface, ensuring a simple and compliant model structure. The user interaction module integrates all functions into a single visual interface, supporting intuitive parameter adjustment and one-click batch generation, simplifying the operation process and significantly lowering the barrier to entry. Ultimately, this system achieves a building generation system with high building modeling efficiency, diverse height settings, and full utilization of data sources. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] Figure 1 A structural block diagram provided for an embodiment of the architectural model generation system of this application; Figure 2 A schematic diagram illustrating the execution process of the vector import module provided in this application; Figure 3 A schematic diagram of the scaling factor setting function included in the contour generation module provided in this application; Figure 4 Another schematic diagram showing the scaling factor setting function included in the contour generation module provided in this application; Figure 5 A schematic diagram of the building base generated by the outline generation module for this application; Figure 6 A schematic diagram illustrating the selection of height generation mode via user interaction, provided in this application; Figure 7 A schematic diagram of a batch of three-dimensional building blocks generated using the architectural model generation system of this application; Figure 8 Another schematic diagram of a batch of three-dimensional building blocks generated using the architectural model generation system of this application; Figure 9 A schematic diagram illustrating the process of generating a 3D building using the building model generation system provided in the embodiments of this application; Figure 10 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0020] As described in the background section, under the current technological system, the creation of batch architectural models using 3D modeling software such as Maya requires a large amount of tedious manual operation. Furthermore, the industry has not yet formed an integrated, streamlined, and modular operating system. The following problems exist in the actual modeling process: (1) The building outline needs to be drawn manually throughout the process. When modeling in batches, the amount of repetitive work is large and the modeling efficiency is extremely low.

[0021] (2) Existing technologies cannot rely on multi-dimensional actual information such as polygon area, vector data built-in attribute fields, and reference image brightness to dynamically calculate and adapt building height. They can only use a uniform fixed height, resulting in a large deviation between the generated building model and the real scene, and insufficient realism and practicality.

[0022] (3) It is incompatible with, unable to import and parse Shapefile and GeoJSON, two mainstream GIS building vector data in the industry, and it is difficult to directly utilize existing surveying and planning data.

[0023] (4) The lack of a standardized processing mechanism for polygon regularity, uniform ring direction and automatic alignment of coordinate axes makes the generated three-dimensional geometry prone to geometric errors and structural abnormalities, resulting in high subsequent correction costs.

[0024] (5) It is impossible to call the existing curves in the scene of the 3D modeling software to quickly generate compliant building outlines, which limits the flexibility of the modeling method and reduces the efficiency of design iteration.

[0025] (6) The effective visual information such as brightness and color of satellite base maps and reference maps is completely wasted and can only be used as background aids, and cannot be converted into usable parameters for modeling.

[0026] (7) Adjusting various modeling parameters requires modifying the underlying code or executing multiple commands step by step. The operation process is cumbersome and complicated, with a high threshold for use, making it difficult to achieve rapid batch modeling.

[0027] Based on this, this application provides a building model generation system, such as... Figure 1 As shown, the building model generation system includes modules such as vector data import module 11, building outline generation module 12, height calculation module 13, extrusion modeling module 14, and user interaction module 15. Optionally, it may also include curve sampling module 16.

[0028] The vector import module reads user-input GeoJSON and Shapefile format building vector files, parses them to obtain a feature set, and performs polygon decomposition and ring orientation standardization on the features in the feature set to obtain a polygon set with a uniform format. This module solves the problem that traditional manual modeling cannot directly reuse GIS data. It is compatible with both GeoJSON and Shapefile standard vector formats and can automatically complete multi-component polygon decomposition and ring orientation standardization, ensuring the geometric accuracy of the imported model from the source. Figure 2 As shown, this is a schematic diagram of the execution process of the vector import module.

[0029] The contour generation module is used to create a one-to-one building base in 3D architectural software based on the coordinate information of each polygon in the polygon set, combined with the user-input coordinate scaling factor. Specifically, for polygons containing inner rings, a building base with inner rings is generated by patching facets. This module converts standardized coordinate data into a polygonal building base adapted to the 3D software, and completes unit adaptation through coordinate scaling factors, providing a foundation for subsequent modeling. Figure 3 , 4 The diagram shown illustrates how to set the scaling factor for the contour generation module. Figure 5 As shown, it is a schematic diagram of the building base created in 3D building software.

[0030] The height calculation module calculates the extruded height for each building base based on the user-selected height generation mode (including four modes: area weight, random height, floor field, and average image brightness), combined with polygon area, attribute fields, image brightness, or a random range. This module enables dynamic and diversified generation of building heights, completely eliminating the drawbacks of a single fixed height. In particular, the image brightness mode can directly convert satellite image visual information into building height parameters, innovatively achieving a "what you see is what you get" intelligent modeling method. Figure 6 As shown, it is a schematic diagram of selecting the height generation mode through user interaction.

[0031] The extrusion modeling module is used to: receive each building base and its corresponding extrusion height, and extrude each of the building bases along a preset direction to the corresponding height, thereby generating a three-dimensional building block with a top surface to ensure the model structure is simple and compliant. For example... Figure 7 , 8 As shown, this is a schematic diagram of the final generated batch of 3D building blocks.

[0032] The curve sampling module is used to: sample existing curves selected by the user to obtain a set of sampling points when the user does not provide the building vector file or when the curves already exist in the 3D building software; generate closed polygons based on the set of sampling points; and output the closed polygons to the contour generation module, which, together with the extrusion modeling module, sequentially processes and generates the 3D building block. This module effectively expands the sources of building contours, enabling the rapid generation of closed contours directly from existing curves in the software, significantly improving the speed of design and modeling iterations.

[0033] The user interaction module provides a visual interface for users to input configuration parameters and receive feedback on the generated building results. This module integrates all functions into a single visual interface, supports intuitive parameter adjustment and one-click batch generation, simplifies the operation process, and significantly lowers the barrier to entry.

[0034] In the aforementioned vector import module, polygon decomposition and ring direction standardization are performed on the features in the feature set. This includes: splitting the multi-polygon in the feature set into multiple independent single polygons; calculating the signed area of ​​each polygon based on the outer ring coordinates of each polygon; if the signed area is negative, reversing the point order of the outer ring of the corresponding polygon; otherwise, keeping the point order of the outer ring of the corresponding polygon unchanged.

[0035] More specifically, the JSON file is read, and the feature set $F = {f_i\in Features}$ is extracted. Each feature $f_i$ contains a geometry type $type_i$, a coordinate array $coords_i$, and an attribute dictionary $props_i$. For features where $type_i$ is "MultiPolygon", they are decomposed into multiple Polygon features: $F′ = {f_{ij}|f_{ij} corresponds to the j-th polygon component of f_i}$.

[0036] Furthermore, based on the pyshp library, it reads .shp files to obtain the feature set $S={s_k|s_k \in Shapes}$, where each $s_k$ contains a geometric shape $shape_k$ (polygon or polygon with holes / polygon with inner rings) and an attribute record $record_k$. The parsing process automatically identifies shapeType as a polygon type (shapefile.POLYGON or shapefile.POLYGONZ) and splits the parts into independent single polygons.

[0037] After decomposing the composite polygon into multiple independent single polygons, for each polygon's outer ring coordinate set $C = [(x_0,y_0,x_1,y_1,…,x_{n−1},y_{n−1})]$, calculate the signed area $area = \frac{1}{2}\sum_{i=0}$. ∧ {n−1}(x_iy_{i+1}−x_{i+1}y_i)$ , where $(x−n,y_n)=(x_0,y_0)$ .

[0038] If $area < 0$, then reverse the order of the outer ring points: $C_{std} = reverse(C)$; otherwise, keep it unchanged: $C_{std} = C$. Mathematically, this is expressed as: $C_{std} = \begin {cases} C & \text{if} area(C) \ge 0 \reverse(C) & \text{if} area(C) < 0 \end{cases}$.

[0039] in: i and j represent the index numbers of the elements, respectively.

[0040] x_0, y_0, x_1, y_1, ..., x_{n−1}, y_{n−1} represent the 0th point in the outer ring of the polygon. The x-coordinate of the first point, the y-coordinate of the 0th point, the x-coordinate of the 1st point, the y-coordinate of the 1st point, ..., the x-coordinate of the (n-1)th point, the y-coordinate of the (n-1)th point, where n is the number of points contained in the outer ring.

[0041] $F$ represents the set of features parsed from the GeoJSON file, where each feature $f_i$ is a... A data unit containing geometry and attributes.

[0042] $type_i$ represents the geometry type of element $f_i$, with values ​​of "Polygon" or "MultiPolygon", which determines the subsequent decomposition method.

[0043] $coords_i$ represents the array of geometric coordinates of element $f_i$, following the GeoJSON specification and is a list structure.

[0044] $props_i$ represents the list of attributes of feature $f_i$, stored in key-value pairs, such as fields like "height" or "floor".

[0045] $S$ represents the set of features parsed from the Shapefile, with each feature $s_k$ corresponding to a geometric shape.

[0046] $shape_k$ represents the geometry object of feature $s_k$, containing a list of points and part indices, used to extract polygon loops.

[0047] $record_k$ represents the attribute record of feature $s_k$, and the values ​​are stored in field order.

[0048] $C$ represents a list of coordinate points of the outer ring of a polygon, which can be connected in order to form a closed loop.

[0049] $area$ represents the signed area of ​​the polygonal ring $C$. A positive value indicates that the ring is in a counterclockwise direction, and a negative value indicates that it is in a clockwise direction.

[0050] "reverse" means to reverse the function.

[0051] $C_{std}$ represents the standardized ring, ensuring that the outer ring is counterclockwise, which conforms to the Maya polygon creation convention.

[0052] The aforementioned contour generation module is specifically used for: Receives a uniformly formatted collection of polygons output from the vector import module; Extract the set of outer ring coordinates for each polygon in the polygon set; The outer coordinate set is scaled using the user-input coordinate scaling factor to obtain a new coordinate set; If the first and last points of the new coordinate set do not coincide, add the first point to the last point to close the polygon. In 3D architectural software, create planar polygon patches, map the two-dimensional coordinates of the new coordinate set onto a preset plane, and generate and output the building base.

[0053] More specifically, the input is a standardized polygon set $F_{std}={f_k|f_k|text{containing outer ring coordinates}C_k \text{and attributes}P_k}$, and a coordinate scaling factor $s$. For each polygon $f_k$, the outer ring coordinates $C_k=[(x_0,y_0), (x_1,y_1), …,(x_{m-1}, y_{m-1})]$ are extracted, and the scaling factor is applied to obtain a new coordinate set, which is represented as follows: $C′k=[(s|cdotx_0,s|cdoty_0),(s|cdotx_1,s|cdoty_1),…,(s|cdotx{m−1},s\cdot y_{m-1})]$.

[0054] If the first and last points of $C′_k$ do not coincide, add the first point to the last point to ensure closure: $C′_k=C′_k\cup{(s\cdot x_0,s\cdot y_0)}$. Create a polygon face in Maya: $M_k=\text{polyCreateFacet}(p= [ (x,0,y) \text{for}(x,y)∖in C′_k,∖text{ name}=∖text{"building_face"}$, mapping the 2D coordinates to the XZ plane (Y=0), and outputting the building base Mesh set $\mathcal{M}={M_k}$.

[0055] in: k represents the index number of the polygon; (x_0, y_0), (x_1, y_1), ..., (x_{m-1}, y_{m-1} represent those that have not been passed through The x-coordinate of the 0th point, the y-coordinate of the 0th point, the x-coordinate of the 1st point, the y-coordinate of the 1st point, ..., the x-coordinate of the (m-1)th point, the y-coordinate of the (m-1)th point, where m is the number of points contained in the outer ring of the scaled polygon.

[0056] (s|cdotx_0,s|cdoty_0),(s|cdotx_1,s|cdoty_1),…,(s|cdotx{m−1} ,s\cdoty_{m -1} represent the x-coordinate of the 0th point, the y-coordinate of the 0th point, the x-coordinate of the 1st point, the y-coordinate of the 1st point, ..., the x-coordinate of the (m-1)th point, and the y-coordinate of the (m-1)th point, respectively, after scaling.

[0057] $F_{std}$ represents the set of polygons after normalization in the cyclic direction. Each polygon $f_k$ contains the outer cyclic coordinates $C_k$ and the attribute $P_k$.

[0058] $s$ represents the coordinate scaling factor, which is entered by the user through the interface and is used to convert geographic coordinates into Maya world units.

[0059] $C_k$ represents the list of outer ring coordinates of polygon $f_k$, the original coordinates are not scaled.

[0060] $C′_k$ represents a scaled list of coordinates used to construct Maya polygons.

[0061] $M_k$ represents a planar polygon mesh object created in Maya, which serves as the base for the building.

[0062] $mathcal{M}$ represents the collection of all generated building base meshes, which are used by the subsequent extrusion modeling module.

[0063] The aforementioned height calculation module is specifically used for: When the height generation mode is the area weight mode, the extrusion height is calculated based on the area of ​​the outer ring of the polygon. When the height generation mode is set to random height mode, the extrusion height is randomly determined based on the height range set by the user. When the height generation mode is floor field mode, the extrusion height is calculated based on the attribute fields in the building vector file; When the height generation mode is image brightness mode, the extrusion height is obtained based on the average brightness mapping of the image.

[0064] More specifically, the operations / commands for different height generation modes are as follows: Area weighting model: $h = \max(1.0, \alpha \cdot \text\{area}(C_k) \cdot \beta)$, where $\alpha$ is the default height (set by the "default height" parameter in the input), $\beta = 0.05$ is a fixed weight factor, and $\text {area}( C_k )$ is the area of ​​the outer ring $C_k$ of the polygon (take the absolute value). This mode makes the building height positively correlated with its footprint.

[0065] Random height mode: $h \sim U(h_{\min}, h_{\max})$, that is, randomly sampling from a uniform distribution consisting of the minimum height $h_{\min}$ and the maximum height $h_{\max}$ specified by the user, to quickly generate building groups of varying heights.

[0066] Floor field pattern: $h=\begin{cases}\text{int}(P_k.\text{field})\cdot h_{\text{floor}}&\text{if}\exists\text{field}\in P_k\text\{and convertible toint}\h_{\text{default}} & \text{otherwise} \end{cases}$, where $P_k\$ is a list of feature attributes, field is a user-specified field name (e.g., "Floor"), $h_{\text{floor}}$ is the single-floor height, and $h_{\text{default}}$ is the default height (fallback value).

[0067] Image average brightness mode: $h = h_{\text{img_min}} + \lambda\cdot(h_{\text{img_max}} - h_{\text{img_min}})$, where $lambda$ is the normalized value of the image average brightness, $\lambda\in [0, 1]$, calculated by the function $lambda = \text{avg_brightness}(\text{img_path})$, and $h_{\text{img_min}}$ and $h_{\text{img_max}}$ are the specified height mapping ranges.

[0068] in: $\Theta$ represents the parameter set generated by configuring the height through the interface, including the mode selection and corresponding parameters.

[0069] $h$ represents the calculated height of a single building foundation.

[0070] $lalpha$ represents the set "default height" value, which is used as a scaling factor in area-weighted mode.

[0071] $\text\{area}(C_k)$ represents the geometric area of ​​the outer ring $C_k$ of the polygon, which is calculated using a formula.

[0072] $h_{min}, h_{max}$ represent the minimum and maximum heights in random mode.

[0073] $P_k$ represents the attribute dictionary of feature $f_k$.

[0074] $\text{field}$ represents the floor field name specified by the user, such as "Floor".

[0075] $h_{\text{floor}}$ represents the user-specified height of a single floor.

[0076] $h_{\text\{default}}$ represents the default height, used when the attribute field is missing or invalid.

[0077] $lambda$ represents the normalized average brightness value of the image, which is obtained by calculating the average grayscale value of the image pixels and then dividing it by 255.

[0078] $\text{img_path}$ represents the path to the image file selected by the user.

[0079] $h_{\text{img_min}} and $h_{\text{img_max}} represent the minimum and maximum heights of the image brightness mapping.

[0080] The extrusion modeling module described above extrudes the building base along a preset direction to a corresponding height, including: inputting a Mesh set $\mathcal{M} = {M_k}$ and a corresponding height set $\mathcal{H} = {h_k}$. For each $M_k$, select all its faces: $\text{faces}_k = \text{polyListComponentConversion}(M_k, \text{toFace=True})$.

[0081] Execute the extrusion command: $\text\{polyExtrudeFacet}(\text{faces}_k,\ext{ltz}=h_k,\text\{keepFacesTogether=True})$, extrude $h_k$ units along the negative local Z-axis, generating the sidewalls and top surface. Finally, output the final building entity set $\mathcal {B}=B_k $.

[0082] in: $\mathcal{M}$ represents the set of Mesh output by the extrusion modeling module.

[0083] $\mathcal{H}$ represents the set of corresponding height values ​​output by the height calculation module.

[0084] $M_k$ represents the $k-th Mesh.

[0085] $h_k$ represents the calculated height of the $k$-th building foundation.

[0086] $\text{faces}_k$ represents all face components of $M_k$, used for extrusion operations.

[0087] $\text{polyExtrudeFacet}$ is the Maya polygon extrusion command, and the parameter $\text{Itz}$ specifies the displacement along the local Z-axis.

[0088] $\mathcal{B}$ represents the final set of building entities generated for later use.

[0089] The curve sampling module described above is specifically used for: Calculate the arc length of the existing curve and determine the number of sampling points to fit based on the arc length; The existing curve is uniformly sampled according to the number of sampling points, and the two-dimensional coordinates of the preset plane are extracted and a closed polygon is generated.

[0090] More specifically, obtain the set of curve transformation nodes selected by the user: $C_{sel} = {c_i | c_i in {SelectedCurves}}$. For each curve $c_i$, calculate its arc length $L_i = {arclen}(c_i)$, and determine the number of sampling points $N_i = max(12, max(8, L_i)\rceil)$. Uniformly sample N_i points on the parameter $[0,1]$. For each parameter $u_j=j / N_i$, j=0,1,…,N_i−1$, calculate the world coordinates of the points on the curve $p_j=\text{pointOnCurve}(c_i, \text{pr}=u_j,\text{p}=True){. Take the X and Z components of $p_j$ as the plane coordinates $(x_j, z_j)$, forming the contour point set $P_i={(x_j, z_j)}{. If the first and last points of $P_i$ do not coincide, add the first point to the end: $P_i=P_i \cupx_0,z_0{. $P_i$ is passed to the building outline generation module to create the bottom and calculate the height based on the current height mode. Finally, the building $B_i$ is generated by the extrusion modeling module.

[0091] in: $C_{\text{sel}}$ represents the set of curve transformation nodes selected by the user, with each $c_i$ corresponding to a curve.

[0092] $L_i$ represents the arc length of curve $c_i$, calculated using the Maya command arclen.

[0093] $N_i$ represents the number of sampling points for curve $c_i$, which is adaptively determined by the arc length, with at least 12 points to ensure contour quality.

[0094] $u_j$ represents the parameter value of the $j$-th sampling point, which is uniformly distributed within the range $[0,1].

[0095] $p_j$ represents the world coordinate point on the curve corresponding to parameter $u_j$, which includes X, Y, and Z components.

[0096] $P_i$ represents the set of two-dimensional contour points sampled from the curve $c_i$, used to construct the polygonal base.

[0097] Based on the building model generation system provided above, this application embodiment also provides a building model generation method, including: Read the user-input building vector file and parse it to obtain a set of features. Perform polygon decomposition and ring direction standardization on the features in the set of features to obtain a polygon set with a uniform format. Based on the coordinate information of each polygon in the polygon set, and combined with the coordinate scaling factor input by the user, a one-to-one corresponding building base is created in the 3D building software. Among them, for polygons containing inner rings, a building base with inner rings is generated by splicing facets. Based on the user-selected height generation mode, the extrusion height is calculated for each of the building bases, taking into account polygon area, attribute fields, image brightness, or a random range.

[0098] Receive each of the building bases and their corresponding extrusion heights, and extrude each of the building bases to a corresponding height along a preset direction to generate a three-dimensional building block with a top surface; It provides a visual interface for users to input configuration parameters and receive feedback on the generated building results.

[0099] It should be noted that the specific implementation methods, technical principles, and beneficial effects of each of the above steps correspond one-to-one with the corresponding modules in the building model generation system of the above embodiments, and will not be repeated here.

[0100] like Figure 9 The diagram illustrates the process of generating a 3D building using the architectural model generation system provided in this application. It fully presents the two core modeling paths of this system (vector data path / curve path), combined with image information linkage logic, covering the entire process from initial condition selection to 3D building generation. Each module collaborates to achieve automated and configurable batch modeling. The architectural model generation process of this system is divided into three stages: initial condition judgment, vector data path, and path without vector data. Each stage is completed collaboratively by the corresponding module, as detailed below: 1. Initial condition judgment (user interaction module) After the system starts, the user interaction module guides the user to complete the selection of core conditions: Step 1: Determine if image information (such as satellite map, top reference image) exists, which is divided into two main branches: "with image information" and "without image information"; Step 2: Under the "Image Information" branch, further determine whether GIS vector data (GeoJSON / Shapefile format) exists, and further subdivide into "Vector Data" and "No Vector Data" sub-paths; The "No Image Information" branch defaults to the "No Vector Data" subpath and only supports curve generation mode.

[0101] 2. There is a vector data path, which is a batch building generation process based on GIS vector data: First, the GeoJSON / Shapefile vector file input by the user is read through the vector import module, parsed into a feature set, and automatically completed the multi-part polygon decomposition (splitting MultiPolygon into independent Polygon) and ring direction standardization (reversing the negative area outer ring point order), outputting a polygon set with a uniform format.

[0102] Then, the contour generation module receives the above set of polygons and, in conjunction with the coordinate scaling factor from latitude and longitude to Maya units provided by the user interaction module, scales the coordinates of the outer ring of the polygons to adapt to the coordinate system of the 3D software; iterates through each polygon and creates the corresponding planar polygon building base (polygons containing inner rings are generated by splicing facets to form a base with an inner ring).

[0103] Then, the height calculation module, based on the default height set by the user interaction module (a fallback value for the no-data mode), allows the user to select the height generation mode. Specifically: Field mode: Reads built-in attribute fields (such as floor number) from the vector file to calculate the extrusion height; Image brightness mode: Combining satellite image brightness information, the image mapping range is adjusted through the user interaction module, and the brightness value is linearly mapped to the building height.

[0104] Then, the generated effect is previewed and the style adaptability is determined through the user interaction module: Appropriate style: Triggers the extrusion modeling module, which extrudes a three-dimensional building block with a top surface along a preset direction based on the building base and the calculated height. Style not suitable: Return to adjust height mode or image mapping range until the style meets the requirements.

[0105] 3. No vector data path; this path is a flexible building generation process based on scene curves: First, the curve sampling module calculates the arc length of the curve drawn by the user or existing curves in the scene and adaptively determines the number of sampling points (minimum 12). The X / Z coordinates are extracted by uniform sampling with equal parameters, and a closed polygon is generated and output to the contour generation module.

[0106] Then, the contour generation module receives the closed polygon and creates the corresponding planar polygon building base.

[0107] Then, the height calculation module, based on the default height set by the user interaction module, allows the user to select a height generation mode. Specifically: When there is image information: Supports field mode / image brightness mode, and the image mapping range can be adjusted; When there is no image information: Only area weight mode / random height mode is supported (height is calculated based on polygon area or user-defined range).

[0108] Then, the generated effect is previewed and the style adaptability is determined through the user interaction module: Appropriate style: Trigger the extrusion modeling module, and extrude a 3D building block based on the building base generated by the curve and the calculated height; Style not suitable: Return to adjust height mode or related parameters until the style meets the requirements.

[0109] It should be noted that regardless of whether a vector data path or a curve path is selected, the extrusion modeling module ultimately completes the conversion from a planar base to a three-dimensional block, and the user interaction module provides feedback on the generated results, achieving full automation from data input to model output.

[0110] Accordingly, see Figure 10 , Figure 10 This is a structural block diagram of an electronic device provided in an embodiment of this application. In this embodiment, the electronic device includes a memory 101, a processor 100, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, it implements all the steps of the building model generation method provided in the above embodiment.

[0111] The electronic device can be a mobile computing device (such as a mobile phone), a desktop computer, a laptop, a PDA, and a cloud server, etc. This electronic device may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will understand that... Figure 10 This is merely an example of an electronic device and does not constitute a limitation on electronic devices. It may include more or fewer components than shown in the illustration, or combinations of certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0112] The processor 100 may be a microcontroller unit (MCU) or a central processing unit (CPU). It may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0113] In some embodiments, memory 101 may be an internal storage unit of an electronic device, such as a hard disk or memory. In other embodiments, memory 101 may be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Furthermore, memory 101 may include both internal and external storage units of the electronic device. Memory 101 is used to store operating systems, applications, bootloaders, data, and other programs, such as program code for computer programs. Memory 101 can also be used to temporarily store data that has been output or will be output.

[0114] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the building model generation method described in the above embodiments. The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. Program code contained on a computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof. The aforementioned computer-readable storage medium may be contained within an electronic device; or it may exist independently, not assembled into an electronic device.

[0115] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Modules described in the embodiments of this application can be implemented in software or hardware. The names of modules do not, in some cases, constitute a limitation on the unit itself.

[0117] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., a computer program) for executing the above-described building model generation method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the building model generation method provided in the above embodiments, and will not be repeated here.

[0118] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A building model generation system, characterized in that, include: The vector import module is used to read the building vector file input by the user and parse it to obtain a set of features. The features in the set of features are then decomposed into polygons and their ring directions are standardized to obtain a set of polygons with a uniform format. The outline generation module is used to create a one-to-one corresponding building base in the 3D building software based on the coordinate information of each polygon in the polygon set and the coordinate scaling factor input by the user. Among them, for polygons containing inner rings, a building base with inner rings is generated by splicing facets. The height calculation module is used to calculate the extrusion height of each building base according to the height generation mode selected by the user, combined with polygon area, attribute fields, image brightness or random range. The extrusion modeling module is used to receive each of the building bases and their corresponding extrusion heights, and to extrude each of the building bases along a preset direction to a corresponding height to generate a three-dimensional building block with a top surface; The user interaction module provides a visual interface for users to input configuration parameters and receive feedback on the generated building results.

2. The architectural model generation system as described in claim 1, characterized in that, The building model generation system also includes a curve sampling module, which is used for: If the user does not provide the building vector file or the 3D building software already has curves, the existing curve selected by the user is sampled to obtain a set of sampling points. A closed polygon is generated based on the set of sampling points, and the closed polygon is output to the contour generation module, so that the contour generation module and the extrusion modeling module can process and generate the 3D building block in sequence.

3. The architectural model generation system as described in claim 1, characterized in that, The vector import module is specifically used for: The composite polygon in the feature set is split into multiple independent single polygons; Based on the outer ring coordinates of each polygon, calculate the signed area of ​​each polygon. If the signed area is negative, reverse the point order of the outer ring of the corresponding polygon. If the signed area is negative, keep the point order of the outer ring of the corresponding polygon unchanged.

4. The architectural model generation system as described in claim 1, characterized in that, The contour generation module is specifically used for: Receive a set of polygons with a uniform format output by the vector import module; Extract the outer ring coordinate set for each polygon in the polygon set; The outer coordinate set is scaled using the user-input coordinate scaling factor to obtain a new coordinate set; If the first and last points of the new coordinate set do not coincide, add the first point to the last point to close the polygon. In 3D architectural software, create planar polygon patches, map the two-dimensional coordinates of the new coordinate set onto a preset plane, and generate and output the building base.

5. The architectural model generation system as described in claim 1, characterized in that, The height generation mode can be area weight mode, random height mode, floor field mode, or image brightness mode.

6. The architectural model generation system as described in claim 5, characterized in that, The height calculation module is specifically used for: When the height generation mode is the area weight mode, the extrusion height is calculated based on the area of ​​the outer ring of the polygon. When the height generation mode is set to random height mode, the extrusion height is randomly determined based on the height range set by the user. When the height generation mode is floor field mode, the extrusion height is calculated based on the attribute fields in the building vector file; When the height generation mode is image brightness mode, the extrusion height is obtained based on the average brightness mapping of the image.

7. The architectural model generation system as described in claim 2, characterized in that, The curve sampling module is specifically used for: Calculate the arc length of the existing curve and determine the number of sampling points to fit based on the arc length; The existing curve is uniformly sampled according to the number of sampling points, and the two-dimensional coordinates of the preset plane are extracted to generate a closed polygon.

8. A method for generating architectural models, characterized in that, Based on the building model generation system as described in any one of claims 1 to 7, the building model generation method includes: Read the user-input building vector file and parse it to obtain a set of features. Perform polygon decomposition and ring direction standardization on the features in the set of features to obtain a polygon set with a uniform format. Based on the coordinate information of each polygon in the polygon set, and combined with the coordinate scaling factor input by the user, a one-to-one corresponding building base is created in the 3D building software. Among them, for polygons containing inner rings, a building base with inner rings is generated by splicing facets. Based on the height generation mode selected by the user, the extrusion height is calculated for each of the building bases, taking into account the polygon area, attribute fields, image brightness, or a random range. Receive each of the building bases and their corresponding extrusion heights, and extrude each of the building bases to a corresponding height along a preset direction to generate a three-dimensional building block with a top surface; It provides a visual interface for users to input configuration parameters and receive feedback on the generated building results.

9. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the computer program being configured to implement the building model generation method as described in claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the building model generation method as described in claim 8.