A method and system for parameterized generation of three-dimensional spatial form of urban buildings

By employing polygon segmentation, maximum inscribed rectangle, buffer, nine-intersection model, and roof generation algorithms, this paper solves the problem of generating 3D urban layout models in existing technologies. It enables the rapid generation of 3D building models that comply with planning regulations in a lightweight environment, possessing architectural details and improving the scientific nature and repeatability of the generation process.

CN122134920APending Publication Date: 2026-06-02HENAN ACADEMY OF SCIENCES AERONAUTICS & AEROSPACE INFORMATION RESEARCH INSTITUTE +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN ACADEMY OF SCIENCES AERONAUTICS & AEROSPACE INFORMATION RESEARCH INSTITUTE
Filing Date
2026-01-26
Publication Date
2026-06-02

Smart Images

  • Figure CN122134920A_ABST
    Figure CN122134920A_ABST
Patent Text Reader

Abstract

This application relates to a parametric generation method and system for the three-dimensional spatial form of urban buildings, belonging to the field of urban planning technology. The method includes: inputting a target spatial range and building layout parameters; generating building layout areas using a polygon segmentation algorithm; obtaining the two-dimensional base surface of the building to be generated using a maximum inscribed rectangle and orientation algorithm; obtaining building spacing buffers using a buffer algorithm; S5, obtaining the available remaining spatial range using a nine-intersection model algorithm; S6, repeatedly iterating the remaining spatial range to generate a set of all two-dimensional base surfaces of the buildings; performing three-dimensional extrusion on each surface of the set to generate a primary building model at LOD1 level; generating the three-dimensional geometry of the roof of each primary building model to obtain a building model at LOD2 level; applying textures and materials to the building model to obtain a building model at LOD3 level; and exporting the building model into a general three-dimensional model format. This application, through parameter-driven and intelligent iteration, can quickly generate three-dimensional building layouts and models that meet the requirements of the latest planning regulations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer-aided technology in urban planning and architectural design, and in particular to a method and system for parametric generation of three-dimensional spatial morphology of urban buildings. Background Technology

[0002] With the rapid development of artificial intelligence, parametric modeling, and computer-aided design, the automation of building generation and layout has become an important research direction in the fields of architecture and urban planning. Traditional architectural design relies heavily on human experience, resulting in a cumbersome and time-consuming process that makes it difficult to efficiently explore diverse, compliant, and scientific spatial planning solutions within a limited timeframe. Therefore, how to utilize intelligent and automated technologies to quickly generate three-dimensional building layouts and models that meet the latest planning regulations, have excellent performance, and are aesthetically pleasing is a key issue in improving the scientific rigor and efficiency of urban design and planning.

[0003] To achieve the above goals, existing research has proposed the following main technical approaches: The first approach is based on parametric modeling, which establishes constraints between geometric parameters and planning indicators to rapidly generate building volumes on specific software platforms (such as Rhino + Grasshopper). Its advantage is strong controllability, but the generated results are mostly limited to simple block levels and rely on specific desktop software environments. The second approach is based on deep learning and generative adversarial networks (GANs), which learns layout patterns by training on historical data and can generate diverse two-dimensional planes. However, it heavily relies on a large amount of high-quality historical data, which may not comply with the latest regulations and is difficult to directly generate detailed three-dimensional models. The third approach is based on optimization methods such as evolutionary algorithms, which abstract the layout problem into multi-objective optimization for solution. This allows for the exploration of diverse solutions, but it has high computational overhead, slow convergence, and difficulty in comprehensively covering complex actual construction constraints. The fourth approach is based on geometric modeling and image reconstruction techniques, often used to quickly generate city-level three-dimensional block models from drawings or images. However, the models are too abstract and lack architectural details and semantic information. Furthermore, while emerging generative artificial intelligence methods have shown potential, they are still limited by the quality of training data and the difficulty of injecting rules.

[0004] Despite some progress in existing technologies, several shortcomings remain. Machine learning-based methods rely on historical data for training, which may be outdated or non-compliant, failing to accurately respond to dynamically updated planning regulations. Most methods can only generate two-dimensional outlines or abstract three-dimensional blocks, lacking the ability to automatically construct details above LOD2, such as building roofs, facades, and materials. Many methods are tied to specific professional software platforms, making them unsuitable for deployment in lightweight environments like web and mobile devices, and the generated models are often in closed formats with weak interactivity. The generation process often only allows adjustment of a few parameters (such as height and density), failing to provide integrated and precise control over a dozen planning and design parameters, including setbacks, orientation, spacing, and color. Existing methods frequently require hand-drawn sketches or CAD drawings as input, resulting in low automation, and scheme selection and optimization rely on the designer's subjective experience, lacking objective and efficient automatic iteration and optimization mechanisms. Summary of the Invention

[0005] The purpose of this application is to provide a method and system for parametric generation of three-dimensional spatial morphology of urban buildings, so as to solve the problems existing in the prior art.

[0006] To achieve the above objectives, the technical solution adopted in this application is as follows: This application provides a method for parametrically generating the three-dimensional spatial form of urban buildings, including the following steps: S1. Input the polygonal boundary of the target space and the building layout parameters. The building layout parameters include at least the number of buildings, building height information, setback distance and sunlight spacing coefficient. S2. Generate a layout area for the building to be generated from the target space using a polygon segmentation algorithm; S3. Within the layout area, the two-dimensional base surface of the building to be generated is obtained by using the maximum inscribed rectangle algorithm and the longest side orientation algorithm of the building. S4. Based on the two-dimensional base surface, the setback distance, and the solar spacing coefficient, the building spacing buffer of the building to be generated is obtained through the buffer algorithm; S5. Using the nine-intersection model algorithm, the target spatial range, the two-dimensional base surface, and the building spacing buffer are superimposed and analyzed to obtain the available remaining spatial range. S6. Take the remaining space range as the new target space range and repeat S2 to S5 until a set of two-dimensional base surfaces that meet the number of buildings is generated. S7. Based on the building height information, extrude each surface in the two-dimensional base surface set in three dimensions to generate a primary building model at LOD1 level. S8. Generate the 3D geometry of the roof of each building's primary model using the roof algorithm to obtain a building model at LOD2 level; S9. Apply textures, configure materials and textures to the building model to obtain a LOD3 level building model; S10. Export the completed building model with material attachments as a common 3D model file format.

[0007] Furthermore, in S1, the building layout parameters also include at least the building width information, building length information, total building size, distance from the ground, single-story height, building height type, building shape type, fifth facade, building orientation, building color, building texture, and building material.

[0008] Furthermore, in S2, the polygon segmentation algorithm divides the target space into multiple regularly arranged regions, the shapes of which are concave or convex polygons.

[0009] Furthermore, in S3, the algorithm for determining the orientation of the longest side of a building includes the following steps: S31. Input the vertex coordinates of the building; S32. Calculate the length of each side of the polygon using the following formula: in, The length of the side. , Let these be the coordinates of the starting point of the edge. , Let be the coordinates of the endpoint of the edge; S33. Obtain the longest side of the polygon through S32, and record the coordinates of the two endpoints of the longest side; S34. Determine the orientation by calculating the direction angle of the longest side using the arctangent function. The calculation formula is: Where θ is the orientation angle of the side, expressed in radians or degrees, and atan2 is the two-parameter arctangent function that determines the quadrant of the direction. This represents the displacement difference of the longest side on the Y-axis. This represents the displacement difference of the longest side on the X-axis.

[0010] Furthermore, in S4, the buffer algorithm constructs a buffer range centered on the building to be generated, which is a solar spacing coefficient away from the building. The buffer range is either circular or rectangular, thus obtaining the building spacing buffer.

[0011] Furthermore, in S5, the nine-intersection model algorithm performs spatial superposition operations on the layout area of ​​the building to be generated and the building spacing buffer through Boolean operations. By subtracting the superimposed building spacing buffer from the target spatial range through difference operations, the remaining spatial range is obtained.

[0012] Furthermore, the polygon segmentation algorithm in S2 and the nine-intersection model algorithm in S5 together constitute an automated layout process that can iterate continuously. By continuously segmenting the remaining space range and avoiding the building spacing buffer of the already generated buildings, the building layout that meets the requirements of sunlight spacing and setback line is automatically completed.

[0013] Furthermore, in S8, the roof algorithm extracts the main skeleton line of the building plan outline to obtain the centerline position of the building, determines the slope parameters on both sides of the roof based on the centerline, and generates the three-dimensional geometry of the roof that conforms to the set slope.

[0014] Furthermore, this method is implemented using JavaScript and Rust, and can be deployed on web, PC, or mobile devices.

[0015] This application also provides a system for parametrically generating the three-dimensional spatial form of urban buildings, used to implement the method for parametrically generating the three-dimensional spatial form of urban buildings as described above, including: The parameter input module is used to receive target spatial range and building layout parameters input by the user. The layout generation engine, which includes an algorithm library and processing logic, is used to execute S2 to S6 in sequence to automatically generate the two-dimensional base surface layout of the building. A 3D modeling engine for executing S7 and S8, converting 2D layouts into LOD2 level building models with roof structures; The material processing module is used to execute S9 to apply textures, configure materials and textures for the building model, and obtain a LOD3 level building model. The model output module is used to execute S10 and export the building model into a common 3D model file format.

[0016] The beneficial effects of the technical solution provided in this application include at least the following: (1) This application enables users to quickly generate multiple layout schemes by controlling only a few key parameters through preset parameter templates and intelligent reasoning mechanisms. The generation process is driven by input parameters that reflect the latest planning regulations, and the generated results can accurately and scientifically meet the current constraints.

[0017] (2) This application integrates algorithms such as polygon segmentation, maximum inscribed rectangle, buffer, nine-intersection model, and roof generation into a closed-loop iterative process, which saves design time and manpower costs and makes the layout results more scientific and repeatable.

[0018] (3) This application uses texture mapping algorithm and material mapping algorithm to transform the building model from a white model into a more realistic LOD2 and LOD3 model, which can directly produce finished models for city-level visualization, simulation analysis and scheme presentation. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the present application and form part of the specification. They are used together with the embodiments of the present application to explain the application and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating the method in one embodiment of the present invention; Figure 2 This is a schematic diagram illustrating specific steps in one embodiment of the present invention; Figure 3 This is a schematic diagram of the longest edge orientation algorithm in one embodiment of the present invention; Figure 4 This is a schematic diagram of a buffer algorithm in one embodiment of the present invention; Figure 5 This is a schematic diagram of the spatial relationship of the nine-intersection model in one embodiment of the present invention; Figure 6 This is a schematic diagram of the nine-intersection model algorithm in one embodiment of the present invention.

[0020] Explanation of key figure labels: 10. Target space range; 20. Layout area; 30. Building spacing buffer zone; 40. Remaining space range; 50. Primary building model; 60. Building body model; 70. Building model. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] In this specification, identical components are represented by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, while the terms "bottom surface," "top surface," "inner," and "outer" refer to directions towards or away from a specific component, respectively. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this specification, "multiple" means two or more.

[0023] Terminology Explanation: Parametric modeling: Parametric modeling is a modeling method based on parameter control. Its core idea is to abstract the geometric shapes, structural elements, and planning indicators in architectural design into a set of adjustable parameters (such as length, width, height, number of floors, depth, bay width, floor area ratio, building density, sunlight spacing, etc.), and drive the generation and changes of the model by setting the logical relationships and constraints between the parameters.

[0024] Generative Adversarial Networks (GANs) are an artificial intelligence method consisting of two parts: a "generator" responsible for creating new data, and a "discriminator" responsible for judging whether the data is real or fake. The generator and discriminator compete against each other; the generator continuously improves its "forgery" skills, while the discriminator continuously improves its "recognition" capabilities. After multiple rounds of training, the generator can produce results that are very close to real data. In architectural design, GANs can be used to automatically generate building floor plans or 3D layout schemes. Its advantage is that it can learn patterns from a large number of design drawings to generate diverse and reasonable schemes; however, its disadvantages include the need for a large amount of training data, and the fact that the generated results are sometimes difficult to interpret.

[0025] Rhino + Grasshopper: Rhino (Rhinoceros) is a commonly used 3D modeling software capable of accurately handling complex surfaces and architectural geometry, widely used in architecture, industrial design, and urban planning. Grasshopper is a visual programming plugin for Rhino, allowing users to control model parameters by dragging and dropping "nodes" and establishing logical relationships. Designers can convert building height, number of floors, depth, spacing, etc., into parameters, and use Grasshopper to build a rule framework, achieving automated modeling and rapid iteration.

[0026] Evolutionary algorithms are a class of intelligent optimization methods that simulate the natural evolutionary process. They transform a design problem into a "population," where each candidate solution is like an "individual." Through operations such as selection, crossover, and mutation, the algorithm iterates continuously, much like how organisms gradually adapt to their environment during evolution. Ultimately, the algorithm retains the best-performing solution, gradually approaching the optimal solution.

[0027] Geometric modeling: Geometric modeling is a common method in computer graphics and architectural design, which uses regular geometric shapes (such as points, lines, surfaces, cuboids, cylinders, etc.) to represent the form of buildings or urban spaces. By combining, stretching, rotating, and superimposing geometric shapes, three-dimensional models of buildings, roads, terrains, etc., can be quickly constructed.

[0028] Image reconstruction: Image reconstruction is the process of restoring or generating the shape of an object using computer algorithms based on existing images, photographs, or scanned data. Common methods include extrapolating three-dimensional shapes from two-dimensional images or completing blurry or incomplete images into clear and complete results.

[0029] Setback distance: This is a basic control indicator in architectural design and urban planning, referring to the minimum horizontal distance that must be maintained between the exterior wall of a building and the land boundary line, road boundary, or adjacent buildings.

[0030] Height above ground: refers to the vertical distance between the bottom of a building or structure and the natural ground. It is usually used to measure the elevation of the first floor of a building or the height of the elevated portion of a building.

[0031] Sunlight Spacing Coefficient: The sunlight spacing coefficient is a control indicator in architectural planning and design, used to measure the minimum distance between adjacent buildings to ensure that residential buildings can obtain the prescribed amount of sunlight on the winter solstice or during a specific period.

[0032] The fifth facade: The fifth facade is a concept in architectural design, referring to the roof of a building. Traditional architecture emphasizes the design of four facades (east, south, west, and north), but with increasing urban density and the prevalence of bird's-eye views, the roof is also regarded as the "fifth facade" of a building.

[0033] Total building size: The sum of the sizes of all buildings. The size of each building is the sum of its length, width, and number of floors.

[0034] Architectural texturing: It's like pasting a patterned piece of paper onto a blank sheet of paper. The model itself is just a "shape," and the texture is like covering it with a two-dimensional image, giving the surface the appearance of patterns, colors, and markings. In other words, pasting a "photo of a brick wall" onto the wall of a 3D architectural model will make it look like a real brick wall. The goal of texturing algorithms is to map a two-dimensional image (texture map) onto the surface of a 3D model. Building texture mapping: It's not just about applying patterns; it's also about telling the model what material the surface is (wood, glass, metal, concrete, etc.) and giving it physical properties such as reflectivity, roughness, transparency, and refractive index, making 3D architecture closer to reality.

[0035] White model: The building is entirely white, without color or texture, and does not show the building's material effects. However, it can show information such as the number of floors, height, width, and area of ​​the building. It does not show the exterior wall material, color, or landscape details. Before the building meets the parameter requirements, the generated building is presented in the form of a white model. The white model can reduce the interference of color, highlight the shape and spatial distribution of the building, and is quick to produce, easy to compare different schemes, and suitable for repeated modifications.

[0036] LOD2 model: A building model with a roof shape (such as a gable roof, flat roof, or complex roof), like a white model building, but with smooth walls and no windows. It can be used for urban landscape assessment, solar radiation analysis, and rooftop photovoltaic planning.

[0037] LOD3 Model: A high-precision exterior model with accurate roof shape, facade texture, windows, doors and other architectural exterior details and materials, used for visualization, virtual reality (VR) and digital twin appearance.

[0038] LOD4 Model: The LOD3 integrated indoor and outdoor model can simulate indoor navigation and fire evacuation based on the appearance and interior structure (rooms, stairs, furniture, etc.).

[0039] Building layout priority strategies: When laying out buildings within a certain plot of land, different priority strategies can be adopted. For example, prioritizing the largest building area, the largest building height, or the largest building width. Based on different priority strategies, different building layouts can ensure that they meet the requirements of maximizing area, height, or width.

[0040] Example 1 Please refer to Figures 1-6 A method for parametrically generating the three-dimensional spatial form of urban buildings, comprising the following steps: S1. Input the polygon boundary of the target space range of 10 and the building layout parameters. The building layout parameters include at least the number of buildings, building height information, setback distance and sunlight spacing coefficient. S2. Generate a layout area 20 for the building to be generated from the target space range 10 using a polygon segmentation algorithm; S3. Within the layout area 20, the two-dimensional base surface of the building to be generated is obtained by using the maximum inscribed rectangle algorithm and the longest side orientation algorithm of the building. S4. Based on the two-dimensional base surface, the setback distance, and the solar spacing coefficient, the building spacing buffer 30 of the building to be generated is obtained through the buffer algorithm; S5. Using the nine-intersection model algorithm, the target space range 10, the two-dimensional base surface and the building spacing buffer 30 are superimposed and analyzed to obtain the available remaining space range 40. S6. Take the remaining space range 40 as the new target space range 10, and repeat S2 to S5 until a set of two-dimensional base surfaces that meets the number of buildings is generated. S7. Based on the building height information, extrude each surface in the two-dimensional base surface set in three dimensions to generate a primary building model 50 at LOD1 level. S8. Generate the 3D geometry of the roof of each building's primary model 50 using the roof algorithm to obtain the building body model 60 at LOD2 level. S9. Apply textures, configure materials and textures to the obtained building model 60 to obtain a LOD3 level building model 70; S10. Export the completed building model 60 with material attachments as a common 3D model file format.

[0041] In this embodiment, as Figure 1 , 2 As shown, where, as Figure 2 As shown, the number of buildings is 4, the building length is 14-80m, and the maximum building area is 41,000m². 2 Taking a building spacing of building height * 1.2 and a daylighting spacing coefficient of 1.6 as an example, the specific generation steps are as follows.

[0042] In step S1: The system receives user input or reads two key initial data points from the system database: the target spatial range 10 and building layout parameters. The target spatial range 10 is a two-dimensional polygon boundary used for building layout, defining the geometric outline of the generated area. The building layout parameters are a set of rules and indicators used to control the generation process, including at least the number of buildings, building height information, setback distance, and sunlight spacing coefficient.

[0043] In step S2, the target spatial range 10 input in step S1 is used as the initial working area. The polygon segmentation algorithm is used to segment the area to generate the first candidate area for the building to be placed. This segmentation can be a simple division of the area according to the area, or it can be combined with a layout priority strategy, such as area priority and edge priority intelligent division, so as to define a preliminary placeable range for a single building from the overall land use, as the basis for subsequent precise positioning.

[0044] In step S3, precise positioning is performed within the layout area 20 generated in step S2. First, the maximum inscribed rectangle algorithm is used to find the largest inscribed rectangle within the area. This rectangle represents the most regular and largest building base shape that can be arranged within the area. Then, the longest side orientation algorithm is applied, usually taking the direction of the longest side of the maximum inscribed rectangle as the main orientation of the building. The final determined rectangle or polygon is the two-dimensional base surface of the building to be generated, which has precise position, size, and orientation.

[0045] In step S4, to ensure that the generated building meets regulatory requirements, its influence range needs to be calculated. Based on the two-dimensional base surface obtained in step S3, the base surface is first contracted inward according to the setback distance to obtain the actual construction outline that meets the setback requirements. Then, based on this outline, combined with the building height information and the sunlight spacing coefficient, a building spacing buffer 30 is generated by expanding outward through the buffer algorithm. The range of this buffer is the space area that meets the sunlight regulations and that other buildings are not allowed to intrude into, thereby converting the spacing coefficient into a specific space area.

[0046] In step S5, after arranging a building and its building spacing buffer zone 30, this area needs to be subtracted from the total land area for the next round of arrangement. Using the nine-intersection model algorithm, spatial overlay analysis is performed on the target space range 10, the two-dimensional base surface and the building spacing buffer zone 30. The occupied base surface and the protected buffer zone are subtracted from the original target space range 10 to obtain the available remaining space range 40, thereby ensuring that subsequent buildings do not conflict with the generated buildings in terms of space and sunlight.

[0047] In step S6, the remaining space range 40 obtained in step S5 is used as the new target space range 10. The process returns to step S2, and the loop process of S2-S3-S4-S5 is repeated. In each loop, a two-dimensional base surface of a building and its corresponding buffer are generated, and the remaining available space is updated. This iterative process continues until the number of buildings generated reaches the building number requirement set in step S1. Finally, a set of two-dimensional base surfaces containing all buildings is output, where each two-dimensional base surface automatically satisfies the hard constraints of setback and sunlight spacing.

[0048] In step S7, based on the building height information input in step S1, such as the specific height value of each building, each polygon face in the two-dimensional base surface set obtained in step S6 is three-dimensionally stretched along the vertical direction to generate the corresponding three-dimensional polyhedron, resulting in a primary building model 50 at the LOD1 level containing only the basic volume.

[0049] In step S8, the roof surface of each LOD1 level primary building model 50 generated in step S7 is processed, and a detailed three-dimensional roof geometry is added to it through the roof algorithm, upgrading it to a LOD2 level building model 60, so that the model changes from a simple block to a building shell with a real roof shape.

[0050] In step S9, based on the building material and building texture parameters set in step S1, corresponding material properties, such as reflectivity and roughness, are configured for each surface of the LOD2 level building model 60 obtained in step S8, such as exterior walls, roofs, and glass curtain walls, and texture images, such as brick wall textures and tile textures, are mapped to upgrade it to a LOD3 level building model 70, thereby enhancing the building's visual realism and information dimension.

[0051] In step S10, the LOD3 level architectural model 70 with material textures, completed in step S9, is converted into a universal, cross-platform 3D model file format using a 3D model export algorithm. Preferably, the export format is .obj, .gltf, or .glb. These formats are directly supported by most 3D modeling software (such as 3ds Max, SketchUp, Blender), game engines (such as Unity, Unreal Engine), and WebGL and WebGPU rendering platforms, ensuring the wide applicability of the generated results.

[0052] In the above steps, the complexity of manual input is reduced by using preset parameter templates and intelligent reasoning mechanisms. Users only need to control a few key parameters to quickly generate multiple layout schemes. By driving the generation process with input parameters reflecting the latest planning regulations (such as setback distance and sunlight spacing coefficient), reliance on potentially outdated or non-compliant historical datasets is avoided, ensuring that the generated results accurately and scientifically meet current constraints. Furthermore, by integrating algorithms such as polygon segmentation, maximum inscribed rectangle, buffer, nine-intersection model, and roof generation into a closed-loop iterative process, no hand-drawn sketches or CAD base maps are required, nor is manual intervention in layout iteration, saving design time and labor costs. Simultaneously, by objectively iterating through the algorithm chain to find spatial layout schemes that meet all hard constraints, the uncertainty and time-consuming problems caused by excessive reliance on designers' subjective experience for scheme selection and comparison in traditional methods are avoided, making the layout results more scientific and repeatable.

[0053] This method uses texture mapping and material application algorithms to transform the building model 60 from a blank model into more realistic LOD2 and LOD3 models. It can directly produce finished models for city-level visualization, simulation analysis, and project presentation, avoiding the problems of model abstraction and the need for extensive post-processing refinement in existing technologies.

[0054] The texturing algorithm maps a two-dimensional image (texture map) onto the surface of a three-dimensional model. Its key technologies include: using UV mapping to map each point on the three-dimensional surface to two-dimensional image coordinates; and texture coordinate interpolation: calculating the pixel color based on the UV coordinates of the triangle vertices during rendering.

[0055] Material application algorithms give 3D models physical properties such as reflectivity, roughness, transparency, and refractive index, making 3D buildings more realistic.

[0056] More specifically, in S1, the building layout parameters also include at least the building width information, building length information, total building size, distance from the ground, single-story height, building height type, building shape type, fifth facade, building orientation, building color, building texture, and building material.

[0057] In this embodiment, by introducing and integrating more than ten specific parameters such as building width information, building length information, total building scale, distance from the ground, single-story height, building height type, building shape type, fifth facade, building orientation, building color, building texture, and building material, a refined and comprehensive parametric control system is constructed. This allows the generation process to not only meet basic spatial and regulatory constraints, but also to achieve multi-level and fine-grained precise control over the form of individual buildings, group combination relationships, facade aesthetic expression, and visual realism.

[0058] In S2, the polygon segmentation algorithm divides the target space range 10 into multiple regularly arranged regions 20, and the shape of the arranged regions 20 is a concave polygon or a convex polygon.

[0059] In this embodiment, the polygon segmentation algorithm is the process of breaking down a complex polygon into multiple simple polygons (or basic units). This makes subsequent modeling, rendering, analysis, or calculation more efficient and accurate. The initial target space range 10 is an irregular plot outline (polygon). The polygon segmentation algorithm cuts it into some more regular arrangement areas 20 (such as concave polygons and convex polygons), making the calculation of each piece easier.

[0060] Specifically, such as Figure 3 As shown, in S3, the maximum inscribed algorithm is a method to find the inscribed shape with the largest area (or largest diameter) within a given shape. After the first division, the maximum inscribed algorithm is used to construct the largest building between the dividing line and the known plot. To determine whether the plot is oriented east-west or north-south, it is necessary to identify its longest edge, and then use the direction of this edge as the orientation of the entire plot. Therefore, the orientation of the constructed building can be calculated using an orientation algorithm. This algorithm uses the longest edge of the polygon to determine the overall orientation. The longest edge orientation algorithm for buildings includes the following steps: S31. Input the vertex coordinates of the building; S32. Calculate the length of each side of the polygon using the following formula: ,in, The length of the side. , Let these be the coordinates of the starting point of the edge. , Let be the coordinates of the endpoint of the edge; S33. Obtain the longest side of the polygon through S32, and record the coordinates of the two endpoints of the longest side; S34. Determine the orientation by calculating the direction angle of the longest side using the arctangent function. The calculation formula is: Where θ is the orientation angle of the side, expressed in radians or degrees, and atan2 is the two-parameter arctangent function that determines the quadrant of the direction. This represents the displacement difference of the longest side on the Y-axis. This represents the displacement difference of the longest side on the X-axis.

[0061] More specifically, in S4, the buffer algorithm constructs a buffer range centered on the building to be generated, which is one solar spacing coefficient away from the building. The buffer range is either circular or rectangular, to obtain a building spacing buffer of 30.

[0062] In this embodiment, as Figure 4 As shown, in order to meet the lighting conditions of the building, a daylighting spacing coefficient is set to control the spacing between buildings and ensure the duration of sunshine. For example, if the daylighting spacing coefficient is 1.6, a ring-shaped range 1.6 away from the building is constructed with the entire building as the center. The next building must be generated outside this ring-shaped range in order to meet the daylighting conditions.

[0063] In addition, in S5, the nine-intersection model algorithm performs spatial superposition operation on the layout area 20 of the building to be generated and the building spacing buffer 30 through Boolean operation. After subtracting the superimposed building spacing buffer 30 from the target spatial range 10 through the difference operation, the remaining spatial range 40 is obtained.

[0064] The nine-intersection model primarily determines the spatial topological relationships between geometric objects by analyzing the intersections of their interiors, exteriors, and boundaries. (See below.) Figure 5As shown, the two shapes have different spatial relationships: such as being separate, connected, or overlapping, which are methods of superimposing, intersecting, and erasing two polygons. In this embodiment, when generating the building layout, the first building is first generated based on the known defined plot area. To meet the sunlight requirements, a building spacing buffer zone 30 is constructed around the first building to maintain the necessary building spacing. Subsequently, the second building to be generated should be arranged in an area that does not overlap with the building spacing buffer zone 30 of the first building. To determine this available area, Boolean operations are used, such as... Figure 6 As shown, the original plot area and the building spacing buffer 30 are spatially superimposed. Through the difference operation, that is, the remaining position after the known plot is subtracted from the building spacing buffer 30, the remaining buildable land is determined, that is, the remaining spatial range 40. The subsequent buildings are generated in the same way.

[0065] Among them, the polygon segmentation algorithm in S2 and the nine-intersection model algorithm in S5 together constitute an automated layout process that can be iterated in a loop. By continuously segmenting the remaining space range 40 and avoiding the building spacing buffer 30 of the already generated buildings, the building layout that meets the requirements of sunlight spacing and setback line is automatically completed.

[0066] In this embodiment, the two core operations of segmentation and overlay analysis are seamlessly integrated and placed in a loop, enabling the system to have self-propelled and constraint-checking capabilities. Each iteration is a complete micro-loop of segmentation and positioning, calculation buffer, and overlay erasure, realizing fully automated derivation of layout schemes from scratch and from one to many. The generation of each new building is strictly based on the building spacing buffer 30 that completely avoids all already generated buildings, effectively preventing unintentional violations or chain errors caused by later adjustments that may occur during manual layout, greatly improving the compliance and reliability of the scheme.

[0067] In addition, in S8, the roof algorithm extracts the main skeleton line of the building plan outline to obtain the centerline position of the building, determines the slope parameters on both sides of the roof based on the centerline, and generates the three-dimensional geometry of the roof that conforms to the set slope.

[0068] In this embodiment, when generating the building model 60, a roof algorithm is used to extract the centerline, i.e., the ridge, to construct a roof with double slopes. The double-sloped roof consists of two slopes, a front and a back, and its roof cross-section has a triangular structure. The intersection of the two slopes is the centerline of the roof. The roof algorithm extracts the main skeleton line of the building's planar outline (which can be a rectangle or any irregular polygon) to obtain the location of the building's centerline. Based on the centerline, the slope parameters on both sides of the roof can be further determined, and a roof geometry conforming to the set slope can be generated accordingly.

[0069] In particular, this method is implemented using JavaScript and Rust and can be deployed on web, PC, or mobile devices.

[0070] In this embodiment, developed using common languages ​​such as JavaScript / Rust, it can be deployed on web, PC, and mobile platforms, breaking free from the constraints of specific professional desktop software like Rhino+Grasshopper. Simultaneously, it supports exporting common 3D model data formats such as .obj, .gltf, and .glb, allowing for secondary editing in common 3D modeling software like 3ds Max, SketchUp, and Blender, thus enhancing the technology's applicability.

[0071] Example 2 This application also provides a system for parametrically generating the three-dimensional spatial form of urban buildings, used to implement a method for parametrically generating the three-dimensional spatial form of urban buildings, including: The parameter input module is used to receive user input of the target spatial range 10 and building layout parameters; The layout generation engine, which includes an algorithm library and processing logic, is used to execute S2 to S6 in sequence to automatically generate the two-dimensional base surface layout of the building. A 3D modeling engine for executing S7 and S8, converting 2D layouts into LOD2 level building models with roof structures. The material processing module is used to execute S9 to apply textures, configure materials and textures for the building model 60, and obtain the building model 70 at LOD3 level. The model output module is used to execute S10, which exports the building model 70 into a common 3D model file format.

[0072] In this embodiment, the parameter input module serves as the interaction front-end between the system and the user, responsible for collecting the initial data required for all generation tasks. Specifically, it includes: Graphical Extent Drawing Component: Provides a map or canvas interface that allows users to intuitively define the polygon boundary of a target spatial extent of 10 by clicking, dragging, or importing boundary coordinate files (such as GeoJSON, SHP).

[0073] Parametric Forms and Controls Unit: This unit provides a series of interactive controls such as forms, sliders, and drop-down menus to receive user-defined building layout parameters. This unit includes at least basic controls for inputting information such as the number of buildings, setback distance, sunlight spacing coefficient, and building height. Preferably, this unit also provides dedicated controls for inputting more than ten parameters, including building width, length, total size, distance from ground level, single-story height, building shape type, fifth facade, building orientation, building color, building textures, and building material identifiers, forming a comprehensive parameter control panel.

[0074] Data validation and formatting unit: validates the validity of user input data (such as numerical range and polygon closure), packages and formats the received graphic and parameter data into a common data structure within the system (such as a JSON object), and passes it to the downstream layout generation engine.

[0075] The layout generation engine is responsible for performing all automated calculations from space allocation to the final 2D layout generation. Internally, it includes: Algorithm Library: A software library integrating multiple core geometric and spatial analysis algorithms. This library includes at least: a polygon segmentation algorithm for spatial partitioning; a maximum inscribed rectangle algorithm for finding the optimal building location within a region; an algorithm for determining the orientation of the longest side of a building's main direction; a buffer algorithm for calculating the building's protected area; and a nine-intersection model algorithm for spatial overlay analysis.

[0076] Processing Logic Controller: A control program that schedules and executes algorithms from the algorithm library according to a predefined workflow. It strictly follows method steps S2 to S6: First, it calls the polygon segmentation algorithm to divide the current spatial area. Within the segmented area, it sequentially calls the maximum inscribed rectangle algorithm and the longest side orientation algorithm to determine the base surface of each building. Then, it calls the buffer algorithm, combining the setback distance and the sunlight spacing coefficient, to calculate the restricted building buffer zone for the building. Finally, it calls the nine-intersection model algorithm to erase the occupied base surfaces and buffer zones from the total land area, obtaining new remaining space. The new remaining space is fed back to step 1 to start the next iteration, until the building quantity requirement is met.

[0077] The 3D modeling engine receives the set of 2D base surfaces and related height parameters output by the layout generation engine, and is responsible for constructing the 3D geometric model. Specifically, this includes: 3D Extrusion Element: Based on the building height information corresponding to each 2D base surface, a corresponding 3D polyhedron is generated through a linear extrusion operation, namely the LOD1 level primary building model 50.

[0078] Roof Generation Unit: Responsible for upgrading the LOD1 level building primary model 50 to the LOD2 level building volume model. This unit has a built-in roof algorithm, especially the polygon main skeleton line extraction algorithm.

[0079] The material processing module gives the 3D geometric model a visual appearance, enhancing realism and upgrading LOD2 level building model 60 to LOD3 level building model 70. Specifically, it includes: Material Library: A pre-built or expandable database that stores the physical properties (such as color, albedo, roughness) of various materials (such as concrete, glass, bricks) and their corresponding texture maps.

[0080] Texture Mapping and UV Unwrapping Unit: Automatically calculates texture coordinates (UV) for each surface (walls, roof) of each building model generated by the 3D modeling engine, ensuring that the texture can be correctly wrapped and projected onto the 3D geometry, avoiding stretching or distortion.

[0081] Material binding unit: Based on the building material and building texture identifier transmitted from the parameter input module, retrieve the corresponding material properties and texture images from the material library, and bind them to the corresponding mesh surface of the model to complete the visual definition of the model.

[0082] The model output module is the final output of the system, and it specifically includes: Format Converter: An encoder that supports multiple 3D file format encodings. It encodes internal 3D mesh data, material definitions, texture references, and other information into a universal 3D file format. The core of this converter supports exporting .gltf and its binary variant .glb formats due to their efficiency and widespread support. It also supports the traditional .obj format as a supplement.

[0083] The file packaging and output unit packages the converted 3D model files (and possibly separate texture image files) and provides them to the user via HTTP download, cloud storage link, or direct writing to the local disk. This unit is also responsible for generating lightweight scene description files to organize model relationships in scenes with multiple buildings.

[0084] In the embodiments disclosed in this application, the terms "installation," "connection," "linking," and "fixing" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; "linking" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments disclosed in this application according to the specific circumstances.

[0085] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for parametrically generating the three-dimensional spatial form of urban buildings, characterized in that, Includes the following steps: S1. Input the polygonal boundary of the target space and the building layout parameters, wherein the building layout parameters include at least the number of buildings, building height information, setback distance and sunlight spacing coefficient; S2. Generate a layout area for the building to be generated from the target space using a polygon segmentation algorithm; S3. Within the layout area, the two-dimensional base surface of the building to be generated is obtained by using the maximum inscribed rectangle algorithm and the longest side orientation algorithm of the building. S4. Based on the two-dimensional base surface, the setback distance, and the solar spacing coefficient, the building spacing buffer of the building to be generated is obtained through a buffer algorithm. S5. Using the nine-intersection model algorithm, the target spatial range, the two-dimensional base surface, and the building spacing buffer are superimposed and analyzed to obtain the available remaining spatial range; S6. Using the remaining spatial range as the new target spatial range, repeat steps S2 to S5 until the set of two-dimensional base surfaces that meets the number of buildings is generated. S7. Based on the building height information, each surface in the two-dimensional base surface set is three-dimensionally stretched to generate a primary building model at LOD1 level. S8. Generate the 3D geometry of the roof of each of the primary building models using the roof algorithm to obtain a building model at LOD2 level. S9. Apply textures, configure materials and textures to the building model to obtain a LOD3 level building model; S10. Export the building model with the completed material attachment as a common 3D model file format.

2. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, In S1, the building layout parameters also include at least the building width information, building length information, total building size, distance from the ground, single-story height, building height type, building shape type, fifth facade, building orientation, building color, building texture, and building material.

3. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, In S2, the polygon segmentation algorithm divides the target space into multiple regular arrangement regions, the shape of which is a concave polygon or a convex polygon.

4. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, In S3, the algorithm for the orientation of the longest side of a building includes the following steps: S31. Input the vertex coordinates of the building; S32. Calculate the length of each side of the polygon using the following formula: Where L is the length of the side. , Let these be the coordinates of the starting point of the edge. , Let be the coordinates of the endpoint of the edge; S33. Obtain the longest side of the polygon through S32, and record the coordinates of the two endpoints of the longest side; S34. Calculate the orientation angle of the longest side using the arctangent function. The calculation formula is: Where θ is the orientation angle of the side, expressed in radians or degrees, and atan2 is the two-parameter arctangent function that determines the quadrant of the direction. The displacement difference of the longest side on the Y-axis. The displacement difference of the longest side on the X-axis.

5. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, In S4, the buffer algorithm constructs a buffer range centered on the building to be generated, which is one solar spacing coefficient away from the building. The buffer range is either circular or rectangular, to obtain the building spacing buffer.

6. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, In S5, the nine-intersection model algorithm performs a spatial superposition operation on the layout area of ​​the building to be generated and the building spacing buffer through Boolean operation, and obtains the remaining spatial range by subtracting the superimposed building spacing buffer from the target spatial range through a difference operation.

7. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, The polygon segmentation algorithm in S2 and the nine-intersection model algorithm in S5 together constitute an automated layout process that can iterate cyclically. By continuously segmenting the remaining space range and avoiding the building spacing buffer of the already generated buildings, the system automatically completes the building layout that meets the requirements of sunlight spacing and setback line.

8. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, In step S8, the roof algorithm extracts the main skeleton line of the building plan outline to obtain the centerline position of the building, determines the slope parameters on both sides of the roof based on the centerline, and generates the three-dimensional geometry of the roof that conforms to the set slope.

9. The method for parametric generation of three-dimensional spatial morphology of urban buildings according to claim 1, characterized in that, The method is implemented using JavaScript and Rust and can be deployed on web, PC, or mobile devices.

10. A system for parametrically generating three-dimensional spatial forms of urban buildings, characterized in that, The method for parametrically generating the three-dimensional spatial form of urban buildings as described in any one of claims 1-9 includes: The parameter input module is used to receive target spatial range and building layout parameters input by the user. The layout generation engine includes an algorithm library and processing logic, which is used to execute S2 to S6 in sequence to automatically generate the two-dimensional base surface layout of the building. A 3D modeling engine is used to execute S7 and S8 to convert the 2D layout into the building model at LOD2 level with a roof structure. The material processing module is used to execute S9 to apply textures, configure materials and textures for the building model, and obtain a LOD3 level building model. The model output module is used to execute S10 and export the building model into a common three-dimensional model file format.