CN116776408A - Design drawing processing method, device, equipment and storage medium - Google Patents

Design drawing processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116776408A
CN116776408A CN202310754524.9A CN202310754524A CN116776408A CN 116776408 A CN116776408 A CN 116776408A CN 202310754524 A CN202310754524 A CN 202310754524A CN 116776408 A CN116776408 A CN 116776408A
Authority
CN
China
Prior art keywords
target
stretching
target areas
area
areas
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310754524.9A
Other languages
Chinese (zh)
Inventor
张云剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meiping Meiwu Shanghai Technology Co ltd
Original Assignee
Meiping Meiwu Shanghai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meiping Meiwu Shanghai Technology Co ltd filed Critical Meiping Meiwu Shanghai Technology Co ltd
Priority to CN202310754524.9A priority Critical patent/CN116776408A/en
Publication of CN116776408A publication Critical patent/CN116776408A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

The embodiment of the application provides a processing method, a device, equipment and a storage medium of a design drawing. In an embodiment of the present application, the method includes: obtaining a plurality of target areas to be stretched from a target two-dimensional sketch panel, wherein one target area comprises an area mark, a stretching height and coordinates of vertexes and edges forming the target area; encoding a plurality of target areas based on coordinates of vertexes and edges forming the plurality of target areas, stretching heights and corresponding area identifiers to obtain encoded representations of the plurality of target areas; obtaining a boundary representation of a stretching model corresponding to the coding representation of the first target area from a target cache space corresponding to the target two-dimensional sketch panel; and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.

Description

Design drawing processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of internet information processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a design drawing.
Background
In the existing home decoration design, a relatively complex hard decoration design is usually involved, for example, a complex grid plate modeling is often carried out in the design of a background wall with a large area. In the hard-wearing design, in the subsequent communication process with the client, the feedback opinion of the client is inevitably needed, and the design drawing is repeatedly modified for a plurality of times. For such hard-sided designs of large area, when design and modification of the solution are involved, the boundaries of the geometric shapes corresponding to each grid plate area in the design drawing are often recalculated. Obviously, this consumes a lot of computing resources during each design and modification of the solution, resulting in a not small performance overhead. Therefore, how to reduce the computational resources consumed in the hard-wired design and modification process, thereby saving the performance overhead, still needs to provide further solutions.
Disclosure of Invention
Aspects of the present application provide a method, apparatus, device, and storage medium for processing a design drawing, which are used for reducing computing resources consumed in the design and modification process of the design drawing of a hard-wearing scheme, thereby saving performance overhead.
The embodiment of the application also provides a processing method of the design drawing, which comprises the following steps: obtaining a plurality of target areas to be stretched from a target two-dimensional sketch panel, wherein one target area comprises an area mark, a stretching height and coordinates of vertexes and edges forming the target area; encoding a plurality of target areas based on coordinates of vertexes and edges forming the plurality of target areas, stretching heights and corresponding area identifiers to obtain encoded representations of the plurality of target areas; obtaining boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space; and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
The embodiment of the application also provides a device for processing the design drawing, which comprises: the system comprises a region acquisition module, a drawing module and a drawing module, wherein the region acquisition module is used for acquiring a plurality of target regions to be drawn from a target two-dimensional sketch panel, and one target region comprises a region mark, a drawing height and coordinates of vertexes and edges forming the target region; the region coding module is used for coding the plurality of target regions based on coordinates, stretching heights and corresponding region identifiers of vertexes and edges forming the plurality of target regions to obtain coded representations of the plurality of target regions; the boundary representation acquisition module is used for acquiring boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained based on stretching of the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space; and the design drawing generation module is used for generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
The embodiment of the application also provides electronic equipment, which comprises: a memory and a processor; the memory is used for storing a computer program; the processor, coupled to the memory, is configured to execute the computer program for: obtaining a plurality of target areas to be stretched from a target two-dimensional sketch panel, wherein one target area comprises an area mark, a stretching height and coordinates of vertexes and edges forming the target area; encoding a plurality of target areas based on coordinates of vertexes and edges forming the plurality of target areas, stretching heights and corresponding area identifiers to obtain encoded representations of the plurality of target areas; obtaining boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space; and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
The embodiment of the 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 by the embodiment of the application.
In the embodiment of the application, a plurality of target areas to be stretched can be obtained from a target two-dimensional sketch panel, each target area comprises an area identifier, a stretching height and coordinates of vertexes and edges forming each target area, and the plurality of target areas are encoded based on the coordinates of the vertexes and the edges forming the plurality of target areas, the stretching height and the corresponding area identifiers, so that the encoded representation of each target area is obtained. In this way, according to the coded representation of each target area, whether each target area is a newly drawn area or not can be determined from the target buffer space storing the coded representation of the stretch model obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel, if the boundary representation of the stretch model corresponding to the coded representation of the first target area in the plurality of target areas exists in the target buffer space, the boundary representation of the stretch model corresponding to the first target area can be directly obtained from the target buffer space, so that the design diagram corresponding to the target two-dimensional sketch panel is generated based on the boundary representation of the stretch model corresponding to the first target area, the need of stretching the first target area again is avoided, the calculation resources occupied by the boundary representation of the stretch model obtained after stretching the first target area and the calculation are reduced, and the performance cost of the design diagram corresponding to the target two-dimensional sketch panel in the design and modification process is further saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic illustration of a two-dimensional sketch panel provided in accordance with an exemplary embodiment of the present application;
FIG. 2 is a schematic representation of a boundary representation provided by an exemplary embodiment of the present application;
FIG. 3 is a schematic illustration of a stretch-forming provided in an exemplary embodiment of the present application;
FIG. 4 is a flow chart of a method for processing a design drawing according to an exemplary embodiment of the present application;
FIG. 5 is a schematic illustration of a hardcover two-dimensional sketch provided in an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a boundary representation of a stretch build for each region based on the encoded representation of each region in the two-dimensional design sketch shown in FIG. 5, provided by an embodiment of the present application;
FIG. 7 is a schematic illustration of a combined boundary representation of a stretch build based on the boundary representations of the stretch builds of the various regions of FIG. 6, provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a design drawing rendered based on the merged stretch builds of FIG. 7 according to an embodiment of the present application;
Fig. 9 is a schematic flow chart of a processing method of a design chart applied to a practical scene according to an embodiment of the present application;
fig. 10 is a schematic flow chart of a processing method of a design chart applied to a practical scene according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application may be embodied in many other forms than those herein described, and those skilled in the art will readily appreciate that the present application may be similarly embodied without departing from the spirit or essential characteristics thereof, and therefore the present application is not limited to the specific embodiments disclosed below.
The terminology used in the one or more embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the application. As used in one or more embodiments of the application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of the application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present application will be explained.
Boundary representation: in computer aided design, the boundary representation is a method of preserving information required for how to build a model from its geometry, especially euler topology boundaries, which is often abbreviated as BREP (english full name Boundary Representation). An important feature of the boundary representation is that the information describing the shape includes both geometric information (english name Geometry) and topological information (english name Topology). Topology information describes the connection of vertices, edges, faces on a body, which forms a "skeleton" that the object boundary represents. The geometric information of the body can be seen as muscles attached to a "skeleton". For example, a surface of a body is located on a curved surface, and the data defining this surface equation is geometric information. In addition, the shape of the side, the position of the vertex in three-dimensional space (coordinates of the point), and the like are geometric information, which generally describes the size, dimension, position, shape, and the like of the feature. In the boundary representation, the boundary representation records the geometric information of all geometric elements constituting the body and the topological relation of the interconnection thereof in detail according to the hierarchy of the body-surface-ring-edge-point.
mesh: is an important concept of digital modeling processing. One three-dimensional model is a three-dimensional model in which a plurality of triangles are combined at different angles (common edges or corners), and each triangle at the periphery constitutes a triangular mesh. mesh is typically a discrete result of BREP, which is the type of data required for rendering a display.
Stretching and shaping: a common way of three-dimensional modeling is to manufacture a three-dimensional shape by drawing a cross-sectional shape of a model on a sketch plane and then specifying a stretching height.
Sketch: english is named Sketch and is a two-dimensional graphic associated with a solid model. The function can create a sketch plane in any one of the required planes, and thus a sketch. The concept of constraint is added in the drawn sketch, and the graph in the sketch can be changed by modifying the constraint. Using the sketch tool, a user can draw an approximate curve profile, and after adding an accurate constraint definition, the intent of the design can be fully expressed. The established sketch can also be stretched, rotated and the like by using a solid modeling tool to generate a solid model related to the sketch. When the sketch is modified, the associated entity model is automatically updated.
Hard-fitting: means that in addition to the infrastructure that must be satisfied, a fixed and immovable ornament is added to the surface or inside of the building in order to satisfy the structural, layout, functional, and aesthetic needs of the house.
The conventional way of hard-fitting stretch molding is as follows: firstly, constructing a boundary representation (a boundary representation schematic diagram shown in fig. 2) corresponding to a two-dimensional sketch panel (namely the two-dimensional sketch panel shown in fig. 1) one by one; the corresponding regions in the boundary representation shown in fig. 2 are then stretched one by one according to the projected height (i.e., stretched height) of each region marked in the boundary representation schematic shown in fig. 2. As shown in fig. 3, the left drawing includes a region with a protrusion height of 100, and the right drawing includes a region with a protrusion height of 200, and two stretching molding needs to be performed on the two regions shown in fig. 2 respectively, so as to obtain a schematic diagram of the final stretching molding shown in the right drawing of fig. 3.
Because all the areas shown in fig. 3 are topologically connected together, this stretch modeling approach requires a full computation of the data for each area in the two-dimensional sketch panel and boundary representation each time the design is modified and redrawn. When the design diagram is complex, the number of the areas is increased, so that a great deal of computing resources are consumed for each design and modification of the design diagram, the design and modification process is slower and slower, and the performance cost is higher.
In view of this, an embodiment of the present application provides a processing method for a design drawing, where a plurality of target areas to be stretched may be obtained from a target two-dimensional sketch panel, each target area includes an area identifier, a stretching height, and coordinates of vertices and edges forming each target area, and then the plurality of target areas are encoded based on the coordinates of vertices and edges forming the plurality of target areas, the stretching height, and the corresponding area identifiers, so as to obtain an encoded representation of each target area. In this way, according to the coded representation of each target area, whether each target area is a newly drawn area or not can be determined from the target buffer space storing the coded representation of the stretch model obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel, if the boundary representation of the stretch model corresponding to the coded representation of the first target area in the plurality of target areas exists in the target buffer space, the boundary representation of the stretch model corresponding to the first target area can be directly obtained from the target buffer space, so that the design diagram corresponding to the target two-dimensional sketch panel is generated based on the boundary representation of the stretch model corresponding to the first target area, the need of stretching the first target area again is avoided, the calculation resources occupied by the boundary representation of the stretch model obtained after stretching the first target area and the calculation are reduced, and the performance cost of the design diagram corresponding to the target two-dimensional sketch panel in the design and modification process is further saved. Specifically, in the present application, a processing method of a design drawing is provided, and the present application relates to a processing apparatus of a design drawing, an electronic device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 4 is a schematic flow chart of a processing method of a design chart according to an exemplary embodiment of the present application. As shown in fig. 4, the method includes:
in step 410, a plurality of target areas to be stretched are obtained from the target two-dimensional sketch panel, wherein one target area includes an area identifier, a stretching height, and coordinates of vertices and edges constituting the target area.
The target two-dimensional sketch panel is used for drawing a two-dimensional design drawing, and coordinates of vertexes and edges of each target area are drawn on the target two-dimensional sketch panel and can be obtained based on a two-dimensional coordinate system built in the target two-dimensional sketch panel. And each time a target area is drawn, an area identifier for uniquely identifying the target area can be automatically allocated to the target area, and the stretching height of each target area can be set by a designer. Fig. 5 is a schematic diagram of a hard-packed two-dimensional sketch according to an exemplary embodiment of the present application, where the hard-packed two-dimensional sketch shown in fig. 5 includes 18 target areas to be stretched, each target area has a corresponding area identifier, a stretching height (i.e., a protrusion value shown in fig. 5), and coordinates of vertices and edges constituting the target area, where the coordinates of the area identifier and the vertices and edges constituting the target area may not be displayed in the hard-packed two-dimensional sketch, and may be obtained from detailed information of each target area (for example, clicking each target area may display detailed information of each target area).
Step 420, encoding the plurality of target areas based on coordinates of vertices and edges constituting the plurality of target areas, the stretching heights, and the corresponding area identifications, to obtain encoded representations of the plurality of target areas.
The side line may include at least one of a line segment, a circle and an arc, the line segment may be represented by a start point coordinate and an end point coordinate, the circle may be represented by a center point coordinate and a radius, and the arc may be represented by a center point coordinate, a radius, an arc start point coordinate and an arc end point coordinate. Based on the embodiment of the application, line segments, circles and arcs can be encoded.
In some exemplary embodiments, when the plurality of target regions include only edges, encoding the plurality of target regions based on coordinates of vertices and edges that make up the plurality of target regions, a stretch height, and corresponding region identifications, resulting in encoded representations of the plurality of target regions, comprising:
encoding the vertexes of the plurality of target areas based on coordinates of vertexes constituting the plurality of target areas to obtain the encoding of the vertexes of the plurality of target areas;
when line segments exist in side lines forming a plurality of target areas, acquiring starting point codes and end point codes of the line segments in the plurality of target areas from the codes of the vertexes of the plurality of target areas;
Based on the start point codes and the end point codes of the line segments in the plurality of target areas and preset line segment codes, the line segments in the plurality of target areas are coded, and the line segment codes in the plurality of target areas are obtained;
and encoding each target area in the plurality of target areas based on the line segment codes, the area identifiers, the stretching heights and the preset area codes in the plurality of target areas to obtain the encoding representation of each target area in the plurality of target areas.
As an example, vertices are encoded in x.tofixed (3) -y.tofixed (3), where x and y are the abscissa and ordinate, respectively, of the vertex in a two-dimensional sketch panel, ".tofixed (3)" is used to indicate that the last 3 bits of the decimal point are reserved, and it should be understood that ". ToFixed (3)" is merely an exemplary illustration and does not constitute a limitation on the precision of the vertex coordinates.
As an example, the line segment is encoded in a manner of 'l2d' - (start point encoding) - (end point encoding), where 'l2d' is an example of a preset line segment code, and no limitation is imposed on the preset line segment code. The starting point code is obtained by the method that the starting point of the line segment is obtained according to the method that the vertex is coded, and the end point code is obtained by the method that the end point of the line segment is obtained according to the method that the end point is coded. The coding mode of each target area is 'f2d' -face.id-face.height- (coding of all sides of the target area), wherein 'f2d' is an example of a preset area code, face.id is an area identifier of the target area, face.height is the stretching height of the target area, and all sides of the target area are all line segments forming the target area.
In some exemplary embodiments, when the plurality of target areas include only edges and circles, encoding each target area of the plurality of target areas based on a line segment encoding, an area identification, a stretching height, and a preset area code of each target area of the plurality of target areas to obtain an encoded representation of each target area of the plurality of target areas, including:
when circles exist in the side lines forming the plurality of target areas, acquiring circle center point codes of the circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the circles based on the coordinates of the side lines forming the plurality of target areas;
based on circle center point codes and radiuses of circles in the plurality of target areas and preset circle codes, the circles in the plurality of target areas are coded, and circle codes of the plurality of target areas are obtained;
and encoding each target area in the plurality of target areas based on line segment encoding, circle encoding, area identification, stretching height and preset area codes of the plurality of target areas to obtain encoding representation of each target area in the plurality of target areas.
As an example, the circle is encoded in the form of 'c2d' - (circle center point code) -radius. The center point coding can adopt a vertex coding mode, namely, the codes are x.tofixed (3) -y.tofixed (3), x and y are respectively the abscissa and the ordinate of the center point in the two-dimensional sketch panel, the ". ToFixed (3)" is used for indicating that 3 bits after the decimal point is reserved, and the 'c2d' is an example of a preset circle code. It should be understood that ". ToFixed (3)" is only an exemplary illustration and does not constitute a limitation on the precision of the center point coordinates and radius. The coding mode of each target area is 'f2d' -face.id-face.height- (the coding of all sides of the target area), wherein 'f2d' is an example of a preset area code, face.id is the area identifier of the target area, face.height is the stretching height of the target area, and all sides of the target area are all line segments and circles forming the target area.
In some exemplary embodiments, when the plurality of target areas include only edges and arcs, encoding each target area of the plurality of target areas based on line segment encoding, area identification, stretching height, and a preset area code of each target area of the plurality of target areas, to obtain an encoded representation of each target area of the plurality of target areas, including:
when an arc exists in the side lines forming the plurality of target areas, acquiring center point codes, starting point codes and end point codes of circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the arc based on the coordinates of the side lines forming the plurality of target areas;
coding the arcs in the multiple target areas based on the circle center codes and the radiuses of the arcs in the multiple target areas and preset arc codes to obtain arc codes of the multiple target areas;
and encoding each target area in the plurality of target areas based on line segment encoding, arc encoding, area identification, stretching height and preset area codes of the plurality of target areas to obtain encoding representation of each target area in the plurality of target areas.
As an example, the arc code is 'ca2d' - (circle center point code) -radius, toFixed (3) -start point code-end point code. The center point code, the starting point code and the end point code can all adopt a vertex code mode, namely, the codes are x.tofixed (3) -y.tofixed (3), x and y are respectively the abscissa and the ordinate of the center point/the circular arc starting point/the circular arc end point in the two-dimensional sketch panel, the · toFixed (3) "is used for indicating that the 3 bits after the decimal point is reserved, and 'ca2d' is an example of a preset circular arc code. It should be understood that ". ToFixed (3)" is only an exemplary illustration and does not constitute a limitation on the center point coordinates, the arc starting point, the arc ending point, and the radius accuracy.
As an example, the encoding mode of each target area is 'f2d' -face.id-face.height- (encoding of all sides of the target area), where 'f2d' is an example of a preset area code, face.id is an area identifier of the target area, face.height is a stretching height of the target area, and all sides of the target area may include a line segment and an arc.
In some exemplary embodiments, when a plurality of target areas simultaneously include a border, a circle, and an arc, encoding each target area of the plurality of target areas based on line segment encoding, circle encoding, area identification, stretching height, and a preset area code of the plurality of target areas to obtain an encoded representation of each target area of the plurality of target areas, including:
When an arc exists in the side lines forming the plurality of target areas, acquiring center point codes, starting point codes and end point codes of circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the arc based on the coordinates of the side lines forming the plurality of target areas;
coding the arcs in the multiple target areas based on the circle center codes and the radiuses of the arcs in the multiple target areas and preset arc codes to obtain arc codes of the multiple target areas;
and encoding each target area in the plurality of target areas based on line segment encoding, circle encoding, arc encoding, area identification, stretching height and preset area codes of the plurality of target areas to obtain encoding representation of each target area in the plurality of target areas.
As an example, the encoding mode of each target area is 'f2d' -face.id-face.height- (encoding of all sides of the target area), where 'f2d' is an example of a preset area code, face.id is an area identifier of the target area, face.height is a stretching height of the target area, and all sides of the target area may include a line segment, a circle, and an arc.
According to the embodiment of the application, the coded representation of the target area is used as the basis for whether the boundary representation of the stretching modeling corresponding to the target area exists in the target cache space, and if the boundary representation of the stretching modeling corresponding to the target area exists in the target cache space, the boundary representation can be directly obtained, so that the calculation resources consumed for carrying out pulling body operation on the target area and calculating the relevant reference of the stretching modeling can be saved.
Step 430, obtaining a boundary representation of the stretch style corresponding to the encoded representation of the first target region from the target buffer space corresponding to the target two-dimensional sketch panel.
The first target area is a target area which exists in a target cache space and is indicated by a boundary indication of a corresponding stretching model in a plurality of target areas, and the target cache space stores the encoding indication of the stretching model which is obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel. The boundary representation of the stretching modeling obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel is stored in the target cache space, and is a coded representation of the stretching modeling obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel in a historical time period.
Fig. 6 is a schematic diagram of a boundary representation of a stretch build obtained based on a coded representation of each region in the two-dimensional design sketch shown in fig. 5 according to an embodiment of the present application.
Step 440, generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretch build corresponding to the first target region.
In some exemplary embodiments, if there are some target areas that have not been generated within a historical period of time in the plurality of target areas, a stretching operation may be performed based on the encoded representations of the target areas to obtain boundary representations of corresponding stretching builds, so that a design drawing corresponding to the template two-dimensional sketch panel is quickly generated based on the boundary representations of the newly generated stretching builds and the boundary representations of the stretching builds stored in the target cache space. Specifically, based on the boundary representation of the stretch build corresponding to the first target area, generating a design drawing corresponding to the target two-dimensional sketch panel includes:
When a second target area exists in the plurality of target areas, stretching the second target area based on the coded representation of the second target area to obtain a boundary representation of a stretching model corresponding to the second target area, wherein the second target area is a target area which does not exist in the target cache space and is represented by the boundary representation of the stretching model corresponding to the coded representation in the plurality of target areas;
and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area and the boundary representation of the stretching modeling corresponding to the second target area.
The drawing model is a mode of generating a corresponding three-dimensional model based on the shape and the drawing height of a two-dimensional region in a two-dimensional design sketch in the two-dimensional sketch panel shown in fig. 5.
According to the embodiment of the application, the corresponding relation between the coding representation and the boundary representation of the stretching modeling is utilized, only the stretching modeling is carried out on the target area which does not exist in the target cache space, and the calculation cost of the stretching modeling is saved.
In some exemplary embodiments, since the boundary representation of the stretch builds corresponding to the first target region and the boundary representation of the stretch builds corresponding to the second target region are both original representations of the region shape, these representations cannot be directly displayed to the user, and therefore rendering operations based on the data of these original representations are also required. Specifically, generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretch build corresponding to the first target area and the boundary representation of the stretch build corresponding to the second target area, including:
Combining the boundary representation of the stretching modeling corresponding to the first target area and the boundary representation of the stretching modeling corresponding to the second target area to obtain boundary representations of the stretching modeling corresponding to the plurality of target areas;
performing discrete processing on boundary representations of the stretching models corresponding to the multiple target areas to obtain triangular surface patch data of the stretching models corresponding to the multiple target areas;
rendering the triangle patch data of the stretching modeling corresponding to the multiple target areas to generate a design drawing corresponding to the target two-dimensional sketch panel.
Fig. 7 is a schematic diagram of a boundary representation of a stretch model obtained by merging boundary representations of stretch models based on respective regions in fig. 6 according to an embodiment of the present application, that is, a schematic diagram of a boundary representation of a stretch model corresponding to a first target region and a boundary representation of a stretch model corresponding to a second target region, where the boundary representations of the stretch models corresponding to the target regions are obtained by performing a merging operation. Fig. 8 is a schematic diagram of a hard-wearing design drawing rendered based on the drawing model obtained by combining in fig. 7 according to an embodiment of the present application. Specifically, the process of obtaining the design drawing shown in fig. 8 may include: s1, obtaining a plurality of target areas to be stretched from the target two-dimensional sketch panel shown in fig. 5, wherein the target areas are rectangular areas. And s2, coding the plurality of target areas to obtain coded representations of the plurality of target areas. s3, querying boundary representations of the stretching shapes corresponding to the coded representations of the multiple target areas from the target cache space corresponding to the target two-dimensional sketch panel shown in fig. 5; s4, determining whether a boundary representation of a stretch model corresponding to the coded representation of the target region exists in the target cache space, if the boundary representation of the stretch model corresponding to the coded representation of the target region does not exist in the target cache space, executing s5, otherwise executing s6 to obtain a schematic diagram of the boundary representation of the stretch model of each region shown in fig. 6. s5, stretching the target area based on the coded representation of the target area to obtain a boundary representation of the stretching model corresponding to the target area; s6, obtaining a boundary representation of the stretch model corresponding to the target area, if the boundary representation of the stretch model corresponding to the coded representation of the target area exists in the target cache space, the boundary representation of the stretch model corresponding to the target area can be directly obtained from the target cache space. And s7, carrying out merging operation on boundary representations of the stretch builds corresponding to the multiple target areas in s5 and s6 to obtain a schematic diagram of the boundary representation of the stretch build of the hard-wearing design shown in fig. 7. And s8, performing discrete processing on the boundary representation of the stretching modeling corresponding to the combined multiple target areas to obtain triangular surface patch data of the stretching modeling corresponding to the multiple target areas. s9, rendering the triangle patch data of the stretch model corresponding to the plurality of target areas, and generating a hard-wearing design diagram shown in fig. 8.
In some exemplary embodiments, to reduce the stretching operation on the two-dimensional design sketch corresponding to each design drawing, the method further includes, after stretching the second target area based on the encoded representation of the second target area to obtain the boundary representation of the stretch profile corresponding to the second target area:
and storing the boundary representation of the stretch model corresponding to the second target area into a target cache space.
The boundary representation of the newly generated target region (namely the second target region) corresponding to the stretching modeling is stored in the target cache space and can be directly acquired and used for the region, corresponding to the second target region, of the next two-dimensional design sketch, of the stretching modeling, so that the times of pulling body operation are reduced, and the performance cost in the pulling body operation process is reduced.
Fig. 9 is a schematic flow chart of a design diagram processing method applied to an actual scene according to an embodiment of the present application, including:
step 910, a plurality of target areas to be stretched are obtained from the target two-dimensional sketch panel.
Step 920, encoding the plurality of target regions to obtain encoded representations of the plurality of target regions.
Step 930, querying boundary representations of the stretch builds corresponding to the coded representations of the plurality of target areas from the target cache space corresponding to the target two-dimensional sketch panel.
Step 940, determining whether a boundary representation of the stretch build corresponding to the encoded representation of the target region exists in the target cache space.
If there is no boundary representation of the stretch build corresponding to the encoded representation of the target region in the target cache space, then step 950 is performed, otherwise step 960 is performed.
Step 950, stretching the target region based on the encoded representation of the target region, to obtain a boundary representation of the stretch build corresponding to the target region.
In step 960, a boundary representation of the stretch build corresponding to the target region is obtained.
If the boundary representation of the stretch model corresponding to the coded representation of the target region exists in the target cache space, the boundary representation of the stretch model corresponding to the target region can be directly obtained from the target cache space.
In step 970, the boundary representations of the stretch builds corresponding to the plurality of target regions are merged.
And step 980, performing discrete processing on the boundary representations of the stretching models corresponding to the combined target areas to obtain triangular panel data of the stretching models corresponding to the target areas.
In step 990, rendering is performed on the triangle patch data of the stretch builds corresponding to the plurality of target areas, thereby generating a design drawing.
By adopting the processing method of the design drawing provided by the embodiment of the application, a plurality of target areas to be stretched can be obtained from the target two-dimensional sketch panel, each target area comprises an area identifier, stretching height and coordinates of vertexes and edges forming each target area, and the plurality of target areas are encoded based on the coordinates of the vertexes and the edges forming the plurality of target areas, the stretching height and the corresponding area identifiers, so that the encoded representation of each target area is obtained. In this way, according to the coded representation of each target area, whether each target area is a newly drawn area or not can be determined from the target buffer space storing the coded representation of the stretch model obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel, if the boundary representation of the stretch model corresponding to the coded representation of the first target area in the plurality of target areas exists in the target buffer space, the boundary representation of the stretch model corresponding to the first target area can be directly obtained from the target buffer space, so that the design diagram corresponding to the target two-dimensional sketch panel is generated based on the boundary representation of the stretch model corresponding to the first target area, the need of stretching the first target area again is avoided, the calculation resources occupied by the boundary representation of the stretch model obtained after stretching the first target area and the calculation are reduced, and the performance cost of the design diagram corresponding to the target two-dimensional sketch panel in the design and modification process is further saved.
It should be noted that, the execution subjects of each step of the method provided in the above embodiment may be the same device, or the method may also be executed by different devices. For example, the execution subject of steps 410 to 430 may be device a; for another example, the execution subject of steps 410 to 420 may be device a, and the execution subject of step 430 may be device B; etc.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations appearing in a particular order are included, but it should be clearly understood that the operations may be performed out of the order in which they appear herein or in parallel, the sequence numbers of the operations such as 410, 420, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel.
Fig. 10 is a schematic structural diagram of a processing apparatus 1000 of a design diagram according to an exemplary embodiment of the present application, where the apparatus is applied to a distributed computing scheduling system. As shown in fig. 10, the apparatus 1000 includes: a region acquisition module 1110, a region encoding module 1120, a boundary representation acquisition module 1130, and a plan generation module 1140, wherein:
The region obtaining module 1110 is configured to obtain a plurality of target regions to be stretched from a target two-dimensional sketch panel, where one target region includes a region identifier, a stretching height, and coordinates of vertices and edges that form the target region;
the region coding module 1120 is configured to code the multiple target regions based on coordinates, stretching heights, and corresponding region identifiers of vertices and edges that form the multiple target regions, so as to obtain coded representations of the multiple target regions;
a boundary representation obtaining module 1130, configured to obtain, from a target cache space corresponding to the target two-dimensional sketch panel, a boundary representation of a stretch build corresponding to a coded representation of a first target area, where the first target area is a plurality of target areas, the boundary representation of the stretch build corresponding to the coded representation exists in the target cache space, and the target cache space stores therein a boundary representation of the stretch build obtained by stretching based on the plurality of areas drawn in the target two-dimensional sketch panel;
the design drawing generating module 1140 is configured to generate a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretch build corresponding to the first target area.
Optionally, the region encoding module encodes the plurality of target regions based on coordinates, stretching heights and corresponding region identifiers of vertices and edges forming the plurality of target regions, and is specifically configured to, when obtaining encoded representations of the plurality of target regions:
encoding the vertexes of the plurality of target areas based on coordinates of vertexes constituting the plurality of target areas to obtain the encoding of the vertexes of the plurality of target areas;
when line segments exist in side lines forming a plurality of target areas, acquiring start point codes and end point codes of the line segments in the plurality of target areas from the codes of the vertexes of the plurality of target areas;
based on the start point codes and the end point codes of the line segments in the target areas and preset line segment codes, the line segments in the target areas are coded, and the line segment codes in the target areas are obtained;
and encoding each target area in the target areas based on line segment encoding, area identification, stretching height and preset area codes in the target areas to obtain encoding representations of each target area in the target areas.
Optionally, the region encoding module encodes each target region of the plurality of target regions based on line segment encoding, region identification, stretching height and preset region codes of each target region of the plurality of target regions, and is specifically configured to, when obtaining encoded representations of each target region of the plurality of target regions:
when circles exist in side lines forming a plurality of target areas, acquiring circle center point codes of circles of the target areas from the codes of vertexes of the target areas, and determining the radius of the circles based on coordinates of the side lines forming the target areas;
based on circle center point codes and radiuses of circles in the target areas and preset circle codes, the circles in the target areas are coded, and circle codes of the target areas are obtained;
and encoding each target area in the target areas based on line segment encoding, circle encoding, area identification, stretching height and preset area codes of the target areas to obtain encoding representations of each target area in the target areas.
Optionally, the region encoding module encodes each target region of the plurality of target regions based on line segment encoding, region identification, stretching height and preset region codes of each target region of the plurality of target regions, and is specifically configured to, when obtaining encoded representations of each target region of the plurality of target regions:
When an arc exists in the side lines forming a plurality of target areas, acquiring center point codes, starting point codes and end point codes of circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the arc based on the coordinates of the side lines forming the plurality of target areas;
coding the arcs in the target areas based on the circle center codes and the radiuses of the arcs in the target areas and preset arc codes to obtain arc codes of the target areas;
and encoding each target area in the target areas based on line segment encoding, arc encoding, area identification, stretching height and preset area codes of the target areas to obtain encoding representations of each target area in the target areas.
Optionally, the region encoding module encodes each target region in the plurality of target regions based on line segment encoding, circle encoding, region identification, stretching height and preset region codes of the plurality of target regions, and is specifically configured to, when obtaining encoded representations of each target region in the plurality of target regions:
When an arc exists in the side lines forming a plurality of target areas, acquiring center point codes, starting point codes and end point codes of circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the arc based on the coordinates of the side lines forming the plurality of target areas;
coding the arcs in the target areas based on the circle center codes and the radiuses of the arcs in the target areas and preset arc codes to obtain arc codes of the target areas;
and encoding each target area in the target areas based on line segment encoding, circle encoding, arc encoding, area identification, stretching height and preset area codes of the target areas to obtain encoding representations of each target area in the target areas.
Optionally, the design drawing generating module is specifically configured to, when generating the design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretch model corresponding to the first target area:
when a second target area exists in the plurality of target areas, stretching the second target area based on the coded representation of the second target area to obtain a boundary representation of a stretching model corresponding to the second target area, wherein the boundary representation of the stretching model corresponding to the coded representation in the plurality of target areas does not exist in the target area of the target cache space;
And generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area and the boundary representation of the stretching modeling corresponding to the second target area.
Optionally, the design drawing generating module is specifically configured to, when generating the design drawing corresponding to the target two-dimensional sketch panel, based on the boundary representation of the stretch build corresponding to the first target area and the boundary representation of the stretch build corresponding to the second target area:
combining the boundary representation of the stretching modeling corresponding to the first target area and the boundary representation of the stretching modeling corresponding to the second target area to obtain boundary representations of the stretching modeling corresponding to a plurality of target areas;
performing discrete processing on boundary representations of the stretching models corresponding to the target areas to obtain triangular surface patch data of the stretching models corresponding to the target areas;
rendering the triangle patch data of the stretching modeling corresponding to the target areas to generate a design diagram corresponding to the target two-dimensional sketch panel.
Optionally, after stretching the second target area based on the encoded representation of the second target area to obtain a boundary representation of the stretch profile corresponding to the second target area, the apparatus further includes:
And the storage module is used for storing the boundary representation of the stretching modeling corresponding to the second target area into the target cache space.
The processing device 1000 of the design chart can implement the method of the method embodiment of fig. 4 to 9, and specifically, the processing method of the design chart of the embodiment shown in fig. 4 to 9 may be referred to, and will not be described again.
Fig. 11 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. As shown in fig. 11, the apparatus includes: a memory 111 and a processor 112.
Memory 111 is used to store computer programs and may be configured to store various other data to support operations on the computing device. Examples of such data include instructions for any application or method operating on a computing device, contact data, phonebook data, messages, pictures, videos, and the like.
A processor 112 coupled to the memory 111 for executing the computer program in the memory 111 for: obtaining a plurality of target areas to be stretched from a target two-dimensional sketch panel, wherein one target area comprises an area mark, a stretching height and coordinates of vertexes and edges forming the target area; encoding a plurality of target areas based on coordinates of vertexes and edges forming the plurality of target areas, stretching heights and corresponding area identifiers to obtain encoded representations of the plurality of target areas; obtaining boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space; and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
Further, as shown in fig. 11, the electronic device further includes: communication component 113, display 114, power component 115, audio component 116, and other components. Only some of the components are schematically shown in fig. 11, which does not mean that the electronic device only comprises the components shown in fig. 11. In addition, the components within the dashed box in fig. 11 are optional components, not necessarily components, depending on the implementation of the flow playback device. For example, when the electronic device is implemented as a terminal device such as a smart phone, tablet computer, or desktop computer, the components within the dashed box in fig. 11 may be included; when the electronic device is implemented as a server-side device such as a conventional server, cloud server, data center, or server array, the components within the dashed box in fig. 11 may not be included.
Accordingly, an embodiment of the present application further provides a computer readable storage medium storing a computer program, where the computer program when executed by a processor causes the processor to implement the steps in the embodiment of the processing method of the design drawing.
Accordingly, embodiments of the present application also provide a computer program product, which includes a computer program/instruction that, when executed, can implement the steps of the above-described embodiments of the processing method of the design drawing, where the steps can be executed by an electronic device. Optionally, the computer program product may obtain a modification operation for a target area on the target two-dimensional sketch panel in addition to performing the steps in the processing method embodiment of the design drawing, and determine an encoded representation of the target area in response to the modification operation for the target area; determining whether a boundary representation of a stretching model corresponding to the coding representation of the target area exists in a target cache space corresponding to the target two-dimensional sketch panel; and updating the design diagram corresponding to the two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the coding representation of the target area when the boundary representation of the stretching modeling corresponding to the coding representation of the target area exists in the target cache space.
The communication assembly of fig. 11 is configured to facilitate wired or wireless communication between the device in which the communication assembly is located and other devices. The device in which the communication component is located may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component receives a broadcast signal 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, and the like.
The memory of fig. 11 described above may be implemented by any type of volatile or non-volatile memory device or 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 memory, flash memory, magnetic or optical disk.
The display in fig. 11 described above 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 may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation.
The power supply assembly shown in fig. 11 provides power to various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the devices in which the power components are located.
The audio component of fig. 11 described above may 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 in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signal may be further stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (11)

1. A method for processing a design drawing, comprising:
obtaining a plurality of target areas to be stretched from a target two-dimensional sketch panel, wherein one target area comprises an area mark, a stretching height and coordinates of vertexes and edges forming the target area;
encoding a plurality of target areas based on coordinates of vertexes and edges forming the plurality of target areas, stretching heights and corresponding area identifiers to obtain encoded representations of the plurality of target areas;
obtaining boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space;
And generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
2. The method of claim 1, wherein the encoding the plurality of target regions based on coordinates of vertices and edges making up the plurality of target regions, stretching heights, and corresponding region identifications, results in encoded representations of the plurality of target regions, comprising:
encoding the vertexes of the plurality of target areas based on coordinates of vertexes constituting the plurality of target areas to obtain the encoding of the vertexes of the plurality of target areas;
when line segments exist in side lines forming a plurality of target areas, acquiring start point codes and end point codes of the line segments in the plurality of target areas from the codes of the vertexes of the plurality of target areas;
based on the start point codes and the end point codes of the line segments in the target areas and preset line segment codes, the line segments in the target areas are coded, and the line segment codes in the target areas are obtained;
and encoding each target area in the target areas based on line segment encoding, area identification, stretching height and preset area codes in the target areas to obtain encoding representations of each target area in the target areas.
3. The method of claim 2, wherein the encoding each of the plurality of target areas based on segment codes, area identifiers, stretching heights, and preset area codes of each of the plurality of target areas to obtain encoded representations of each of the plurality of target areas comprises:
when circles exist in side lines forming a plurality of target areas, acquiring circle center point codes of circles of the target areas from the codes of vertexes of the target areas, and determining the radius of the circles based on coordinates of the side lines forming the target areas;
based on circle center point codes and radiuses of circles in the target areas and preset circle codes, the circles in the target areas are coded, and circle codes of the target areas are obtained;
and encoding each target area in the target areas based on line segment encoding, circle encoding, area identification, stretching height and preset area codes of the target areas to obtain encoding representations of each target area in the target areas.
4. The method of claim 2, wherein the encoding each of the plurality of target areas based on segment codes, area identifiers, stretching heights, and preset area codes of each of the plurality of target areas to obtain encoded representations of each of the plurality of target areas comprises:
when an arc exists in the side lines forming a plurality of target areas, acquiring center point codes, starting point codes and end point codes of circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the arc based on the coordinates of the side lines forming the plurality of target areas;
coding the arcs in the target areas based on the circle center codes and the radiuses of the arcs in the target areas and preset arc codes to obtain arc codes of the target areas;
and encoding each target area in the target areas based on line segment encoding, arc encoding, area identification, stretching height and preset area codes of the target areas to obtain encoding representations of each target area in the target areas.
5. The method of claim 3, wherein the encoding each of the plurality of target areas based on segment encoding, circle encoding, area identification, stretching height, and a preset area code for the plurality of target areas to obtain an encoded representation of each of the plurality of target areas comprises:
when an arc exists in the side lines forming a plurality of target areas, acquiring center point codes, starting point codes and end point codes of circles of the target areas in the plurality of target areas from the codes of the vertexes of the plurality of target areas, and determining the radius of the arc based on the coordinates of the side lines forming the plurality of target areas;
coding the arcs in the target areas based on the circle center codes and the radiuses of the arcs in the target areas and preset arc codes to obtain arc codes of the target areas;
and encoding each target area in the target areas based on line segment encoding, circle encoding, arc encoding, area identification, stretching height and preset area codes of the target areas to obtain encoding representations of each target area in the target areas.
6. The method of claim 1, wherein the generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretch build corresponding to the first target region comprises:
when a second target area exists in the plurality of target areas, stretching the second target area based on the coded representation of the second target area to obtain a boundary representation of a stretching model corresponding to the second target area, wherein the boundary representation of the stretching model corresponding to the coded representation in the plurality of target areas does not exist in the target area of the target cache space;
and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area and the boundary representation of the stretching modeling corresponding to the second target area.
7. The method of claim 6, wherein the generating the design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretch build corresponding to the first target region and the boundary representation of the stretch build corresponding to the second target region comprises:
Combining the boundary representation of the stretching modeling corresponding to the first target area and the boundary representation of the stretching modeling corresponding to the second target area to obtain boundary representations of the stretching modeling corresponding to a plurality of target areas;
performing discrete processing on boundary representations of the stretching models corresponding to the target areas to obtain triangular surface patch data of the stretching models corresponding to the target areas;
rendering the triangle patch data of the stretching modeling corresponding to the target areas to generate a design diagram corresponding to the target two-dimensional sketch panel.
8. The method of claim 6, wherein the stretching the second target region based on the encoded representation of the second target region, after obtaining a boundary representation of a stretch build corresponding to the second target region, further comprises:
and storing the boundary representation of the stretching modeling corresponding to the second target area into the target cache space.
9. A device for processing a design drawing, comprising:
the system comprises a region acquisition module, a drawing module and a drawing module, wherein the region acquisition module is used for acquiring a plurality of target regions to be drawn from a target two-dimensional sketch panel, and one target region comprises a region mark, a drawing height and coordinates of vertexes and edges forming the target region;
The region coding module is used for coding the plurality of target regions based on coordinates, stretching heights and corresponding region identifiers of vertexes and edges forming the plurality of target regions to obtain coded representations of the plurality of target regions;
the boundary representation acquisition module is used for acquiring boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained based on stretching of the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space;
and the design drawing generation module is used for generating a design drawing corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
10. An electronic device, comprising: a memory and a processor;
the memory is used for storing a computer program;
the processor, coupled to the memory, is configured to execute the computer program for:
Obtaining a plurality of target areas to be stretched from a target two-dimensional sketch panel, wherein one target area comprises an area mark, a stretching height and coordinates of vertexes and edges forming the target area;
encoding a plurality of target areas based on coordinates of vertexes and edges forming the plurality of target areas, stretching heights and corresponding area identifiers to obtain encoded representations of the plurality of target areas;
obtaining boundary representations of stretching shapes corresponding to coded representations of a first target area from a target cache space corresponding to the target two-dimensional sketch panel, wherein the first target area is a plurality of target areas, the boundary representations of the stretching shapes corresponding to the coded representations exist in the target cache space, and the boundary representations of the stretching shapes obtained by stretching the plurality of areas drawn in the target two-dimensional sketch panel are stored in the target cache space;
and generating a design diagram corresponding to the target two-dimensional sketch panel based on the boundary representation of the stretching modeling corresponding to the first target area.
11. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, causes the processor to carry out the steps in the processing method of the design drawing according to any one of claims 1 to 8.
CN202310754524.9A 2023-06-25 2023-06-25 Design drawing processing method, device, equipment and storage medium Pending CN116776408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310754524.9A CN116776408A (en) 2023-06-25 2023-06-25 Design drawing processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310754524.9A CN116776408A (en) 2023-06-25 2023-06-25 Design drawing processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116776408A true CN116776408A (en) 2023-09-19

Family

ID=88012965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310754524.9A Pending CN116776408A (en) 2023-06-25 2023-06-25 Design drawing processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116776408A (en)

Similar Documents

Publication Publication Date Title
US11842125B2 (en) Space profile interpreter framework for a computer file
CN108205960B (en) Method and device for rendering characters, electronic map making system and navigation system
CN112241565A (en) Modeling method and related device
CN109388843B (en) Visualization system and method of truss antenna based on VTK (virtual terminal K), and terminal
CN116954585A (en) Industrial digital twin three-dimensional visual scene editing method, device and medium
CN111158650B (en) Report template and report generation method and device
CN108961406A (en) Geographical information visualization method, apparatus and user terminal
CN105095515A (en) Bucket dividing method, device and equipment supporting fast query of Map-Reduce output result
CN107330209B (en) Modeling wall intelligent template implementation method based on parametric design
CN116776408A (en) Design drawing processing method, device, equipment and storage medium
CN113742804B (en) Furniture layout diagram generation method, device, equipment and storage medium
CN116485995A (en) Modeling method based on assembled building components, intelligent terminal and storage medium
CN114797109A (en) Object editing method and device, electronic equipment and storage medium
CN115168657A (en) Data storage method, device and storage medium
CN114820988A (en) Three-dimensional modeling method, device, equipment and storage medium
CN115481458A (en) Method, device, equipment, storage medium and product for generating house layout
CN114327395A (en) Webpage design method, device, computer equipment, storage medium and product
CN116737852A (en) Vector tile data-based vector drawing method and device and electronic equipment
CN109840945B (en) Finite element preprocessing method and device
CN112749229A (en) Data conversion method, device, storage medium and electronic equipment
CN113593025B (en) Geologic body model updating method, device, equipment and storage medium
CN116402842B (en) Edge defect detection method, device, computer equipment and storage medium
CN115049804B (en) Editing method, device, equipment and medium for virtual scene
CN114549767B (en) PLM (product quality model) processing method, system and device and readable medium
CN116137056A (en) Facade sampling line generation method, device, equipment and storage medium

Legal Events

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