A method, device and computer-readable storage medium for determining component orientation
By determining the angle relationship between the insertion point and the rotation reference line in the BIM model, the problems of complex component direction adjustment and high learning cost in the prior art are solved, and the accurate and efficient placement of components and overall correctness of the model are achieved.
Patent Information
- Application Number
- CN202210767807.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The existing BIM modeling software is complicated and complicated when adjusting the direction of components, and has high learning costs and business knowledge requirements for model makers, making it difficult to quickly and efficiently place components in the correct direction.
By determining the insertion point of the target component in the BIM model and the straight line parallel or overlapping with its X-axis as the rotation alignment line, and combining the building object construction line as the rotation reference line, the component is automatically rotated to the target position according to the angle relationship, simplifying the direction of the component Adjustment process.
It realizes accurate and efficient placement of components, reduces the learning cost and operation complexity of model makers, and improves modeling efficiency and overall model accuracy.
Smart Images

Figure CN115062388B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, and in particular to a method, device, computer equipment and computer-readable storage medium for determining a component direction. Background Art
[0002] The existing BIM (Building Information Modeling) modeling process is generally divided into several steps, including project setup, importing drawings, placing components, deepening design, and rendering output. A conventional-scale site layout and civil engineering BIM model usually includes tens of thousands of components. Therefore, improving the efficiency of placing a single component is the key to achieving efficient production of a construction BIM model. In the prior art, the process of placing a single component can generally be divided into the following steps: selecting the component, capturing the placement point, determining the placement, adjusting the component direction, and adjusting the component parameters. In order to ensure the overall correctness of the model, the model maker needs to adjust the component direction during the modeling process to ensure that the direction of each component meets the business requirements, but the existing component direction adjustment method has many shortcomings.
[0003] On the one hand, existing related modeling software such as Revit requires cumbersome and complicated processes when adjusting the direction of components. After placing the components, the user needs to select the placed components again, and then select a direction as the starting direction of the component rotation, and then select a direction as the target direction of the component rotation. The component rotation can be achieved after 3-4 confirmation operations; on the other hand, when the component to be rotated is attached to other components and has a strong directional requirement with the attached components, the maker needs to master certain business knowledge and the usage threshold is high. Under the condition that the BIM model maker does not have rich construction background knowledge, using existing technology to model requires huge learning costs and production efforts, and it is impossible to quickly and efficiently produce construction BIM models.
[0004] Therefore, how to accurately and efficiently place components in the correct direction in the BIM building model has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The object of the present invention is to provide a method, device, computer equipment and computer-readable storage medium for determining component orientation, which can accurately and efficiently place the component in the correct orientation in a BIM building model.
[0006] One aspect of the present invention provides a method for determining the direction of a component, the method comprising: determining an insertion point of a target component in a BIM building model; determining a straight line passing through the insertion point and parallel to or overlapping with an X-axis of the target component, and using the straight line and the overlapping line segment of the target component as a rotation alignment line; identifying a building object construction line passing through the insertion point in the BIM building model as a rotation reference line; and rotating the target component to a target orientation according to an angular relationship between the rotation alignment line and the rotation reference line.
[0007] Optionally, rotating the target component to a target orientation according to the angular relationship between the rotation alignment line and the rotation reference line comprises: determining a minimum angle from the rotation alignment line to the rotation reference line or a tangent to the rotation reference line toward the target direction; wherein the target direction is a clockwise direction or a counterclockwise direction; rotating the target component toward the target direction by the minimum angle so that the rotation alignment line after being rotated by the minimum angle overlaps with the rotation reference line or a tangent to the rotation reference line; determining a building object to which the rotation reference line belongs, and rotating the target component after being rotated by the minimum angle to the target orientation according to the building object to which the rotation reference line belongs.
[0008] Optionally, rotating the target component after being rotated by the minimum angle to the target orientation according to the building object to which the rotation reference line belongs includes: when the building object to which the rotation reference line belongs is a two-dimensional graphic other than all inserted components in the BIM building model, determining that the target component after being rotated by the minimum angle is in the target orientation; when the building object to which the rotation reference line belongs is an inserted component other than the target component in the BIM building model: determining a first component type of the component to which the rotation reference line belongs; when the first component type does not belong to a first preset component type, determining that the target component after being rotated by the minimum angle is in the target orientation; when the first component type belongs to the first preset component type, determining a second component type of the target component, determining a positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs, and rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type and the positional relationship.
[0009] Optionally, determining the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs includes: determining the Y-axis position of the target component after being rotated by the minimum angle; moving the insertion point along the positive direction of the Y-axis at the Y-axis position by a preset distance to generate a checkpoint; and determining the positional relationship between the checkpoint and the component to which the rotation reference line belongs as the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
[0010] Optionally, rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type and the positional relationship includes: judging whether the positional relationship satisfies a preset positional relationship condition between the component to which the rotation reference line belongs and other components; when the positional relationship satisfies the preset positional relationship condition, rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type; when the positional relationship does not satisfy the preset positional relationship condition, further rotating the target component after being rotated by the minimum angle by 180 degrees to obtain the target component after being rotated by a comprehensive angle; rotating the target component after being rotated by the comprehensive angle to the target orientation according to the second component type; wherein the comprehensive angle is the sum of the minimum angle and 180 degrees.
[0011] Optionally, rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type includes: when the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the first directional relationship satisfies the preset directional relationship condition between the target component and other components, determining that the target component after being rotated by the minimum angle is in the target orientation; when the second component type belongs to the second preset component type and the first directional relationship does not satisfy the preset directional relationship condition, directly rotating the target component after being rotated by the minimum angle to the target orientation, so that the directional relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs meets the preset directional relationship condition; wherein, the first directional relationship is the directional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
[0012] Optionally, rotating the target component after rotating the comprehensive angle to the target orientation according to the second component type includes: when the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the second direction relationship satisfies the preset direction relationship condition between the target component and other components, determining that the target component after rotating the comprehensive angle is in the target orientation; when the second component type belongs to the second preset component type and the second direction relationship does not satisfy the preset direction relationship condition, directly rotating the target component after rotating the comprehensive angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs meets the preset direction relationship condition; wherein, the second direction relationship is the direction relationship between the target component after rotating the comprehensive angle and the component to which the rotation reference line belongs.
[0013] Optionally, the identifying, within the BIM building model, a building object construction line passing through the insertion point as a rotation reference line comprises: when the building object construction line passing through the insertion point is unique, directly using the building object construction line as the rotation reference line; when the building object construction line passing through the insertion point is not unique: filtering out the building object construction line with the smallest graphic depth from all the building object construction lines passing through the insertion point as the rotation reference line; when a rotation reference line switching instruction is detected, filtering out the building object construction line with the next graphic depth from all the building object construction lines passing through the insertion point in order of graphic depth from the smallest to the largest, and switching the current rotation reference line to the filtered building object construction line with the next graphic depth.
[0014] Another aspect of the present invention provides a device for determining the direction of a component, the device comprising: a first determination module, used to determine the insertion point of a target component in a BIM building model; a second determination module, used to determine a straight line passing through the insertion point and parallel to or overlapping with the X-axis of the target component, and using the overlapping line segment of the straight line and the target component as a rotation alignment line; an identification module, used to identify a building object construction line passing through the insertion point in the BIM building model as a rotation reference line; and a rotation module, used to rotate the target component to a target orientation according to the angular relationship between the rotation alignment line and the rotation reference line.
[0015] Another aspect of the present invention provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for determining the direction of a component as described in any of the above embodiments when executing the computer program.
[0016] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining the direction of a component described in any of the above embodiments is implemented.
[0017] The method for determining the direction of a component provided by the present invention automatically rotates the target component to the correct orientation according to the angular relationship between the rotation reference line and the rotation alignment line, thereby avoiding the problem in the prior art that the manual rotation of components is cumbersome and complicated and is not conducive to the efficient creation of the model. At the same time, it overcomes the defects in the prior art that the manual rotation of components requires certain construction background knowledge of the BIM model maker, and the user needs to spend huge learning costs and production efforts, otherwise the correctness of the component direction cannot be guaranteed, thereby affecting the correctness of the entire model, thereby achieving the effect of accurately and efficiently embodying the component in the BIM building model with the correct orientation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0019] Figure 1 A flow chart of a method for determining a component direction provided in Example 1;
[0020] Figure 2 A schematic diagram of determining a rotation reference line provided in Example 1;
[0021] Figure 3 A schematic diagram of rotating a target component toward a target direction by a minimum angle provided in the first embodiment;
[0022] Figure 4 Another schematic diagram of rotating the target component toward the target direction by a minimum angle provided in the first embodiment;
[0023] Figure 5 Another schematic diagram of rotating the target component toward the target direction by a minimum angle provided in the first embodiment;
[0024] Figure 6 A schematic diagram of a user flexibly rotating a target component provided in Embodiment 1;
[0025] Figure 7 An overall flow chart of the solution for determining the direction of a component provided in Example 1;
[0026] Figure 8 A block diagram of a device for determining a component direction provided in Embodiment 2;
[0027] Fig. 9 A block diagram of a computer device suitable for implementing the method for determining the direction of a component provided in Example 3. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0030] Embodiment 1
[0031] Figure 1 Flow chart of a method for determining component direction provided in Example 1, which is applied to modeling software, such as Figure 1 As shown, the method includes steps S1 to S4, wherein:
[0032] Step S1, determining the insertion point of the target component in the BIM building model.
[0033] BIM building model is also called BIM model. BIM building model may include target engineering drawings for reference of modeling. The target engineering drawings may be CAD drawings or drawings of other forms. The specific type of target engineering drawings is not limited in this embodiment. Before the target engineering drawings are imported into the modeling software to create the BIM building model, some two-dimensional graphics already exist in the target engineering drawings, such as the proposed two-dimensional plane graphics and the two-dimensional plane graphics of the road. Among them, the target component may be a component that has been inserted into the BIM building model, or a component that has not been inserted into the BIM building model. The goal of this embodiment is to insert the components of the modeling software into the BIM building model in the correct direction to complete the engineering modeling, such as inserting the proposed component into the proposed two-dimensional plane graphics, inserting the road component into the two-dimensional plane graphics of the road, and inserting the safety passage component into the proposed component and ensuring that the safety passage component is located outside the proposed component.
[0034] The insertion point is located on the target component. Usually, the insertion point is located at the geometric center of the target component by default. The insertion point can also be moved to a vertex of the target component, such as the lower left vertex or the upper right vertex.
[0035] Step S2, determining a straight line that passes through the insertion point and is parallel to or overlaps with the X-axis of the target component, and using the overlapping line segment of the straight line and the target component as a rotation alignment line.
[0036] Since the insertion point is located on the target component, and the straight line through the insertion point is determined to be parallel to or overlapped with the X-axis, the straight line must have an overlapping portion with the target component, and the overlapping portion is a line segment, and the overlapping line segment must also be parallel to or overlapped with the X-axis. Among them, each component has its own X-axis and Y-axis, and the coordinate origin is the geometric center point of the component. When the insertion point is located on the X-axis of the target component, the straight line through the insertion point determined in step S3 overlaps with the X-axis of the target component, and the above-mentioned overlapping line segment must also overlap with the X-axis of the target component; when the insertion point is not located on the X-axis of the target component, the straight line through the insertion point determined in step S3 is parallel to the X-axis of the target component, and the above-mentioned overlapping line segment must also be parallel to the X-axis of the target component.
[0037] Step S3, identifying a building object construction line passing through the insertion point in the BIM building model as a rotation reference line.
[0038] The BIM building model includes multiple building objects other than the target components, and the line segments that constitute the building objects are called building object construction lines. That is, the building object construction lines are the line segments that constitute the building objects other than the target components in the BIM building model. When the BIM building model includes the target engineering drawings, the building objects may be two-dimensional graphics in the target engineering drawings; when the BIM building model includes inserted components, the building objects may be inserted components other than the target components. Among them, the building object construction lines that pass through the insertion point may be construction lines on some two-dimensional graphics that already exist in the BIM building model, or they may be construction lines on inserted components other than the target components that have been inserted into the BIM building model, or they may include both. Among them, the building object construction lines are line segments.
[0039] As an optional embodiment, step S3 includes:
[0040] When there is only one construction line of the building object passing through the insertion point, directly use the construction line of the building object as the rotation reference line;
[0041] When the building object construction line passing through the insertion point is not unique:
[0042] Filter out the building object construction line with the smallest graphic depth from all building object construction lines passing through the insertion point as the rotation reference line;
[0043] When a rotation reference line switching instruction is detected, the building object construction line of the next graphic depth is filtered out from all the building object construction lines passing through the insertion point in order of graphic depth from small to large, and the current rotation reference line is switched to the filtered building object construction line of the next graphic depth.
[0044] When the insertion point is the overlapping point of multiple building object construction lines, the command can be used to traverse and pick up the building object construction lines in the order of graphic depth from small to large, so as to determine the building object construction line that serves as the rotation reference line. For example, when picking for the first time, the modeling software automatically picks up the building object construction line with the smallest layer depth, and uses the building object construction line as the rotation reference line by default to rotate the target component. If the user needs to switch the rotation reference line, the rotation reference line switching command can be triggered, and the modeling software selects the next layer depth, that is, the building object construction line with the second smallest layer depth, as the new rotation reference line based on the command. Among them, the rotation reference line switching command can be a preset keyboard key, such as the Tab key. Figure 2 As shown, when there are three construction lines of the building object at the insertion point, the rotation baseline can be switched using the Tab key.
[0045] Step S4: rotating the target component to a target orientation according to the angular relationship between the rotation alignment line and the rotation reference line.
[0046] When the rotation reference line is a straight line, the minimum angle between the rotation alignment line and the rotation reference line can be determined in the target direction, and the minimum angle is used as the angle relationship between the rotation alignment line and the rotation reference line; when the rotation reference line is an arc, the minimum angle between the rotation alignment line and the tangent of the rotation reference line can be determined in the target direction, and the minimum angle is used as the angle relationship between the rotation alignment line and the rotation reference line. The target direction is clockwise or counterclockwise.
[0047] As an optional embodiment, step S4 includes steps S41 to S43, wherein:
[0048] Step S41, determining the minimum angle from the rotation alignment line to the rotation reference line or the tangent of the rotation reference line in a target direction; wherein the target direction is a clockwise direction or a counterclockwise direction;
[0049] Step S42, rotating the target component toward the target direction by the minimum angle, so that the rotation alignment line after the rotation by the minimum angle overlaps with the rotation reference line or a tangent line of the rotation reference line;
[0050] Step S43, determining the building object to which the rotation reference line belongs, and rotating the target component after being rotated by the minimum angle to the target orientation according to the building object to which the rotation reference line belongs.
[0051] When the line shape of the rotation reference line is a straight line, step S41 may be: determining the minimum angle from the rotation alignment line to the rotation reference line toward the target direction; step S42 may be: rotating the target component toward the target direction by the minimum angle so that the rotation alignment line after being rotated by the minimum angle overlaps with the rotation reference line. When the line shape of the rotation reference line is an arc, step S41 may be: determining the minimum angle from the rotation alignment line to the tangent of the rotation reference line toward the target direction; step S42 may be: rotating the target component toward the target direction by the minimum angle so that the rotation alignment line after being rotated by the minimum angle overlaps with the tangent of the rotation reference line. Wherein, overlap means that there are overlapping line segments between the two line segments of the rotation alignment line and the rotation reference line, or there are overlapping line segments between the rotation alignment line and the tangent of the rotation reference line.
[0052] Take the target direction as clockwise as an example: when the line shape of the rotation reference line is a straight line and the insertion point is located at a non-end point of the rotation reference line, the schematic diagram of determining the minimum angle and rotating the target component to the target direction by the minimum angle is as follows: Figure 3 When the rotation reference line is a straight line and the insertion point is located at the end point of the rotation reference line, the schematic diagram of determining the minimum angle and rotating the target component to the target direction by the minimum angle is shown in FIG. Figure 4 As shown, the target component after the minimum rotation angle will not fall outside the rotation reference line; when the line shape of the rotation reference line is an arc, the schematic diagram of determining the minimum angle and rotating the target component to the target direction by the minimum angle is as shown Figure 5 shown.
[0053] The building object to which the rotation baseline belongs may be a two-dimensional graphic other than all inserted components in the BIM building model, that is, the two-dimensional graphic originally existed in the target engineering drawing before the target engineering drawing is imported into the modeling software; or, the building object to which the rotation baseline belongs may be an inserted component other than the target component in the BIM building model.
[0054] As an optional embodiment, step S43 includes step S431 and step S432, wherein:
[0055] Step S431, when the building object to which the rotation reference line belongs is a two-dimensional figure in the BIM building model except for all inserted components, determining that the target component after being rotated by the minimum angle is in the target orientation;
[0056] Step S432, when the building object to which the rotation reference line belongs is an inserted component other than the target component in the BIM building model:
[0057] Determine a first component type of the component to which the rotation reference line belongs;
[0058] When the first component type does not belong to the first preset component type, determining that the target component after being rotated by the minimum angle is in the target orientation;
[0059] When the first component type belongs to the first preset component type, the second component type of the target component is determined, the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs is determined, and the target component after being rotated by the minimum angle is rotated to the target orientation according to the second component type and the positional relationship.
[0060] When inserting components, there are positional relationship requirements for special types of inserted components and directional relationship requirements for special types of target components. Therefore, this embodiment needs to determine the rotation logic according to the first component type and the second component type.
[0061] As an optional embodiment, the determining of the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs in step S432 includes:
[0062] Determine the Y-axis position of the target component after rotating the target component by the minimum angle;
[0063] Moving the insertion point along the positive direction of the Y axis at the position of the Y axis by a preset distance to generate a check point;
[0064] The positional relationship between the inspection point and the component to which the rotation reference line belongs is determined as the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
[0065] When the check point is located inside the component to which the rotation reference line belongs, the positional relationship between the target component after rotation by the minimum angle and the component to which the rotation reference line belongs is: the target component after rotation by the minimum angle is located inside the component to which the rotation reference line belongs; when the check point is located outside the component to which the rotation reference line belongs, the positional relationship between the target component after rotation by the minimum angle and the component to which the rotation reference line belongs is: the target component after rotation by the minimum angle is located outside the component to which the rotation reference line belongs.
[0066] As an optional embodiment, the step S432 of rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type and the positional relationship includes steps S4321 to S4323, wherein:
[0067] Step S4321, determining whether the positional relationship satisfies a preset positional relationship condition between the component to which the rotation reference line belongs and other components;
[0068] Step S4322, when the positional relationship satisfies the preset positional relationship condition, rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type;
[0069] Step S4323, when the position relationship does not satisfy the preset position relationship condition, the target component rotated by the minimum angle is further rotated 180 degrees to obtain the target component rotated by the comprehensive angle; according to the second component type, the target component rotated by the comprehensive angle is rotated to the target orientation; wherein the comprehensive angle is the sum of the minimum angle and 180 degrees.
[0070] When the position relationship meets the preset position relationship condition, it is necessary to determine whether the rotation needs to continue based on the second component type; when the position relationship does not meet the preset position relationship condition, it is necessary to first make the position relationship meet the requirements, and then determine whether the rotation needs to continue based on the second component type.
[0071] Among them, preset position relationship conditions between components of the first preset component type and other components are preset; wherein the first preset component type includes proposed construction, roads and external scaffolding. The preset position relationship conditions between the proposed construction and other components are: other components are outside the proposed construction; the preset position relationship conditions between the road and other components are: other components are inside the road; the preset position relationship conditions between the external scaffolding and other components are: other components face the outside of the external scaffolding.
[0072] When the component to which the rotation reference line belongs is a proposed construction, if the positional relationship is such that the target component after the minimum rotation angle is located inside the proposed construction, the target component after the minimum rotation angle is further rotated 180 degrees to ensure that the target component after this rotation is outside the proposed construction.
[0073] When the component to which the rotation reference line belongs is a road, if the positional relationship is such that the target component after the minimum rotation angle is located outside the road, the target component after the minimum rotation angle is further rotated 180 degrees to ensure that the target component after this rotation is located inside the road.
[0074] When the component to which the rotation reference line belongs is an external scaffolding, if the rotation reference line is the baseline of the external scaffolding and the positional relationship is that the target component after the minimum rotation angle is located outside the external scaffolding, then the target component after the minimum rotation angle is further rotated 180 degrees; if the rotation reference line is not the baseline of the external scaffolding and the positional relationship is that the target component after the minimum rotation angle is located inside the external scaffolding, then the target component after the minimum rotation angle is further rotated 180 degrees.
[0075] As an optional embodiment, step S4322 includes:
[0076] When the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the first direction relationship satisfies the preset direction relationship condition between the target component and other components, determining that the target component after being rotated by the minimum angle is in the target orientation;
[0077] When the second component type belongs to the second preset component type and the first direction relationship does not satisfy the preset direction relationship condition, directly rotating the target component after rotating the minimum angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs satisfies the preset direction relationship condition;
[0078] The first direction relationship is the direction relationship between the target component after rotating the minimum angle and the component to which the rotation reference line belongs, and the target orientation is such that the direction relationship between the target component at the current orientation and the component to which the rotation reference line belongs meets a preset direction relationship condition.
[0079] As an optional embodiment, the step S4323 of rotating the target component after rotating the comprehensive angle to the target orientation according to the second component type includes:
[0080] When the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the second direction relationship satisfies the preset direction relationship condition between the target component and other components, determining that the target component after being rotated by the minimum angle is in the target orientation;
[0081] When the second component type belongs to the second preset component type and the second direction relationship does not satisfy the preset direction relationship condition, directly rotating the target component after rotating the comprehensive angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs satisfies the preset direction relationship condition;
[0082] The second direction relationship is the direction relationship between the target component after rotating the comprehensive angle and the component to which the rotation reference line belongs, and the target orientation is such that the direction relationship between the target component at the current orientation and the component to which the rotation reference line belongs meets a preset direction relationship condition.
[0083] Specifically, preset directional relationship conditions between components of a second preset component type and other components are preset; wherein, the second preset component type includes a safety passage, and the preset directional relationship conditions between the safety passage and other components are: when other components are to be built, the passage direction of the safety passage is perpendicular to the proposed construction line passing through the insertion point in the proposed construction, that is, when the component to which the rotation reference line belongs is to be built, the passage direction of the safety passage is perpendicular to the rotation reference line; when other components are external scaffoldings, the passage direction of the safety passage is perpendicular to the external scaffolding construction line passing through the insertion point in the external scaffolding, that is, when the component to which the rotation reference line belongs is the external scaffolding, the passage direction of the safety passage is perpendicular to the rotation reference line; when other components are roads, the passage direction of the safety passage is parallel to the road construction line passing through the insertion point in the road, that is, when the component to which the rotation reference line belongs is a road, the passage direction of the safety passage is parallel to the rotation reference line. Table 1 shows the positional relationship conditions and directional relationship conditions of different component categories as shown in Table 1, where the model lines in Table 1 are the construction lines of the inserted components other than the target components, and the CAD lines are the construction lines of the two-dimensional graphics other than the inserted components.
[0084] Table 1 Position relationship conditions and direction relationship conditions of different component categories
[0085]
[0086]
[0087] As an optional embodiment, in order to meet the needs of some users who want to more flexibly adjust the direction of components based on the results of automatic rotation during the component insertion process, this embodiment provides a solution that allows the user to rotate the component before determining to insert the component, that is, inserting the target component rotated to the target orientation into the BIM building model includes: when a target component rotation instruction is detected, continuing to convert the target component rotated to the target orientation by a preset angle toward the target direction; determining whether the target component rotation instruction is detected again; if so, continuing to rotate the target component by a preset angle toward the target direction; if otherwise, taking the orientation of the target component after this rotation as the new target orientation, and inserting the target component rotated to the new target orientation into the BIM building model.
[0088] like Figure 6 As shown in the figure, each click of the space bar can rotate the target component 90 degrees clockwise and update the preview effect in real time.
[0089] In order to better understand the present invention, take the target component not yet inserted into the BIM building model as an example. Figure 7 The present invention is described in the flowchart shown. Figure 7As shown, first obtain the target component, capture the insertion point of the target component after the target component is moved to the target engineering drawing, determine whether the insertion point is on the building object construction line, if not, directly insert the target component, if yes, highlight a building object construction line that passes the insertion point. Determine whether the user has turned on the automatic rotation function and whether the highlighted building object construction line is used as the rotation reference line. If yes, rotate the target component to the target orientation and determine whether an instruction to switch the highlight line through the Tab key is detected. If no, directly determine whether an instruction to switch the highlight line through the Tab key is detected. When an instruction to switch the highlight line is detected, return to the step of highlighting a building object construction line that passes the insertion point. When no instruction to switch the highlight line is detected, determine whether an instruction to continue changing the component direction through the space is detected. If yes, continue to rotate the target component by a preset angle and determine whether to insert the target component. If no, directly determine whether to insert the target component. If the target component is not inserted, return to the step of capturing the insertion point of the target component. If the target component is inserted, end this process.
[0090] The present invention realizes the purpose of automatically rotating the component during the process of placing the component, and has the following advantages:
[0091] 1. Automatically adjust components to the correct direction that meets business specifications, improve the efficiency of placing individual components, and thus improve the modeling efficiency of users;
[0092] 2. When you need to arrange components along the direction of a construction line that already exists in the target engineering drawing, the components will automatically rotate to the same direction as or perpendicular to the construction line, and the preview effect will be updated in real time. Users do not need to manually rotate the components according to the direction of the construction line again.
[0093] 3. When the target component has a strong directional relationship with the inserted component in terms of business requirements, during the placement process, such components will automatically rotate to a direction that meets the business requirements. Users do not need to manually infer the correct direction of the current component based on the directions of other components after placement and then rotate the component. This reduces the modeling software's requirements for the user's business knowledge level, lowers the threshold for BIM modeling, and on the other hand improves the user's modeling efficiency.
[0094] Embodiment 2
[0095] Embodiment 2 of the present invention further provides a device for determining the direction of a component, which corresponds to the method provided in the above embodiment 1. The corresponding technical features and technical effects are not described in detail in this embodiment, and the relevant parts can refer to the above embodiment 1. Specifically, Figure 8 This is a block diagram of a device for determining the direction of a component provided in Embodiment 2. Figure 8 As shown, the device 800 for determining the direction of a component may include:
[0096] The first determination module 801 is used to determine the insertion point of the target component in the BIM building model;
[0097] A second determination module 802 is used to determine a straight line that passes through the insertion point and is parallel to or overlaps with the X-axis of the target component, and use the overlapping line segment of the straight line and the target component as a rotation alignment line;
[0098] An identification module 803 is used to identify a construction line of a building object passing through the insertion point in the BIM building model as a rotation reference line;
[0099] The rotation module 804 is used to rotate the target component to a target orientation according to the angular relationship between the rotation alignment line and the rotation reference line.
[0100] Optionally, the rotation module is specifically used to: determine the minimum angle from the rotation alignment line to the rotation reference line or the tangent of the rotation reference line toward the target direction; wherein the target direction is a clockwise direction or a counterclockwise direction; rotate the target component toward the target direction by the minimum angle so that the rotation alignment line after being rotated by the minimum angle overlaps with the rotation reference line or the tangent of the rotation reference line; determine the building object to which the rotation reference line belongs, and rotate the target component after being rotated by the minimum angle to the target orientation according to the building object to which the rotation reference line belongs.
[0101] Optionally, when executing the rotating the target component after being rotated by the minimum angle to the target orientation according to the building object to which the rotation reference line belongs, the rotation module is specifically used to: when the building object to which the rotation reference line belongs is a two-dimensional graphic other than all inserted components in the BIM building model, determine that the target component after being rotated by the minimum angle is in the target orientation; when the building object to which the rotation reference line belongs is an inserted component other than the target component in the BIM building model: determine a first component type of the component to which the rotation reference line belongs; when the first component type does not belong to a first preset component type, determine that the target component after being rotated by the minimum angle is in the target orientation; when the first component type belongs to the first preset component type, determine a second component type of the target component, determine the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs, and rotate the target component after being rotated by the minimum angle to the target orientation according to the second component type and the positional relationship.
[0102] Optionally, when the rotation module executes the determination of the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs, it is specifically used to: determine the Y-axis position of the target component after being rotated by the minimum angle; move the insertion point along the positive direction of the Y-axis at the Y-axis position by a preset distance to generate a checkpoint; determine the positional relationship between the checkpoint and the component to which the rotation reference line belongs, as the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
[0103] Optionally, when the rotation module executes the rotating the target component after rotating the minimum angle to the target orientation according to the second component type and the positional relationship, it is specifically used to: determine whether the positional relationship satisfies a preset positional relationship condition between the component to which the rotation reference line belongs and other components; when the positional relationship satisfies the preset positional relationship condition, rotate the target component after rotating the minimum angle to the target orientation according to the second component type; when the positional relationship does not satisfy the preset positional relationship condition, continue to rotate the target component after rotating the minimum angle by 180 degrees to obtain the target component after rotating the comprehensive angle; rotate the target component after rotating the comprehensive angle to the target orientation according to the second component type; wherein the comprehensive angle is the sum of the minimum angle and 180 degrees.
[0104] Optionally, when executing the rotation module to rotate the target component after being rotated by the minimum angle to the target orientation according to the second component type, it is specifically used to: when the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the first direction relationship satisfies the preset direction relationship condition between the target component and other components, determine that the target component after being rotated by the minimum angle is in the target orientation; when the second component type belongs to the second preset component type and the first direction relationship does not satisfy the preset direction relationship condition, directly rotate the target component after being rotated by the minimum angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs meets the preset direction relationship condition; wherein, the first direction relationship is the direction relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
[0105] Optionally, when executing the rotation of the target component after rotating the comprehensive angle to the target orientation according to the second component type, the rotation module is specifically used to: when the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the second direction relationship satisfies the preset direction relationship condition between the target component and other components, determine that the target component after rotating the comprehensive angle is in the target orientation; when the second component type belongs to the second preset component type and the second direction relationship does not satisfy the preset direction relationship condition, directly rotate the target component after rotating the comprehensive angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs meets the preset direction relationship condition; wherein, the second direction relationship is the direction relationship between the target component after rotating the comprehensive angle and the component to which the rotation reference line belongs.
[0106] Optionally, when the rotation module executes the step of identifying the building object construction line passing through the insertion point in the BIM building model as the rotation reference line, it is specifically used to: when the building object construction line passing through the insertion point is unique, directly use the building object construction line as the rotation reference line; when the building object construction line passing through the insertion point is not unique: filter out the building object construction line with the smallest graphic depth from all the building object construction lines passing through the insertion point as the rotation reference line; when a rotation reference line switching instruction is detected, filter out the building object construction line with the next graphic depth from all the building object construction lines passing through the insertion point in order of graphic depth from the smallest to the largest, and switch the current rotation reference line to the filtered building object construction line with the next graphic depth.
[0107] Embodiment 3
[0108] Fig. 9 A block diagram of a computer device suitable for implementing a method for determining a component direction provided in Embodiment 3. In this embodiment, the computer device 900 may be a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that executes a program. Fig. 9 As shown, the computer device 900 of this embodiment includes at least but is not limited to: a memory 901, a processor 902, and a network interface 903 that can be interconnected through a system bus. It should be noted that Fig. 9 Only computer device 900 having components 901 - 903 is shown, but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0109] In this embodiment, the memory 903 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 901 can be an internal storage unit of the computer device 900, such as a hard disk or memory of the computer device 900. In other embodiments, the memory 901 can also be an external storage device of the computer device 900, such as a plug-in hard disk equipped on the computer device 900, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 901 can also include both the internal storage unit of the computer device 900 and its external storage device. In this embodiment, the memory 901 is generally used to store the operating system and various application software installed on the computer device 900, such as the program code of the method for determining the direction of the component, etc.
[0110] The processor 902 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 902 is generally used to control the overall operation of the computer device 900. For example, the processor 902 performs control and processing related to data interaction or communication with the computer device 900. In this embodiment, the processor 902 is used to run the program code of the steps of the method for determining the direction of the component stored in the memory 901.
[0111] In this embodiment, the method for determining the component direction stored in the memory 901 may also be divided into one or more program modules and executed by one or more processors (processor 902 in this embodiment) to complete the present invention.
[0112] The network interface 903 may include a wireless network interface or a wired network interface, and the network interface 903 is generally used to establish a communication link between the computer device 900 and other computer devices. For example, the network interface 903 is used to connect the computer device 900 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 900 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0113] Embodiment 4
[0114] This embodiment also provides a computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for determining the direction of a component are implemented.
[0115] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0116] It should be noted that the serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0118] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for determining the orientation of a component, It is characterized in that The method comprises: Determine the insertion point of the target component in the BIM building model; Determine a straight line that passes through the insertion point and is parallel to or overlaps with the X-axis of the target component, and use the overlapping line segment of the straight line and the target component as a rotation alignment line; Identifying, in the BIM building model, a building object construction line passing through the insertion point as a rotation reference line; The target component is rotated to a target orientation according to an angular relationship between the rotation alignment line and the rotation reference line.
2. The method according to claim 1, It is characterized in that The step of rotating the target component to a target orientation according to the angular relationship between the rotation alignment line and the rotation reference line comprises: Determine a minimum angle from the rotation alignment line to the rotation reference line or a tangent to the rotation reference line in a target direction; wherein the target direction is a clockwise direction or a counterclockwise direction; Rotating the target component toward the target direction by the minimum angle so that the rotation alignment line after the minimum angle of rotation overlaps with the rotation reference line or a tangent line of the rotation reference line; The building object to which the rotation reference line belongs is determined, and the target component rotated by the minimum angle is rotated to the target orientation according to the building object to which the rotation reference line belongs.
3. The method according to claim 2, It is characterized in that The step of rotating the target component after being rotated by the minimum angle to the target orientation according to the building object to which the rotation reference line belongs includes: When the building object to which the rotation reference line belongs is a two-dimensional figure in the BIM building model except for all inserted components, determining that the target component after being rotated by the minimum angle is in the target orientation; When the building object to which the rotation reference line belongs is an inserted component other than the target component in the BIM building model: Determine a first component type of the component to which the rotation reference line belongs; When the first component type does not belong to a first preset component type, determining that the target component after being rotated by the minimum angle is in the target orientation; the first preset component type includes planned construction, road, and external scaffolding; When the first component type belongs to the first preset component type, the second component type of the target component is determined, the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs is determined, and the target component after being rotated by the minimum angle is rotated to the target orientation according to the second component type and the positional relationship.
4. The method according to claim 3, It is characterized in that The determining of the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs includes: Determine the Y-axis position of the target component after rotating the target component by the minimum angle; Moving the insertion point along the positive direction of the Y axis at the position of the Y axis by a preset distance to generate a check point; The positional relationship between the inspection point and the component to which the rotation reference line belongs is determined as the positional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
5. The method according to claim 3, It is characterized in that The step of rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type and the positional relationship includes: Determining whether the positional relationship satisfies a preset positional relationship condition between the component to which the rotation reference line belongs and other components; When the positional relationship satisfies the preset positional relationship condition, rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type; When the positional relationship does not satisfy the preset positional relationship condition, the target component rotated by the minimum angle is further rotated 180 degrees to obtain the target component rotated by the comprehensive angle; and the target component rotated by the comprehensive angle is rotated to the target orientation according to the second component type; wherein the comprehensive angle is the sum of the minimum angle and 180 degrees.
6. The method according to claim 5, It is characterized in that The step of rotating the target component after being rotated by the minimum angle to the target orientation according to the second component type includes: When the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the first direction relationship satisfies the preset direction relationship condition between the target component and other components, determining that the target component after being rotated by the minimum angle is in the target orientation; the second preset component type includes a safety passage; When the second component type belongs to the second preset component type and the first direction relationship does not satisfy the preset direction relationship condition, directly rotating the target component after rotating the minimum angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs satisfies the preset direction relationship condition; The first directional relationship is the directional relationship between the target component after being rotated by the minimum angle and the component to which the rotation reference line belongs.
7. The method according to claim 5, It is characterized in that The step of rotating the target component after rotating the comprehensive angle to the target orientation according to the second component type includes: When the second component type does not belong to the second preset component type, or when the second component type belongs to the second preset component type and the second direction relationship satisfies the preset direction relationship condition between the target component and other components, determining that the target component after being rotated by the comprehensive angle is in the target orientation; When the second component type belongs to the second preset component type and the second direction relationship does not satisfy the preset direction relationship condition, directly rotating the target component after rotating the comprehensive angle to the target orientation, so that the direction relationship between the target component rotated to the target orientation and the component to which the rotation reference line belongs satisfies the preset direction relationship condition; The second directional relationship is the directional relationship between the target component after being rotated by the comprehensive angle and the component to which the rotation reference line belongs.
8. The method according to claim 1, It is characterized in that The step of identifying a construction line of a building object passing through the insertion point in the BIM building model as a rotation reference line includes: When there is only one construction line of the building object passing through the insertion point, directly use the construction line of the building object as the rotation reference line; When the building object construction line passing through the insertion point is not unique: Filter out the building object construction line with the smallest graphic depth from all building object construction lines passing through the insertion point as the rotation reference line; When a rotation reference line switching instruction is detected, the building object construction line of the next graphic depth is filtered out from all the building object construction lines passing through the insertion point in order of graphic depth from small to large, and the current rotation reference line is switched to the filtered building object construction line of the next graphic depth.
9. A device for determining the orientation of a component, It is characterized in that The device comprises: A first determination module is used to determine an insertion point of a target component in a BIM building model; A second determination module is used to determine a straight line passing through the insertion point and parallel to or overlapping with the X-axis of the target component, and use the overlapping line segment of the straight line and the target component as a rotation alignment line; An identification module, used for identifying a construction line of a building object passing through the insertion point in the BIM building model as a rotation reference line; A rotation module is used to rotate the target component to a target orientation according to the angular relationship between the rotation alignment line and the rotation reference line.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
