Panel group display method, apparatus, equipment and storage medium
By grouping, arranging, and overlapping the panel models in the home decoration water and electricity construction drawings, the problem of the panel models being difficult to display clearly on the drawings was solved, achieving a clear, unobstructed display of the models and a clear positional relationship.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
- Filing Date
- 2023-12-20
- Publication Date
- 2026-06-30
AI Technical Summary
In home renovation plumbing and electrical construction drawings, multiple circuit panels such as switches and sockets are placed side by side and may be stacked on top of each other, making them difficult to display clearly on the drawings and easy to obscure each other.
The panel models to be displayed are grouped, arranged side by side on the baseline using a preset scaling ratio, and stacking offset is adjusted when there is overlap. The position information is updated, and finally the model group is rendered and displayed on the drawing.
It achieves a clear display of panel models on drawings, avoids mutual obstruction, and ensures clear positional relationships, making them easy to distinguish.
Smart Images

Figure CN117707399B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to the fields of computer-aided design, home decoration design, and construction drawing generation. Background Technology
[0002] In home electrical and plumbing projects, multiple switch and socket circuit panels are often arranged side by side, and there may be two sets of panels stacked on top of each other in the same location. The actual size of the switches and sockets is relatively small, making them difficult to see on the construction drawings, and multiple panels can easily block each other. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, and storage medium for grouped display of panels to solve or alleviate one or more technical problems in the prior art.
[0004] In a first aspect, this disclosure provides a method for displaying panels in groups, including:
[0005] Group all panel models to be displayed in the current view to obtain multiple model groups;
[0006] For each model group in the multiple model groups of the device, the panel models in the same group are arranged side by side on the corresponding baseline with a preset scaling ratio;
[0007] The position information of multiple model groups of the device is obtained based on the arrangement results;
[0008] In cases where multiple model groups in the device overlap, the target model groups within the overlapping model groups are offset and adjusted in a stacking manner to update the position information of the target model groups; and
[0009] Based on the position information of multiple model groups of the device, render and display multiple model groups of the device on the current view of the device.
[0010] Secondly, this disclosure provides a panel assembly display device, comprising:
[0011] The grouping module is used to group all panel models to be displayed in the current view, resulting in multiple model groups;
[0012] The intra-group offset module is used to arrange the panel models of the same group side by side on the corresponding baseline with a preset scaling ratio for each model group in multiple model groups of the device.
[0013] The location determination module is used to obtain the location information of multiple model groups of the device based on the arrangement results;
[0014] The inter-group stacking module is used to offset and adjust the target model group in the overlapping model groups of the device in a stacking manner when there are overlapping model groups in multiple model groups of the device, so as to update the position information of the target model group of the device; and
[0015] The display module is used to render and display multiple model groups of the device on the current view of the device based on the position information of multiple model groups of the device.
[0016] Thirdly, an electronic device is provided, comprising:
[0017] At least one processor; and
[0018] The memory is communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.
[0020] Fourthly, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of the present disclosure.
[0021] Fifthly, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of the present disclosure.
[0022] The beneficial effects of the technical solution provided in this disclosure include at least the following: combining multiple models of similar objects as a whole for scaling and adjustment, so that the legends of the models are clearly displayed on the drawing, without obscuring each other and with clearer positional relationships.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0024] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments provided according to this disclosure and should not be construed as limiting the scope of this disclosure.
[0025] Figure 1 This is a schematic flowchart of a panel group display method according to an embodiment of the present disclosure;
[0026] Figure 2This is a schematic diagram of intra-group offset processing according to an embodiment of the present disclosure;
[0027] Figure 3 This is a schematic diagram of inter-group offset processing according to an embodiment of the present disclosure;
[0028] Figure 4 This is a schematic flowchart of a panel group display method according to an embodiment of the present disclosure;
[0029] Figure 5 This is a schematic diagram of the structure of a panel group display device according to an embodiment of the present disclosure.
[0030] Figure 6 This is a block diagram of an electronic device used to implement the panel group display method of the embodiments of this disclosure. Detailed Implementation
[0031] The present disclosure will now be described in further detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0032] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0033] In home decoration drawings, due to the presence of switch and socket panels, which often appear side-by-side or stacked vertically, the display of switches and sockets in the drawings can easily be unreasonable.
[0034] Figure 1 This is a schematic flowchart of a panel group display method provided in an embodiment of this disclosure. Figure 1 As shown, the method includes at least the following steps:
[0035] S110. Group all panel models to be displayed in the current view to obtain multiple model groups.
[0036] In this embodiment of the disclosure, the construction drawings typically contain multiple different views, each used to display different areas or different objects within the same area. For the current view, the panel model is first determined from all models to be displayed. The panel model can include various different types of objects, such as: switch panels, socket panels, telephone panels, network cable interface panels, and wireless APs (Access Points).
[0037] Panels include electrical control panels (both high and low voltage), air conditioning control panels, video intercom panels, plumbing panels, and fresh air system control panels. For panel models of the same type, they are grouped according to their location, forming a model group from multiple adjacent panel models or a single isolated panel model.
[0038] S120. For each model group in multiple model groups, arrange the panel models of the same group side by side on the corresponding baseline with a preset scaling ratio.
[0039] In this embodiment of the disclosure, the panel model is scaled by a preset scaling ratio, making the panel model, which is smaller in actual size, more clearly visible on the drawing. The preset scaling ratio can be set manually based on experience or preference, or it can be dynamically adjusted according to the size of the drawing or the scaling ratio of the current view. For example, when the scaling ratio of the current view is small, the preset scaling ratio of the panel model can be set to be larger, making the panel model easier to recognize; while when the scaling ratio of the current view is large, the preset scaling ratio can be set to be smaller, making the panel model closer to the actual size.
[0040] Each model group corresponds to a baseline, which is usually parallel to the ground and the wall to which the model group will be installed. The baseline may have a center point, so that multiple panel models in the same group are arranged horizontally side by side on both sides of the baseline with respect to the center point. The position and height of the center point of the baseline may depend on the actual position of the positioning model in the model group, or the average of the actual positions of multiple panel models.
[0041] It should be noted that multiple panel models in each model group can have a preset order, and each panel model usually has an initial position. When arranged side by side, the panel model whose initial position is closest to the center point of the baseline is placed in the middle of the baseline. Then, the panel models whose initial positions are farther from the center point of the baseline are moved to both sides along the baseline in turn to obtain the position of each panel model.
[0042] S130. Obtain the position information of multiple model groups based on the arrangement results.
[0043] In this embodiment of the disclosure, the panel models in each model group are arranged side by side on the corresponding baseline with a preset scaling ratio to obtain the position information of each panel model in the group. Then, for the entire model group, the position information of the model group is calculated. The position information can be the bounding box or rectangular outline of the model group.
[0044] S140. In the case of overlapping model groups among multiple model groups, the target model group in the overlapping model group is offset and adjusted in a stacking manner to update the position information of the target model group.
[0045] In this embodiment of the disclosure, mutual overlap can be understood as the existence of overlapping areas between the bounding boxes or rectangular outlines of any two model groups. It should be noted that the aforementioned overlapping area can be the overlapping area generated in the projection view of the two model groups on a two-dimensional plane from a certain perspective. For example, in a top view, two model groups of different heights at the same position will overlap. The aforementioned overlapping area can also be in actual three-dimensional space.
[0046] If overlap occurs, to clearly display each model group, the position of the target model group within the overlapping model group needs to be adjusted secondaryly. This typically involves shifting it to one side by a certain distance so that they no longer obscure each other, and the model legends and quantities in each model group are clearly visible. The target model group can be any model group within the overlapping model groups; there are no restrictions here. After adjustment, the new position information of the target model group is obtained.
[0047] S150. Based on the position information of multiple model groups, render and display multiple model groups on the current view.
[0048] In this embodiment, the position information of multiple model groups is finally determined by scaling and translating the models within a group, and by making secondary adjustments when the groups overlap. This position information can be updated in the construction drawings, and multiple model groups can be rendered and displayed on the current view.
[0049] According to the solution of this disclosure embodiment, multiple models of similar objects are combined as a whole and scaled and adjusted so that the legends of the models are clearly displayed on the drawing, without overlapping or obscuring each other, and the positional relationship is clearer and easier to distinguish.
[0050] In one possible implementation, step S110 groups all panel models to be displayed in the current view to obtain multiple model groups, and further includes the following steps:
[0051] S111. Get all panel models to be displayed in the current view.
[0052] S112. Based on the preset grouping threshold and the spacing between two adjacent panel models of the same type, group all panel models to be displayed to obtain multiple model groups.
[0053] In this embodiment of the disclosure, for multiple different views in the construction drawings, steps S110-S150 and S111-S112 can be executed separately. Each time, all models to be displayed in the current view are obtained, and then it is determined whether the model is a panel type object, i.e., whether it is a panel model such as a switch, socket, or electrical box. For panel models, they are first cached and displayed only after grouping is completed and the position information of multiple model groups is finally determined. Before grouping, the grouping threshold and other grouping rule configurations are read, and then the spacing between panel models of the target type is obtained. Multiple panel models of the target type with a spacing less than the grouping threshold are grouped together.
[0054] Grouping rules can be configured to allow panel models of one or more target types to be grouped together. For example, multiple different types of socket panels can be grouped together, but 16A socket panels should not be grouped with 10A socket panels. As another example, network cable interface panels and wireless AP panels can be grouped together.
[0055] According to the embodiments of this disclosure, multiple switch / socket panels arranged together are packaged into a group so that when displayed in a floor plan, the multiple objects can be combined as a whole for display and labeling.
[0056] In one possible implementation, S120, for each model group in multiple model groups, arranges the panel models of the same group side by side on the corresponding baseline with a preset scaling ratio, and further includes the following steps:
[0057] S121. Obtain model legends for multiple model groups.
[0058] In this embodiment, a model legend can be understood as an explanatory mark in a drawing or model used to explain and identify different elements, symbols, or components. This enables the reader or user to accurately understand the digital model, ensuring the accuracy of information transmission and communication. Different panel models may have different legends. If the model legend exists in the cache of the plumbing and electrical drawings, it is read directly from the cache; otherwise, it needs to be requested from the construction drawings.
[0059] S122. Adjust the size of the model legends of multiple model groups using a preset scaling ratio.
[0060] After obtaining the model legend, adjust the legend size according to the preset scaling ratio.
[0061] S123. Determine the number of models within each model group and the baseline in multiple model groups.
[0062] The baseline can be a line connecting the center points of the initial positions of the panel models in the model group or a line connecting the edges of multiple panel models.
[0063] S124. Based on the number of models in each group, select the positioning model for each model group.
[0064] like Figure 2 As shown, a model group contains 5 panel models (201, 202, 203, 204, 205). When the number of models in the group is odd, the panel model 203, which is initially located in the middle of the group, is used as the positioning model. If the number of models in the group is even, the two panel models initially located in the middle are arranged side by side and then used as the positioning models.
[0065] S125. For each model group in multiple model groups, arrange the panel models of the same group along the baseline on both sides of the positioning model so that the panel models of the same group do not obstruct each other.
[0066] like Figure 2 As shown, after determining the positioning model and baseline, the panel models of the same group are arranged side by side on both sides of the baseline with the positioning model as the center.
[0067] According to the solution of this disclosure embodiment, the panel models in the same model group are resized and unfolded side by side to ensure that each panel model is of appropriate size and does not obstruct each other.
[0068] In one possible implementation, when there are overlapping model groups among multiple model groups, S140 performs offset adjustment on the target model group in the overlapping model groups in a stacking manner to update the position information of the target model group, further including the following steps:
[0069] S141. Based on the position information of multiple model groups, obtain the bounding boxes corresponding to each model group.
[0070] In this embodiment, the bounding box of each panel model can be calculated using information such as the coordinates, dimensions, and rotation of the panel models. Then, the bounding boxes of each panel model in the model group are merged to calculate the bounding box of the entire model group. Specifically, a bounding box enclosing each panel model in the model group is more easily obtained by taking the minimum and maximum coordinate values of all panel model bounding boxes; this is the merged bounding box.
[0071] S142. Perform collision detection on the bounding boxes corresponding to each model group from the current viewpoint.
[0072] Collision detection in the current view involves mapping a group of models in a 3D scene to the 2D view of the current view and detecting whether they overlap on a 2D plane. Exemplary steps include:
[0073] By using perspective projection or orthographic projection, a group of models in a 3D scene is projected onto a 2D plane from the target's perspective. Perspective projection is better suited for simulating realistic visual effects, while orthographic projection is better suited for simplified planar projection.
[0074] Collision detection algorithms can be performed on a two-dimensional plane, ranging from simple rectangle intersection tests to more complex geometric algorithms, such as convex polygon intersection tests.
[0075] S143. Based on the collision detection results of the bounding boxes, determine the overlapping model groups among multiple model groups.
[0076] S144. In the case of overlapping model groups among multiple model groups, the target model group in the overlapping model group is offset and adjusted in a stacking manner to update the position information of the target model group.
[0077] In this embodiment, after scaling and repositioning the legends of the grouped models, the bounding box (bbox) of the entire model group is calculated and recorded. Collision detection is performed on each pair of bboxes of the model group. If overlap is found, the target model groups in the overlapping model groups are offset and adjusted in a stacking manner.
[0078] According to the scheme of this disclosure embodiment, collision detection is performed by using the bounding boxes of each model group to accurately determine whether there is mutual overlap.
[0079] In one possible implementation, if there are overlapping model groups among multiple model groups in S140 or S144, the target model group in the overlapping model groups is offset and adjusted in a stacking manner to update the position information of the target model group, further including the following steps:
[0080] S1441. In the case of overlapping model groups among multiple model groups, determine the bottom model group whose position remains unchanged and the target model group whose position needs to be adjusted among the overlapping model groups.
[0081] S1442. Determine the offset direction perpendicular to the corresponding wall.
[0082] S1443. Stack the target model group on top of the bottom model group in the offset direction to update the position information of the target model group.
[0083] In this embodiment of the disclosure, in order not to affect the understanding of the actual position of the model, when two model groups overlap, the direction of offset is not horizontal offset along the wall plane, but the target model group can be offset in a direction that is vertical and away from the wall, so that it is exactly stacked on the other model group, forming a stacked positional relationship.
[0084] According to the solution of this disclosure embodiment, the overlapping model groups are stacked with the wall as the bottom surface, so that the adjusted new position is closer to the actual position. This can reduce the deviation when the reader understands the actual position of the offset adjusted model group and more accurately show the actual position of the model group.
[0085] In one possible implementation, S1441, when there are overlapping model groups among multiple model groups, determines the underlying model group whose position remains unchanged and the target model group whose position needs to be adjusted within the overlapping model groups, further including:
[0086] In the case of overlapping model groups among multiple model groups, determine the ground clearance of the overlapping model groups.
[0087] When overlapping model groups have different ground clearances, the model group with the lowest ground clearance is used as the bottom model group whose position remains unchanged, and the remaining model groups are used as the target model groups whose positions need to be adjusted.
[0088] In this embodiment of the disclosure, such as Figure 3 As shown, when two model groups 301 and 302 overlap, model group 301, which has a smaller height from the ground, is used as the bottom model group to maintain its position, while the other model group 302 is used as the target model group whose position needs to be adjusted. Then, based on the size of the bottom model group, the target model group is shifted a certain distance away from the wall.
[0089] In one example, three model groups overlap: a first socket group (300mm above the ground), a switch group (1200mm above the ground), and a second socket group (2000mm above the ground). The first socket group, with the lowest ground height, is designated as the bottom layer model group, maintaining its position. The remaining model groups are designated as the target model groups for position adjustment. The switch group and the second socket group are offset to prevent overlap with the first socket group. Then, the switch group, with the lowest ground height, is designated as the middle layer model group, maintaining its position. The second socket group is designated as the target model group for position adjustment. The second socket group is offset to place it on the top layer.
[0090] The scheme according to the embodiments of this disclosure makes it easier to intuitively show the positional relationship between overlapping model groups.
[0091] In one possible implementation, S1441, when there are overlapping model groups among multiple model groups, determines the underlying model group whose position remains unchanged and the target model group whose position needs to be adjusted within the overlapping model groups, and further includes:
[0092] Determine the number of models within each overlapping model group when they are at the same ground clearance.
[0093] The model group with the most models in the group is used as the bottom model group whose position remains unchanged, and the remaining model groups are used as the target model groups whose positions need to be adjusted.
[0094] In this embodiment, if there are overlapping model groups, the model group with a smaller height from the ground is placed closer to the bottom of the wall, while the model group with a larger height from the ground is shifted upwards away from the wall and stacked. If the heights from the ground are the same, the model group with the most models in the group is placed closer to the bottom of the wall, while the model group with fewer models in the group is shifted upwards away from the wall, forming a pyramid shape with a larger bottom and a smaller top, which can also be called a human pyramid.
[0095] According to the scheme of this disclosure embodiment, overlapping model groups are stacked in a pyramid manner, which makes the positional relationship after offset easier to understand and more aesthetically pleasing.
[0096] In one possible implementation, S150 renders and displays multiple model groups on the current view based on the position information of the multiple model groups, further including the following steps:
[0097] S151. For each model group in multiple model groups, deduplicate the annotation height information of the panel models in the same group so that each model group retains only one annotation height information.
[0098] S152. Based on the position information of multiple model groups, render and display the model legends and annotation height information of multiple model groups on the current view.
[0099] In this embodiment of the disclosure, after the panel models are grouped, each model group displays only one annotation height information during rendering. Simultaneously, for model groups that require secondary adjustments due to overlap, their annotation height information is shifted accordingly.
[0100] The solution according to the embodiments of this disclosure makes the data information clearer and more concise.
[0101] Figure 4 This is a schematic flowchart of a panel group display method provided in an embodiment of this disclosure. Figure 4 As shown, the method includes at least the following steps:
[0102] 1. Initiate a component synchronization request based on the construction drawings.
[0103] In one example, when the front-end page navigates to the water and electricity drawings of the construction plan, if the plan contains MepModel data, the getGrep2d method in MepModelElement will be called to convert the water and electricity model into a construction drawing element for annotation (setMepModelGrep2d method).
[0104] 2. Determine if the model belongs to a switch / socket / electrical box. If it does, cache all models requiring a large group within the current view, on a view-by-view basis. If it does not belong, proceed directly to the next step.
[0105] When converting a single model to an element, if the current drawing contains a switch and socket group and is located in the top view, the `updateElementGroup` method is called to collect all models available for grouping within the current drawing view. After collection, the grouping interface of the plumbing and electrical backend is called to obtain the grouped model results within the current drawing. The returned grouping results are then cached using `MepDrawingDocument`. At this point, the `updateLegendResult` method is called to synchronize the grouped grep results to the construction drawing.
[0106] 3. Determine if the model legend exists in the water and electricity cache. If it does not exist, request the model legend from the construction drawings. If it exists, proceed directly to the next step.
[0107] 4. After obtaining the model legend, adjust the size and position of the legend according to the configuration.
[0108] 5. Perform intra-group model offset on the grouped models to prevent legend overlap. Specifically, this involves using the labeled and positioned model within a group as a reference point, and then shifting the other models within the group sequentially a certain distance from the current model image.
[0109] 6. Determine if groups overlap. If they overlap, perform a stacking process to find the correct insertion position based on the height from the ground. Specifically, stack groups with the same or smaller height from the ground on top of each other. If the height of the current group is different from the ground, offset the height of the current group accordingly. If they do not overlap, proceed to the next step.
[0110] 7. Update the offset / stacked switch and socket groups to the construction drawings so that they can be displayed in a grouped manner.
[0111] For a description of the specific functions and examples of each step in the embodiments of this disclosure, please refer to the relevant descriptions of the corresponding steps in the above method embodiments, which will not be repeated here.
[0112] Figure 5 This is a schematic diagram of the structure of a panel group display device provided in one embodiment of the present disclosure. For example... Figure 5 As shown, the device includes:
[0113] Grouping module 501 is used to group all panel models to be displayed in the current view to obtain multiple model groups.
[0114] The intra-group offset module 502 is used to arrange the panel models of the same group side by side on the corresponding baseline with a preset scaling ratio for each model group in multiple model groups.
[0115] The location determination module 503 is used to obtain the location information of multiple model groups based on the arrangement results.
[0116] The inter-group stacking module 504 is used to adjust the offset of target model groups in overlapping model groups in a stacking manner when there are overlapping model groups among multiple model groups, so as to update the position information of the target model groups.
[0117] Display module 505 is used to render and display multiple model groups on the current view based on the position information of multiple model groups.
[0118] In one possible implementation, the grouping module 501 is used for:
[0119] Retrieves all panel models to be displayed in the current view.
[0120] Based on the preset grouping threshold and the spacing between two adjacent panel models of the same type, all panel models to be displayed are grouped to obtain multiple model groups.
[0121] In one possible implementation, the intra-group offset module 502 is used for:
[0122] Obtain model legends for multiple model groups.
[0123] Adjust the size of the model legends for multiple model groups using a preset scaling ratio.
[0124] Determine the number of models within each model group and the baseline in multiple model groups.
[0125] Based on the number of models within a group, the localization model for each model group is selected.
[0126] For each model group in multiple model groups, the panel models in the same group are arranged side by side on both sides of the baseline with the positioning model as the center, so that the panel models in the same group do not obscure each other.
[0127] In one possible implementation, the inter-group stacking module 504 includes:
[0128] The bounding box determination submodule is used to obtain the bounding boxes corresponding to each model group based on the position information of multiple model groups.
[0129] The collision detection submodule is used to perform collision detection on the bounding boxes corresponding to each model group from the current viewpoint.
[0130] The overlap determination submodule is used to determine the overlapping model groups among multiple model groups based on the collision detection results of the bounding boxes.
[0131] The position adjustment submodule is used to adjust the offset of the target model group in the overlapping model groups in a stacked manner when there are overlapping model groups in multiple model groups, so as to update the position information of the target model group.
[0132] In one possible implementation, the position adjustment submodule is used for:
[0133] In the case of overlapping model groups among multiple model groups, the underlying model group whose position remains unchanged and the target model group whose position needs to be adjusted are determined in the overlapping model groups.
[0134] Determine the offset direction perpendicular to the corresponding wall.
[0135] The target model group is stacked on top of the underlying model group in the offset direction to update the position information of the target model group.
[0136] In one possible implementation, the position adjustment submodule is used for:
[0137] In the case of overlapping model groups among multiple model groups, determine the ground clearance of the overlapping model groups.
[0138] When overlapping model groups have different ground clearances, the model group with the lowest ground clearance is used as the bottom model group whose position remains unchanged, and the remaining model groups are used as the target model groups whose positions need to be adjusted.
[0139] In one possible implementation, the position adjustment submodule is also used for:
[0140] Determine the number of models within each overlapping model group when they are at the same ground clearance.
[0141] The model group with the most models in the group is used as the bottom model group whose position remains unchanged, and the remaining model groups are used as the target model groups whose positions need to be adjusted.
[0142] In one possible implementation, the display module is used for:
[0143] For each model group within multiple model groups, the annotation height information of the panel models in the same group is deduplicated so that each model group retains only one annotation height information.
[0144] Based on the location information of multiple model groups, render and display the model legends and annotation height information of multiple model groups on the current view.
[0145] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.
[0146] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 6 As shown, the electronic device includes a memory 610 and a processor 620. The memory 610 stores a computer program that can run on the processor 620. There can be one or more memories 610 and processors 620. The memory 610 can store one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the methods provided in the above-described method embodiments. The electronic device may also include a communication interface 630 for communicating with external devices and performing data exchange and transmission.
[0147] If the memory 610, processor 620, and communication interface 630 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0148] Optionally, in a specific implementation, if the memory 610, processor 620, and communication interface 630 are integrated on a single chip, then the memory 610, processor 620, and communication interface 630 can communicate with each other through an internal interface.
[0149] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0150] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).
[0151] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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, all or part of the processes or functions described in the embodiments of this disclosure are generated. 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, Bluetooth, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)). It is worth noting that the computer-readable storage media mentioned in this disclosure can be non-volatile storage media; in other words, it can be non-transient storage media.
[0152] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0153] In the description of the embodiments of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0154] In the description of the embodiments disclosed herein, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0155] In the description of embodiments of this disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0156] The above description is merely an exemplary embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for displaying panels in groups, comprising: Group all panel models to be displayed in the current view to obtain multiple model groups; For each of the multiple model groups, the panel models in the same group are arranged side by side on the corresponding baseline with a preset scaling ratio; The position information of the multiple model groups is obtained based on the arrangement results; In the case where there are overlapping model groups among the multiple model groups, the target model groups in the overlapping model groups are offset and adjusted in a stacking manner to update the position information of the target model groups, including: In the overlapping model groups, determine the bottom model group whose position remains unchanged and the target model group whose position needs to be adjusted; Determine the offset direction perpendicular to the corresponding wall; The target model group is stacked on top of the underlying model group in the offset direction to update the position information of the target model group; and Based on the position information of the multiple model groups, the multiple model groups are rendered and displayed on the current view.
2. The method according to claim 1, wherein, The process of grouping all panel models to be displayed in the current view results in multiple model groups, including: Get all panel models to be displayed in the current view; Based on a preset grouping threshold and the spacing between two adjacent panel models of the same type, all panel models to be displayed are grouped to obtain multiple model groups.
3. The method according to claim 1, wherein, The step of arranging panel models within the same model group side-by-side on a corresponding baseline at a preset scaling ratio includes: Obtain the model legends of the multiple model groups; Adjust the size of the model illustrations of the multiple model groups according to a preset scaling ratio; Determine the number of models within each of the multiple model groups and the baseline; Based on the number of models within the group, the positioning model of each model group is selected; For each of the multiple model groups, the panel models of the same group are arranged along the baseline on both sides of the positioning model so that the panel models of the same group do not obstruct each other.
4. The method according to claim 1, wherein, In the case where there are overlapping model groups among the multiple model groups, the target model group in the overlapping model group is offset and adjusted in a stacking manner to update the position information of the target model group, including: Based on the position information of the multiple model groups, the bounding boxes corresponding to each model group are obtained; Collision detection is performed on the bounding boxes corresponding to each model group from the current viewpoint. Based on the collision detection results of the bounding boxes, identify the overlapping model groups among the multiple model groups; In the case where there are overlapping model groups among the multiple model groups, the target model group in the overlapping model group is offset and adjusted in a stacking manner to update the position information of the target model group.
5. The method according to claim 1, wherein, In the case where there are overlapping model groups among the multiple model groups, the underlying model group whose position remains unchanged and the target model group whose position needs to be adjusted are determined from the overlapping model groups, including: In the case where there are overlapping model groups among the multiple model groups, the ground clearance of the overlapping model groups is determined; When the overlapping model groups have different ground clearances, the model group with the lowest ground clearance is used as the bottom model group whose position remains unchanged, and the remaining model groups are used as the target model groups whose positions need to be adjusted.
6. The method according to claim 5, further comprising: When the overlapping model groups have the same ground clearance, determine the number of models within each overlapping model group; The model group with the most models in the group is used as the bottom model group whose position remains unchanged, and the remaining model groups are used as the target model groups whose positions need to be adjusted.
7. The method according to claim 1, wherein, The step of rendering and displaying the multiple model groups on the current view based on the position information of the multiple model groups includes: For each model group in the multiple model groups, the annotation height information of the panel models in the same group is deduplicated so that each model group retains only one annotation height information. Based on the position information of the multiple model groups, the model legends and annotation height information of the multiple model groups are rendered and displayed on the current view.
8. A panel group display device, comprising: The grouping module is used to group all panel models to be displayed in the current view, resulting in multiple model groups; The intra-group offset module is used to arrange the panel models of the same group side by side on the corresponding baseline with a preset scaling ratio for each of the multiple model groups. The position determination module is used to obtain the position information of the multiple model groups based on the arrangement result; The inter-group stacking module is used to determine, in the case where there are overlapping model groups among the multiple model groups, the bottom model group whose position remains unchanged and the target model group whose position needs to be adjusted among the overlapping model groups. Determine the offset direction perpendicular to the corresponding wall; The target model group is stacked on top of the bottom model group in the offset direction to update the position information of the target model group; as well as The display module is used to render and display the multiple model groups on the current view based on the position information of the multiple model groups.
9. The apparatus according to claim 8, wherein, The grouping module is used for: Get all panel models to be displayed in the current view; Based on a preset grouping threshold and the spacing between two adjacent panel models of the same type, all panel models to be displayed are grouped to obtain multiple model groups.
10. The apparatus according to claim 9, wherein, The intra-group offset module is used for: Obtain the model legends of the multiple model groups; Adjust the size of the model illustrations of the multiple model groups according to a preset scaling ratio; Determine the number of models within each of the multiple model groups and the baseline; Based on the number of models within the group, the positioning model of each model group is selected; For each of the multiple model groups, the panel models of the same group are arranged along the baseline on both sides of the positioning model so that the panel models of the same group do not obstruct each other.
11. 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 to enable the at least one processor to perform the method of any one of claims 1-7.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.
13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.
Citation Information
Patent Citations
CN107818213A
CN114210058A