A space design method, device, equipment and readable storage medium
By creating closed graphics in the two-dimensional view in the architectural design software and synchronously updating the spatial blocks in the three-dimensional view, the cumbersome problems of two-dimensional and three-dimensional views conversion and adjustment in the existing technology are solved, and an efficient spatial design process and user experience are achieved.
Patent Information
- Application Number
- CN202210785095.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-06-29
AI Technical Summary
When designing space, existing architectural design software requires frequent conversion and adjustments between two-dimensional planes and three-dimensional stereoscopic views, which is cumbersome and inefficient.
By creating closed graphics in the 2D view and detecting user adjustment operations in real time, the shape of space blocks is synchronized in the 3D view, thereby automatically generating the corresponding 3D spatial model.
It realizes efficient linkage between two-dimensional views and three-dimensional views, simplifies the spatial design process, improves design efficiency and user experience, and reduces design difficulty.
Smart Images

Figure CN115098926B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer-aided design technology, and in particular to a space design method, device, equipment and readable storage medium. Background Art
[0002] In the early stage of architectural design and interior design, it is necessary to complete the planning and design of the space in advance according to functional requirements and design specifications. In the existing process of using architectural software for space design, there are the following problems: after using CAD to draw a two-dimensional plane design drawing, it is necessary to import the two-dimensional plane design drawing into Sketchup software to generate a three-dimensional space design drawing. If the two-dimensional plane design drawing in CAD is modified later, the three-dimensional design drawing must also be adjusted accordingly, which is cumbersome; in addition, using Revit to draw a three-dimensional space design drawing requires drawing components such as walls, room dividing lines and floor slabs first, and then creating rooms based on these components. This will reduce the efficiency of space design a lot and make the design difficult. Therefore, how to efficiently and conveniently draw or modify graphics on a two-dimensional view and automatically generate a three-dimensional view corresponding to the two-dimensional view has become a technical problem that technicians in this field urgently need to solve. Summary of the invention
[0003] The purpose of the present invention is to provide a space design method, device, equipment and readable storage medium, which can perform space design efficiently and flexibly.
[0004] According to one aspect of the present invention, there is provided a space design method, the method comprising:
[0005] Create 2D and 3D views to represent the target floor;
[0006] When it is detected that a closed figure is created in the two-dimensional view, a space block is created in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor;
[0007] When an adjustment operation on the closed figure in the two-dimensional view is detected, an adjustment operation is synchronously performed on the spatial block in the three-dimensional view;
[0008] All the space blocks in the three-dimensional view form a space model of the target floor.
[0009] Optionally, when it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor includes:
[0010] When it is detected that two target points are created in the two-dimensional view and do not overlap in the horizontal direction and the vertical direction, the two target points are used as two diagonal vertices to create a rectangular closed figure;
[0011] receiving a modification instruction, and modifying the length and width of the rectangular closed figure in the two-dimensional view according to the modification instruction to obtain a modified rectangular closed figure;
[0012] A space block is formed in the three-dimensional view with the modified rectangular closed figure as the bottom surface and according to the floor height of the target floor.
[0013] Optionally, when it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor includes:
[0014] When a drag operation on a target edge of a target closed figure in the two-dimensional view is detected, a moving edge is drawn at an end position of the drag operation; wherein the length of the moving edge is consistent with the length of the target edge;
[0015] forming a rectangular closed figure based on the target edge and the moving edge;
[0016] A space block is formed in the three-dimensional view with the rectangular closed figure as the bottom surface and according to the floor height of the target floor.
[0017] Optionally, when it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor includes:
[0018] When a drag operation for a target vertex of a target closed figure in the two-dimensional view is detected, drawing a moving vertex at an end position of the drag operation;
[0019] Using the target vertex and the moving vertex as two diagonal vertices, a rectangular closed figure is created;
[0020] A space block is formed in the three-dimensional view with the rectangular closed figure as the bottom surface and according to the floor height of the target floor.
[0021] Optionally, when an adjustment operation on the closed figure in the two-dimensional view is detected, synchronously adjusting the spatial block in the three-dimensional view includes:
[0022] When a click operation on a target edge of a target closed figure in the two-dimensional view is detected, a truncation point is drawn at the click operation location, and the target edge is divided into a first truncation edge and a second truncation edge based on the truncation point;
[0023] When a drag operation on the first truncated edge is detected, a new edge is drawn at the end position of the drag operation to replace the first truncated edge; wherein the length of the new edge is consistent with the length of the first truncated edge;
[0024] forming a new closed graph based on the second truncated edge, the newly created edge, and other edges in the target closed graph except the target edge;
[0025] A new space block is formed in the three-dimensional view with the new closed figure as the bottom surface and according to the height of the target floor.
[0026] Optionally, when an adjustment operation on the closed figure in the two-dimensional view is detected, synchronously adjusting the spatial block in the three-dimensional view includes:
[0027] When a drag operation on a common edge in the two-dimensional view is detected, determining all associated closed figures including the common edge in the two-dimensional view;
[0028] Drawing a replacement edge at the end position of the dragging operation to replace the common edge, and reconstructing each associated closed graph based on the replacement edge;
[0029] A new space block is formed in the three-dimensional view with each reconstructed associated closed figure as the bottom surface and according to the floor height of the target floor.
[0030] Optionally, forming the spatial model of the target floor from all the spatial blocks in the three-dimensional view includes:
[0031] Creating a wall element belonging to the target floor based on the side surface of the space block in the three-dimensional view;
[0032] The wall elements formed based on all the space blocks constitute the space model;
[0033] When a modification instruction for a target wall element is received, the target wall element is deleted from the space model, or the thickness of the target wall element is modified.
[0034] In order to achieve the above object, the present invention further provides a space design device, the device comprising:
[0035] A view module, used for creating two-dimensional views and three-dimensional views for representing a target floor;
[0036] A creation module, configured to, when detecting that a closed figure is created in the two-dimensional view, create a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor;
[0037] an adjustment module, configured to synchronously adjust the space block in the three-dimensional view when an adjustment operation on the closed figure in the two-dimensional view is detected;
[0038] The floor module is used to form a spatial model of the target floor from all the spatial blocks in the three-dimensional view.
[0039] In order to achieve the above objectives, the present invention also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned steps of space design when executing the computer program.
[0040] In order to achieve the above objectives, the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of space design introduced above are implemented.
[0041] The spatial design method, device, equipment and readable storage medium provided by the present invention enable the user to draw a closed figure in the two-dimensional view of the target floor according to the design requirements and design specifications, and directly obtain a spatial model consisting of spatial blocks corresponding to the closed figure in the two-dimensional view in the three-dimensional view, thereby efficiently and conveniently realizing the spatial design of the target floor. At the same time, the user's adjustment of the closed figure in the two-dimensional view is detected in real time, and the shape of the spatial block in the three-dimensional view is updated synchronously, without the need to repeatedly modify the spatial block in the three-dimensional view, while maintaining the uniqueness and consistency of the data in the spatial design, optimizing the computing efficiency and user experience, and improving the convenience and efficiency of the spatial design. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0043] Figure 1 An optional flow chart of the space design method provided in Example 1;
[0044] Figure 2 A schematic diagram of creating a closed figure for the space design method provided in the first embodiment;
[0045] Figure 3 A schematic diagram for creating another closed figure of the space design method provided in the first embodiment;
[0046] Figure 4 A schematic diagram of creating another closed figure of the space design method provided in the first embodiment;
[0047] Figure 5 A schematic diagram of closed figure adjustment of the space design method provided in Example 1;
[0048] Figure 6 Another closed figure adjustment schematic diagram of the space design method provided in the first embodiment;
[0049] Figure 7 A schematic diagram of a furniture element of the space design method provided in the first embodiment;
[0050] Figure 8 A schematic diagram of adjusting furniture graphic elements in the space design method provided in the first embodiment;
[0051] Fig. 9 A two-dimensional view of a space model of a target floor of the space design method provided in the first embodiment;
[0052] Fig.10 A schematic diagram of an optional composition structure of a space design device provided in Example 2;
[0053] Fig.11 A schematic diagram of an optional hardware architecture of a computer device provided in Example 3. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0055] Embodiment 1
[0056] The embodiment of the present invention provides a space design method, such as Figure 1 As shown, the method specifically comprises the following steps:
[0057] Step S101: creating a two-dimensional view and a three-dimensional view for representing a target floor.
[0058] In architectural design and interior design, space design is to create a design model including room space layout and building wall in the target floor according to functional requirements. Space design can be divided into drawing two-dimensional view and three-dimensional view. In the prior art, the drawing of two-dimensional view and three-dimensional view of the target floor mostly needs to be drawn separately. It is necessary to generate two-dimensional view in advance, and then convert the two-dimensional view into three-dimensional view through architectural software. It is impossible to quickly realize the linkage drawing of two-dimensional view and three-dimensional view, and the drawing difficulty of three-dimensional view is relatively high, which undoubtedly increases the workload of designers. In this embodiment, by introducing the concept of spatial block, by drawing two-dimensional closed figures in the two-dimensional view, the spatial block corresponding to the closed figure can be directly generated in the three-dimensional view, thereby realizing the synchronous conversion from two-dimensional view to three-dimensional view, and supporting the synchronous adjustment of the shape of the spatial block in the three-dimensional view while the user modifies the closed figure in the two-dimensional view.
[0059] Step S102: when it is detected that a closed figure is created in the two-dimensional view, a space block is created in the three-dimensional view with the closed figure as the bottom surface and according to the floor height of the target floor.
[0060] The space block is a three-dimensional space entity with a certain volume that is enclosed by multiple faces. The space block is created by using the closed figure in the two-dimensional view as the upper and lower surfaces and the preset target floor height as the height of the space block. That is, the user can draw a closed figure in the two-dimensional view and then directly obtain the space block corresponding to the closed figure in the three-dimensional view.
[0061] The spatial block is automatically calculated based on the closed figures in the two-dimensional view and the height of the target floor. The user does not need to manually draw in the three-dimensional view to represent the construction of architectural elements such as walls, room dividing lines and floor slabs. The existence of the spatial block directly realizes the linkage from the two-dimensional view to the three-dimensional view, allowing the user to operate only in the two-dimensional view, which is in line with the user's design habits, greatly simplifies the difficulty of spatial design and improves the efficiency of spatial design.
[0062] In addition, this embodiment provides four creation logics for creating closed graphics in a two-dimensional view, including: a graphics selection method, a two-point drawing method, an edge drawing method, and a vertex drawing method. Among them, the graphics selection method is to create a closed graphic of the same shape by directly selecting a graphic in the menu bar in the two-dimensional view, so this graphics selection method is not described in detail in this embodiment.
[0063] Specifically, Figure 2 As shown, the two-point drawing method in step S102 includes:
[0064] Step A1: when it is detected that two target points that do not overlap in the horizontal direction and the vertical direction are created in the two-dimensional view, the two target points are used as two diagonal vertices to create a rectangular closed figure.
[0065] Among them, the two-point drawing method realizes the creation of a rectangular closed figure based on two diagonal vertices.
[0066] Step A2: receiving a modification instruction, and modifying the length and width of the rectangular closed figure in the two-dimensional view according to the modification instruction to obtain a modified rectangular closed figure.
[0067] Step A3: Using the modified rectangular closed figure as the bottom surface and forming a space block in the three-dimensional view according to the height of the target floor.
[0068] Further, such as Figure 3 As shown, the edge drawing method in step S102 includes:
[0069] Step B1: when a drag operation on a target edge of a target closed figure in the two-dimensional view is detected, a moving edge is drawn at an end position of the drag operation; wherein the length of the moving edge is consistent with the length of the target edge;
[0070] The target side of the target closed figure may be the entire side of the target closed figure or a partial side of the target closed figure, which is not specifically limited here. In addition, the drag operation is an operation performed by the user when creating a closed figure in a two-dimensional view. The drag operation on the target side can only be moved in a direction perpendicular to the target side. The moving side obtained after dragging is the same length as the target side and parallel in direction.
[0071] Step B2: forming a rectangular closed figure based on the target edge and the moving edge;
[0072] The target side and the moving side are used as two opposite sides of a rectangular closed figure, and the remaining two sides of the rectangular closed figure are automatically generated to obtain a closed figure with a rectangular shape.
[0073] Step B3: Using the rectangular closed figure as the bottom surface and forming a space block in the three-dimensional view according to the height of the target floor.
[0074] Furthermore, if Figure 4 As shown, the vertex drawing method in step S102 includes:
[0075] Step C1: when a drag operation on a target vertex of a target closed figure in the two-dimensional view is detected, a moving vertex is drawn at an end position of the drag operation.
[0076] Step C2: Using the target vertex and the moving vertex as two diagonal vertices, a rectangular closed figure is created.
[0077] Step C3: Using the rectangular closed figure as the bottom surface and forming a space block in the three-dimensional view according to the height of the target floor.
[0078] In this embodiment, four creation logics for drawing closed figures in a two-dimensional plane are provided to meet the creation needs of different users and conform to the user's habit of drawing graphics in a two-dimensional view. There is no need to pre-draw components such as walls, room dividing lines and floor slabs, and spatial blocks can be obtained directly in a preset three-dimensional view, which improves the speed of creating spatial blocks, reduces the user's design volume, eliminates the need for repeated modeling operations in the three-dimensional view, and improves the efficiency of spatial design.
[0079] Step S103: When an adjustment operation on the closed figure in the two-dimensional view is detected, an adjustment operation is synchronously performed on the space block in the three-dimensional view.
[0080] Among them, when the user stretches, drags, deletes, adds, and other adjustment operations on the closed figure in the two-dimensional view according to the design requirements, the spatial blocks corresponding to the adjusted closed figure in the three-dimensional view are adjusted synchronously.
[0081] Specifically, Figure 5 As shown, the step S103 includes:
[0082] Step D1: when a click operation on a target edge of a target closed figure in the two-dimensional view is detected, a truncation point is drawn at the click operation location, and the target edge is divided into a first truncation edge and a second truncation edge based on the truncation point.
[0083] Among them, each truncation point can truncate a target edge to obtain two truncation edges. Multiple truncation points can be drawn on a target edge, which is not limited here. At the same time, the truncation points are freely set by users, which facilitates users to modify closed figures, simplifies the adjustment logic of adjusting closed figures and synchronously adjusting spatial blocks, gives users high freedom and low operating difficulty, and optimizes user experience and adjustment efficiency.
[0084] Step D2: when a drag operation on the first truncated edge is detected, a new edge is drawn at the end position of the drag operation to replace the first truncated edge; wherein the length of the new edge is consistent with the length of the first truncated edge.
[0085] The dragging operation is performed in a direction perpendicular to the truncated edge, and the newly created edge obtained after the dragging has the same length as the dragged edge and is parallel in direction.
[0086] Step D3: forming a new closed graph based on the second truncated edge, the newly created edge and other edges in the target closed graph except the target edge.
[0087] Step D4: forming a new space block in the three-dimensional view with the new closed figure as the bottom surface and according to the height of the target floor.
[0088] In this embodiment, the user pushes and pulls the truncation edge to modify the shape of the closed figure in the two-dimensional view, so that the number of edges of the closed figure changes, thereby synchronously changing the number of sides of the spatial block in the three-dimensional view, for example, Figure 5 As shown, the closed figure is changed from a rectangle to an "L" shape. At this time, the number of faces of the spatial block corresponding to the closed figure will increase by two faces. This modification can be implemented automatically without re-creating faces for the spatial block in the three-dimensional view. This adjustment synchronously modifies the two-dimensional view and the three-dimensional view, simplifies the modification logic of the spatial block in the three-dimensional view, improves modification efficiency, and optimizes the user experience.
[0089] Further, such as Figure 6 As shown, the step S103 further includes:
[0090] Step E1: when a drag operation on a common edge in the two-dimensional view is detected, all associated closed figures including the common edge are determined in the two-dimensional view.
[0091] The common edge is an edge shared by multiple associated closed figures.
[0092] Step E2: drawing a replacement edge at the end position of the dragging operation to replace the common edge, and reconstructing each associated closed graph based on the replacement edge.
[0093] The reconstruction of each associated closed figure is to change the shape of each associated closed figure according to the original connection relationship between each associated closed figure and the common edge so that the replacement edge becomes a new common edge of all associated closed figures.
[0094] Step E3: forming a new space block in the three-dimensional view with the reconstructed associated closed figures as the bottom surface and according to the height of the target floor.
[0095] In this embodiment, multiple adjacent closed figures with common edges are set as associated closed figures. When the user drags the common edge, all associated closed figures corresponding to the common edge will change their shapes while maintaining the original association relationship, so as to reconstruct all associated closed figures to be closed figures. The modification logic of modifying the spatial block is simplified. When modifying a common edge in a two-dimensional view, the shapes of all associated closed figures corresponding to the common edge are changed at the same time, without the user having to modify each associated closed figure repeatedly. At the same time, the adjustment of the shape of the spatial block can be realized synchronously in the three-dimensional view, so that the modifications in the two-dimensional and three-dimensional views are kept synchronized at any time, without the need to repeat the modeling operation in the three-dimensional view, and the computing efficiency and user experience are optimized.
[0096] Furthermore, if Figure 7 As shown, after step S103, the method further includes:
[0097] Step F1: when it is detected that a new furniture primitive is added to the closed figure in the two-dimensional view, a furniture block corresponding to the furniture primitive is obtained from a preset furniture library;
[0098] Step F2: Add the furniture block to the space block in the three-dimensional view accordingly.
[0099] In addition, if Figure 8 As shown, after step F2, the method further includes:
[0100] Step F21: when it is detected that the shape of the closed figure including the furniture primitive changes, the original position relationship of the furniture primitive and the shape change information of the closed figure are obtained.
[0101] Step F22: According to the original position relationship of the furniture primitives and the shape change information of the closed figure, the position of the furniture primitives in the closed figure after the shape change is adjusted so that the existing position relationship of the furniture primitives remains consistent with the original position relationship.
[0102] Among them, the original position relationship includes the vertical alignment and horizontal alignment between the furniture primitives, so after the shape of the closed figure containing the furniture primitives changes, the vertical alignment and horizontal alignment between the furniture primitives do not change, and only the offset distance in the vertical direction and the offset distance in the horizontal direction are changed according to the shape change information of the closed figure.
[0103] In this embodiment, the existence of the spatial block realizes the fusion of the two-dimensional and three-dimensional views. The closed figures in the two-dimensional view and the spatial blocks in the three-dimensional view remain consistent. The user can adjust the spatial block in the two-dimensional view. The spatial block can be adjusted by adjusting the two-dimensional closed figure. This adjustment method conforms to the user's habits, so that the modifications in the two-dimensional and three-dimensional views are synchronized at any time, and there is no need to repeat the modeling operation in the three-dimensional view, which maintains the uniqueness and consistency of the data in the spatial design and optimizes the computing efficiency and user experience. In addition, this embodiment also supports the placement of furniture blocks in the spatial block, and the relative position of the furniture blocks does not change with the shape of the spatial block, without the need for manual adjustment by the user, which improves the efficiency of spatial design.
[0104] Step S104: All the space blocks in the three-dimensional view form a space model of the target floor.
[0105] The spatial model of the target floor is an overall model for representing the shapes of the rooms in the floor and the relationship between the rooms' positions, and the edges of the closed figures in the two-dimensional view represent the wall elements of the room.
[0106] Specifically, the step S104 includes:
[0107] Step G1: Create a wall element belonging to the target floor based on the side of the space block in the three-dimensional view.
[0108] The wall graphic element is the actual wall of the target floor in the space design, and a room is formed by multiple closed wall graphic elements, and each room corresponds to a closed figure in the two-dimensional view.
[0109] Step G2: construct the space model using wall elements formed based on all space blocks.
[0110] Step G3: When a modification instruction for a target wall element is received, the target wall element is deleted from the space model, or the thickness of the target wall element is modified.
[0111] Further, such as Fig. 9 As shown, the step G3 includes:
[0112] Step G31: when an instruction to modify the wall width of the target wall element in the two-dimensional view is detected, modify the wall thickness of the target wall element according to the instruction.
[0113] Step G32: When a deletion instruction to delete a common edge of two adjacent closed figures in the two-dimensional view is detected, the wall element corresponding to the common edge in the space model is deleted according to the deletion instruction.
[0114] Step G33: When a new instruction for adding a new edge in the closed figure of the two-dimensional view is detected, a wall element is added to the space model according to the instruction.
[0115] Among them, after the drawing of the spatial blocks is completed, the spatial blocks are merged to generate the spatial model of the target floor, and each side of the spatial block is used as the wall element of the target floor. At this time, if the wall elements are adaptively modified according to the design requirements, the closed graphics in the two-dimensional view can be directly modified to achieve the modification of the wall elements synchronously, thereby improving the efficiency of spatial design.
[0116] In this embodiment, the user can directly obtain a spatial model consisting of spatial blocks corresponding to the closed figure in the two-dimensional view in the three-dimensional view by drawing a closed figure in accordance with the design requirements and design specifications in the two-dimensional view of the target floor, thereby realizing the spatial design of the target floor efficiently and conveniently. At the same time, the user's adjustment of the closed figure in the two-dimensional view is detected in real time, and the shape of the spatial block in the three-dimensional view is updated synchronously, without the need to repeatedly modify the spatial block in the three-dimensional view. While maintaining the uniqueness and consistency of data in the spatial design, the computing efficiency and user experience are optimized, and the convenience and efficiency of the spatial design are improved.
[0117] Embodiment 2
[0118] The embodiment of the present invention provides a space design device, such as Fig.10 As shown, the device specifically includes the following components:
[0119] A view module 1001, used to create a two-dimensional view and a three-dimensional view for representing a target floor;
[0120] A creation module 1002 is used for, when it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the floor height of the target floor;
[0121] An adjustment module 1003, configured to synchronously adjust the space block in the three-dimensional view when an adjustment operation on the closed figure in the two-dimensional view is detected;
[0122] The floor module 1004 is used to form a spatial model of the target floor from all the spatial blocks in the three-dimensional view.
[0123] Specifically, the creation module 1002 is used to:
[0124] When it is detected that two target points are created in the two-dimensional view and do not overlap in the horizontal direction and the vertical direction, the two target points are used as two diagonal vertices to create a rectangular closed figure;
[0125] receiving a modification instruction, and modifying the length and width of the rectangular closed figure in the two-dimensional view according to the modification instruction to obtain a modified rectangular closed figure;
[0126] A space block is formed in the three-dimensional view with the modified rectangular closed figure as the bottom surface and according to the floor height of the target floor.
[0127] Further, a module 1002 is created for:
[0128] When a drag operation on a target edge of a target closed figure in the two-dimensional view is detected, a moving edge is drawn at an end position of the drag operation; wherein the length of the moving edge is consistent with the length of the target edge;
[0129] forming a rectangular closed figure based on the target edge and the moving edge;
[0130] A space block is formed in the three-dimensional view with the rectangular closed figure as the bottom surface and according to the floor height of the target floor.
[0131] Furthermore, the creation module 1002 is also used for:
[0132] When a drag operation for a target vertex of a target closed figure in the two-dimensional view is detected, drawing a moving vertex at an end position of the drag operation;
[0133] Using the target vertex and the moving vertex as two diagonal vertices, a rectangular closed figure is created;
[0134] A space block is formed in the three-dimensional view with the rectangular closed figure as the bottom surface and according to the floor height of the target floor.
[0135] Specifically, the adjustment module 1003 is used to:
[0136] When a click operation on a target edge of a target closed figure in the two-dimensional view is detected, a truncation point is drawn at the click operation location, and the target edge is divided into a first truncation edge and a second truncation edge based on the truncation point;
[0137] When a drag operation on the first truncated edge is detected, a new edge is drawn at the end position of the drag operation to replace the first truncated edge; wherein the length of the new edge is consistent with the length of the first truncated edge;
[0138] forming a new closed graph based on the second truncated edge, the newly created edge, and other edges in the target closed graph except the target edge;
[0139] A new space block is formed in the three-dimensional view with the new closed figure as the bottom surface and according to the height of the target floor.
[0140] Furthermore, the adjustment module 1003 is also used for:
[0141] When a drag operation on a common edge in the two-dimensional view is detected, determining all associated closed figures including the common edge in the two-dimensional view;
[0142] Drawing a replacement edge at the end position of the dragging operation to replace the common edge, and reconstructing each associated closed graph based on the replacement edge;
[0143] A new space block is formed in the three-dimensional view with each reconstructed associated closed figure as the bottom surface and according to the floor height of the target floor.
[0144] Specifically, the floor module 1004 is used to:
[0145] Creating a wall element belonging to the target floor based on the side surface of the space block in the three-dimensional view;
[0146] The wall elements formed based on all the space blocks constitute the space model;
[0147] When a modification instruction for a target wall element is received, the target wall element is deleted from the space model, or the thickness of the target wall element is modified.
[0148] Furthermore, the device also includes a furniture module, which is used to:
[0149] When a new furniture graphic element is detected in the closed figure in the two-dimensional view, a furniture block corresponding to the furniture graphic element is acquired from a preset furniture library;
[0150] The furniture blocks are correspondingly added to the space blocks in the three-dimensional view.
[0151] Furthermore, the furniture module is also used for:
[0152] When it is detected that the shape of the closed figure including the furniture primitive changes, the original position relationship of the furniture primitive and the shape change information of the closed figure are acquired.
[0153] According to the original positional relationship of the furniture primitives and the shape change information of the closed figure, the positions of the furniture primitives in the closed figure after the shape change are adjusted so that the existing positional relationship of the furniture primitives is consistent with the original positional relationship.
[0154] In this embodiment, the user can directly obtain a spatial model consisting of spatial blocks corresponding to the closed figure in the two-dimensional view in the three-dimensional view by drawing a closed figure in accordance with the design requirements and design specifications in the two-dimensional view of the target floor, thereby realizing the spatial design of the target floor efficiently and conveniently. At the same time, the user's adjustment of the closed figure in the two-dimensional view is detected in real time, and the shape of the spatial block in the three-dimensional view is updated synchronously, without the need to repeatedly modify the spatial block in the three-dimensional view. While maintaining the uniqueness and consistency of data in the spatial design, the computing efficiency and user experience are optimized, and the convenience and efficiency of the spatial design are improved.
[0155] Embodiment 3
[0156] This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Fig.11 As shown, the computer device 110 of this embodiment includes at least but not limited to: a memory 1101 and a processor 1102 that can be interconnected through a system bus. It should be noted that Fig.11 Only computer device 110 is shown with components 1101 - 1102 , but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0157] In this embodiment, the memory 1101 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 1101 may be an internal storage unit of the computer device 110, such as a hard disk or a memory of the computer device 110. In other embodiments, the memory 1101 may also be an external storage device of the computer device 110, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 110. Of course, the memory 1101 may also include both the internal storage unit of the computer device 110 and its external storage device. In this embodiment, the memory 1101 is generally used to store an operating system and various application software installed on the computer device 110. In addition, the memory 1101 can also be used to temporarily store various types of data that have been output or are to be output.
[0158] In some embodiments, the processor 1102 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other spatially designed chips. The processor 1102 is generally used to control the overall operation of the computer device 110 .
[0159] Specifically, in this embodiment, the processor 1102 is used to execute the program of the space design method stored in the memory 1101, and the program of the space design method implements the following steps when being executed:
[0160] Create 2D and 3D views to represent the target floor;
[0161] When it is detected that a closed figure is created in the two-dimensional view, a space block is created in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor;
[0162] When an adjustment operation on the closed figure in the two-dimensional view is detected, an adjustment operation is synchronously performed on the spatial block in the three-dimensional view;
[0163] All the space blocks in the three-dimensional view form a space model of the target floor.
[0164] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.
[0165] Embodiment 4
[0166] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored. When the computer program is executed by a processor, the following method steps are implemented:
[0167] Create 2D and 3D views to represent the target floor;
[0168] When it is detected that a closed figure is created in the two-dimensional view, a space block is created in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor;
[0169] When an adjustment operation on the closed figure in the two-dimensional view is detected, an adjustment operation is synchronously performed on the spatial block in the three-dimensional view;
[0170] All the space blocks in the three-dimensional view form a space model of the target floor.
[0171] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.
[0172] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0173] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0174] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0175] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A space design method, characterized in that: The method comprises: Create 2D and 3D views to represent the target floor; When it is detected that a closed figure is created in the two-dimensional view, a space block is created in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor; When an adjustment operation on the closed figure in the two-dimensional view is detected, an adjustment operation is synchronously performed on the spatial block in the three-dimensional view, including: when a click operation on a target edge of a target closed figure in the two-dimensional view is detected, a truncation point is drawn at the click operation location, and the target edge is divided into a first truncation edge and a second truncation edge based on the truncation point; when a drag operation on the first truncation edge is detected, a new edge is drawn at the end position of the drag operation to replace the first truncation edge; wherein the length of the new edge is consistent with the length of the first truncation edge; a new closed figure is formed based on the second truncation edge, the new edge and other edges in the target closed figure except the target edge; a new spatial block is formed in the three-dimensional view with the new closed figure as the bottom surface and according to the floor height of the target floor; All the space blocks in the three-dimensional view form a space model of the target floor.
2. The space design method according to claim 1, characterized in that: When it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor, including: When it is detected that two target points are created in the two-dimensional view and do not overlap in the horizontal direction and the vertical direction, the two target points are used as two diagonal vertices to create a rectangular closed figure; receiving a modification instruction, and modifying the length and width of the rectangular closed figure in the two-dimensional view according to the modification instruction to obtain a modified rectangular closed figure; A space block is formed in the three-dimensional view with the modified rectangular closed figure as the bottom surface and according to the floor height of the target floor.
3. The space design method according to claim 1, characterized in that: When it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor, including: When a drag operation on a target edge of a target closed figure in the two-dimensional view is detected, a moving edge is drawn at an end position of the drag operation; wherein the length of the moving edge is consistent with the length of the target edge; forming a rectangular closed figure based on the target edge and the moving edge; A space block is formed in the three-dimensional view with the rectangular closed figure as the bottom surface and according to the floor height of the target floor.
4. The space design method according to claim 1, characterized in that: When it is detected that a closed figure is created in the two-dimensional view, creating a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor, including: When a drag operation for a target vertex of a target closed figure in the two-dimensional view is detected, drawing a moving vertex at an end position of the drag operation; Using the target vertex and the moving vertex as two diagonal vertices, a rectangular closed figure is created; A space block is formed in the three-dimensional view with the rectangular closed figure as the bottom surface and according to the floor height of the target floor.
5. The space design method according to claim 1, characterized in that: When the adjustment operation on the closed figure in the two-dimensional view is detected, the adjustment operation on the space block in the three-dimensional view is synchronously performed, including: When a drag operation on a common edge in the two-dimensional view is detected, determining all associated closed figures including the common edge in the two-dimensional view; Drawing a replacement edge at the end position of the dragging operation to replace the common edge, and reconstructing each associated closed graph based on the replacement edge; A new space block is formed in the three-dimensional view with each reconstructed associated closed figure as the bottom surface and according to the floor height of the target floor.
6. The space design method according to claim 1, characterized in that: The forming of the spatial model of the target floor from all the spatial blocks in the three-dimensional view comprises: Creating a wall element belonging to the target floor based on the side surface of the space block in the three-dimensional view; The wall elements formed based on all the space blocks constitute the space model; When a modification instruction for a target wall element is received, the target wall element is deleted from the space model, or the thickness of the target wall element is modified.
7. A space design device, characterized in that: The device comprises: A view module, used for creating two-dimensional views and three-dimensional views for representing a target floor; A creation module, configured to, when detecting that a closed figure is created in the two-dimensional view, create a space block in the three-dimensional view with the closed figure as the bottom surface and according to the height of the target floor; an adjustment module, configured to synchronously adjust the space block in the three-dimensional view when an adjustment operation on the closed figure in the two-dimensional view is detected; A floor module, used for forming a spatial model of the target floor from all the spatial blocks in the three-dimensional view; The adjustment module is also used to, when a click operation is detected on a target edge of a target closed figure in the two-dimensional view, draw a truncation point at the click operation location, and divide the target edge into a first truncation edge and a second truncation edge based on the truncation point; when a drag operation is detected on the first truncation edge, draw a new edge at the end position of the drag operation to replace the first truncation edge; wherein the length of the new edge is consistent with the length of the first truncation edge; form a new closed figure based on the second truncation edge, the new edge and other edges in the target closed figure except the target edge; and form a new spatial block in the three-dimensional view with the new closed figure as the bottom surface and according to the floor height of the target floor.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Processing method for converting two-dimensional house type graph into three-dimensional scene graph
CN111008484A