Design drawing processing method and device, equipment and storage medium
By utilizing the boundary representation of cache space in the hard decoration design drawing, the design drawing can be directly generated, which solves the problem of high computational resource consumption in the hard decoration design drawing and achieves performance savings.
Patent Information
- Application Number
- CN202310754524.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-06-25
AI Technical Summary
During the design and modification of hard decoration design drawings, existing technology requires recalculation of the geometric boundary of each grid area, resulting in excessive consumption of computing resources and high performance overhead.
By obtaining the encoded representation of the region to be stretched from the target 2D sketch panel and querying the existing boundary representation from the cache space, the design drawing is directly generated without repeated calculations.
This reduces the consumption of computing resources during the design and modification of hardware installation schemes, thus saving performance overhead.
Smart Images

Figure CN116776408B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet information processing technology, and in particular to a method, apparatus, device and storage medium for processing design drawings. Background Technology
[0002] Current home decoration designs often involve complex hard furnishing designs, such as intricate grid patterns used in large feature walls. Furthermore, these designs inevitably require repeated revisions based on client feedback during subsequent communication. For such large-area hard furnishing designs, recalculating the geometric boundaries of each grid area in the design drawings is often necessary during design and modification. Clearly, this consumes significant computational resources during each design and modification process, resulting in considerable performance overhead. Therefore, providing further solutions to reduce the computational resources consumed during the design and modification of hard furnishing schemes, thereby saving performance costs, remains crucial. Summary of the Invention
[0003] This application provides a method, apparatus, device, and storage medium for processing design drawings, which reduces the computational resources consumed during the design and modification of hard decoration scheme design drawings, thereby saving performance overhead.
[0004] This application embodiment also provides a method for processing a design drawing, including: obtaining multiple target regions to be stretched from a target two-dimensional sketch panel, each target region including a region identifier, a stretching height, and coordinates of vertices and edges constituting the target region; encoding the multiple target regions based on the coordinates of the vertices and edges constituting the multiple target regions, the stretching height, and the corresponding region identifiers to obtain encoded representations of the multiple target regions; obtaining the boundary representation of the stretched shape corresponding to the encoded representation of a first target region from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target region is a target region among the multiple target regions whose boundary representations of the stretched shapes corresponding to the encoded representations exist in the target cache space, and the target cache space stores the boundary representations of stretched shapes obtained by stretching multiple regions drawn in the target two-dimensional sketch panel; and generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretched shape corresponding to the first target region.
[0005] This application embodiment also provides a design drawing processing apparatus, including: a region acquisition module, used to acquire multiple target regions to be extruded from a target two-dimensional sketch panel, each target region including a region identifier, an extrusion height, and coordinates of vertices and edges constituting the target region; a region encoding module, used to encode the multiple target regions based on the coordinates of vertices and edges constituting the multiple target regions, the extrusion height, and the corresponding region identifier, to obtain an encoded representation of the multiple target regions; a boundary representation acquisition module, used to acquire the boundary representation of the extruded shape corresponding to the encoded representation of a first target region from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target region is a target region in the multiple target regions whose boundary representation of the extruded shape corresponding to the encoded representation exists in the target cache space, and the target cache space stores the boundary representation of the extruded shape obtained by extruding multiple regions drawn in the target two-dimensional sketch panel; and a design drawing generation module, used to generate a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the extruded shape corresponding to the first target region.
[0006] This application embodiment also provides an electronic device, including: a memory and a processor; the memory is used to store a computer program; the processor, coupled to the memory, is used to execute the computer program for: obtaining a plurality of target regions to be stretched from a target two-dimensional sketch panel, each target region including a region identifier, a stretching height, and coordinates of vertices and edges constituting the target region; encoding the plurality of target regions based on the coordinates of the vertices and edges constituting the plurality of target regions, the stretching height, and the corresponding region identifiers, to obtain encoded representations of the plurality of target regions; obtaining the boundary representation of the stretched shape corresponding to the encoded representation of a first target region from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target region is a target region in the plurality of target regions whose boundary representation of the stretched shape corresponding to the encoded representation exists in the target cache space, and the target cache space stores the boundary representations of stretched shapes obtained by stretching multiple regions drawn in the target two-dimensional sketch panel; and generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretched shape corresponding to the first target region.
[0007] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the processing method of the design drawing provided in this application.
[0008] In this embodiment, multiple target regions to be stretched can be obtained from the target 2D sketch panel. Each target region includes a region identifier, a stretching height, and the coordinates of the vertices and edges that make up the target region. Based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifier, the multiple target regions are encoded to obtain the encoded representation of each target region. In this way, based on the encoded representation of each target region, it is possible to determine whether each target region is a newly drawn region from the target cache space that stores the encoded representations of the stretched shapes obtained by stretching multiple regions drawn in the target 2D sketch panel. If the boundary representation of the stretched shape corresponding to the encoded representation of the first target region exists in the target cache space, the boundary representation of the stretched shape corresponding to the first target region can be directly obtained from the target cache space. Based on the boundary representation of the stretched shape corresponding to the first target region, the design drawing corresponding to the target 2D sketch panel can be generated, avoiding the need to re-stretch the first target region and reducing the computing resources occupied by stretching the first target region and calculating the boundary representation of the stretched shape obtained after stretching. This saves the performance overhead generated during the design and modification process of the design drawing corresponding to the target 2D sketch panel. Attached Figure Description
[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0010] Figure 1 A schematic diagram of a two-dimensional sketch panel provided for an exemplary embodiment of this application;
[0011] Figure 2 A schematic diagram of a boundary representation provided for an exemplary embodiment of this application;
[0012] Figure 3 A schematic diagram of a stretching model provided for an exemplary embodiment of this application;
[0013] Figure 4 A flowchart illustrating a method for processing design drawings provided in an exemplary embodiment of this application;
[0014] Figure 5 A schematic diagram of a two-dimensional sketch of a rigid fixture provided for an exemplary embodiment of this application;
[0015] Figure 6 The embodiments provided in this application are based on Figure 5 The code of each region in the two-dimensional design sketch shown is a schematic diagram of the boundary representation of the extruded shape of each region.
[0016] Figure 7 For the purposes of adopting the embodiments provided in this application, based on Figure 6 A schematic diagram of the boundary representation of the stretched shape obtained by merging the boundary representations of the various regions in the diagram.
[0017] Figure 8 For the purposes of adopting the embodiments provided in this application, based on Figure 7 A schematic diagram of the design drawing obtained by merging and stretching the shape;
[0018] Figure 9 A flowchart illustrating the application of the design drawing processing method provided in this application embodiment to a real-world scenario;
[0019] Figure 10 A flowchart illustrating the application of the design drawing processing method provided in this application embodiment to a real-world scenario;
[0020] Figure 11 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation
[0021] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0022] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.
[0023] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0024] First, the terms and concepts involved in one or more embodiments of this application will be explained.
[0025] Boundary Representation: In computer-aided design, boundary representation is a method for storing information about how to construct a model based on its geometry, especially Eulerian topological boundaries. It is often abbreviated as BREP (Boundary Representation). A key characteristic of boundary representation is that the information describing the shape includes both geometric and topological information. Topological information describes the connections between vertices, edges, and faces on the shape, forming the "skeleton" of the object's boundary representation. The geometric information of the shape can be seen as the muscles attached to the "skeleton." For example, if a face of the shape lies on a curved surface, the data defining the equation of this surface is geometric information. Furthermore, the shape of edges, the position of vertices in three-dimensional space (coordinates of points), etc., are all geometric information. Generally, geometric information describes the size, dimensions, position, and shape of the shape. In boundary representation, the boundary information records in detail the geometric information of all geometric elements constituting the shape and their interconnected topological relationships, following a volume-face-loop-edge-point hierarchy.
[0026] Mesh is an important concept in digital modeling. A 3D model consists of multiple triangles combined at different angles (sharing sides or corners), with each outer triangle forming a triangular mesh. Mesh is generally a discrete result of BREP and is the data type required for rendering and display.
[0027] Extrusion modeling: A common method for 3D modeling, which involves drawing a cross-sectional shape of a model on a sketch plane and then specifying an extrusion height to create a three-dimensional shape.
[0028] Sketch: A sketch is a 2D graphic associated with a solid model. This function allows you to create a sketch plane on any desired surface, thus creating a sketch. The sketch incorporates the concept of "constraints," which can be modified to change the graphic within the sketch. Using the sketch tools, users can draw approximate curved outlines, and by adding precise constraint definitions, fully express their design intent. The created sketch can also be extruded, rotated, and manipulated using solid modeling tools to generate a solid model associated with the sketch. When a sketch is modified, the associated solid model is automatically updated.
[0029] Hard decoration: refers to the fixed and immovable decorations added to the surface or interior of a building in order to meet the structural, layout, functional and aesthetic needs of the house, in addition to the necessary infrastructure.
[0030] The conventional method for hard-surface extrusion modeling is: first construct a 2D sketch panel (i.e. Figure 1The boundary representation of the two-dimensional sketch panel shown is shown in the figure. Figure 2 The boundary shown is a schematic diagram; then according to Figure 2 The boundaries shown represent the protrusion height (i.e., stretch height) of each area marked in the diagram, one by one. Figure 2 The corresponding region in the boundary representation shown is stretched. For example... Figure 3 As shown, the left image includes a region with a protrusion height of 100, and the right image includes a region with a protrusion height of 200. Therefore, it is necessary to... Figure 2 The two regions shown were stretched twice to obtain the desired shape. Figure 3 The diagram on the right shows the final stretched shape.
[0031] because Figure 3 All the regions shown are topologically connected. Therefore, this extrusion modeling method requires a complete recalculation of all data for each region in the 2D sketch panel and boundary representation whenever the design needs to be modified or redrawn. As the design becomes more complex, the number of such regions increases, leading to significant computational resource consumption for each design and modification, slowing down the process and resulting in substantial performance overhead.
[0032] To address this, this application provides a method for processing design drawings, which can obtain multiple target regions to be stretched from a target two-dimensional sketch panel. Each target region includes a region identifier, a stretching height, and the coordinates of the vertices and edges that make up each target region. Then, based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifier, the multiple target regions are encoded to obtain the encoded representation of each target region. This allows for the determination of whether each target region is a newly drawn region based on its encoded representation, from a target cache space storing encoded representations of extruded shapes obtained from multiple regions drawn in the target 2D sketch panel. If the boundary representation of the extruded shape corresponding to the encoded representation of the first target region exists in the target cache space, the boundary representation of the extruded shape corresponding to the first target region can be directly obtained from the target cache space. Based on the boundary representation of the extruded shape corresponding to the first target region, a design drawing corresponding to the target 2D sketch panel can be generated, avoiding the need to re-extrude the first target region and reducing the computational resources occupied by extruding the first target region and calculating the boundary representation of the extruded shape obtained after extrusion. This saves performance overhead during the design and modification process of the design drawing corresponding to the target 2D sketch panel. Specifically, this application provides a method for processing design drawings, and also relates to a processing apparatus, electronic device, and computer-readable storage medium for design drawings, which will be described in detail in the following embodiments.
[0033] Figure 4 This is a schematic flowchart illustrating a method for processing design drawings, provided as an exemplary embodiment of this application. Figure 4 As shown, the method includes:
[0034] Step 410: Obtain multiple target regions to be stretched from the target 2D sketch panel. Each target region contains a region identifier, stretch height, and coordinates of the vertices and edges that make up the target region.
[0035] The target 2D sketch panel is used to draw 2D design drawings. The coordinates of the vertices and edges of each target area are drawn on this panel, which can be obtained based on the built-in 2D coordinate system. Moreover, each target area is automatically assigned a unique area identifier, and the extrusion height of each target area can be set by the designer. Figure 5 A schematic diagram of a two-dimensional hard-mounted sketch provided for an exemplary embodiment of this application. Figure 5 The 2D sketch of the hard decoration shown includes 18 target areas to be stretched. Each target area has a corresponding area label and stretch height (i.e., Figure 5 The convex values shown) and the coordinates of the vertices and edges that make up the target area. The area identifier and the coordinates of the vertices and edges that make up the target area may not be displayed in the hard decoration 2D sketch, but can be obtained in the details of each target area (for example, clicking on each target area can display the details of each target area).
[0036] Step 420: Based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, the multiple target regions are encoded to obtain the encoded representation of the multiple target regions.
[0037] The edge line can include at least one of line segments, circles, and arcs. A line segment can be represented by the coordinates of its starting point and ending point, a circle can be represented by the coordinates of its center point and its radius, and an arc can be represented by the coordinates of its center point, its radius, the coordinates of its starting point, and the coordinates of its ending point. Based on this, the embodiments of this application can encode line segments, circles, and arcs.
[0038] In some exemplary embodiments, when multiple target regions contain only edge lines, the multiple target regions are encoded based on the coordinates of the vertices and edge lines constituting the multiple target regions, the stretching height, and the corresponding region identifiers to obtain an encoded representation of the multiple target regions, including:
[0039] Based on the coordinates of the vertices that make up multiple target regions, the vertices of the multiple target regions are encoded to obtain the vertices of the multiple target regions;
[0040] When there are line segments in the edges that make up multiple target regions, the start-point and end-point codes of the line segments in the multiple target regions are obtained from the codes of the vertices of the multiple target regions.
[0041] Based on the start-point and end-point codes of line segments in multiple target areas and the preset line segment codes, the line segments in multiple target areas are encoded to obtain the line segment codes in multiple target areas;
[0042] Based on the line segment codes, region identifiers, stretching heights, and preset region codes in multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0043] As an example, the vertex is encoded as x.toFixed(3)-y.toFixed(3), where x and y are the x and y coordinates of the vertex in the 2D sketch panel, respectively. ".toFixed(3)" is used to indicate that three decimal places should be retained. It should be understood that ".toFixed(3)" is only an illustrative example and does not constitute a limitation on the precision of vertex coordinates.
[0044] As an example, the encoding method for line segments is 'l2d'-(start point encoding)-(end point encoding), where 'l2d' is an example of a preset line segment code and does not constitute a limitation on the preset line segment code. The start point code is obtained by encoding the start point of the line segment according to the vertex encoding method, and the end point code is obtained by encoding the end point of the line segment according to the end point encoding method. The encoding method for each target region is 'f2d'-face.id-face.height-(encoding of all edges of the target region), where 'f2d' is an example of a preset region code, face.id is the region identifier of the target region, face.height is the stretch height of the target region, and all edges of the target region are all the line segments that make up the target region.
[0045] In some exemplary embodiments, when multiple target regions contain only edges and circles, each target region in the multiple target regions is encoded based on its line segment code, region identifier, stretching height, and preset region code to obtain an encoded representation of each target region in the multiple target regions, including:
[0046] When there are circles in the edges that make up multiple target regions, obtain the center point code of the circle in each target region from the code of the vertices of the multiple target regions, and determine the radius of the circle based on the coordinates of the edges that make up the multiple target regions;
[0047] Based on the center point encoding and radius of circles in multiple target regions and the preset circle code, the circles in multiple target regions are encoded to obtain the circle codes of multiple target regions;
[0048] Based on the line segment encoding, circle encoding, region identifier, stretching height, and preset region code of multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0049] As an example, the circle encoding method is 'c2d'-(center point encoding)-radius.toFixed(3). The center point encoding can use the vertex encoding method, i.e., encoded as x.toFixed(3)-y.toFixed(3), where x and y are the horizontal and vertical coordinates of the center point in the 2D sketch panel, respectively. ".toFixed(3)" indicates that three decimal places should be retained, and 'c2d' is an example of a preset circle code. It should be understood that ".toFixed(3)" is only an illustrative example and does not constitute a limitation on the precision of the center point coordinates and radius. The encoding method for each target region is 'f2d'-face.id-face.height-(encoding of all edges of the target region), where 'f2d' is an example of a preset region code, face.id is the region identifier of the target region, face.height is the stretch height of the target region, and all edges of the target region are all the line segments and circles that make up the target region.
[0050] In some exemplary embodiments, when multiple target regions contain only edge lines and arcs, each target region in the multiple target regions is encoded based on its line segment code, region identifier, stretching height, and preset region code to obtain an encoded representation of each target region in the multiple target regions, including:
[0051] When there are arcs in the edges that make up multiple target regions, obtain the center point code, start point code, and end point code of the circle in each target region from the codes of the vertices of the multiple target regions, and determine the radius of the arc based on the coordinates of the edges that make up the multiple target regions;
[0052] Based on the center point encoding and radius of the arcs in multiple target regions and the preset arc code, the arcs in multiple target regions are encoded to obtain the arc codes of multiple target regions;
[0053] Based on line segment encoding, arc encoding, region identifier, stretching height, and preset region code of multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0054] As an example, the arc encoding method is 'ca2d'-(center point encoding)-radius.toFixed(3)-start point encoding-end point encoding. The center point encoding, start point encoding, and end point encoding can all use vertex encoding, i.e., encoded as x.toFixed(3)-y.toFixed(3), where x and y are the x and y coordinates of the center point / arc start point / arc end point in the 2D sketch panel, respectively. ".toFixed(3)" indicates that three decimal places should be retained, and 'ca2d' is an example of a preset arc code. It should be understood that ".toFixed(3)" is merely an illustrative example and does not constitute a limitation on the precision of the center point coordinates, arc start point, arc end point, and radius.
[0055] As an example, the encoding method for each target region is 'f2d'-face.id-face.height-(encoding of all edges of the target region), where 'f2d' is an example of a preset region code, face.id is the region identifier of the target region, face.height is the stretch height of the target region, and all edges of the target region can include line segments and arcs.
[0056] In some exemplary embodiments, when multiple target regions simultaneously contain edges, circles, and arcs, each target region in the multiple target regions is encoded based on the line segment code, circle code, region identifier, stretching height, and preset region code of the multiple target regions to obtain the encoded representation of each target region in the multiple target regions, including:
[0057] When there are arcs in the edges that make up multiple target regions, obtain the center point code, start point code, and end point code of the circle in each target region from the codes of the vertices of the multiple target regions, and determine the radius of the arc based on the coordinates of the edges that make up the multiple target regions;
[0058] Based on the center point encoding and radius of the arcs in multiple target regions and the preset arc code, the arcs in multiple target regions are encoded to obtain the arc codes of multiple target regions;
[0059] Based on line segment encoding, circle encoding, arc encoding, region identifier, stretching height, and preset region code of multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0060] As an example, the encoding method for each target region is 'f2d'-face.id-face.height-(encoding of all edges of the target region), where 'f2d' is an example of a preset region code, face.id is the region identifier of the target region, face.height is the stretch height of the target region, and all edges of the target region can include line segments, circles, and arcs.
[0061] In this embodiment, the encoding representation of the target region is used as the basis for whether the boundary representation of the extrusion model corresponding to the target region exists in the target cache space. If the boundary representation of the extrusion model corresponding to the target region exists in the target cache space, the boundary representation can be directly obtained, thereby saving the computing resources consumed by performing extrusion operations on the target region and calculating the relevant references for the extrusion model.
[0062] Step 430: Obtain the boundary representation of the extruded shape corresponding to the encoded representation of the first target region from the target cache space corresponding to the target 2D sketch panel.
[0063] The first target region comprises multiple target regions. The encoded representation of the boundary of the corresponding extruded shape exists in the target cache space. The target cache space stores the encoded representations of extruded shapes obtained from multiple regions drawn in the target 2D sketch panel. Specifically, the boundary representations of extruded shapes obtained from multiple regions drawn in the target 2D sketch panel stored in the target cache space are the encoded representations of extruded shapes obtained from multiple regions drawn in the target 2D sketch panel within a historical time period.
[0064] Figure 6 The embodiments provided in this application are based on Figure 5 The diagram shown illustrates the boundary representation of the extruded shape of each region obtained from the encoding of each region in the two-dimensional design sketch.
[0065] Step 440: Based on the boundary representation of the extruded shape corresponding to the first target region, generate the design drawing corresponding to the target two-dimensional sketch panel.
[0066] In some exemplary embodiments, if there are target regions among multiple target regions that have not been generated within a historical time period, an extrusion operation can be performed based on the encoded representation of these target regions to obtain the boundary representation of the corresponding extruded shape. Based on these newly generated boundary representations of extruded shapes and the boundary representations of extruded shapes stored in the target cache space, a design drawing corresponding to the template 2D sketch panel can be quickly generated. Specifically, generating the design drawing corresponding to the target 2D sketch panel based on the boundary representation of the extruded shape corresponding to the first target region includes:
[0067] When a second target region exists in multiple target regions, the second target region is stretched based on the encoded representation of the second target region to obtain the boundary representation of the stretched shape corresponding to the second target region. The second target region is a target region in multiple target regions whose encoded representation corresponds to a stretched shape that does not exist in the target cache space.
[0068] Based on the boundary representation of the extruded shape corresponding to the first target region and the boundary representation of the extruded shape corresponding to the second target region, the design drawing corresponding to the target two-dimensional sketch panel is generated.
[0069] Among them, stretching modeling is based on Figure 5 The two-dimensional model is generated by the shape and extrusion height of the two-dimensional area in the two-dimensional design sketch in the two-dimensional sketch panel.
[0070] This application embodiment utilizes the correspondence between the encoded representation and the boundary representation of the extrusion model to perform extrusion modeling only on target regions that do not exist in the target cache space, thus saving the computational overhead of extrusion modeling.
[0071] In some exemplary embodiments, since the boundary representations of the extruded shapes corresponding to the first target region and the second target region are both raw expressions of the region shapes, these expressions cannot be directly displayed to the user. Therefore, rendering operations are still required based on the data of these raw expressions. Specifically, based on the boundary representations of the extruded shapes corresponding to the first target region and the second target region, a design drawing corresponding to the target 2D sketch panel is generated, including:
[0072] The boundary representations of the extruded shapes corresponding to the first target region and the second target region are merged to obtain the boundary representations of the extruded shapes corresponding to multiple target regions.
[0073] Discretize the boundary representations of the extruded shapes corresponding to multiple target regions to obtain triangular facet data of the extruded shapes corresponding to multiple target regions;
[0074] The triangular facet data of the extruded shapes corresponding to multiple target areas are rendered to generate the design drawing corresponding to the target 2D sketch panel.
[0075] Figure 7 For the purposes of adopting the embodiments provided in this application, based on Figure 6 A schematic diagram of the boundary representation of the stretched shape obtained by merging the boundary representations of the stretched shapes of various regions. That is, the boundary representations of the stretched shapes corresponding to the first target region and the second target region are merged to obtain a schematic diagram of the boundary representations of the stretched shapes corresponding to multiple target regions. Figure 8For the purposes of adopting the embodiments provided in this application, based on Figure 7 A schematic diagram of the hard decoration design drawing obtained from the combined extrusion modeling rendering. Specifically, Figure 8 The process of obtaining the design drawing shown may include: s1, from Figure 5 Multiple target regions to be stretched are obtained from the target 2D sketch panel shown. These target regions are all rectangular regions. s2, the multiple target regions are encoded to obtain their encoded representations. s3, from... Figure 5 In the target cache space corresponding to the target 2D sketch panel shown, query the boundary representation of the extruded shape corresponding to the encoded representation of multiple target regions; s4, determine whether there is a boundary representation of the extruded shape corresponding to the encoded representation of the target region in the target cache space. If there is no boundary representation of the extruded shape corresponding to the encoded representation of the target region in the target cache space, then execute s5; otherwise, execute s6 to obtain... Figure 6 The diagram illustrates the boundary representations of the stretched shapes for each region. Step s5: Based on the encoded representation of the target region, stretch the target region to obtain the boundary representation of the stretched shape corresponding to the target region. Step s6: Obtain the boundary representation of the stretched shape corresponding to the target region. If the boundary representation of the stretched shape corresponding to the encoded representation of the target region exists in the target cache space, it can be directly obtained from the target cache space. Step s7: Merge the boundary representations of the stretched shapes corresponding to multiple target regions in steps s5 and s6 to obtain... Figure 7 The diagram shows the boundary representation of the stretched shape in the hard decoration design. Step s8 discretizes the boundary representations of the stretched shapes corresponding to the merged target regions, obtaining triangular facet data for the stretched shapes corresponding to the target regions. Step s9 renders the triangular facet data for the stretched shapes corresponding to the target regions, generating... Figure 8 The hard decoration design drawing shown.
[0076] In some exemplary embodiments, to reduce the stretching operations on the two-dimensional design sketches corresponding to each design drawing, after stretching the second target region based on the encoded representation of the second target region to obtain the boundary representation of the stretched shape corresponding to the second target region, the method further includes:
[0077] Store the boundary representation of the extruded shape corresponding to the second target region into the target cache space.
[0078] The boundary representation of the extrusion model corresponding to the newly generated target area (i.e. the second target area) is stored in the target cache space, which can be directly obtained and used by the area in the next 2D design sketch that is consistent with the extrusion model corresponding to the second target area, reducing the number of extrusion operations and reducing the performance overhead during the extrusion operation process.
[0079] Figure 9 The method for processing design drawings provided in this application is applied to a flowchart in a real-world scenario, including:
[0080] Step 910: Obtain multiple target areas to be stretched from the target 2D sketch panel.
[0081] Step 920: Encode multiple target regions to obtain encoded representations of multiple target regions.
[0082] Step 930: From the target cache space corresponding to the target 2D sketch panel, query the boundary representation of the extrusion model corresponding to the encoded representation of multiple target regions.
[0083] Step 940: Determine whether there is a boundary representation of the stretched shape corresponding to the encoded representation of the target region in the target cache space.
[0084] If there is no boundary representation of the stretched shape corresponding to the encoded representation of the target region in the target cache space, then proceed to step 950; otherwise, proceed to step 960.
[0085] Step 950: Based on the encoded representation of the target region, stretch the target region to obtain the boundary representation of the stretched shape corresponding to the target region.
[0086] Step 960: Obtain the boundary representation of the extruded shape corresponding to the target area.
[0087] If the target cache space contains the boundary representation of the extruded shape corresponding to the encoded representation of the target region, then the boundary representation of the extruded shape corresponding to the target region can be obtained directly from the target cache space.
[0088] Step 970: Merge the boundary representations of the extruded shapes corresponding to multiple target regions.
[0089] Step 980: Discretize the boundary representations of the extruded shapes corresponding to the merged target regions to obtain the triangular facet data of the extruded shapes corresponding to the target regions.
[0090] Step 990: Render the triangular facet data of the stretched shapes corresponding to multiple target areas to generate a design drawing.
[0091] Using the design drawing processing method provided in the embodiments of this application, multiple target regions to be stretched can be obtained from the target two-dimensional sketch panel. Each target region includes a region identifier, stretching height, and coordinates of the vertices and edges that make up each target region. Then, based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifier, the multiple target regions are encoded to obtain the encoded representation of each target region. This allows us to determine whether each target region is a newly drawn region based on the encoded representation of each target region. This can be done by storing the encoded representations of the extruded shapes obtained from multiple regions drawn in the target 2D sketch panel in the target cache space. If the boundary representation of the extruded shape corresponding to the encoded representation of the first target region exists in the target cache space, then the boundary representation of the extruded shape corresponding to the first target region can be directly obtained from the target cache space. Based on the boundary representation of the extruded shape corresponding to the first target region, the design drawing corresponding to the target 2D sketch panel can be generated. This avoids the need to re-extrude the first target region and reduces the computational resources occupied by extruding the first target region and calculating the boundary representation of the extruded shape obtained after extrusion, thereby saving performance overhead during the design and modification process of the design drawing corresponding to the target 2D sketch panel.
[0092] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 410 to 430 can be device A; or the execution subject of steps 410 to 420 can be device A, and the execution subject of step 430 can be device B; and so on.
[0093] Furthermore, some processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 410, 420, etc., are merely used to distinguish different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.
[0094] Figure 10 This is a schematic diagram of a design drawing processing device 1000 provided for an exemplary embodiment of this application. This device is applied to a distributed computing scheduling system. Figure 10 As shown, the device 1000 includes: a region acquisition module 1110, a region encoding module 1120, a boundary representation acquisition module 1130, and a design drawing generation module 1140, wherein:
[0095] The region acquisition module 1110 is used to acquire multiple target regions to be stretched from the target two-dimensional sketch panel. Each target region includes a region identifier, a stretching height, and the coordinates of the vertices and edges that make up the target region.
[0096] The region encoding module 1120 is used to encode the multiple target regions based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, to obtain an encoded representation of the multiple target regions.
[0097] Boundary representation acquisition module 1130 is used to acquire the boundary representation of the extruded shape corresponding to the encoded representation of the first target region from the target cache space corresponding to the target two-dimensional sketch panel. The first target region is a target region in the target cache space where the boundary representation of the extruded shape corresponding to the encoded representation exists. The target cache space stores the boundary representation of the extruded shape obtained by extruding multiple regions drawn in the target two-dimensional sketch panel.
[0098] The design drawing generation module 1140 is used to generate a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the extruded shape corresponding to the first target area.
[0099] Optionally, when the region encoding module encodes the multiple target regions based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, to obtain the encoded representation of the multiple target regions, it is specifically used for:
[0100] Based on the coordinates of the vertices that make up the multiple target regions, the vertices of the multiple target regions are encoded to obtain the encoding of the vertices of the multiple target regions;
[0101] When there are line segments among the edges that make up the multiple target regions, the start-point code and end-point code of the line segments in the multiple target regions are obtained from the codes of the vertices of the multiple target regions;
[0102] Based on the start-point and end-point codes of line segments in multiple target areas and a preset line segment code, the line segments in multiple target areas are encoded to obtain the line segment codes in multiple target areas;
[0103] Based on the line segment codes, region identifiers, stretching heights, and preset region codes in the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0104] Optionally, when the region encoding module encodes each target region in the multiple target regions based on the line segment code, region identifier, stretching height, and preset region code of each target region, and obtains the encoded representation of each target region in the multiple target regions, it is specifically used for:
[0105] When a circle exists in the edge lines that make up the multiple target regions, the center point code of the circle in each of the multiple target regions is obtained from the codes of the vertices of the multiple target regions, and the radius of the circle is determined based on the coordinates of the edge lines that make up the multiple target regions.
[0106] Based on the center point encoding and radius of the circles in the multiple target regions and the preset circle code, the circles in the multiple target regions are encoded to obtain the circle codes of the multiple target regions;
[0107] Based on the line segment code, circle code, region identifier, stretching height, and preset region code of the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0108] Optionally, when the region encoding module encodes each target region in the multiple target regions based on the line segment code, region identifier, stretching height, and preset region code of each target region, and obtains the encoded representation of each target region in the multiple target regions, it is specifically used for:
[0109] When there is an arc in the edge line that makes up the multiple target regions, the center point code, start point code and end point code of the circle of each target region in the multiple target regions are obtained from the code of the vertex of the multiple target regions, and the radius of the arc is determined based on the coordinates of the edge line that makes up the multiple target regions.
[0110] Based on the center point code and radius of the arcs in the multiple target regions and the preset arc code, the arcs in the multiple target regions are encoded to obtain the arc codes of the multiple target regions;
[0111] Based on the line segment code, arc code, region identifier, stretching height, and preset region code of the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0112] Optionally, when the region encoding module encodes each target region in the multiple target regions based on line segment encoding, circle encoding, region identifier, stretching height, and preset region code, to obtain the encoded representation of each target region in the multiple target regions, it is specifically used for:
[0113] When there is an arc in the edge line that makes up the multiple target regions, the center point code, start point code and end point code of the circle of each target region in the multiple target regions are obtained from the code of the vertex of the multiple target regions, and the radius of the arc is determined based on the coordinates of the edge line that makes up the multiple target regions.
[0114] Based on the center point code and radius of the arcs in the multiple target regions and the preset arc code, the arcs in the multiple target regions are encoded to obtain the arc codes of the multiple target regions;
[0115] Based on the line segment code, circle code, arc code, region identifier, stretching height, and preset region code of the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
[0116] Optionally, when the design drawing generation module generates the design drawing corresponding to the target 2D sketch panel based on the boundary representation of the extruded shape corresponding to the first target region, it is specifically used for:
[0117] When a second target region exists in multiple target regions, the second target region is stretched based on the encoded representation of the second target region to obtain the boundary representation of the stretched shape corresponding to the second target region. The second target region is a target region in multiple target regions whose boundary representation of the stretched shape corresponding to the encoded representation does not exist in the target cache space.
[0118] Based on the boundary representation of the extruded shape corresponding to the first target region and the boundary representation of the extruded shape corresponding to the second target region, a design drawing corresponding to the target two-dimensional sketch panel is generated.
[0119] Optionally, when the design drawing generation module generates the design drawing corresponding to the target 2D sketch panel based on the boundary representation of the extruded shape corresponding to the first target region and the boundary representation of the extruded shape corresponding to the second target region, it is specifically used for:
[0120] The boundary representations of the stretched shapes corresponding to the first target region and the second target region are merged to obtain the boundary representations of the stretched shapes corresponding to multiple target regions.
[0121] Discretize the boundary representations of the extruded shapes corresponding to the multiple target regions to obtain triangular facet data of the extruded shapes corresponding to the multiple target regions;
[0122] The triangular facet data of the extruded shapes corresponding to multiple target areas are rendered to generate the design drawing corresponding to the target two-dimensional sketch panel.
[0123] Optionally, after stretching the second target region based on the encoded representation of the second target region to obtain the boundary representation of the stretched shape corresponding to the second target region, the device further includes:
[0124] The storage module is used to store the boundary representation of the stretched shape corresponding to the second target region into the target cache space.
[0125] The design drawing processing device 1000 is capable of achieving... Figures 4-9 For details of the method implementation examples, please refer to [link / reference]. Figures 4-9 The processing method for the design drawings of the illustrated embodiment will not be described in detail here.
[0126] Figure 11 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. For example... Figure 11 As shown, the device includes a memory 111 and a processor 112.
[0127] Memory 111 is used to store computer programs and can be configured to store various other data to support operation on the computing device. Examples of this data include instructions for any application or method operating on the computing device, contact data, phone book data, messages, pictures, videos, etc.
[0128] Processor 112, coupled to memory 111, is configured to execute a computer program in memory 111 for: acquiring multiple target regions to be extruded from a target 2D sketch panel, each target region including a region identifier, an extrusion height, and coordinates of vertices and edges constituting the target region; encoding the multiple target regions based on the coordinates of the vertices and edges constituting the multiple target regions, the extrusion height, and the corresponding region identifiers, to obtain encoded representations of the multiple target regions; acquiring, from a target cache space corresponding to the target 2D sketch panel, the boundary representation of the extruded shape corresponding to the encoded representation of a first target region, wherein the first target region is a target region among the multiple target regions whose boundary representations of the extruded shapes corresponding to the encoded representations exist in the target cache space, and the target cache space stores boundary representations of extruded shapes obtained by extruding multiple regions drawn in the target 2D sketch panel; and generating a design drawing corresponding to the target 2D sketch panel based on the boundary representation of the extruded shape corresponding to the first target region.
[0129] Furthermore, such as Figure 11As shown, the electronic device also includes other components such as a communication component 113, a display 114, a power supply component 115, and an audio component 116. Figure 11 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 11 The components shown. Additionally, depending on the implementation of the traffic playback device, Figure 11 The components within the dashed box are optional, not mandatory. For example, when an electronic device is implemented as a terminal device such as a smartphone, tablet, or desktop computer, it may include... Figure 11 The components within the dashed box; when the electronic device is implemented as a server-side device such as a conventional server, cloud server, data center, or server array, it may be excluded. Figure 11 The component within the dashed box.
[0130] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the processing method embodiments of the above-described design drawings.
[0131] Accordingly, this application also provides a computer program product, including a computer program / instructions, which, when executed, can implement the steps that can be executed by an electronic device in the above-described design drawing processing method embodiment. Optionally, in addition to executing the steps in the above-described design drawing processing method embodiment, the computer program product can also obtain modification operations on a target area on the target two-dimensional sketch panel, and in response to the modification operations on the target area, determine the encoded representation of the target area; determine whether there is a boundary representation of an extruded shape corresponding to the encoded representation of the target area in the target cache space corresponding to the target two-dimensional sketch panel; and when there is a boundary representation of an extruded shape corresponding to the encoded representation of the target area in the target cache space, update the design drawing corresponding to the two-dimensional sketch panel based on the boundary representation of the extruded shape corresponding to the encoded representation of the target area.
[0132] The above Figure 11 The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component may further include a Near Field Communication (NFC) module, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, etc.
[0133] The above Figure 11 The memory in the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0134] The above Figure 11 The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe action, but also the duration and pressure associated with the touch or swipe operation.
[0135] The above Figure 11 The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.
[0136] The above Figure 11 The audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0137] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0139] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0143] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0144] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0145] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0146] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for processing design drawings, characterized in that, include: Obtain multiple target regions to be stretched from the target 2D sketch panel. Each target region includes a region identifier, a stretch height, and the coordinates of the vertices and edges that make up the target region. Based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, the multiple target regions are encoded to obtain the encoded representation of the multiple target regions; From the target cache space corresponding to the target 2D sketch panel, obtain the boundary representation of the extruded shape corresponding to the encoded representation of the first target region. The first target region is one of the target regions. The boundary representation of the extruded shape corresponding to the encoded representation exists in the target cache space. The target cache space stores the boundary representation of the extruded shape obtained by extruding multiple regions drawn in the target 2D sketch panel. Based on the boundary representation of the extruded shape corresponding to the first target region, a design drawing corresponding to the target two-dimensional sketch panel is generated.
2. The method as described in claim 1, characterized in that, The process of encoding the multiple target regions based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, to obtain an encoded representation of the multiple target regions, includes: Based on the coordinates of the vertices that make up the multiple target regions, the vertices of the multiple target regions are encoded to obtain the encoding of the vertices of the multiple target regions; When there are line segments among the edges that make up the multiple target regions, the start-point code and end-point code of the line segments in the multiple target regions are obtained from the codes of the vertices of the multiple target regions; Based on the start-point and end-point codes of line segments in multiple target areas and a preset line segment code, the line segments in multiple target areas are encoded to obtain the line segment codes in multiple target areas; Based on the line segment codes, region identifiers, stretching heights, and preset region codes in the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
3. The method as described in claim 2, characterized in that, The process of encoding each target region in the multiple target regions based on its line segment code, region identifier, stretching height, and preset region code to obtain an encoded representation of each target region in the multiple target regions includes: When a circle exists in the edge lines that make up the multiple target regions, the center point code of the circle in each of the multiple target regions is obtained from the code of the vertex of the multiple target regions, and the radius of the circle is determined based on the coordinates of the edge lines that make up the multiple target regions. Based on the center point encoding and radius of the circles in the multiple target regions and the preset circle code, the circles in the multiple target regions are encoded to obtain the circle codes of the multiple target regions; Based on the line segment code, circle code, region identifier, stretching height, and preset region code of the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
4. The method as described in claim 2, characterized in that, The process of encoding each target region in the multiple target regions based on its line segment code, region identifier, stretching height, and preset region code to obtain an encoded representation of each target region in the multiple target regions includes: When there is an arc in the edge line that makes up the multiple target regions, the center point code, start point code and end point code of the circle of each target region in the multiple target regions are obtained from the code of the vertex of the multiple target regions, and the radius of the arc is determined based on the coordinates of the edge line that makes up the multiple target regions. Based on the center point code and radius of the arcs in the multiple target regions and the preset arc code, the arcs in the multiple target regions are encoded to obtain the arc codes of the multiple target regions; Based on the line segment code, arc code, region identifier, stretching height, and preset region code of the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
5. The method as described in claim 3, characterized in that, The method involves encoding each target region within the multiple target regions based on line segment encoding, circle encoding, region identifier, stretching height, and a preset region code, to obtain an encoded representation of each target region within the multiple target regions, including: When there is an arc in the edge line that makes up the multiple target regions, the center point code, start point code and end point code of the circle of each target region in the multiple target regions are obtained from the code of the vertex of the multiple target regions, and the radius of the arc is determined based on the coordinates of the edge line that makes up the multiple target regions. Based on the center point code and radius of the arcs in the multiple target regions and the preset arc code, the arcs in the multiple target regions are encoded to obtain the arc codes of the multiple target regions; Based on the line segment code, circle code, arc code, region identifier, stretching height, and preset region code of the multiple target regions, each target region in the multiple target regions is encoded to obtain the encoded representation of each target region in the multiple target regions.
6. The method as described in claim 1, characterized in that, The step of generating the design drawing corresponding to the target 2D sketch panel based on the boundary representation of the extruded shape corresponding to the first target region includes: When a second target region exists in multiple target regions, the second target region is stretched based on the encoded representation of the second target region to obtain the boundary representation of the stretched shape corresponding to the second target region. The second target region is a target region in multiple target regions whose boundary representation of the stretched shape corresponding to the encoded representation does not exist in the target cache space. Based on the boundary representation of the extruded shape corresponding to the first target region and the boundary representation of the extruded shape corresponding to the second target region, a design drawing corresponding to the target two-dimensional sketch panel is generated.
7. The method as described in claim 6, characterized in that, The step of generating the design drawing corresponding to the target 2D sketch panel based on the boundary representation of the extruded shape corresponding to the first target region and the boundary representation of the extruded shape corresponding to the second target region includes: The boundary representations of the stretched shapes corresponding to the first target region and the second target region are merged to obtain the boundary representations of the stretched shapes corresponding to multiple target regions. Discretize the boundary representations of the extruded shapes corresponding to the multiple target regions to obtain triangular facet data of the extruded shapes corresponding to the multiple target regions; The triangular facet data of the extruded shapes corresponding to multiple target regions are rendered to generate the design drawing corresponding to the target two-dimensional sketch panel.
8. The method as described in claim 6, characterized in that, After stretching the second target region based on the encoded representation of the second target region to obtain the boundary representation of the stretched shape corresponding to the second target region, the method further includes: The boundary representation of the stretched shape corresponding to the second target region is stored in the target cache space.
9. A design drawing processing apparatus, characterized in that, include: The region acquisition module is used to acquire multiple target regions to be stretched from the target 2D sketch panel. Each target region includes a region identifier, a stretching height, and the coordinates of the vertices and edges that make up the target region. The region encoding module is used to encode the multiple target regions based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, to obtain the encoded representation of the multiple target regions; The boundary representation acquisition module is used to acquire the boundary representation of the extruded shape corresponding to the encoded representation of the first target region from the target cache space corresponding to the target two-dimensional sketch panel. The first target region is a target region in the target cache space where the boundary representation of the extruded shape corresponding to the encoded representation exists. The target cache space stores the boundary representation of the extruded shape obtained by extruding multiple regions drawn in the target two-dimensional sketch panel. The design drawing generation module is used to generate a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the extruded shape corresponding to the first target area.
10. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute the computer program for: Obtain multiple target regions to be stretched from the target 2D sketch panel. Each target region includes a region identifier, a stretch height, and the coordinates of the vertices and edges that make up the target region. Based on the coordinates of the vertices and edges that make up the multiple target regions, the stretching height, and the corresponding region identifiers, the multiple target regions are encoded to obtain the encoded representation of the multiple target regions; From the target cache space corresponding to the target 2D sketch panel, obtain the boundary representation of the extruded shape corresponding to the encoded representation of the first target region. The first target region is one of the target regions. The boundary representation of the extruded shape corresponding to the encoded representation exists in the target cache space. The target cache space stores the boundary representation of the extruded shape obtained by extruding multiple regions drawn in the target 2D sketch panel. Based on the boundary representation of the extruded shape corresponding to the first target region, a design drawing corresponding to the target two-dimensional sketch panel is generated.
11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps in the processing method of the design drawing according to any one of claims 1 to 8.
