Cabinet body position processing method and device, equipment and storage medium
By displaying the editable functional area in the target floor plan and adsorbing the initial cabinet model, dynamically adjusting the cabinet size and position, the existing cabinet layout design is solved, and automatic layout is realized, improving user experience and drawing efficiency.
Patent Information
- Application Number
- CN202411886936.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-15
AI Technical Summary
The layout design of the existing cabinet body is cumbersome and inefficient, and is inconvenient for calculating dimensions, which affects the efficiency of drawing.
Display the editable functional area in the target floor plan, adjust its area size as needed, and adsorb the initial cabinet model into the area, and dynamically adjust the cabinet size and position to achieve automatic layout.
Users do not need to manually adjust the direction and size of the cabinet, which reduces the cost of understanding, improves the user experience, and improves the drawing efficiency of the cabinet layout.
Smart Images

Figure CN119832122A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a cabinet position processing method, device, equipment and storage medium. Background Art
[0002] For cabinet layout design in the industry, the overall layout of the cabinet is usually achieved by assembling individual cabinets based on a pre-drawn overall structure. However, this method is cumbersome and inefficient, and it is not easy to calculate the dimensions, which in turn affects the efficiency of drawing. Summary of the invention
[0003] The present disclosure provides a cabinet position processing method, device, equipment and storage medium to solve or alleviate one or more technical problems in the prior art.
[0004] In a first aspect, the present disclosure provides a method for processing a cabinet position, comprising:
[0005] Displaying the editable functional area in the target floor plan; the area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan;
[0006] When it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan, adsorbing the editable functional area to the target boundary;
[0007] When it is detected that the initial cabinet model is placed in the editable functional area, the initial cabinet model is adsorbed into the editable functional area to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area to obtain the target cabinet that needs to be laid out in the target floor plan.
[0008] In a second aspect, the present disclosure provides a cabinet position processing device, comprising:
[0009] A display unit, used for displaying the editable functional area in the target floor plan; the area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan;
[0010] A processing unit is used to adsorb the editable functional area to the target boundary of the target floor plan when it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan; and to adsorb the initial cabinet model into the editable functional area when it is detected that the initial cabinet model is placed in the editable functional area, so as to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area, so as to obtain the target cabinet that needs to be laid out in the target floor plan.
[0011] In a third aspect, an electronic device is provided, including:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0015] In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute any method according to the embodiments of the present disclosure.
[0016] In a fifth aspect, a computer program product is provided, comprising a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.
[0017] The beneficial effects of the technical solution provided by the present disclosure include at least:
[0018] In this way, the disclosed solution first arranges an editable functional area with adsorption capability in the target floor plan, then places the corresponding initial cabinet model in the editable functional area, and automatically adjusts the initial cabinet model (such as the direction and size of the cabinet model) to obtain the target cabinet that needs to be arranged in the target floor plan. In this way, the user only needs to drag the corresponding cabinet into the arranged area to automatically complete the layout of the cabinet without the user manually adjusting the direction and size of the cabinet, thereby reducing the understanding cost and improving the user experience.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments provided according to the present disclosure and should not be regarded as limiting the scope of the present disclosure.
[0021] Figure 1 This is a schematic flow chart of a method for processing the cabinet position according to an embodiment of the present application. Figure 1 ;
[0022] Figure 2 This is a schematic diagram of a scenario in which the direction of an editable functional area is automatically adjusted when the editable functional area is adsorbed to a target boundary according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of the segmentation effect of the segmentation operation on the editable functional area according to an embodiment of the present application;
[0024] Figure 4 This is a scene diagram of an adaptive method of a sub-area according to an embodiment of the present application. Figure 1 ;
[0025] Figure 5 This is a scene diagram of an adaptive change method of the sub-region size according to an embodiment of the present application. Figure 2 ;
[0026] Figure 6 This is a schematic flow chart of a method for processing the cabinet position according to an embodiment of the present application. Figure 2 ;
[0027] Figure 7 is a schematic diagram of a scenario for determining boundary key points of a target boundary according to an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of a scene in which an editable function area is adsorbed to a target boundary according to an embodiment of the present application;
[0029] Fig. 9 This is a schematic flow chart of a method for processing the cabinet position according to an embodiment of the present application. Figure 3 ;
[0030] Fig.10 Schematic diagram of a scene showing the positional relationship between an editable functional area and a candidate boundary according to an embodiment of the present application Figure 1 ;
[0031] Fig.11 Schematic diagram of a scene showing the positional relationship between an editable functional area and a candidate boundary according to an embodiment of the present application Figure 2 ;
[0032] Fig.12 is a flowchart of a method for processing the cabinet position in a specific example according to an embodiment of the present application;
[0033] Fig.13 This is a system architecture diagram of a draw zone cabinet according to an embodiment of the present application;
[0034] Fig.14 is a structural schematic diagram of a cabinet position processing device according to an embodiment of the present application;
[0035] Fig.15It is a block diagram of an electronic device used to implement the method for processing the cabinet position according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The present disclosure will be further described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0037] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0038] The disclosed solution provides a method for processing the position of a cabinet, by placing a cabinet in an area pre-drawn in a target floor plan, so that the cabinet can be automatically adsorbed to the area, and the size and position of the cabinet can be automatically adjusted. In this way, the automatic adjustment of the cabinet can be completed by simply dragging the corresponding cabinet into the area, which reduces the understanding cost. Moreover, the area layout pre-drawn in the target floor plan has strong reusability, which effectively avoids the user's repetitive work and improves the efficiency of designing drawings.
[0039] Specifically, Figure 1 This is a schematic flow chart of a method for processing the cabinet position according to an embodiment of the present application. Figure 1 The method may be optionally applied to electronic devices, such as personal computers, servers, server clusters, and other electronic devices.
[0040] Further, the method includes at least part of the following contents. Figure 1 As shown, including:
[0041] Step S101: Display editable functional areas in the target floor plan.
[0042] Here, the editable functional area may specifically be a two-dimensional plane graphic associated with a cabinet plane of the target cabinet, or a three-dimensional stereographic graphic associated with a three-dimensional shape of the target cabinet.
[0043] Furthermore, the area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet to be laid out in the target floor plan. For example, in one example, the initial area size of the editable functional area can be a default value, and further, based on the default value, the cabinet size of the target cabinet to be laid out in the target floor plan can be adjusted as needed, so that the layout of the cabinet can be quickly completed later.
[0044] It should be noted that, in this example, the area parameters of the editable functional area may include other parameters in addition to the area size, such as area type, height from the ground (that is, the distance between the actual cabinet and the ground), etc., and the setting method of the above parameters is similar to the setting method of the area size, and the present disclosure does not impose specific restrictions on the setting method.
[0045] Furthermore, in one example, before displaying the editable functional area in the target floor plan, the editable functional area can also be created, for example, in response to a drag operation on the editable functional area, the editable functional area is placed in the target floor plan; or, in response to an input operation on the area parameters of the editable functional area, an editable functional area with specified area parameters is automatically generated in the target floor plan. It can be understood that the above is only an exemplary description, and there can be other creation methods in actual applications. The disclosed solution does not specifically limit the creation method of the editable functional area.
[0046] Step S102: When it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan, the editable functional area is adsorbed to the target boundary.
[0047] It should be noted that if it is necessary to layout multiple cabinets in the target floor plan, the above steps S101 to S102 can be repeatedly executed to form an area layout with multiple editable functional areas in the target floor plan, so as to facilitate the rapid layout of multiple cabinets, thereby improving the efficiency of cabinet layout drawing.
[0048] Furthermore, in the process of adsorbing the editable functional area to the target boundary, the area direction of the editable functional area can also be adjusted so that the area direction matches the floor plan structure (such as floor plan direction) of the target floor plan. Figure 2 As shown, for the target floor plan, according to the direction of the tip of the hollow triangle corresponding to the target floor plan, it can be known that the floor plan direction of the target floor plan (i.e., the front direction) is toward the "front" (i.e., along the negative direction of the Y-axis in the XY coordinate system); for the editable functional area, according to the direction of the tip of the hollow triangle corresponding to the editable functional area, it can be known that the area direction of the editable functional area (i.e., the front direction) is toward the "back" (i.e., along the positive direction of the Y-axis in the XY coordinate system). At this time, while the editable functional area is adsorbed to the target boundary, the area direction of the editable functional area is automatically adjusted to make the area direction of the editable functional area consistent with the floor plan direction, that is, both directions are toward the "front" (i.e., along the negative direction of the Y-axis in the XY coordinate system). In this way, the user is effectively prevented from manually adjusting the area direction of the editable functional area.
[0049] In one example, after the editable functional area is adsorbed to the target boundary, the disclosed solution also provides a function of redoing the area parameters of the editable functional area to readjust the area parameters of the editable functional area, thereby meeting the user's customized needs for the area and improving the user experience.
[0050] Step S103: When it is detected that the initial cabinet model is placed in the editable functional area, the initial cabinet model is adsorbed into the editable functional area to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area, so as to obtain the target cabinet that needs to be laid out in the target floor plan.
[0051] It should be pointed out that, in a specific example, when it is detected that the initial cabinet model is not placed within the editable functional area, it is determined whether there are other cabinets that can be adsorbed within the preset range of the initial cabinet model (for example, other cabinets that have been laid out), and when it is determined that there are other cabinets that can be adsorbed within the preset range of the initial cabinet model, the initial cabinet model is adsorbed to the other cabinets to dynamically adjust the cabinet size of the initial cabinet model according to the cabinet size of the other cabinets.
[0052] Furthermore, in the process of adsorbing the initial cabinet model into the editable functional area, the cabinet direction of the initial cabinet model can also be automatically adjusted so that the cabinet direction of the initial cabinet model is consistent with the area direction of the editable functional area. The specific adjustment method is similar to the adjustment method of the area direction of the editable functional area. Please refer to the above example and will not be repeated here.
[0053] Here, the timing when the initial cabinet model is adsorbed into the editable functional area may be, in addition to detecting that the initial cabinet model is placed within the editable functional area, also when the initial cabinet model is detected to be close to the editable functional area, for example, the distance between the initial cabinet model and the area boundary of the editable functional area meets the preset distance, or, it may be when some model features of the initial cabinet model are detected to be within the editable functional area.
[0054] In this way, the disclosed solution first arranges an editable functional area with adsorption capability in the target floor plan, then places the corresponding initial cabinet model in the editable functional area, and automatically adjusts the initial cabinet model (such as the direction and size of the cabinet model) to obtain the target cabinet that needs to be arranged in the target floor plan. In this way, the user only needs to drag the corresponding cabinet into the arranged area to automatically complete the layout of the cabinet without the user manually adjusting the direction and size of the cabinet, thereby reducing the understanding cost and improving the user experience.
[0055] Furthermore, since the disclosed solution can pre-place editable functional areas with adsorption capabilities in the target floor plan, a regional layout containing multiple areas can be formed in the target floor plan, and the editable functional areas in the regional layout have a parameter modification function, the regional layout formed in the target floor plan has strong reusability and can be reused by users, effectively avoiding duplication of work and thereby improving the efficiency of drawing the cabinet layout.
[0056] Furthermore, in order to meet different design requirements, in a specific example, the editable functional area can also carry more cabinets. For example, a splitting function is provided to split the editable functional area, specifically including: in response to the splitting operation on the editable functional area, a plurality of sub-areas corresponding to the editable functional area are obtained, for example, Figure 3 As shown, the editable functional area is divided to obtain sub-area 1 and sub-area 2.
[0057] Here, the number of sub-areas is related to the number of sub-cabinets in the target cabinet that needs to be laid out in the target floor plan, for example, the number of sub-areas matches the number of sub-cabinets. Further, the area size of the sub-area can be adjusted based on the cabinet size of the sub-cabinet, for example, the area size of the sub-area is obtained after adjusting the cabinet size of the sub-cabinet.
[0058] It should be pointed out that the disclosed solution can also determine the way the area size of the sub-area changes by adjusting the adaptive method of the sub-area, such as only fixing the width of the sub-area, only fixing the length and width of a specified sub-area, etc. In this way, it can meet the user's customized needs for the area size of the sub-area, thereby improving the user experience.
[0059] For example, in one example, Figure 4 As shown, the length and width (i.e., length × width) of sub-area 1 obtained after the editable functional area is divided is n1×M, and the length and width of sub-area 2 is n2×M. When the width value M of the sub-area is fixed, but the adjustment method of the length of each sub-area is set to the active adjustment method, if the total length of sub-area 1 and sub-area 2 is increased from N to N+a, then since the length of each sub-area is an adjustable parameter, the increase value a will be evenly distributed to the length of each sub-area, that is, the length of sub-area 1 changes from n1 to n1+a / 2, and the length of sub-area 2 changes from n2 to n2+a / 2. At this time, the length and width of sub-area 1 is (n1+a / 2)×M, and the length and width of sub-area 2 is (n2+a / 2)×M.
[0060] Or, in another example, Figure 5As shown in the figure, the length and width (i.e., length × width) of sub-area 1 obtained after the editable functional area is divided is n1×M, and the length and width of sub-area 2 is n2×M. When the length and width of sub-area 1 are fixed, but the adjustment method of the length of sub-area 2 is set to the active adjustment method, if the total length of sub-area 1 and sub-area 2 is increased from N to N+a, since only the length of sub-area 2 is an adjustable parameter, the increase value a will be allocated to the length of sub-area 2, that is, the length of sub-area 2 changes from n2 to n2+a. At this time, the length and width of sub-area 1 are n1×M, and the length and width of sub-area 2 are (n2+a)×M.
[0061] Here, the above is only an example, and the adaptive method for sub-areas is not limited to the example in the disclosed solution; in addition, the segmentation method used in this example can be other segmentation methods such as horizontal segmentation in addition to vertical segmentation, and the disclosed solution does not limit this.
[0062] Figure 6 This is a schematic flow chart of a method for processing the cabinet position according to an embodiment of the present application. Figure 2 The method can optionally be applied to electronic devices, such as personal computers, servers, server clusters, and other electronic devices. It is understandable that the above Figures 1 to 5 The relevant contents of the method shown can also be applied to this example, and the relevant contents will not be described in detail in this example.
[0063] Further, the method includes at least part of the following contents. Specifically, Figure 6 As shown, including:
[0064] Step S601: Display editable functional areas in the target floor plan.
[0065] Here, the area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan.
[0066] It should be noted that the relevant content about the editable functional area can be referred to the above examples and will not be repeated here.
[0067] Step S602: Determine a plurality of candidate boundaries from the target floor plan.
[0068] Step S603: obtaining a target distance from the editable functional area to each candidate boundary.
[0069] In a specific example, the above-mentioned obtaining of the target distance from the editable functional area to each candidate boundary (for example, step S603) specifically includes:
[0070] Based on the current location of the region key point of the editable functional area and the location of the boundary key point of each candidate boundary, the target distance from the editable functional area to each candidate boundary is calculated.
[0071] Here, the regional key point of the editable functional area can be specifically the regional center point of the editable functional area, or it can be any point on the regional boundary of the editable functional area, or it can be any point within the area of the editable functional area. The present disclosure does not make any specific restrictions on this.
[0072] Further, the boundary key points of the candidate boundary are determined based on the region key points of the editable functional area. For example, the boundary key points of the candidate boundary are determined based on the region center point of the editable functional area.
[0073] For example, if Figure 7 As shown, first, a straight line is drawn from the center point of the editable functional area and intersects the candidate boundary perpendicularly. At this time, the point intersecting the candidate boundary is the boundary key point of the candidate boundary; secondly, in the coordinate system established based on the target floor plan, the target distance from the editable functional area to the candidate boundary is obtained according to the current coordinates of the center point of the editable functional area and the coordinates of the boundary key points of the candidate boundary; finally, the target distance from the editable functional area to each candidate boundary can be obtained by using the above steps. In this way, the foundation is laid for determining the target boundary that the editable functional area can adsorb from multiple candidate boundaries in the future.
[0074] Step S604: Based on the target distance, determine from multiple candidate boundaries whether there is a target boundary of the target floor plan to which the editable functional area can be adsorbed; if so, proceed to step S605; otherwise, return to step S603.
[0075] Step S605: When it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan, the editable functional area is adsorbed to the target boundary. Then, the process proceeds to step S606.
[0076] In a specific example, when it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan, the adsorption operation between the editable functional area and the target boundary can be completed in the following manner; specifically, the above adsorbing the editable functional area to the target boundary (for example, step S605) specifically includes:
[0077] Step S605 - 1 : Based on the current position of the region key point of the editable functional area, determine the target position of the region key point when adsorbed to the target boundary.
[0078] Step S605-2: Move the key point of the editable functional area from the current position to the target position.
[0079] Continue with Figure 7 For example, when the target boundary of the editable functional area to be adsorbed is determined, Figure 8 As shown, according to the current coordinates of the area center point of the editable functional area (such as the initial coordinates), half of the width of the editable functional area, and the target distance from the area center point of the editable functional area to the boundary key point of the target boundary, the coordinates of the area center point when adsorbed to the target boundary (such as the target coordinates) are obtained; and then the area center point of the editable functional area is moved from the initial coordinates to the target coordinates.
[0080] It should be pointed out that, in a specific example, the above-mentioned adsorbing the editable functional area to the target boundary may also specifically include: determining the target position required for the area key points when adsorbing to the target boundary based on the positions of the boundary key points of the target boundary; and moving the area key points of the editable functional area from the current positions to the target positions.
[0081] For example, continue with Figure 8 For example, according to the coordinates of the boundary key points of the target boundary and half of the width of the editable functional area, the target coordinates of the area center point when adsorbed to the target boundary are determined, and then the area center point of the editable functional area is moved from the initial coordinates to the target coordinates.
[0082] In this way, the disclosed solution can use the adsorption method to quickly complete the layout of an area in the target floor plan without the need for manual adjustment by the user, thereby laying the foundation for quickly obtaining the cabinet layout and improving the user experience.
[0083] Step S606: When it is detected that the initial cabinet model is placed in the editable functional area, the initial cabinet model is adsorbed into the editable functional area to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area to obtain the target cabinet that needs to be laid out in the target floor plan.
[0084] In this way, the disclosed scheme can determine the target boundary to which the editable functional area needs to be adsorbed from multiple candidate boundaries according to the target distance from the editable functional area to each candidate boundary, and then adsorb the editable functional area to the target boundary, so that the initial cabinet model can be adsorbed on the laid-out editable functional area. At the same time, the initial cabinet model is automatically adjusted to complete the layout of the cabinet in the target floor plan. In this way, the cost of understanding is reduced, and the area layout obtained after the editable functional area is laid out in the target floor plan has strong reusability, which effectively avoids the user's repetitive work and thereby improves the efficiency of designing the drawing.
[0085] Fig. 9 This is a schematic flow chart of a method for processing the cabinet position according to an embodiment of the present application. Figure 3 The method can optionally be applied to electronic devices, such as personal computers, servers, server clusters, and other electronic devices. It is understandable that the above Figures 1 to 8 The relevant contents of the method shown can also be applied to this example, and the relevant contents will not be described in detail in this example.
[0086] Further, the method includes at least part of the following contents. Specifically, Fig. 9 As shown, including:
[0087] Step S901: Display editable functional areas in the target floor plan.
[0088] Here, the area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan.
[0089] It should be noted that the relevant content about the editable functional area can be referred to the above examples and will not be repeated here.
[0090] Step S902: Determine a plurality of candidate boundaries from the target floor plan.
[0091] Step S903: obtaining a target distance from the editable functional area to each candidate boundary.
[0092] Step S904: Based on the target distance, determine from multiple candidate boundaries whether there is a candidate boundary whose target distance is less than or equal to a preset threshold; if so, proceed to step S905; otherwise, return to step S903.
[0093] Step S905: When a candidate boundary whose target distance is less than or equal to the preset threshold is detected, the candidate boundary whose target distance is less than or equal to the preset threshold is used as the target boundary, and an adsorption operation is triggered to adsorb the editable function area to the target boundary. Entering step S906.
[0094] That is to say, in the target floor plan, during the process of dragging the editable functional area, based on the target distance from the editable functional area to each candidate boundary, if a target distance is less than or equal to a preset threshold, the candidate boundary corresponding to the target distance is used as the target boundary to be adsorbed to the editable functional area, and the adsorption operation is triggered to automatically adsorb the editable functional area to the target boundary. In this way, the layout of the editable functional area in the target floor plan can be completed without manual adjustment by the user, which lays the foundation for the subsequent efficient completion of the layout of the cabinets in the target floor plan.
[0095] Step S906: When it is detected that the initial cabinet model is placed in the editable functional area, the initial cabinet model is adsorbed into the editable functional area to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area to obtain the target cabinet that needs to be laid out in the target floor plan.
[0096] In this way, the disclosed scheme can determine whether to trigger the adsorption of the editable functional area to the target boundary according to the target distance and the preset threshold, and then complete the layout of the editable functional area in the target floor plan, so as to place the cabinet in the editable functional area after layout, and finally complete the layout of the cabinet. In this way, the understanding cost is reduced and the user experience is improved. Moreover, the regional layout obtained after the editable functional area is laid out in the target floor plan has strong reusability and can be reused, which effectively avoids duplication of work and improves the efficiency of cabinet layout.
[0097] Furthermore, in the process of determining the target boundary from multiple candidate boundaries, the target boundary may be further determined according to the boundary type of the candidate boundary. For example, in a specific example, when a candidate boundary whose target distance is less than or equal to a preset threshold is detected, the candidate boundary whose target distance is less than or equal to the preset threshold is used as the target boundary, and the adsorption operation (for example, step S905) is triggered, which specifically includes:
[0098] Step S905-1: When a candidate boundary whose target distance is less than or equal to a preset threshold is detected, determine whether the candidate boundary whose target distance is less than or equal to the preset threshold is a wall boundary. If so, proceed to step S905-2; otherwise, proceed to step S905-3.
[0099] Step S905 - 2 : when it is determined that the candidate boundary whose target distance is less than or equal to the preset threshold is a wall boundary, the candidate boundary whose target distance is less than or equal to the preset threshold is taken as the target boundary, and the adsorption operation is triggered.
[0100] That is to say, according to the target distance from the editable functional area to each candidate boundary, if a target distance is detected to be less than or equal to the preset threshold, it can be further determined whether the candidate boundary with a target distance less than or equal to the preset threshold is a wall boundary. If so, the candidate boundary with a target distance less than or equal to the preset threshold is taken as the target boundary and the adsorption operation is triggered, that is, the editable functional area is adsorbed to the target boundary. In this way, the design efficiency of the regional layout is improved.
[0101] Step S905-3: When it is determined that the candidate boundary whose target distance is less than or equal to the preset threshold is a non-wall boundary, determine whether at least one of the following conditions is met, and when it is determined that at least one of the following conditions is met, take the candidate boundary whose target distance is less than or equal to the preset threshold as the target boundary, and trigger the adsorption operation:
[0102] Condition 1: The location of the candidate boundary whose target distance is less than or equal to the preset threshold satisfies a preset position relationship with the location of the editable functional area.
[0103] Here, the preset position relationship may specifically be that the editable functional area is located at a unique specific position of the candidate boundary; it should be pointed out that the "specific position" in this example specifically includes the position to the left of the candidate boundary (referred to as the left position) and the position to the right of the candidate boundary (referred to as the right position); or, specifically includes the position to the upper side of the candidate boundary (referred to as the upper position) and the position to the lower side of the candidate boundary (referred to as the lower position).
[0104] For example, in one example, Fig.10 As shown, boundary 1 corresponds to two specific directions, an upper direction and a lower direction, and boundary 1 is a candidate boundary whose target distance is less than or equal to a preset threshold. Further, according to the location of the editable functional area (i.e. Fig.10 It can be seen from the position shown that the editable functional area is located below the boundary 1. At this time, it is considered that the editable functional area is located at a unique specific position relative to the boundary 1, that is, it is considered that the position of the editable functional area and the position of the boundary 1 satisfy the preset position relationship.
[0105] Or, in another example, continue with Fig.10 For example, Fig.11 As shown, according to the location of the editable function area (that is, Fig.11 It can be seen from the position shown that the editable functional area is neither located at the lower position of the boundary 1 nor at the upper position of the boundary 1. At this time, it is considered that the editable functional area is not located at the only specific position of the boundary 1, that is, it is considered that the position of the editable functional area and the position of the boundary 1 do not satisfy the preset position relationship.
[0106] Here, the relevant contents of the left and right positions of the candidate boundary are similar to those of the upper and lower positions of the candidate boundary, and can be referred to the above Fig.10 and Fig.11 The examples are not repeated here.
[0107] In this way, for candidate boundaries that are not wall boundaries, by judging whether the position of the editable functional area and the position of the candidate boundary satisfy the preset position relationship, it is ensured that the editable functional area can be accurately adsorbed to the candidate boundary, thereby laying the foundation for subsequently improving the rationality of the cabinet layout.
[0108] Condition 2: The boundary type of the candidate boundary whose target distance is less than or equal to the preset threshold matches the area type of the editable functional area.
[0109] That is to say, when a candidate boundary whose target distance is less than or equal to a preset threshold is determined from multiple candidate boundaries, it is also necessary to determine whether the boundary type of the candidate boundary whose target distance is less than or equal to the preset threshold matches the area type of the editable functional area, and if it is determined to match, the candidate boundary whose target distance is less than or equal to the preset threshold is used as the target boundary, and then the editable functional area is adsorbed to the target boundary. In this way, it is convenient to subsequently layout cabinets of the same type together, thereby improving the rationality of the cabinet layout.
[0110] It should be pointed out that after determining that the candidate boundary with a target distance less than or equal to the preset threshold is a non-wall boundary, in one example, when it is determined that the candidate boundary satisfies condition 1, the candidate boundary with a target distance less than or equal to the preset threshold is used as the target boundary, and the adsorption operation is triggered; or, in another example, when it is determined that the candidate boundary satisfies condition 2, the candidate boundary with a target distance less than or equal to the preset threshold is used as the target boundary, and the adsorption operation is triggered; or, in yet another example, when it is determined that the candidate boundary satisfies condition 1 and condition 2, the candidate boundary with a target distance less than or equal to the preset threshold is used as the target boundary, and the adsorption operation is triggered.
[0111] In this way, the disclosed solution can determine the target boundary that needs to be adsorbed in the editable functional area according to whether the candidate boundary with a target distance less than or equal to a preset threshold is a wall boundary, thereby ensuring the rationality of the subsequent cabinet layout.
[0112] The present disclosure is further described in detail below with reference to specific examples; the present disclosure provides a method for processing the position of a cabinet, that is, firstly laying out an editable functional area with adsorption capability in a target floor plan, and then placing a corresponding cabinet model in the editable functional area after layout, and at the same time, automatically adjusting the cabinet model according to the area parameters of the editable functional area to complete the layout of the cabinet model in the target floor plan, thereby effectively avoiding manual adjustment by the user and improving the user experience, and the area layout obtained after laying out the editable functional area in the target floor plan can be reused, avoiding repetitive work by the user and thereby improving the efficiency of drawing the cabinet layout.
[0113] Here, before introducing the present disclosure in detail, the terms used in the present disclosure are first explained, as follows:
[0114] (1) Editable functional area: a container with a fixed geometric shape, used to hold a cabinet.
[0115] Here, the editable functional area can be a two-dimensional plane figure associated with a cabinet plane of the cabinet, or a three-dimensional solid figure associated with the three-dimensional shape of the cabinet. In addition, the disclosed solution can also set the regional parameters of the editable functional area, such as setting the regional size (such as length, width, etc.), height from the ground, and regional type in the regional parameters.
[0116] (2) Sub-region: Usually included in the editable functional region; the sub-region has the same properties as the editable functional region. In addition, an editable functional region that contains several sub-regions can also be called a complex region.
[0117] (3) The visible boundary set (Boundary Segments) that constitutes the object (such as wall, cabinet, etc.): a geometric structure, which means the set of all boundary geometric line segments.
[0118] (4) Adsorption source: During the adsorption process, objects with adsorption capability, such as the boundary in the adsorption boundary of the editable functional area, the editable functional area in the editable functional area of the cabinet adsorption, etc., are all adsorption sources.
[0119] (5) Adsorption objects: During the adsorption process, the adsorbed objects, such as the editable functional area in the adsorption boundary of the editable functional area, the cabinet in the editable functional area of the cabinet, etc., are all adsorption objects.
[0120] (6) Split operation: mainly used to divide the editable functional area into several sub-areas.
[0121] (7) Adaptive mode: This is the property of a sub-region. For example, for a complex region, if the size of the complex region changes, the sub-regions contained in the complex region will be adaptively adjusted according to the specified size change mode.
[0122] (8) Adsorption operation: When the editable functional area is approaching the adsorption source, if certain conditions are met, the position of the editable functional area will be automatically adjusted according to certain rules to avoid the accuracy problems caused by manual adjustment of the position.
[0123] (9) Area direction: specifically refers to the front direction of the editable functional area. Generally, the front direction is set to "front" by default (i.e., the negative direction along the Y axis in the 2D coordinate system (i.e., XY coordinate system)). When the editable functional area is adsorbed, the area direction of the editable functional area will be automatically adjusted to be consistent with the apartment layout direction. For details, please refer to the above Figure 2 The examples are not repeated here.
[0124] Here, the floor plan direction specifically refers to the direction of the front of the target floor plan. Generally, the front direction defaults to "front" (ie, the negative direction along the Y axis in the 2D coordinate system (ie, the XY coordinate system)).
[0125] Specifically, Fig.12 As shown, the core steps of the cabinet position processing method provided by the disclosed solution specifically include:
[0126] Step 1: Generate editable functional areas. Users can pre-set the area type of the editable functional area, such as setting the area type of the editable functional area to the wall cabinet area or the floor cabinet area, and then initialize different area parameters according to different area types, such as area size (such as length, width, etc.), height from the ground, etc. After the setting is completed, a 2D rectangular area will be generated at the center of the target floor plan.
[0127] Step 2: Drag the editable functional area. After the editable functional area is generated, the drag function in Tools will be activated, so that the user can control the movement of the editable functional area by controlling the mouse landing point. Here, the mouse landing point can specifically correspond to the center point of the editable functional area, or can also correspond to other key points of the editable functional area, and the disclosed solution does not make specific restrictions on this.
[0128] Step 3: The editable functional area is adsorbed to the wall. When dragging the editable functional area in the target floor plan, if the editable functional area is about to touch the wall boundary in the target floor plan, for example, the distance from the editable functional area to the wall boundary is less than or equal to the preset threshold, the wall adsorption logic in the Interference module is activated to complete the adsorption of the editable functional area to the wall boundary. The specific process is as follows:
[0129] Step 3.1: Get the boundary segments in the target floor plan and decompose them into multiple boundaries to obtain a boundary set, and use the boundary set as the adsorption source.
[0130] Step 3.2: Calculate the target distance from the center point of the editable functional area (ie, the adsorption object) (ie, corresponding to the above-mentioned regional key point) to each boundary in the adsorption source.
[0131] Step 3.3: According to the target distance from the center point of the area to each boundary, determine the boundary whose target distance is less than or equal to the preset threshold, and if the boundary is a wall boundary, use the boundary as the target boundary to be adsorbed to the editable functional area, and then adsorb the editable functional area to the target boundary.
[0132] Here, based on the initial coordinates of the center point of the editable functional area, the target distance from the center point to the target boundary, and the area size of the editable functional area, the target coordinates where the center point of the area needs to be located when the editable functional area adsorbs the target boundary are calculated.
[0133] Furthermore, the center point of the editable functional area is moved from the initial coordinates to the target coordinates to complete the adsorption operation between the editable functional area and the target boundary, and the direction of the area is adjusted to be consistent with the direction of the apartment type.
[0134] Step 4: The editable functional area adsorbs other areas. When dragging the editable functional area in the target floor plan, if the editable functional area is about to touch other areas (such as the area corresponding to the cabinet), activate the adsorption logic of other areas in Interference to complete the adsorption of the editable functional area to the boundaries of other areas. The specific process is as follows:
[0135] Step 4.1: Get the boundary segments in the target floor plan and decompose them into multiple boundaries to obtain a boundary set, and use the boundary set as the adsorption source.
[0136] Step 4.2: According to the target distance from the center point of the editable functional area (ie, the adsorption object) to each boundary, determine the boundary whose target distance is less than or equal to the preset threshold.
[0137] Step 4.3: When the boundary whose target distance is less than or equal to the preset threshold is a non-wall boundary, determine whether the following conditions are met, and when the following conditions are met, use the boundary whose target distance is less than or equal to the preset threshold as the target boundary to be adsorbed by the center point of the region.
[0138] Condition 1: The editable functional area is completely located in the unique specific position of the area corresponding to the adsorption source.
[0139] Here, for more information about specific locations, please refer to Fig.10 and Fig.11 The examples are not repeated here.
[0140] Condition 2: The editable function area and the area corresponding to the adsorption source are of the same type.
[0141] Here, the relevant content about condition 2 can refer to the above example and will not be repeated here.
[0142] Step 4.4: Complete the adsorption operation between the editable functional area and the boundaries of other areas, and adjust the area direction of the editable functional area to keep it consistent with the area directions of other areas. For the specific adjustment method of this step, please refer to the example of adsorbing the editable functional area to the wall, which will not be repeated here.
[0143] Step 5: Modify the area parameters of the editable functional area. After placing the editable functional area in the target floor plan, you can adjust the area parameters of the editable functional area, such as adjusting the length, width and height from the ground.
[0144] Here, if the editable functional area needs to carry multiple cabinets, the editable functional area can also be split. At this time, the split function in Tools will be activated, that is, a split line is automatically generated and the current editable functional area is split along the area direction to obtain multiple sub-areas. Furthermore, the sub-area can be used as a container for a cabinet alone; the sub-area will inherit the properties of the editable functional area and also support parameter modification.
[0145] It should be noted that if the editable functional area contains multiple sub-areas, the size change of each sub-area can be determined by adjusting the adaptive mode of the sub-area. For the adaptive mode of the sub-area, please refer to the example of the editable functional area adsorbing the wall, which will not be repeated here.
[0146] At this point, the layout of an editable functional area in the target floor plan is completed.
[0147] Step 6: Repeat steps 1 to 5 to create a layout with multiple editable functional areas in the target floor plan.
[0148] Step 7: Drag the cabinet model (corresponding to the initial cabinet model described above) into the corresponding editable functional area.
[0149] It should be pointed out that, in one example, when the cabinet type and cabinet size of the cabinet model respectively match the area type and area size of the editable functional area, it is considered that the cabinet model is placed successfully.
[0150] Step 8: After dragging in the cabinet model, the cabinet model will automatically absorb the editable functional area first. The specific processing process is as follows:
[0151] Step 8.1: According to the mouse landing point, determine whether the current cabinet model is in the editable functional area. If so, proceed to step 8.2, otherwise proceed to step 8.3.
[0152] Here, the point where the mouse is placed corresponds to a key point of the cabinet model (such as the center point of the model).
[0153] Step 8.2: When it is determined that the cabinet model is within the editable functional area, the cabinet model is adsorbed into the editable functional area. At this time, the cabinet parameters of the cabinet model can be automatically adjusted according to the area parameters of the editable functional area. For example, the cabinet direction of the cabinet model can be adjusted to make the adjusted cabinet direction consistent with the area direction of the editable functional area; for another example, the cabinet size of the cabinet model can be adjusted according to the area size of the editable functional area, etc.
[0154] Step 8.3: When it is determined that the cabinet model is not in the editable functional area, determine whether there are other cabinets that can be adsorbed within the preset range of the cabinet model. If so, adsorb the cabinet model to the other cabinet and adjust the cabinet size and cabinet direction of the current cabinet model.
[0155] At this point, the layout of a cabinet in the target floor plan is completed.
[0156] Step 9: Repeat steps 7 and 8 to obtain the target floor plan with multiple cabinets.
[0157] Furthermore, in one example, according to the method for processing the cabinet position in the disclosed solution, a system for placing cabinets in a drawing area is also provided; specifically, Fig.13 As shown, the system architecture specifically includes:
[0158] (1) Data layer: an abstract module of metadata; further, the data layer also specifically includes:
[0159] Rect Area Data: A set of attributes of a region entity, which includes parameters such as size and position;
[0160] Assembly Data: A data structure representing a container form. It is mainly used to form a combination when a cabinet is placed in an editable functional area.
[0161] (2) Middle layer: control modules with the same logic or the same processing flow; the middle layer also specifically includes:
[0162] Geometric Algorithm Library: contains general geometric algorithms;
[0163] Bind Controller: It is used to handle the relationship between entities (such as cabinets, walls, etc.).
[0164] (3) Business layer: abstract modules at the business function level; the business layer also includes:
[0165] Backup Manager: used to handle data backup and data backtracking; in addition, the backup manager can also support data recovery and revocation;
[0166] Data Carrier: responsible for storing and retrieving all metadata;
[0167] Tools: carries all modules related to interaction, such as moving areas, dividing editable functional areas, adjusting dividing lines, etc.
[0168] Scene Component: responsible for rendering of all regional data;
[0169] Interference component: This component includes functions such as editable functional area adsorbing walls, editable functional area adsorbing other areas (such as the area corresponding to the cabinet), and cabinet adsorbing editable functional area.
[0170] In summary, the disclosed solution has the following advantages, including:
[0171] First, no manual adjustment is required. The disclosed solution pre-arranges multiple editable functional areas in the target floor plan, so that after placing a cabinet model in an editable functional area, it can be automatically adsorbed to the editable functional area, and the cabinet model can be automatically adjusted according to the area parameters (such as direction, size, etc.) of the editable functional area, thus effectively avoiding manual adjustment by users, thereby improving the user experience.
[0172] Second, the drawing efficiency is higher. The disclosed solution can save the regional layout obtained after the editable functional area is laid out in the target floor plan. In this way, it only needs to adjust the regional parameters of the editable functional area in the regional layout, and it can be applied to other solutions. In this way, it has strong reusability, avoids the user's duplication of work, and further improves the efficiency of cabinet layout drawing, thereby improving the user experience.
[0173] The disclosed solution also provides a cabinet position processing device, such as Fig.14 As shown, including:
[0174] A display unit 1401 is used to display the editable functional area in the target floor plan; the area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan;
[0175] Processing unit 1402 is used to adsorb the editable functional area to the target boundary of the target floor plan when it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan; and to adsorb the initial cabinet model into the editable functional area when it is detected that the initial cabinet model is placed in the editable functional area, so as to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area, so as to obtain the target cabinet that needs to be laid out in the target floor plan.
[0176] In a specific example of the disclosed solution, the editable functional area is a two-dimensional plane graphic associated with a cabinet plane of the target cabinet; or,
[0177] The editable functional area is a three-dimensional solid figure associated with the three-dimensional shape of the target cabinet.
[0178] In a specific example of the disclosed solution, the processing unit is further used for:
[0179] In response to the splitting operation on the editable functional area, multiple sub-areas corresponding to the editable functional area are obtained. The number of sub-areas is related to the number of sub-cabinets in the target cabinet that needs to be laid out in the target floor plan, and the area size of the sub-area can be adjusted based on the cabinet size of the sub-cabinet.
[0180] In a specific example of the disclosed solution, the processing unit is further used for:
[0181] Determining a plurality of candidate boundaries from the target floor plan;
[0182] Obtaining a target distance from the editable functional area to each candidate boundary;
[0183] Based on the target distance, it is determined from a plurality of candidate boundaries whether there is a target boundary to which the editable functional area can be adsorbed.
[0184] In a specific example of the disclosed solution, the processing unit is specifically used to:
[0185] When a candidate boundary whose target distance is less than or equal to a preset threshold is detected, an adsorption operation is triggered to adsorb the editable functional area to the target boundary, wherein the target boundary is a candidate boundary corresponding to the target distance less than or equal to the preset threshold.
[0186] In a specific example of the disclosed solution, the processing unit is specifically used to:
[0187] When it is detected that there is a candidate boundary whose target distance is less than or equal to the preset threshold, and the candidate boundary whose target distance is less than or equal to the preset threshold is a wall boundary, an adsorption operation is triggered.
[0188] In a specific example of the disclosed solution, the processing unit is specifically used to:
[0189] When it is detected that there is a candidate boundary whose target distance is less than or equal to the preset threshold, and the candidate boundary whose target distance is less than or equal to the preset threshold is a non-wall boundary, it is determined whether at least one of the following conditions is met, and when it is determined that at least one of the following conditions is met, the adsorption operation is triggered:
[0190] The position of the candidate boundary whose target distance is less than or equal to the preset threshold satisfies the preset position relationship with the position of the editable functional area;
[0191] The boundary type of the candidate boundary whose target distance is less than or equal to the preset threshold matches the area type of the editable functional area.
[0192] In a specific example of the disclosed solution, the processing unit is specifically used to:
[0193] Based on the current location of the area key points of the editable functional area and the location of the boundary key points of each candidate boundary, the target distance from the editable functional area to each candidate boundary is calculated; wherein the boundary key points of the candidate boundary are determined based on the area key points of the editable functional area.
[0194] In a specific example of the disclosed solution, the processing unit is specifically used to:
[0195] Determining a target position of the regional key point when adsorbed to the target boundary based on the current position of the regional key point of the editable functional area;
[0196] Move the key point of the editable functional area from the current position to the target position.
[0197] For the description of the specific functions and examples of each unit of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0198] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0199] Fig.15 FIG. 1 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Fig.15 As shown, the electronic device includes: a memory 1510 and a processor 1520, and the memory 1510 stores a computer program that can be run on the processor 1520. The number of memories 1510 and processors 1520 can be one or more. The memory 1510 can store one or more computer programs. When the one or more computer programs are executed by the electronic device, the electronic device executes the method provided by the above method embodiment. The electronic device may also include: a communication interface 1530, which is used to communicate with external devices and perform data exchange transmission.
[0200] If the memory 1510, the processor 1520 and the communication interface 1530 are implemented independently, the memory 1510, the processor 1520 and the communication interface 1530 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.15 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0201] Optionally, in a specific implementation, if the memory 1510, the processor 1520 and the communication interface 1530 are integrated on a chip, the memory 1510, the processor 1520 and the communication interface 1530 can communicate with each other through an internal interface.
[0202] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.
[0203] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0204] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (for example: infrared, Bluetooth, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc. It is worth noting that the computer-readable storage medium mentioned in the present disclosure may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0205] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0206] In the description of the embodiments of the present disclosure, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0207] In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B. "And / or" in this article is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0208] In the description of the embodiments of the present disclosure, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0209] The above description is only an exemplary embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for processing a cabinet position, comprising: Display editable functional areas in the target floor plan; The area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan; When it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan, adsorbing the editable functional area to the target boundary; When it is detected that the initial cabinet model is placed in the editable functional area, the initial cabinet model is adsorbed into the editable functional area to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area to obtain the target cabinet that needs to be laid out in the target floor plan.
2. The method according to claim 1, wherein: The editable functional area is a two-dimensional plane graphic associated with a cabinet plane of the target cabinet; or, The editable functional area is a three-dimensional solid figure associated with the three-dimensional shape of the target cabinet.
3. The method according to claim 1, further comprising: In response to the splitting operation on the editable functional area, multiple sub-areas corresponding to the editable functional area are obtained. The number of sub-areas is related to the number of sub-cabinets in the target cabinet that needs to be laid out in the target floor plan, and the area size of the sub-area can be adjusted based on the cabinet size of the sub-cabinet.
4. The method according to any one of claims 1 to 3, further comprising: Determining a plurality of candidate boundaries from the target floor plan; Obtaining a target distance from the editable functional area to each candidate boundary; Based on the target distance, it is determined from multiple candidate boundaries whether there is a target boundary where the editable functional area can be adsorbed to the target floor plan.
5. The method according to claim 4, wherein: When it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan, adsorbing the editable functional area to the target boundary includes: When a candidate boundary whose target distance is less than or equal to a preset threshold is detected, an adsorption operation is triggered to adsorb the editable functional area to the target boundary, wherein the target boundary is a candidate boundary corresponding to the target distance less than or equal to the preset threshold.
6. The method according to claim 5, wherein: The triggering of the adsorption operation when detecting that there is a candidate boundary whose target distance is less than or equal to a preset threshold value includes: When it is detected that there is a candidate boundary whose target distance is less than or equal to the preset threshold, and the candidate boundary whose target distance is less than or equal to the preset threshold is a wall boundary, an adsorption operation is triggered.
7. The method according to claim 5, wherein: The triggering of the adsorption operation when detecting that there is a candidate boundary whose target distance is less than or equal to a preset threshold value includes: When it is detected that there is a candidate boundary whose target distance is less than or equal to the preset threshold, and the candidate boundary whose target distance is less than or equal to the preset threshold is a non-wall boundary, it is determined whether at least one of the following conditions is met, and when it is determined that at least one of the following conditions is met, the adsorption operation is triggered: The position of the candidate boundary whose target distance is less than or equal to the preset threshold satisfies the preset position relationship with the position of the editable functional area; The boundary type of the candidate boundary whose target distance is less than or equal to the preset threshold matches the area type of the editable functional area.
8. The method according to claim 4, wherein: The step of obtaining a target distance from the editable functional area to each candidate boundary includes: Based on the current location of the area key points of the editable functional area and the location of the boundary key points of each candidate boundary, the target distance from the editable functional area to each candidate boundary is calculated; wherein the boundary key points of the candidate boundary are determined based on the area key points of the editable functional area.
9. The method according to claim 8, wherein: Adsorbing the editable functional area to the target boundary includes: Determining a target position of the regional key point when adsorbing to the target boundary based on the current position of the regional key point of the editable functional area; Move the key point of the editable functional area from the current position to the target position.
10. A cabinet position processing device, comprising: A display unit is used to display editable functional areas in the target floor plan; The area size of the editable functional area can be adjusted based on the cabinet size of the target cabinet that needs to be laid out in the target floor plan; A processing unit is used to adsorb the editable functional area to the target boundary of the target floor plan when it is detected that the editable functional area can be adsorbed to the target boundary of the target floor plan; and to adsorb the initial cabinet model into the editable functional area when it is detected that the initial cabinet model is placed in the editable functional area, so as to dynamically adjust the cabinet size of the initial cabinet model according to the area size of the editable functional area, so as to obtain the target cabinet that needs to be laid out in the target floor plan.
11. The device according to claim 10, wherein: The processing unit is further used for: Determining a plurality of candidate boundaries from the target floor plan; Obtaining a target distance from the editable functional area to each candidate boundary; Based on the target distance, it is determined from multiple candidate boundaries whether there is a target boundary where the editable functional area can be adsorbed to the target floor plan.
12. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
14. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.