A composition acquisition method and device based on composition component modification

By receiving user instructions in the floor plan editing software, changing the vertices and normal vectors of the door components, and building door components with different door opening methods, the problem of being unable to adjust the door opening method in the prior art is solved and the design efficiency is improved.

CN111798541BActive Publication Date: 2024-12-10BEIJING FANGTIANXIA JIAJU NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010692024.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2024-12-10
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

Existing floor plan editing software cannot change the door opening method by simply adjusting the properties of door components, resulting in users needing to redesign the door components, which increases the workload.

Method used

By receiving user modification instructions, obtaining the vertex coordinates of the door component and calling the preset transformation matrix for transformation, building a door component geometric frame with different door opening methods, and transforming the normal vector and vertices of the door component through a regular matrix, setting its surface Material and gloss, displayed in the composition interface.

Benefits of technology

The door opening method of door components is realized simply and effectively modified, avoiding the user's need to redesign the door components and improving design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111798541B_ABST
    Figure CN111798541B_ABST
Patent Text Reader

Abstract

The present application discloses a composition acquisition method and device based on the modification of the composition component, calling a preset transformation matrix to transform the coordinates of each vertex in the first door component to obtain the coordinates of the new vertex. Based on the coordinates of the new vertex, the geometric framework of the second door component is constructed. The normal matrix is ​​called to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component, and the normal vectors of each vertex in the first door component are transformed to obtain the normal vectors of each vertex of the second door component. According to the normal vectors of each face and each vertex of the second door component, the surface material and gloss of the second door component are set. Based on the user's operation in the composition interface, a composition including the second door component is generated. It can be seen that the present application can simply and effectively modify the door opening method of the door component based on the modification instruction triggered by the user, obtain the composition of the door component including different door opening methods, and avoid the user from redesigning the door component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of graphic component design, and in particular to a composition acquisition method and device based on composition component modification. Background Art

[0002] Existing floor plan editing software pre-sets multiple graphic components. Most of the components are simple to place on the design drawing, such as sofas, tables, beds, and chairs. As long as the position, size, and orientation of the components are properly handled, the user's design needs can be met. In actual use, the simple placement of components can be achieved by setting preset properties such as the position, scale, and rotation of the components. However, for the placement of door components, in addition to the design requirements of position, size, and orientation, there may also be design requirements for the way the door opens. For example, the door component was originally designed to open on the left, and the door handle is set on the right side of the door. If the user redesigns the door component to open on the right, it is obvious that the door component's opening method cannot be adjusted by setting the properties of the door component.

[0003] In view of the above situation, users usually redesign the door assembly of the right-opening door by themselves. However, the design of the assembly requires a series of work such as drawing and modeling, which increases the workload of users. Summary of the invention

[0004] The present application provides a composition acquisition method and device based on composition component modification, which aims to simply and effectively modify the door opening method of the door component, obtain the composition of the door component including different door opening methods, and avoid users from redesigning the door component.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A composition acquisition method based on composition component modification, comprising:

[0007] When receiving a modification instruction triggered by a user, obtaining coordinates of each vertex in the modification object, the modification object being the first door component;

[0008] Calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices;

[0009] According to the coordinates of the new vertices, a geometric frame of a second door component is constructed, wherein the second door component and the first door component have different door opening modes;

[0010] Calling a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component; wherein the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix;

[0011] Calling the normal matrix to transform the normal vectors of each of the vertices in the first door component to obtain the normal vectors of each of the vertices of the second door component;

[0012] According to the normal vectors of each of the faces of the second door component and the normal vectors of each of the vertices of the second door component, setting the surface material and gloss of the second door component;

[0013] Displaying the second door component on the composition interface;

[0014] Based on the user's operation on the composition interface, a composition including the second door component is generated.

[0015] Optionally, calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices includes:

[0016] The coordinates of each of the vertices in the first door component are multiplied by a preset transformation matrix to obtain the coordinates of new vertices.

[0017] Optionally, calling the normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component includes:

[0018] Calculating the normal vector of each face in the first door component according to the coordinates of each vertex in the first door component;

[0019] The normal vectors of the respective faces of the first door component are multiplied by the normal matrix to obtain the normal vectors of the respective faces of the second door component.

[0020] Optionally, calling the normal matrix to transform the normal vectors of each vertex in the first door component to obtain the normal vectors of each vertex of the second door component includes:

[0021] Calculate the normal vector of each vertex in the first door component according to the coordinates of each vertex in the first door component;

[0022] The normal vector of each of the vertices in the first door component is multiplied by the normal matrix on the left to obtain the normal vector of each of the vertices in the second door component.

[0023] Optionally, the door opening method includes left-opening and right-opening.

[0024] Optionally, the door opening method includes upper door opening and lower door opening.

[0025] Optionally, also include:

[0026] The second door component is initialized and stored locally.

[0027] A composition acquisition device based on composition component modification, comprising:

[0028] An acquisition unit, configured to acquire coordinates of each vertex in a modification object upon receiving a modification instruction triggered by a user, wherein the modification object is a first door component;

[0029] A first transformation unit, used for calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices;

[0030] A construction unit, configured to construct a geometric frame of a second door component according to the coordinates of the new vertex, wherein the second door component and the first door component have different door opening modes;

[0031] A second transformation unit is used to call a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component; wherein the normal matrix is ​​a transposed matrix of the inverse matrix of the transformation matrix;

[0032] a third transformation unit, configured to call the normal matrix to transform the normal vectors of the vertices in the first door component to obtain the normal vectors of the vertices of the second door component;

[0033] a setting unit, configured to set the surface material and gloss of the second door component according to the normal vectors of each of the faces of the second door component and the normal vectors of each of the vertices of the second door component;

[0034] A display unit, configured to display the second door component on a composition interface;

[0035] A generating unit is used to generate a composition including the second door component based on the operation of the user on the composition interface.

[0036] A computer-readable storage medium includes a stored program, wherein the program executes the composition acquisition method based on modification of composition components.

[0037] A composition acquisition device based on modification of composition components, comprising: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0038] The memory is used to store programs, and the processor is used to run the programs, wherein the program executes the composition acquisition method based on modification of composition components when it is run.

[0039] The technical solution provided by the present application, when receiving a modification instruction triggered by a user, obtains the coordinates of each vertex in the modification object, and the modification object is the first door component. Call the preset transformation matrix to transform the coordinates of each vertex in the first door component to obtain the coordinates of the new vertex. According to the coordinates of the new vertex, the geometric body framework of the second door component is constructed, and the door opening methods of the second door component and the first door component are different. Call the normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component, wherein the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix. Call the normal matrix to transform the normal vectors of each vertex in the first door component to obtain the normal vectors of each vertex of the second door component. According to the normal vectors of each face of the second door component and the normal vectors of each vertex of the second door component, the surface material and gloss of the second door component are set. The second door component is displayed in the composition interface, and a composition including the second door component is generated based on the user's operation in the composition interface. It can be seen that the present application can simply and effectively modify the opening method of the door assembly based on the modification instructions triggered by the user, obtain the composition of the door assembly including different opening methods, and avoid the user from redesigning the door assembly. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic diagram of a composition acquisition method based on modification of a composition component provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of a door assembly provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of another composition acquisition method based on modification of composition components provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of another door assembly provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of another composition acquisition method based on modification of composition components provided in an embodiment of the present application;

[0046] Figure 6A schematic diagram of the structure of a composition acquisition device based on modification of a composition component is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] The process provided in the embodiment of the present application is applied to a floor plan editing system. Specifically, it can be executed by a server to modify the opening method of a door component and obtain a composition of a door component including different opening methods, thereby avoiding users from redesigning the door component.

[0049] like Figure 1 FIG. 1 is a schematic diagram of a composition acquisition method based on modification of a composition component provided in an embodiment of the present application, comprising the following steps:

[0050] S101: upon receiving a modification instruction triggered by a user for a door component of a left-opening door, obtaining a pre-built transformation matrix from a database.

[0051] The pre-constructed transformation matrix is ​​shown in formula (1).

[0052]

[0053] S102: Obtain the coordinates of each vertex in the door component of the left-opening door, and multiply the coordinates of each vertex in the door component of the left-opening door by the transformation matrix to obtain the coordinates of each new vertex, and construct the geometric framework of the door component of the right-opening door based on the coordinates of each new vertex.

[0054] In the floor plan editing system, the reference coordinate system of the door component is the right-hand coordinate system. Therefore, multiplying the coordinates of each vertex in the left-opening door component by the transformation matrix is ​​essentially to convert the X-axis coordinates of each vertex in the left-opening door component into negative values, while keeping the Y-axis and Z-axis coordinates unchanged, thereby obtaining the coordinates of each new vertex, and constructing the geometric framework of the right-opening door component based on the coordinates of each new vertex.

[0055] It should be noted that the specific implementation process of constructing the geometric framework of the door assembly of the right-opening door based on the coordinates of each new vertex is common knowledge familiar to those skilled in the art.

[0056] S103: Calculate the transposed matrix of the inverse matrix of the transformation matrix to obtain a normal matrix.

[0057] Among them, the transposed matrix of the inverse matrix of the transformation matrix shown in the above formula (1) is shown in formula (2).

[0058]

[0059] S104: Calculate the normal vectors of each face in the door assembly of the left-opening door according to the coordinates of each vertex in the door assembly of the left-opening door, and multiply the normal vectors of each face in the door assembly of the left-opening door by the normal matrix to obtain the normal vectors of each face in the door assembly of the right-opening door.

[0060] Among them, the specific implementation process of calculating the normal vectors of each face in the door assembly of the left-opening door based on the coordinates of each vertex in the door assembly of the left-opening door is common knowledge familiar to technical personnel in this field and will not be repeated here.

[0061] S105: Obtain the normal vector of each vertex in the door component of the left-opening door, and multiply the normal vector of each vertex in the door component of the left-opening door by the normal matrix to obtain the normal vector of each vertex in the door component of the right-opening door.

[0062] The normal vector of the vertex specifically refers to the normal vector of each face constituting the vertex in the geometric frame of the door component. In this embodiment, the normal vector of each vertex in the door component of the left-opening door is multiplied by the normal matrix. The specific implementation logic code can be:

[0063] for(varj=0,jl=face.vertexNorMals.length;j <jl;j++){

[0064] face.vertexNorMals[j]=nomalMatrix*face.vertexNorMals[j];

[0065] }

[0066] In the specific implementation logic code, face.vertexNorMals.length represents the number of normal vectors of the vertex, face.vertexNorMals[j] represents the normal vector of the vertex, and nomalMatrix represents the normal matrix.

[0067] S106: Setting the surface material and gloss of the door component of the right-opening door according to the normal vectors of each face of the door component of the right-opening door and the normal vectors of each vertex of the door component of the right-opening door.

[0068] In addition to the geometric frame, the door component also includes surface material and gloss. In the floor plan editing system, the normal vectors of each face and each vertex in the door component are converted by a preset formula to obtain the surface material and gloss of the door component.

[0069] S107: Displaying a door component of a right-opening door on the composition interface.

[0070] The composition interface may specifically be a graphic design interface of a floor plan editing system.

[0071] For details, see the following Figure 2 The door assembly shown consists of Figure 2 It can be seen that the surface material and gloss of the right-opening door assembly obtained through this embodiment are the same as those of the left-opening door assembly, and the only difference is the installation position of the door handle, that is, the door opening method is different.

[0072] S108: Based on the user's operation on the composition interface, generate a composition of the door component including the right-opening door.

[0073] Among them, users can use the composition of the door component of the right-opening door to achieve design requirements.

[0074] S109: Initialize the door assembly of the right-opening door, and store the door assembly of the right-opening door locally.

[0075] Specifically, initializing the door component of the right-opening door refers to recalculating the normal vectors of each face and each vertex of the door component of the right-opening door according to the coordinates of each vertex in the door component of the right-opening door. Storing the door component of the right-opening door locally can facilitate subsequent users to call the door component of the right-opening door.

[0076] In summary, when a user triggers a modification instruction for a door component that opens left, a preset transformation matrix is ​​called to transform the coordinates of each vertex in the door component that opens left to obtain the coordinates of the new vertex. Based on the coordinates of the new vertex, a geometric frame of the door component that opens right is constructed. The normal matrix is ​​called to transform the normal vectors of each face in the door component that opens left to obtain the normal vectors of each face of the door component that opens right. The normal matrix is ​​called to transform the normal vectors of each vertex in the door component that opens left to obtain the normal vectors of each vertex in the door component that opens right. The surface material and gloss of the door component that opens right are set based on the normal vectors of each face and the normal vectors of each vertex in the door component that opens right. The door component that opens right is displayed in the composition interface, and a composition including the door component that opens right is generated based on the user's operation in the composition interface. It can be seen that this embodiment can simply and effectively modify the door opening mode of the door component based on the modification instruction triggered by the user, obtain the composition of the door component including different door opening modes, and avoid the user from redesigning the door component.

[0077] It should be noted that in actual graphic design scenarios, some door components open upward, but as users demand for innovative designs, downward opening door opening methods have also emerged. To this end, this embodiment provides a composition acquisition method based on the modification of a composition component for the application scenario where a door component that opens upward is modified to a door component that opens downward.

[0078] like Figure 3 FIG. 1 is a schematic diagram of another composition acquisition method based on modification of a composition component provided in an embodiment of the present application, comprising the following steps:

[0079] S301: upon receiving a modification instruction triggered by a user for a door component of an upward-opening door, obtaining a pre-built transformation matrix from a database.

[0080] The pre-constructed transformation matrix is ​​shown in formula (3).

[0081]

[0082] S302: Obtain the coordinates of each vertex in the door component of the upper door, and multiply the coordinates of each vertex in the door component of the upper door by the transformation matrix to obtain the coordinates of each new vertex, and construct the geometric framework of the door component of the lower door based on the coordinates of each new vertex.

[0083] In the floor plan editing system, the reference coordinate system of the door assembly is the right-hand coordinate system. Therefore, multiplying the coordinates of each vertex in the upper-opening door assembly by the transformation matrix is ​​essentially to convert the Y-axis coordinates of each vertex in the upper-opening door assembly into negative values, while keeping the X-axis and Z-axis coordinates unchanged, thereby obtaining the coordinates of each new vertex, and constructing the geometric framework of the lower-opening door assembly based on the coordinates of each new vertex.

[0084] It should be noted that the specific implementation process of constructing the geometric framework of the door assembly of the bottom-opening door based on the coordinates of each new vertex is common knowledge familiar to those skilled in the art.

[0085] S303: Calculate the transposed matrix of the inverse matrix of the transformation matrix to obtain a normal matrix.

[0086] Among them, the transposed matrix of the inverse matrix of the transformation matrix shown in the above formula (3) is shown in formula (4).

[0087]

[0088] S304: Calculate the normal vector of each face in the door assembly of the upper opening door according to the coordinates of each vertex in the door assembly of the upper opening door, and multiply the normal vector of each face in the door assembly of the upper opening door by the normal matrix to obtain the normal vector of each face of the door assembly of the lower opening door.

[0089] Among them, the specific implementation process of calculating the normal vectors of each face in the door assembly of the upward opening door based on the coordinates of each vertex in the door assembly of the upward opening door is common knowledge familiar to technical personnel in this field and will not be repeated here.

[0090] S305: Obtain the normal vector of each vertex in the door component of the upward opening door, and multiply the normal vector of each vertex in the door component of the upward opening door by the normal matrix to obtain the normal vector of each vertex in the door component of the downward opening door.

[0091] S306: Setting the surface material and gloss of the door assembly of the downward-opening door according to the normal vectors of each face of the door assembly of the downward-opening door and the normal vectors of each vertex of the door assembly of the downward-opening door.

[0092] S307: Displaying the door component of the door being opened on the composition interface.

[0093] For details, see the following Figure 4 The door assembly shown consists of Figure 4 It can be seen that the surface material and gloss of the bottom-opening door assembly obtained through this embodiment are the same as those of the top-opening door assembly, and the only difference is the installation position of the door handle, that is, the door opening method is different.

[0094] S308: Based on the user's operation on the composition interface, generate a composition of the door assembly including the bottom-opening door.

[0095] Among them, users can use the composition of the door component of the bottom-opening door to achieve design requirements.

[0096] S309: Initialize the door assembly of the downward-opening door, and store the door assembly of the downward-opening door locally.

[0097] Specifically, initializing the door component of the bottom opening door refers to recalculating the normal vectors of each face and each vertex of the door component of the bottom opening door according to the coordinates of each vertex in the door component of the bottom opening door. Storing the door component of the bottom opening door locally can facilitate subsequent users to call the door component of the bottom opening door.

[0098] In summary, when a user triggers a modification instruction for a door assembly that opens upward, a preset transformation matrix is ​​called to transform the coordinates of each vertex in the door assembly that opens upward to obtain the coordinates of the new vertex. Based on the coordinates of the new vertex, a geometric frame of the door assembly that opens downward is constructed. The normal matrix is ​​called to transform the normal vectors of each face in the door assembly that opens upward to obtain the normal vectors of each face of the door assembly that opens downward. The normal matrix is ​​called to transform the normal vectors of each vertex in the door assembly that opens upward to obtain the normal vectors of each vertex in the door assembly that opens downward. The surface material and gloss of the door assembly that opens downward are set based on the normal vectors of each face and the normal vectors of each vertex of the door assembly that opens downward. The door assembly that opens downward is displayed in the composition interface, and a composition including the door assembly that opens downward is generated based on the user's operation in the composition interface. It can be seen that this embodiment can simply and effectively modify the door opening mode of the door assembly based on the modification instruction triggered by the user, obtain the composition including the door assembly with different door opening modes, and avoid the user from redesigning the door assembly.

[0099] It should be noted that the door assembly of the left-opening door is modified into the door assembly of the right-opening door. In addition, the embodiment of the present application can also modify the door assembly of the right-opening door into the door assembly of the left-opening door. To this end, the composition acquisition method based on the modification of the composition assembly provided in the above embodiment can be summarized as follows: Figure 5 Steps shown.

[0100] like Figure 5 As shown, another composition acquisition method based on composition component modification provided in an embodiment of the present application includes the following steps:

[0101] S501: upon receiving a modification instruction triggered by a user, obtaining coordinates of each vertex in the modified object.

[0102] The modified object is the first door component.

[0103] S502: calling a preset transformation matrix to transform the coordinates of each vertex in the first door component to obtain the coordinates of new vertices.

[0104] Optionally, the coordinates of each vertex in the first door component are multiplied by a preset transformation matrix to obtain the coordinates of the new vertex.

[0105] S503: Constructing the geometric framework of the second door component according to the coordinates of the new vertices.

[0106] The door opening methods of the second door assembly and the first door assembly are different from each other.

[0107] Optionally, the door opening method includes left-opening and right-opening.

[0108] Optionally, the door opening method includes upper door opening and lower door opening.

[0109] S504: calling a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component.

[0110] Among them, the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix.

[0111] Optionally, the normal vectors of each face in the first door component are calculated based on the coordinates of each vertex in the first door component, and the normal vectors of the faces in the first door component are multiplied by a normal matrix to obtain the normal vectors of each face of the second door component.

[0112] S505: calling a normal matrix to transform the normal vector of each vertex in the first door component to obtain the normal vector of each vertex of the second door component.

[0113] Optionally, the normal vector of each vertex in the first door component is calculated based on the coordinates of each vertex in the first door component, and the normal vector of each vertex in the first door component is multiplied by a normal matrix to obtain the normal vector of each vertex in the second door component.

[0114] S506: Setting the surface material and gloss of the second door component according to the normal vectors of each face of the second door component and the normal vectors of each vertex of the second door component.

[0115] S507: Displaying the second door component on the composition interface.

[0116] S508: Based on the user's operation on the composition interface, generate a composition including the second door component.

[0117] Optionally, the second door component is initialized and stored locally.

[0118] In summary, when a modification instruction triggered by a user is received, the coordinates of each vertex in the modification object are obtained, and the modification object is the first door component. The preset transformation matrix is ​​called to transform the coordinates of each vertex in the first door component to obtain the coordinates of the new vertex. According to the coordinates of the new vertex, the geometric framework of the second door component is constructed, and the door opening methods of the second door component and the first door component are different. The normal matrix is ​​called to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component, wherein the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix. The normal matrix is ​​called to transform the normal vectors of each vertex in the first door component to obtain the normal vectors of each vertex of the second door component. According to the normal vectors of each face of the second door component and the normal vectors of each vertex of the second door component, the surface material and gloss of the second door component are set. The second door component is displayed in the composition interface, and a composition including the second door component is generated based on the user's operation in the composition interface. It can be seen that this embodiment can simply and effectively modify the opening method of the door assembly based on the modification instruction triggered by the user, obtain the composition of the door assembly including different opening methods, and avoid the user from redesigning the door assembly.

[0119] Corresponding to the composition acquisition method based on modification of the composition component provided in the above-mentioned embodiment of the present application, the present application also provides a composition acquisition device based on modification of the composition component.

[0120] like Figure 6 As shown, it is a structural schematic diagram of a composition acquisition device based on composition component modification provided by an embodiment of the present application, including:

[0121] The acquisition unit 100 is used to acquire the coordinates of each vertex in the modification object when receiving a modification instruction triggered by the user, and the modification object is the first door component.

[0122] The first transformation unit 200 is used to call a preset transformation matrix to transform the coordinates of each vertex in the first door component to obtain the coordinates of new vertices.

[0123] The first transformation unit 200 is specifically used to: multiply the coordinates of each vertex in the first door component by a preset transformation matrix to obtain the coordinates of a new vertex.

[0124] The construction unit 300 is used to construct a geometric frame of the second door component according to the coordinates of the new vertices, wherein the second door component and the first door component have different door opening modes, wherein the door opening modes include left-opening and right-opening, or top-opening and bottom-opening.

[0125] The second transformation unit 400 is used to call a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component. The normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix.

[0126] The second transformation unit 400 is specifically used to calculate the normal vectors of each face in the first door component according to the coordinates of each vertex in the first door component, and multiply the normal vectors of the faces in the first door component by the normal matrix to obtain the normal vectors of each face of the second door component.

[0127] The third transformation unit 500 is used to call the normal matrix to transform the normal vector of each vertex in the first door component to obtain the normal vector of each vertex of the second door component.

[0128] The third transformation unit 500 is specifically used to calculate the normal vector of each vertex in the first door component according to the coordinates of each vertex in the first door component, and multiply the normal vector of each vertex in the first door component by the normal matrix to obtain the normal vector of each vertex in the second door component.

[0129] The setting unit 600 is used to set the surface material and gloss of the second door component according to the normal vectors of each face of the second door component and the normal vectors of each vertex of the second door component.

[0130] The display unit 700 is used to display the second door component on the composition interface.

[0131] The generating unit 800 is used to generate a composition including a second door component based on the user's operation on the composition interface.

[0132] The initialization unit 900 is used to initialize the second door component and store the second door component locally.

[0133] In summary, when a modification instruction triggered by a user is received, the coordinates of each vertex in the modification object are obtained, and the modification object is the first door component. The preset transformation matrix is ​​called to transform the coordinates of each vertex in the first door component to obtain the coordinates of the new vertex. According to the coordinates of the new vertex, the geometric framework of the second door component is constructed, and the door opening methods of the second door component and the first door component are different. The normal matrix is ​​called to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component, wherein the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix. The normal matrix is ​​called to transform the normal vectors of each vertex in the first door component to obtain the normal vectors of each vertex of the second door component. According to the normal vectors of each face of the second door component and the normal vectors of each vertex of the second door component, the surface material and gloss of the second door component are set. The second door component is displayed in the composition interface, and a composition including the second door component is generated based on the user's operation in the composition interface. It can be seen that this embodiment can simply and effectively modify the opening method of the door assembly based on the modification instruction triggered by the user, obtain the composition of the door assembly including different opening methods, and avoid the user from redesigning the door assembly.

[0134] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the composition acquisition method based on composition component modification provided by the present application.

[0135] The present application also provides a composition acquisition device based on composition component modification, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run the programs, wherein when the programs are run, the composition acquisition method based on composition component modification provided by the present application is executed, including the following steps:

[0136] When receiving a modification instruction triggered by a user, obtaining coordinates of each vertex in the modification object, the modification object being the first door component;

[0137] Calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices;

[0138] According to the coordinates of the new vertices, a geometric frame of a second door component is constructed, wherein the second door component and the first door component have different door opening modes;

[0139] Calling a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component; wherein the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix;

[0140] Calling the normal matrix to transform the normal vectors of each of the vertices in the first door component to obtain the normal vectors of each of the vertices of the second door component;

[0141] According to the normal vectors of each of the faces of the second door component and the normal vectors of each of the vertices of the second door component, setting the surface material and gloss of the second door component;

[0142] Displaying the second door component on the composition interface;

[0143] Based on the user's operation on the composition interface, a composition including the second door component is generated.

[0144] Optionally, calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices includes:

[0145] The coordinates of each of the vertices in the first door component are multiplied by a preset transformation matrix to obtain the coordinates of new vertices.

[0146] Optionally, calling the normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component includes:

[0147] Calculating the normal vector of each face in the first door component according to the coordinates of each vertex in the first door component;

[0148] The normal vector of the face in the first door component is multiplied by the normal matrix to obtain the normal vector of each face of the second door component.

[0149] Optionally, calling the normal matrix to transform the normal vectors of each vertex in the first door component to obtain the normal vectors of each vertex of the second door component includes:

[0150] Calculate the normal vector of each vertex in the first door component according to the coordinates of each vertex in the first door component;

[0151] The normal vector of each of the vertices in the first door component is multiplied by the normal matrix on the left to obtain the normal vector of each of the vertices in the second door component.

[0152] Optionally, the door opening method includes left-opening and right-opening.

[0153] Optionally, the door opening method includes upper door opening and lower door opening.

[0154] Optionally, also include:

[0155] The second door component is initialized and stored locally.

[0156] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0157] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A composition acquisition method based on composition component modification, characterized in that: include: When receiving a modification instruction triggered by a user, obtaining coordinates of each vertex in the modification object, the modification object being the first door component; Calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices; According to the coordinates of the new vertices, a geometric frame of a second door component is constructed, wherein the second door component and the first door component have different door opening modes; Calling a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component; wherein the normal matrix is ​​the transposed matrix of the inverse matrix of the transformation matrix; Calling the normal matrix to transform the normal vectors of each of the vertices in the first door component to obtain the normal vectors of each of the vertices of the second door component; According to the normal vectors of each of the faces of the second door component and the normal vectors of each of the vertices of the second door component, setting the surface material and gloss of the second door component; Displaying the second door component on the composition interface; Based on the operation of the user on the composition interface, generating a composition including the second door component; The calling of a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices includes: Multiply the coordinates of each vertex in the first door component by a preset transformation matrix to obtain the coordinates of a new vertex; The calling of the normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component includes: Calculating the normal vector of each face in the first door component according to the coordinates of each vertex in the first door component; Multiply the normal vector of each face of the first door component by the normal matrix to obtain the normal vector of each face of the second door component; The calling of the normal matrix to transform the normal vectors of each vertex in the first door component to obtain the normal vectors of each vertex of the second door component includes: Calculate the normal vector of each vertex in the first door component according to the coordinates of each vertex in the first door component; The normal vector of each of the vertices in the first door component is multiplied by the normal matrix on the left to obtain the normal vector of each of the vertices in the second door component.

2. The method according to claim 1, characterized in that The door opening method includes left door opening and right door opening.

3. The method according to claim 1, characterized in that The door opening method includes upper door opening and lower door opening.

4. The method according to claim 1, characterized in that Also includes: The second door component is initialized and stored locally.

5. A composition acquisition device based on composition component modification, characterized in that: include: An acquisition unit, configured to acquire coordinates of each vertex in a modification object upon receiving a modification instruction triggered by a user, wherein the modification object is a first door component; A first transformation unit, used for calling a preset transformation matrix to transform the coordinates of each of the vertices in the first door component to obtain the coordinates of new vertices; A construction unit, configured to construct a geometric frame of a second door component according to the coordinates of the new vertex, wherein the second door component and the first door component have different door opening modes; A second transformation unit is used to call a normal matrix to transform the normal vectors of each face in the first door component to obtain the normal vectors of each face of the second door component; wherein the normal matrix is ​​a transposed matrix of the inverse matrix of the transformation matrix; a third transformation unit, configured to call the normal matrix to transform the normal vectors of the vertices in the first door component to obtain the normal vectors of the vertices of the second door component; a setting unit, configured to set the surface material and gloss of the second door component according to the normal vectors of each of the faces of the second door component and the normal vectors of each of the vertices of the second door component; A display unit, configured to display the second door component on a composition interface; A generating unit, configured to generate a composition including the second door component based on an operation of the user on the composition interface; The first transformation unit is specifically configured to: Multiply the coordinates of each vertex in the first door component by a preset transformation matrix to obtain the coordinates of a new vertex; The second transformation unit is specifically configured to: Calculating the normal vector of each face in the first door component according to the coordinates of each vertex in the first door component; Multiply the normal vector of each face of the first door component by the normal matrix to obtain the normal vector of each face of the second door component; a third transformation unit, specifically configured to calculate a normal vector of each vertex in the first door component according to the coordinates of each vertex in the first door component; The normal vector of each of the vertices in the first door component is multiplied by the normal matrix on the left to obtain the normal vector of each of the vertices in the second door component.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the computer program executes the composition acquisition method based on composition component modification according to any one of claims 1 to 4.

7. A composition acquisition device based on modification of composition components, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program, when running, executes the composition acquisition method based on composition component modification described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Two-dimensional house type image construction method and device and storage medium

    CN111145294A

  • Door handle assembly with right and left exchange structure

    CN2558732Y

  • Method and system for building, designing with and managing elements of construction

    US20060185275A1

  • KR20200045742A