Method, device and equipment for solving attitude of building component and storage medium

By adding temporary constraints to the geometric elements of building components and using a geometric constraint solver to calculate the final posture that meets the design intent, the problem of not being able to accurately meet the user's intent in the existing technology is solved, thereby improving the efficiency of the design process and the user experience.

CN121502889APending Publication Date: 2026-02-10GLODON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511829193.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing geometric constraint solvers cannot accurately meet users' design intentions in building components, resulting in low efficiency in the design process and a lack of effective intervention methods for users.

Method used

By acquiring the geometric elements of building components and their initial postures and constraint relationships, temporary constraints are added to the target geometric elements and related geometric elements according to preset rules, and the final posture that meets the design intent is calculated using a geometric constraint solver.

Benefits of technology

It enables accurate and rapid solving of the orientation of building components that meet the design intent under under-constraint conditions, improving the efficiency of the design process and the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502889A_ABST
    Figure CN121502889A_ABST
Patent Text Reader

Abstract

The invention discloses a method, device and equipment for solving the attitude of a building component and a storage medium, and the method comprises the steps: obtaining a plurality of geometric elements forming a target building component and the initial attitude of the plurality of geometric elements, and determining the constraint relation among the plurality of geometric elements, adding a temporary constraint to the target geometric element according to a first preset rule; adding temporary constraints to the associated geometric elements according to a second preset rule; inputting all the added temporary constraints, the initial postures of the plurality of geometric elements and the constraint relationship among the plurality of geometric elements into a geometric constraint solver for solving to calculate the final postures of the plurality of geometric elements so as to obtain the final posture of the target building component; according to the method, the problem that the solution obtained by the existing geometric constraint solver through general settings such as the minimum movement distance and the minimum movement geometric number cannot completely meet the design intention is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design technology, and in particular to a method, apparatus, device, and storage medium for solving the posture of building components. Background Technology

[0002] In the fields of Building Information Modeling (BIM) and Computer-Aided Design (CAD), parametric modeling relies heavily on its core supporting technology—geometric constraint solving. In practical design, to maintain design flexibility, the geometric element system of building components is often in an under-constrained state, which theoretically results in an infinite number of solutions when users perform editing operations such as dragging.

[0003] In existing technologies, mainstream geometric constraint solvers (such as Siemens DCM) typically provide general strategies such as "minimum movement distance" and "minimum number of geometric movements" to select a set from an infinite number of solutions. However, these mathematical minimization principles are not entirely equivalent to the user's "design intent" in a specific design context. For example, the user may expect a door leaf to rotate around a hinge, but the solver might obtain an incorrect solution that translates the door leaf to satisfy the "minimum movement" requirement. More importantly, upper-level CAD application software usually does not expose these complex solution options to the user for trial and error. This results in a lack of effective intervention methods when users encounter unexpected dragging results, forcing them to repeatedly adjust or manually add redundant constraints, leading to inefficient design processes and a poor user experience.

[0004] Therefore, how to solve for solutions that meet the design intent under the under-constrained state of various geometric elements in building components has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide a method, apparatus, device, and storage medium for solving the orientation of building components, which can accurately and quickly solve for solutions that meet the design intent under the under-constrained state of each geometric element in the building components.

[0006] According to one aspect of the present invention, a method for solving the orientation of a building component is provided, the method comprising: The system acquires multiple geometric elements that make up the target building component and the initial poses of the multiple geometric elements, and determines the constraint relationships between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. When a preset operation is detected on a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with the first preset rule. Based on the element type of the associated geometric elements that have a constraint relationship with the target geometric element, and the constraint relationship between the target geometric element and the associated geometric elements, temporary constraints are added to the associated geometric elements according to the second preset rule; All added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements are input into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

[0007] Optionally, when a preset operation is detected on a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with a first preset rule, including: The element type of the target geometric element is obtained from the attribute information of the target building component, or the element type of the target geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the operation object of the preset operation; wherein, the operation object includes: feature points on the target geometric element, and the entire target geometric element; The first constraint method that has a mapping relationship with the element type and the operation object is found in the preset mapping document, and the first constraint method is added to the target geometric element as a temporary constraint.

[0008] Optionally, finding a first constraint method that has a mapping relationship with the element type and the operation object from a preset mapping document, and adding the first constraint method as a temporary constraint to the target geometric element, includes: When the element type of the target geometric element is a line segment, if the operation object is one endpoint of the line segment, then a fixed position constraint is added to the other endpoint of the line segment; or, if the operation object is the entire line segment, then an initial position constraint and a translation-only constraint are added to the line segment. When the element type of the target geometric element is a whole circle, if the operation object is the whole circle or its center, then a fixed radius constraint is added to the whole circle; or, if the operation object is a point on the whole circle, then a fixed position constraint is added to the center of the whole circle. When the element type of the target geometric element is an arc, if the operation object is one endpoint of the arc, then a fixed position constraint is added to the other endpoint and the center of the arc; or, if the operation object is the entire arc, the center, or the midpoint of the arc, then an initial position constraint is added to the arc.

[0009] Optionally, the step of adding temporary constraints to the associated geometric elements according to a second preset rule based on the element type of the associated geometric elements that have a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric elements includes: The element type of the associated geometric element is obtained from the attribute information of the target building component, or the element type of the associated geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the constraint relationship between the target geometric element and the associated geometric element from the attribute information of the target building component; wherein the constraint relationship includes at least one of the following: point on line constraint, concurrent constraint, tangent constraint, angle constraint, parallel constraint, perpendicular constraint, and distance constraint; Find a second constraint method that has a mapping relationship with the element type and the constraint relationship from the preset mapping document, and add the second constraint method as a temporary constraint to the associated geometric element.

[0010] Optionally, when the element type of the target geometric element is a line segment, the step of finding a second constraint method that has a mapping relationship with the element type and the constraint relationship from a preset mapping document, and adding the second constraint method as a temporary constraint to the associated geometric element, includes: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then a fixed direction constraint is added to the associated geometric element, and a fixed position constraint is added to the other endpoint of the associated geometric element. If the element type of the associated geometric element is a line segment, and the target geometric element has only translation constraints, one endpoint of the associated geometric element has a point constraint or a point co-point constraint with the target geometric element, and the target geometric element has an angle constraint with the associated geometric element, then add a fixed direction constraint to the associated geometric element and add a fixed position constraint to the other endpoint of the associated geometric element. If the element type of the associated geometric element is a line segment, and the target geometric element has a rotation-only constraint, and the associated geometric element and the target geometric element have an angle constraint, then add a fixed length constraint and a rotation-only constraint to the associated geometric element. If the element type of the associated geometric element is a line segment, and one endpoint of the target geometric element has a point on the line constraint with the associated geometric element, then add a fixed length constraint and a fixed direction constraint to the associated geometric element. If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then a fixed radius constraint is added to the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the target geometric element has a tangent constraint with the associated geometric element, then a fixed radius constraint is added to the associated geometric element.

[0011] Optionally, when the element type of the target geometric element is a full circle or an arc, the step of finding a second constraint method that has a mapping relationship with the element type and the constraint relationship from a preset mapping document, and adding the second constraint method as a temporary constraint to the associated geometric element, further includes: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then add a position fixed constraint to the other endpoint of the associated geometric element and add a direction fixed constraint to the associated geometric element. If the element type of the associated geometric element is a line segment, and the associated geometric element has a tangent constraint with the target geometric element, then a fixed length constraint is added to the associated geometric element. If the element type of the associated geometric element is a line segment, and the center or endpoint of the target geometric element has a point constraint on the associated geometric element, then add a fixed direction constraint and a fixed length constraint to the associated geometric element. If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then a fixed radius constraint is added to the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the associated geometric element has a tangent constraint with the target geometric element, then a fixed radius constraint is added to the associated geometric element.

[0012] To achieve the above objectives, the present invention also provides an apparatus for solving the orientation of building components, the apparatus comprising: The acquisition module is used to acquire multiple geometric elements that make up the target building component and the initial pose of the multiple geometric elements, and to determine the constraint relationship between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. The detection module is used to add temporary constraints to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation when a preset operation is detected. The addition module is used to add temporary constraints to the associated geometric elements according to the element type of the associated geometric elements that have a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric elements, in accordance with a second preset rule. The calculation module is used to input all added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

[0013] Optionally, the detection module is specifically used for: The element type of the target geometric element is obtained from the attribute information of the target building component, or the element type of the target geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the operation object of the preset operation; wherein, the operation object includes: feature points on the target geometric element, and the entire target geometric element; The first constraint method that has a mapping relationship with the element type and the operation object is found in the preset mapping document, and the first constraint method is added to the target geometric element as a temporary constraint.

[0014] To achieve the above objectives, the present invention also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for solving the orientation of building components described above.

[0015] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for solving the orientation of building components described above.

[0016] The present invention provides a method, apparatus, device, and storage medium for solving the attitude of building components. This method acquires multiple geometric elements constituting a target building component and their initial attitudes, determines the constraint relationships between these geometric elements, adds temporary constraints to the target geometric elements according to a first preset rule, adds temporary constraints to the associated geometric elements according to a second preset rule, and inputs all added temporary constraints, the initial attitudes of the multiple geometric elements, and the constraint relationships between them into a geometric constraint solver for solving. This calculates the final attitude of the multiple geometric elements, thereby obtaining the final attitude of the target building component. This solves the problem that existing geometric constraint solvers, through common settings such as minimum moving distance and minimum number of moving geometric elements, cannot fully satisfy the design intent with the obtained solutions. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic flowchart of an optional method for solving the orientation of building components provided in Embodiment 1; Figures 2(a) and 2(b) are schematic diagrams of the geometry of the two parallel line segments and the corresponding constraint relationships provided in Example 1; Figures 3(a) and 3(b) are schematic diagrams of the geometric figures and corresponding constraint relationships of two line segments that are concurrent and perpendicular, provided in Example 1. Figures 4(a) and 4(b) are schematic diagrams of the geometric figures and corresponding constraint relationships of the circle center on the line segment provided in Embodiment 1; Figures 5(a) and 5(b) are schematic diagrams of the geometric figures of points on lines and the corresponding constraint relationships provided in Example 1; Figures 6(a) and 6(b) are geometric figures and corresponding constraint relationships of multiple line segments with continuous distance constraints provided in Example 1; Figures 7(a) and 7(b) are schematic diagrams of the geometric figures and corresponding constraint relationships of multiple perpendicular line segments provided in Embodiment 1; Figure 8 This is a schematic diagram of an optional component structure of the device for solving the posture of building components provided in Embodiment 2; Figure 9 This is a schematic diagram of an optional hardware structure for the computer device provided in Embodiment 3. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0019] Example 1 This invention provides a method for solving the attitude of building components, such as... Figure 1 As shown, the method specifically includes the following steps: Step S101: Obtain multiple geometric elements that make up the target building component and the initial posture of the multiple geometric elements, and determine the constraint relationship between the multiple geometric elements; wherein, the multiple geometric elements are in an under-constrained state.

[0020] In this embodiment, geometric elements are the smallest geometric units that make up the building components. For example, geometric elements include: arcs, full circles, line segments, ellipses, elliptical arcs, and spline curves. The user constructs multiple geometric elements in CAD modeling software and assembles them into the target building component according to corresponding initial constraint relationships. At this point, the target building component is in its initial orientation. The user can add initial constraint relationships to the geometric elements, but the overall target building component is in an under-constrained state. Furthermore, after creating the target building component, a constraint relationship graph is created based on the constraint relationships between the various geometric elements. This constraint relationship graph is an undirected graph, where nodes represent individual geometric elements and edges represent the constraint relationships between them. This abstracts the complex geometric components into a computer-processable undirected graph structure, laying the foundation for subsequent graph-based traversal and rule application.

[0021] Step S102: When a preset operation is detected on the target geometric element, a temporary constraint is added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with the first preset rule.

[0022] In this embodiment, the user performs click, double-click, selection, or drag operations on the target geometric element according to a pre-conceived intention. Then, based on the element type and the operation location, the user sets the initial position or adds temporary constraints to the target geometric element. The semantics of the user's interactive operations are translated into precise mathematical geometric constraints. For example, dragging the endpoint of a line segment means "rotation," and dragging the line segment itself means "translation." This fixes the main degrees of freedom of the manipulated element and sets the tone for the entire solution process.

[0023] Step S103: Based on the element type of the associated geometric element that has a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric element, add temporary constraints to the associated geometric element according to the second preset rule.

[0024] In this embodiment, when a user drags a target geometric element, the movement cannot be isolated; the impact of its motion on associated geometric elements with which it has inherent constraints must also be considered. The "minimum movement" principle in existing technologies often leads to unnatural movements of associated geometric elements that do not conform to design intent when dealing with such problems; for example, elements that should not rotate may rotate, or a fixed-length line segment may be stretched. By adding temporary constraints to associated geometric elements, the internal geometric constraints and design semantics of the entire component are maintained during posture adjustments, thereby achieving a "one-size-fits-all" intelligent linkage effect that aligns with user intent.

[0025] Step S104: Input all added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

[0026] In this embodiment, the initial attitude is the initial iteration value of the geometric constraint solver, which determines the starting point of the geometric solution. After all conditions are input into the geometric constraint solver, if the solution is successful, the geometric elements obtain new positions, new orientations, and new dimensions in space, forming new building components. If the solution fails, a list of failed constraints is obtained from the geometric constraint solver. This list contains all temporary constraints that caused the failure. These temporary constraints that caused the failure are deleted, and the solution is tried again. If this also fails, and the list of failed constraints does not contain any internally added temporary constraints, the process ends, and a solution failure is returned.

[0027] Furthermore, geometric constraint solvers typically employ numerical methods (such as iterative methods) to minimize or eliminate the error of all input constraints by adjusting the position and orientation of geometric elements, thereby calculating the new coordinates of all geometric elements. The final pose is a mathematical description of the new position, orientation, and dimensions of each geometric element in space after a successful solution. For example, for a line segment, it is the coordinates of its two endpoints; for a circle, it is the coordinates of its center and radius. This allows for the efficient and stable solution of a well-posed geometric structure composed of both inherent constraints and intelligently added temporary constraints, ultimately yielding a specific and accurate new pose of the building components after the addition of temporary constraints, based on the user's interactive intent and the system's intelligent reasoning.

[0028] In this embodiment, by acquiring multiple geometric elements that make up the target building component and their initial poses, and determining the constraint relationships between the multiple geometric elements, temporary constraints are added to the target geometric elements according to a first preset rule; temporary constraints are added to the associated geometric elements according to a second preset rule; all added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements are input into a geometric constraint solver for solving, so as to calculate the final pose of the multiple geometric elements, thereby obtaining the final pose of the target building component. This solves the problem that existing geometric constraint solvers, through general settings such as minimum moving distance and minimum moving geometric quantity, cannot obtain solutions that fully meet the design intent.

[0029] Specifically, in step S102, when a preset operation is detected targeting a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with a first preset rule, including: Step A1: Obtain the element type of the target geometric element from the attribute information of the target building component, or determine the element type of the target geometric element using a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Step A2: Obtain the operation object of the preset operation; wherein, the operation object includes: feature points on the target geometric element, and the entire target geometric element; Step A3: Find the first constraint method that has a mapping relationship with the element type and the operation object from the preset mapping document, and add the first constraint method as a temporary constraint to the target geometric element.

[0030] In this embodiment, the element type of the target geometric element includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, and spline curve; the preset operation includes: single-click operation, double-click operation, drag operation, and selection box operation; the feature point includes: endpoint of a line segment, endpoint or center of an arc, and point or center of a full circle. For example, when a single-click operation is detected on an endpoint of the target geometric element, that endpoint is set as the operation object; or, for example, when a double-click operation is detected on the target geometric element, the entire target geometric element is set as the operation object. In a parametric (BIM or CAD) system, the attribute information of each building component and its subordinate geometric elements is defined and stored in the model database. When a preset operation (such as a mouse click) is detected, the system obtains the selected target geometric element through a graphic picking algorithm, and then directly reads its "geometric type" field by accessing the data structure or attribute table of the element, such as the value of the field being "line segment", "arc", "full circle", "ellipse", "elliptical arc", or "spline curve". By adding temporary constraints to the target geometric elements, the system no longer mechanically moves pixels, but rather understands the user's design intent, thus laying a solid foundation for a series of logically and physically consistent interactive effects. This understanding and transformation based on constraint rules is the core of the rigidity and shortcomings of the existing "principle of minimum movement."

[0031] Specifically, step A3, which involves finding a first constraint method from a preset mapping document that has a mapping relationship with the element type and the operation object, and adding the first constraint method as a temporary constraint to the target geometric element, includes: Step A31: When the element type of the target geometric element is a line segment, if the operation object is one endpoint of the line segment, then add a fixed position constraint to the other endpoint of the line segment; or, if the operation object is the entire line segment, then add an initial position constraint and a translation-only constraint to the line segment. In this embodiment, if the dragged element is an endpoint of a line segment, a positional fixed constraint is added to the other endpoint of the line segment; the line segment is marked with R, representing a rotational constraint only. This constraint rule locks the movement of the line segment to rotation around a fixed endpoint, which perfectly matches the physical logic of the user dragging one end of the "stick" and avoids uncontrollable translation of the line segment.

[0032] If the line segment itself is being dragged, set the initial values ​​of the line segment according to the dragging intention (if one or both ends of the line segment are connected to other geometric elements, the endpoints of the line segment will slide along the extension lines of the geometric elements; if it is not connected to any geometric elements, it will translate along the normal direction); mark the line segment with a "T" to represent a translation-only constraint. This constraint rule locks the movement of the line segment as a global translation, which conforms to the logic of the user pushing an "object". The initial position constraint ensures the starting point of the solution, and the translation-only constraint prevents the line segment from rotating unexpectedly during dragging.

[0033] Furthermore, geometric constraint solvers (especially those employing numerical iterative methods) require an initial guess to begin computation. The closer this initial value is to the final true solution, the faster the solution converges and the higher the success rate. If the initial position before dragging is used directly as the initial value, when the dragging distance is large, the geometric elements may be located in a position far from the final solution, causing the solver to fail to iterate, fail to converge, or converge to an incorrect local optimum. Therefore, setting an initial position constraint is equivalent to providing the geometric constraint solver with a high-quality initial guess that conforms to the dragging direction, greatly reducing the difficulty of the solution and improving the success rate of trial calculations.

[0034] Step A32: When the element type of the target geometric element is a whole circle, if the operation object is the whole circle or its center, then add a fixed radius constraint to the whole circle; or, if the operation object is a point on the whole circle, then add a fixed position constraint to the center of the whole circle. In this embodiment, if the center of the circle or the circle itself is being dragged, a fixed radius constraint is added to the entire circle; this constraint rule infers that the user's intention is to move the entire circle, rather than change its size. A fixed radius is the most natural choice that aligns with the design intent of "moving an object".

[0035] If the dragged point is on the circumference of the entire circle, a fixed position constraint is added to the center of the circle. This constraint rule infers that the user's intention is to change the size of the circle (scaling). Fixing the center while allowing points on the circumference to move directly corresponds to a change in the radius.

[0036] Step A33: When the element type of the target geometric element is an arc, if the operation object is one endpoint of the arc, then add a fixed position constraint to the other endpoint and the center of the arc; or, if the operation object is the entire arc, the center, or the midpoint of the arc, then add an initial position constraint to the arc.

[0037] In this embodiment, if the endpoint of the arc is being dragged, the initial value of the endpoint is set according to the dragging intention (the endpoint remains sliding on the arc), and a fixed constraint is added to the center of the arc and a fixed constraint is added to the position of the other endpoint. This constraint rule focuses the editing focus on the "range" of the arc, that is, changing its start angle or end angle, while keeping the center of curvature and the overall position of the arc unchanged. This is suitable for scenarios where the size of the arc opening is adjusted.

[0038] If the dragged element is the center of the arc or the arc itself, the initial value of the arc is set according to the dragging intention; if the dragged element is the midpoint of the arc, the initial value of the arc is set according to the dragging intention (if one or both ends of the arc are connected to other geometric elements, the arc will keep its ends stationary and pass through the target point; if neither end of the arc is connected to other geometric elements, the arc will keep its center stationary and pass through the target point). This constraint rule infers that the user's intention is to move the entire arc. Fixing the relative position of the radius and center, while allowing overall translation, is the most logical approach.

[0039] Specifically, step S103, which involves adding temporary constraints to the associated geometric elements according to the element types of the associated geometric elements that have a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric elements, in accordance with a second preset rule, includes: Step B1: Obtain the element type of the associated geometric element from the attribute information of the target building component, or determine the element type of the associated geometric element using a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Step B2: Obtain the constraint relationship between the target geometric element and the associated geometric element from the attribute information of the target building component; wherein the constraint relationship includes at least one of the following: point on line constraint, concurrent constraint, tangent constraint, angle constraint, parallel constraint, perpendicular constraint, and distance constraint; Step B3: Find a second constraint method that has a mapping relationship with the element type and the constraint relationship from the preset mapping document, and add the second constraint method as a temporary constraint to the associated geometric element.

[0040] In this embodiment, the element types of the associated geometric elements include at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, and spline curve. The constraint relationships include at least one of the following: point-on-line constraint, concurrent constraint, tangent constraint, angle constraint, parallel constraint, perpendicular constraint, and distance constraint. Starting from the target geometric element, in the pre-constructed constraint relationship graph, all geometric elements directly or indirectly connected by constraint edges are traversed using breadth-first search (BFS) or depth-first search (DFS) algorithms. These traversed elements are the "associated geometric elements." The constraint relationship graph or the constraint list of the model is queried to directly obtain all constraint relationships between the target geometric element and the current associated elements. Based on the identified "element type combinations" and "constraint relationships," a predefined rule base containing geometric kinematic principles is used to fix the key degrees of freedom of the associated elements to guide them to produce intentional movements. This ensures that in a complex underconstrained system, dragging a local geometric element can trigger coordinated, stable, and highly physical and design-intended linkages globally.

[0041] Specifically, when the element type of the target geometric element is a line segment, step B3 involves finding a second constraint method from a preset mapping document that has a mapping relationship with the element type and the constraint relationship, and adding the second constraint method as a temporary constraint to the associated geometric element, including: Step B301: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then add a fixed direction constraint to the associated geometric element and a fixed position constraint to the other endpoint of the associated geometric element. Step B302: If the element type of the associated geometric element is a line segment, and the target geometric element has only translation constraints, one endpoint of the associated geometric element has a point constraint or a point co-point constraint with the target geometric element, and the target geometric element has an angle constraint with the associated geometric element, then add a fixed direction constraint to the associated geometric element and add a fixed position constraint to the other endpoint of the associated geometric element. Step B303: If the element type of the associated geometric element is a line segment, and the target geometric element has a rotation-only constraint, and the associated geometric element and the target geometric element have an angle constraint, then add a fixed length constraint and a rotation-only constraint to the associated geometric element. Step B304: If the element type of the associated geometric element is a line segment, and one endpoint of the target geometric element has a point on the line constraint with the associated geometric element, then add a fixed length constraint and a fixed direction constraint to the associated geometric element. Step B305: If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. Step B306: If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then add a fixed radius constraint to the associated geometric element. Step B307: If the element type of the associated geometric element is a full circle or an arc, and the target geometric element has a tangent constraint with the associated geometric element, then add a fixed radius constraint to the associated geometric element.

[0042] Specifically, when the element type of the target geometric element is a full circle or an arc, step B3, which involves finding a second constraint method from a preset mapping document that has a mapping relationship with the element type and the constraint relationship, and adding the second constraint method as a temporary constraint to the associated geometric element, further includes: Step B308: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then add a fixed position constraint to the other endpoint of the associated geometric element and a fixed direction constraint to the associated geometric element. Step B309: If the element type of the associated geometric element is a line segment and the associated geometric element has a tangent constraint with the target geometric element, then add a fixed length constraint to the associated geometric element. Step B310: If the element type of the associated geometric element is a line segment, and the center or endpoint of the target geometric element has a point constraint on the associated geometric element, then add a fixed direction constraint and a fixed length constraint to the associated geometric element. Step B311: If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. Step B312: If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then add a fixed radius constraint to the associated geometric element. Step B313: If the element type of the associated geometric element is a full circle or an arc, and the associated geometric element has a tangent constraint with the target geometric element, then add a fixed radius constraint to the associated geometric element.

[0043] In this embodiment, the geometric figures of the two parallel line segments and the corresponding constraint relationship diagrams are shown in Figures 2(a) and 2(b). The existing method for minimizing the geometric movement is as follows: When dragging P1, first try to make only P1 movable, while fixing P2, P3, and P4. The result of a successful solution is that P1 can only move along the direction of its line, while line segment L2 remains stationary; when dragging line segment L1, first try to make only P1 and P2 movable, while fixing P3 and P4. The result of a successful solution is that line segment L1 is translated along the normal direction as a whole, while line segment L2 remains stationary.

[0044] However, by adding temporary constraints—specifically, adding the fixed position constraint from step A31 to P2 and the fixed length constraint from step B302 to L2—the result is that P1 can move freely, P2 is fixed, and L2 rotates with L1 while maintaining its length. When dragging line segment L1, adding only the translation constraint from step A31 to L1, without needing to add additional temporary constraints, results in line segment L1 translating along the normal direction while maintaining its length, while line segment L2 remains stationary. This method of adding temporary constraints better aligns with the design intent.

[0045] In this embodiment, as shown in Figures 3(a) and 3(b), there are two line segments that are concurrent and perpendicular, and the corresponding constraint relationship diagrams are presented. The existing method for minimizing the number of geometric movements is as follows: When dragging P1, first try to make only P1 movable, while fixing P2, P3, and P4. The result of a successful solution is that P1 can only move along the direction of its own line, and the directions of the two line segments do not change. When dragging P2 (or P3), first try to make only P2 movable, while fixing P1, P3, and P4. The result of a successful solution is that P2 returns to its initial position and cannot be dragged. When dragging line segment L1, first try to make only P1 and P2 movable, while fixing P3 and P4. The result of a successful solution is that line segment L1 returns to its initial position and cannot be dragged.

[0046] However, by adding temporary constraints as follows: When dragging P1, add the fixed position constraint from step A31 to P2 and the fixed length constraint from step B303 to L2. The result is that P1 can move freely, P2 is fixed, and L2 rotates with L1 while maintaining its length. When dragging P2 (or P3), add the fixed position constraint from step A31 to P1 and the fixed length constraint from step B303 to L2. The result is that P2 can move freely, P1 is fixed, and L1 and L2 rotate together around P1 while maintaining the length of L2. When dragging line segment L1, add a fixed direction constraint to L2 and a fixed position constraint from step B302 to P4. The result is that L1 translates along the normal direction, L2's direction remains unchanged, and P3 changes along the extension of L2. This method of adding temporary constraints better matches the design intent.

[0047] In this embodiment, the geometric figures and corresponding constraint relationships of the circle center on the line segment are shown in Figures 4(a) and 4(b). The existing method for minimizing the geometric movement is as follows: When dragging P1, first try making only P1 movable, fixing P2 and the circle center O. A successful solution results in P1 only being able to move along its own straight line. When dragging O, first try making only O movable, fixing P1 and P2. A successful solution results in L remaining stationary, and circle C sliding on L.

[0048] However, by adding temporary constraints as follows: When dragging P1, add the fixed position constraint from step A31 to P2, and the fixed radius constraint to circle C. The successful solution is that P2 is fixed, the radius of circle C remains unchanged, and O remains on L. When dragging O, add the fixed center radius constraint from step A32 to C, and the fixed direction and length constraints from step B310 to L. The successful solution is that L remains fixed, and circle C slides on L. This method of adding temporary constraints better matches the design intent.

[0049] In this embodiment, the geometric figures of the points on the line and the corresponding constraint relationships are shown in Figures 5(a) and 5(b). The existing method for minimizing the number of geometric movements is as follows: when dragging P1, first try to make only P1 movable, while fixing P2, P3, and P4. At this time, the solution is successful, and the effect is that P1 can only move along the direction of the line it is on.

[0050] However, by adding temporary constraints: when dragging P1, a fixed position constraint (as described in step A31) is added to P2, a fixed position constraint is added to P4, and a fixed direction constraint (as described in step B301) is added to L2. The successful solution is that P2, P4, and L2 remain stationary, while P3 remains on L1. If dragging P1 makes L1 and L2 very close to parallel, such that the distance between P3 and P4 exceeds 10^7, the solution will fail. Since this is not due to over-constraint, the failure constraint list will be empty, and the solution will return as failed. The effect is that the device cannot be dragged at this point, but it can be dragged back. This method of adding temporary constraints better aligns with the design intent.

[0051] In this embodiment, as shown in Figures 6(a) and 6(b), multiple line segments have a geometric figure with continuous distance constraints and corresponding constraint relationship diagrams. The existing method for minimizing the number of geometric movements is as follows: When dragging L1, first try to make only L1 movable, while fixing L2, L3, L4, and L5. At this point, the calculation is successful. The effect is that L1 returns to its original position and cannot be dragged. If L1 is fixed in a new position after being dragged, it will cause the calculation to fail, and the first few attempts will fail until all other line segments become movable before the calculation succeeds. The effect of a successful calculation is that all 5 line segments are translated together.

[0052] However, by adding temporary constraints, when dragging L1, there is no need to add temporary constraints to L2, L3, L4, and L5; a single trial calculation is sufficient to solve the problem. The result of a successful solution is that all five line segments are translated together.

[0053] In this embodiment, as shown in Figures 7(a) and 7(b), there are multiple perpendicular straight line segments and corresponding constraint diagrams. The existing method for minimizing the number of geometric movements is as follows: when dragging P6, first try making only P6 movable while fixing the other geometric elements. The successful solution is that P6 moves up and down along L3 while the other geometric elements remain stationary.

[0054] However, by adding temporary constraints: when P6 is dragged, the internal mechanism adds the positional fixed constraint from step A31 to P5 and marks L3 with R; it adds the length dimension fixed constraint from step B303 to L2 and marks it with R; it adds the length dimension fixed constraint to L1 and marks it with R. The result of a successful solution is that P5 remains stationary while the other geometric elements rotate around P5. This method of adding temporary constraints achieves the desired effect more closely with the user.

[0055] In this embodiment, the above technical solution achieves the following beneficial effects: by creating a constraint relationship diagram between various geometric elements, setting appropriate initial positions for the geometric elements according to rules, adding appropriate temporary constraints, and then obtaining a solution that meets the design intent under under-constraint conditions through two trial calculations. This method allows for the customization of corresponding rules based on the actual application scenario of constraint solving, thereby solving the problem that existing constraint solvers, through general settings such as minimum movement distance and minimum number of geometric movements, cannot fully satisfy the design intent. From the user's perspective, the method proposed in this invention can make the dynamic dragging effect under under-constraint conditions more consistent with the design intent, thereby saving design refinement steps and improving design quality and efficiency.

[0056] Example 2 This invention provides a device for solving the orientation of building components, such as... Figure 8 As shown, the device specifically includes the following components: The acquisition module 801 is used to acquire multiple geometric elements that make up the target building component and the initial posture of the multiple geometric elements, and to determine the constraint relationship between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. The detection module 802 is used to add temporary constraints to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation when a preset operation is detected. Adding module 803 is used to add temporary constraints to the associated geometric elements according to the element type of the associated geometric elements that have a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric elements, in accordance with a second preset rule; The calculation module 804 is used to input all added temporary constraints, the initial poses of the plurality of geometric elements, and the constraint relationships between the plurality of geometric elements into the geometric constraint solver for solving, so as to calculate the final poses of the plurality of geometric elements and thus obtain the final pose of the target building component.

[0057] Specifically, the detection module 802 is used for: The element type of the target geometric element is obtained from the attribute information of the target building component, or the element type of the target geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the operation object of the preset operation; wherein, the operation object includes: feature points on the target geometric element, and the entire target geometric element; The first constraint method that has a mapping relationship with the element type and the operation object is found in the preset mapping document, and the first constraint method is added to the target geometric element as a temporary constraint.

[0058] Specifically, when the detection module 802 executes the function of finding a first constraint method that has a mapping relationship with the element type and the operation object from a preset mapping document, and adding the first constraint method as a temporary constraint to the target geometric element, it is used for: When the element type of the target geometric element is a line segment, if the operation object is one endpoint of the line segment, then a fixed position constraint is added to the other endpoint of the line segment; or, if the operation object is the entire line segment, then an initial position constraint and a translation-only constraint are added to the line segment. When the element type of the target geometric element is a whole circle, if the operation object is the whole circle or its center, then a fixed radius constraint is added to the whole circle; or, if the operation object is a point on the whole circle, then a fixed position constraint is added to the center of the whole circle. When the element type of the target geometric element is an arc, if the operation object is one endpoint of the arc, then a fixed position constraint is added to the other endpoint and the center of the arc; or, if the operation object is the entire arc, the center, or the midpoint of the arc, then an initial position constraint is added to the arc.

[0059] Specifically, the adding module 803 is also used for: The element type of the associated geometric element is obtained from the attribute information of the target building component, or the element type of the associated geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the constraint relationship between the target geometric element and the associated geometric element from the attribute information of the target building component; wherein the constraint relationship includes at least one of the following: point on line constraint, concurrent constraint, tangent constraint, angle constraint, parallel constraint, perpendicular constraint, and distance constraint; Find a second constraint method that has a mapping relationship with the element type and the constraint relationship from the preset mapping document, and add the second constraint method as a temporary constraint to the associated geometric element.

[0060] Specifically, when the adding module 803 executes the function of finding a second constraint method that has a mapping relationship with the element type and the constraint relationship from a preset mapping document, and adding the second constraint method as a temporary constraint to the associated geometric element, it is used for: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then a fixed direction constraint is added to the associated geometric element, and a fixed position constraint is added to the other endpoint of the associated geometric element. If the element type of the associated geometric element is a line segment, and the target geometric element has only translation constraints, one endpoint of the associated geometric element has a point constraint or a point co-point constraint with the target geometric element, and the target geometric element has an angle constraint with the associated geometric element, then add a fixed direction constraint to the associated geometric element and add a fixed position constraint to the other endpoint of the associated geometric element. If the element type of the associated geometric element is a line segment, and the target geometric element has a rotation-only constraint, and the associated geometric element and the target geometric element have an angle constraint, then add a fixed length constraint and a rotation-only constraint to the associated geometric element. If the element type of the associated geometric element is a line segment, and one endpoint of the target geometric element has a point on the line constraint with the associated geometric element, then add a fixed length constraint and a fixed direction constraint to the associated geometric element. If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then a fixed radius constraint is added to the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the target geometric element has a tangent constraint with the associated geometric element, then a fixed radius constraint is added to the associated geometric element.

[0061] Specifically, when the adding module 803 performs the function of finding a second constraint method that has a mapping relationship with the element type and the constraint relationship from a preset mapping document, and adding the second constraint method as a temporary constraint to the associated geometric element, it is also used to: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then add a position fixed constraint to the other endpoint of the associated geometric element and add a direction fixed constraint to the associated geometric element. If the element type of the associated geometric element is a line segment, and the associated geometric element has a tangent constraint with the target geometric element, then a fixed length constraint is added to the associated geometric element. If the element type of the associated geometric element is a line segment, and the center or endpoint of the target geometric element has a point constraint on the associated geometric element, then add a fixed direction constraint and a fixed length constraint to the associated geometric element. If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then a fixed radius constraint is added to the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the associated geometric element has a tangent constraint with the target geometric element, then a fixed radius constraint is added to the associated geometric element.

[0062] Example 3 This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 9As shown, the computer device 90 in this embodiment includes, but is not limited to, a memory 901 and a processor 902 that are communicatively connected to each other via a system bus. It should be noted that... Figure 9 Only a computer device 90 with components 901-902 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0063] In this embodiment, the memory 901 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), 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, magnetic disk, optical disk, etc. In some embodiments, the memory 901 may be an internal storage unit of the computer device 90, such as the hard disk or memory of the computer device 90. In other embodiments, the memory 901 may also be an external storage device of the computer device 90, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 90. Of course, the memory 901 may include both the internal storage unit and the external storage device of the computer device 90. In this embodiment, the memory 901 is typically used to store the operating system and various application software installed on the computer device 90. In addition, the memory 901 may also be used to temporarily store various types of data that have been output or will be output.

[0064] In some embodiments, processor 902 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. This processor 902 is typically used to control the overall operation of computer device 90.

[0065] Specifically, in this embodiment, the processor 902 is used to execute the program stored in the memory 901 for solving the orientation of building components. When the program for solving the orientation of building components is executed, it performs the following steps: The system acquires multiple geometric elements that make up the target building component and the initial poses of the multiple geometric elements, and determines the constraint relationships between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. When a preset operation is detected on a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with the first preset rule. Based on the element type of the associated geometric elements that have a constraint relationship with the target geometric element, and the constraint relationship between the target geometric element and the associated geometric elements, temporary constraints are added to the associated geometric elements according to the second preset rule; All added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements are input into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

[0066] For a detailed description of the above method steps, please refer to Example 1. This example will not be repeated here.

[0067] Example 4 This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), 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 store, etc., which stores a computer program. When the computer program is executed by a processor, it implements the following method steps: The system acquires multiple geometric elements that make up the target building component and the initial poses of the multiple geometric elements, and determines the constraint relationships between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. When a preset operation is detected on a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with the first preset rule. Based on the element type of the associated geometric elements that have a constraint relationship with the target geometric element, and the constraint relationship between the target geometric element and the associated geometric elements, temporary constraints are added to the associated geometric elements according to the second preset rule; All added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements are input into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

[0068] For a detailed description of the above method steps, please refer to the first embodiment. This embodiment will not repeat the details here.

[0069] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0070] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0072] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for solving the attitude of building components, characterized in that, The method includes: The system acquires multiple geometric elements that make up the target building component and the initial poses of the multiple geometric elements, and determines the constraint relationships between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. When a preset operation is detected on a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation, in accordance with the first preset rule. Based on the element type of the associated geometric elements that have a constraint relationship with the target geometric element, and the constraint relationship between the target geometric element and the associated geometric elements, temporary constraints are added to the associated geometric elements according to the second preset rule; All added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements are input into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

2. The method for solving the attitude of building components according to claim 1, characterized in that, When a preset operation is detected targeting a target geometric element, temporary constraints are added to the target geometric element according to the element type of the target geometric element and the operation target of the preset operation, in accordance with a first preset rule, including: The element type of the target geometric element is obtained from the attribute information of the target building component, or the element type of the target geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the operation object of the preset operation; wherein, the operation object includes: feature points on the target geometric element, and the entire target geometric element; The first constraint method that has a mapping relationship with the element type and the operation object is found in the preset mapping document, and the first constraint method is added to the target geometric element as a temporary constraint.

3. The method for solving the attitude of building components according to claim 2, characterized in that, The step of finding a first constraint method that has a mapping relationship with the element type and the operation object from a preset mapping document, and adding the first constraint method as a temporary constraint to the target geometric element, includes: When the element type of the target geometric element is a line segment, if the operation object is one endpoint of the line segment, then a fixed position constraint is added to the other endpoint of the line segment; or, if the operation object is the entire line segment, then an initial position constraint and a translation-only constraint are added to the line segment. When the element type of the target geometric element is a whole circle, if the operation object is the whole circle or its center, then a fixed radius constraint is added to the whole circle; or, if the operation object is a point on the whole circle, then a fixed position constraint is added to the center of the whole circle. When the element type of the target geometric element is an arc, if the operation object is one endpoint of the arc, then a fixed position constraint is added to the other endpoint and the center of the arc; or, if the operation object is the entire arc, the center, or the midpoint of the arc, then an initial position constraint is added to the arc.

4. The method for solving the attitude of building components according to claim 1, characterized in that, The step of adding temporary constraints to the associated geometric elements according to the element types of the associated geometric elements that have a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric elements, in accordance with a second preset rule, includes: The element type of the associated geometric element is obtained from the attribute information of the target building component, or the element type of the associated geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the constraint relationship between the target geometric element and the associated geometric element from the attribute information of the target building component; wherein the constraint relationship includes at least one of the following: point on line constraint, concurrent constraint, tangent constraint, angle constraint, parallel constraint, perpendicular constraint, and distance constraint; Find a second constraint method that has a mapping relationship with the element type and the constraint relationship from the preset mapping document, and add the second constraint method as a temporary constraint to the associated geometric element.

5. The method for solving the attitude of building components according to claim 4, characterized in that, When the element type of the target geometric element is a line segment, the step of finding a second constraint method that has a mapping relationship with the element type and the constraint relationship from a preset mapping document, and adding the second constraint method as a temporary constraint to the associated geometric element, includes: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then a fixed direction constraint is added to the associated geometric element, and a fixed position constraint is added to the other endpoint of the associated geometric element. If the element type of the associated geometric element is a line segment, and the target geometric element has only translation constraints, one endpoint of the associated geometric element has a point constraint or a point co-point constraint with the target geometric element, and the target geometric element has an angle constraint with the associated geometric element, then add a fixed direction constraint to the associated geometric element and add a fixed position constraint to the other endpoint of the associated geometric element. If the element type of the associated geometric element is a line segment, and the target geometric element has a rotation-only constraint, and the associated geometric element and the target geometric element have an angle constraint, then add a fixed length constraint and a rotation-only constraint to the associated geometric element. If the element type of the associated geometric element is a line segment, and one endpoint of the target geometric element has a point on the line constraint with the associated geometric element, then add a fixed length constraint and a fixed direction constraint to the associated geometric element. If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then a fixed radius constraint is added to the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the target geometric element has a tangent constraint with the associated geometric element, then a fixed radius constraint is added to the associated geometric element.

6. The method for solving the attitude of building components according to claim 4, characterized in that, When the element type of the target geometric element is a full circle or an arc, the step of finding a second constraint method that has a mapping relationship with the element type and the constraint relationship from a preset mapping document, and adding the second constraint method as a temporary constraint to the associated geometric element, further includes: If the element type of the associated geometric element is a line segment, and one endpoint of the associated geometric element has a point on the line constraint with the target geometric element, then add a position fixed constraint to the other endpoint of the associated geometric element and add a direction fixed constraint to the associated geometric element. If the element type of the associated geometric element is a line segment, and the associated geometric element has a tangent constraint with the target geometric element, then a fixed length constraint is added to the associated geometric element. If the element type of the associated geometric element is a line segment, and the center or endpoint of the target geometric element has a point constraint on the associated geometric element, then add a fixed direction constraint and a fixed length constraint to the associated geometric element. If the element type of the associated geometric element is an arc, and one endpoint of the associated geometric element has a point constraint with the target geometric element on the line, then add a position fixed constraint to the other endpoint and the center of the circle of the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the center of the associated geometric element and the target geometric element have a point constraint on the line, then a fixed radius constraint is added to the associated geometric element. If the element type of the associated geometric element is a full circle or an arc, and the associated geometric element has a tangent constraint with the target geometric element, then a fixed radius constraint is added to the associated geometric element.

7. A device for solving the posture of building components, characterized in that, The device includes: The acquisition module is used to acquire multiple geometric elements that make up the target building component and the initial pose of the multiple geometric elements, and to determine the constraint relationship between the multiple geometric elements; wherein the multiple geometric elements are in an under-constrained state. The detection module is used to add temporary constraints to the target geometric element according to the element type of the target geometric element and the operation object of the preset operation when a preset operation is detected. The addition module is used to add temporary constraints to the associated geometric elements according to the element type of the associated geometric elements that have a constraint relationship with the target geometric element and the constraint relationship between the target geometric element and the associated geometric elements, in accordance with a second preset rule. The calculation module is used to input all added temporary constraints, the initial poses of the multiple geometric elements, and the constraint relationships between the multiple geometric elements into the geometric constraint solver for solving, so as to calculate the final poses of the multiple geometric elements and thus obtain the final pose of the target building component.

8. The apparatus for solving the posture of building components according to claim 7, characterized in that, The detection module is specifically used for: The element type of the target geometric element is obtained from the attribute information of the target building component, or the element type of the target geometric element is determined by a preset recognition algorithm; wherein the element type includes at least one of the following: line segment, arc, full circle, ellipse, elliptical arc, spline curve; Obtain the operation object of the preset operation; wherein, the operation object includes: feature points on the target geometric element, and the entire target geometric element; The first constraint method that has a mapping relationship with the element type and the operation object is found in the preset mapping document, and the first constraint method is added to the target geometric element as a temporary constraint.

9. A computer device, the computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.