A model motion constraint information determination method and device, and an electronic device
By automating the acquisition of motion constraint information of geometric sub-models, the problems of cumbersome operation and poor reliability in existing technologies are solved, and efficient determination of motion constraint information is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU TONGYUAN SOFT CONTROL INFORMATION TECH CO LTD
- Filing Date
- 2025-03-27
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, determining the motion constraint information of geometric models is cumbersome, inefficient, and reliant on manual labor, resulting in poor reliability of the motion constraint information.
By responding to trigger operations, the geometric sub-model is acquired and the target motion constraint relationship is applied, automatically determining the geometric feature category and motion amplitude category information, simplifying the operation process, and realizing the automated acquisition of motion constraint information.
The elimination of manual measurement operations improves the efficiency and reliability of determining the motion constraint information of the geometric model and simplifies the operation process.
Smart Images

Figure CN120296969B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, and electronic device for determining model motion constraint information. Background Technology
[0002] With increasing user demands and technological advancements, many single mechanical products have evolved into complex products integrating mechanics, electronics, hydraulics, and control. For the design of complex products, system modeling and simulation platforms, such as those based on the Modelica language, can meet complex design requirements. These platforms enable the unified visualization and modeling of physical systems across multiple domains in engineering practice. To perform multibody system constraint modeling on a modeling and simulation platform, it is typically necessary to first draw a geometric model with kinematic constraints, then determine the kinematic constraint information of the geometric model, and finally construct a multibody system constraint model based on this determined kinematic constraint information.
[0003] Currently, the main method for determining the motion constraint information of geometric models with motion constraint relationships is as follows: First, analyze the motion relationship between rigid bodies in a multi-body system. Then, design at least two rigid body geometric models with motion constraint relationships in geometric drawing software. Finally, manually measure the motion constraint information of these geometric models using geometric drawing software to obtain direction measurement data and position measurement data.
[0004] However, the above-mentioned method for determining the motion constraint information of the geometric model is not only cumbersome to operate, but also heavily reliant on manual intervention, resulting in technical problems such as cumbersome operation, low efficiency, and poor reliability of motion constraint information. Summary of the Invention
[0005] This invention provides a method, apparatus, and electronic device for determining motion constraint information of a model. It can automatically obtain motion constraint information between multi-body geometric models without the need for manual measurement by the user, through a simple click triggering operation. This simplifies the operation process for determining the motion constraint information of geometric models and improves the efficiency and reliability of determining the motion constraint information.
[0006] In a first aspect, embodiments of the present invention provide a method for determining model motion constraint information, the method comprising:
[0007] In response to the first triggering operation, a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model, is obtained;
[0008] In response to the geometric feature picking operation of the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first geometric sub-model and the second geometric sub-model to obtain a multibody constrained geometric model;
[0009] Determine the target geometric feature category to which the geometric feature pick point belongs, and based on the geometric feature pick point and the target geometric feature category, determine the position information of the constraint application point of the target kinematic pair relative to the multibody constraint geometric model;
[0010] Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined.
[0011] Secondly, embodiments of the present invention also provide a model motion constraint information determination device, the device comprising:
[0012] The geometric model acquisition module is used to acquire a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model, in response to a first trigger operation.
[0013] The constraint model determination module is used to respond to the geometric feature picking operation of the geometric model to be processed, and apply the target motion constraint relationship corresponding to the selected target kinematic pair between the first geometric sub-model and the second geometric sub-model to obtain a multibody constraint geometric model;
[0014] The constraint position determination module is used to determine the target geometric feature category to which the geometric feature pick point belongs, and based on the geometric feature pick point and the target geometric feature category, determine the constraint application point position information of the target kinematic pair relative to the multibody constraint geometric model;
[0015] The constraint direction determination module is used to determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic pair.
[0016] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0017] One or more processors;
[0018] A storage device is provided for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to implement a model motion constraint information determination method as described in any embodiment of the present invention.
[0019] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a model motion constraint information determination method as described in any of the embodiments of the present invention.
[0020] The technical solution of this invention, in response to a first trigger operation, acquires a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model. Then, in response to a geometric feature picking operation on the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first and second geometric sub-models to obtain a multi-body constrained geometric model. This determines the target geometric feature category to which the geometric feature picking point belongs. Based on the geometric feature picking point and the target geometric feature category, the position information of the constraint application point of the target kinematic pair relative to the multi-body constrained geometric model is determined. Furthermore, based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, the directional constraint information of the target kinematic pair relative to the multi-body constrained geometric model can be determined. The technical solution provided in this embodiment eliminates the need for manual measurement by the user. A simple click trigger operation automatically obtains the motion constraint information between the multi-body geometric models, simplifying the operation process for determining the motion constraint information of the geometric model and improving the efficiency and reliability of the determination of the motion constraint information. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of exemplary embodiments of the present invention, the accompanying drawings used in describing the embodiments are briefly introduced below. Obviously, the accompanying drawings described are only a portion of the drawings of the embodiments to be described in this invention, and not all of the drawings. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0022] Figure 1 This is a flowchart illustrating a method for determining model motion constraint information provided in an embodiment of the present invention.
[0023] Figure 2 This is a schematic diagram illustrating the determination of the orientation constraint information of the target kinematic pair relative to the multibody constraint geometric model, as described in an embodiment of the present invention.
[0024] Figure 3 This is a flowchart illustrating another method for determining model motion constraint information provided in an embodiment of the present invention;
[0025] Figure 4 This is a comparative diagram showing the vectors pointing to the inside and outside of the model in an embodiment of the present invention;
[0026] Figure 5 This is a schematic diagram illustrating the process of determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model according to an embodiment of the present invention;
[0027] Figure 6 This is a schematic diagram of the structure of a model motion constraint information determination device provided in an embodiment of the present invention;
[0028] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0029] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0030] Example 1
[0031] Figure 1 This is a flowchart illustrating a method for determining model motion constraint information provided in an embodiment of the present invention. This embodiment can be applied to any situation where it is necessary to determine the motion constraint information of a geometric model. The method can be executed by a model motion constraint information determining device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device, such as a mobile terminal, a PC, or a server.
[0032] like Figure 1 As shown, the method for determining the motion constraint information of this model includes:
[0033] S110. In response to the first trigger operation, obtain the geometric model to be processed, including the first geometric sub-model and the second geometric sub-model.
[0034] The first triggering operation involves acquiring the geometric model to be processed. The geometric model to be processed is a multi-body 3D mechanical model to which motion constraints will be applied, and whose motion constraint information will be determined based on the constraint application trigger point. Specifically, the geometric model to be transformed can include at least a first geometric sub-model and a second geometric sub-model; that is, any two geometric sub-models can serve as the geometric model to be transformed. The spatial positional relationship between the at least two geometric sub-models in the geometric model to be transformed includes, but is not limited to, being disjoint, tangent, intersecting, containing, coinciding, parallel, perpendicular, oblique, coaxial, and symmetrical.
[0035] In this embodiment, the methods for determining the motion constraint information of the model can be integrated into a target tool, and this target tool can be added to a target model platform with 3D model editing capabilities. The geometric model to be processed can be a pre-drawn geometric model stored in a preset storage space. When it is necessary to determine the motion constraint information of the geometric model to be processed, it can be retrieved from the preset storage space. Alternatively, the geometric model to be processed can also be a geometric model drawn in the target tool.
[0036] Specifically, the first triggering operation can include opening the target tool and acquiring the geometric model to be processed. For example, when a user clicks the start control of the target tool in the target model platform, the user can enter the main page of the target tool in response to the operation of opening the target tool. The main page can include a pre-set target control for acquiring the geometric model to be processed. Furthermore, when the user triggers the target control, the user can draw the geometric model to be processed, or retrieve the geometric model to be processed from a preset storage space.
[0037] S120. In response to the geometric feature picking operation of the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first geometric sub-model and the second geometric sub-model to obtain a multibody constrained geometric model.
[0038] Among them, geometric feature picking refers to the operation of picking geometric features (including point, line, or surface features) of the first and / or second geometric sub-models in a 3D visualization environment using mouse operations. A multibody constrained geometric model refers to a mechanical 3D model composed of a first and second geometric sub-models with motion constraint relationships.
[0039] The target kinematic pair is the range of motion selected by the user from a variety of candidate kinematic pairs. A kinematic pair refers to the connection method between two components in a mechanical system, allowing for a certain degree of relative motion between them. A kinematic pair restricts the degrees of freedom of the components and determines their motion patterns. The target motion constraint relationship refers to the motion constraint relationship corresponding to the target motion range. Motion constraints refer to the restrictions imposed on two geometric models during motion, which determine their relative motion patterns. More specifically, the motion range can include at least one of the following categories: ball joint, revolute joint, prismatic joint, cylindrical joint, universal joint, helical joint, fixed joint, and planar joint. Different categories of motion ranges correspond to different motion constraint relationships; for example, a fixed joint corresponds to a fixed constraint relationship, a revolute joint corresponds to a revolute constraint relationship, and so on.
[0040] In this embodiment, various types of candidate kinematic pairs can be displayed on the target tool's display page. When the user clicks on any of these candidate kinematic pairs, the triggered candidate kinematic pair becomes the target kinematic pair, which is then selected. Furthermore, the user can perform geometric feature picking operations on the first and / or second geometric sub-models. The trigger point clicked by the user on the first and / or second geometric model can be determined as the geometric feature picking point. The target motion constraint relationship corresponding to the selected target kinematic pair can then be applied to the geometric feature picking point, thereby obtaining a multibody constrained geometric model.
[0041] It should be noted that if multiple kinematic pairs need to be applied between the first and second geometric models, this step can be repeated.
[0042] S130. Determine the target geometric feature category to which the geometric feature pick point belongs. Based on the geometric feature pick point and the target geometric feature category, determine the position information of the constraint action point of the target kinematic pair relative to the multibody constraint geometric model.
[0043] Among them, geometric feature pick points refer to the trigger points clicked by the user on several models to be processed. The target geometric feature category refers to the specific geometric feature category to which the geometric feature pick point belongs. Geometric feature categories can include vertex categories, edge categories, or face categories. Edge categories can specifically include straight line categories, circular curve categories, and irregular curve categories, etc. Face categories can specifically include plane categories, cylindrical surface categories, spherical surface categories, and irregular curved surface categories, etc. Constraint application point location information refers to the three-dimensional spatial coordinates corresponding to the point of application of the motion constraint on the rigid body.
[0044] Specifically, if the geometric feature pick point is located at a vertex of the multibody constrained geometric model, the target geometric feature category is vertex; if the geometric feature pick point is located on an edge of the multibody constrained geometric model, the target geometric feature category is edge; if the geometric feature pick point is located on an outer surface of the multibody constrained geometric model, the target geometric feature category is face. Based on this, regardless of the category to which the target kinematic pair corresponds, the constraint point position information of the target kinematic pair relative to the multibody constrained geometric model can be determined by reasoning the mapping relationship based on the target geometric feature category, the geometric feature pick point, and the preset position information. For example, the position information reasoning mapping relationship can include: if the target geometric feature category to which the geometric feature pick point belongs is vertex, then the three-dimensional position coordinates of the geometric feature pick point can be determined as the constraint point position information; if the target geometric feature category to which the geometric feature pick point belongs is edge, then the three-dimensional position coordinates of the midpoint of the target edge to which the geometric feature pick point belongs can be determined as the constraint point position information, and so on.
[0045] S140. Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model.
[0046] Among them, motion amplitude category information is used to characterize the type of kinematic pair. For example, each candidate kinematic pair has a corresponding motion category label. When a user selects a candidate kinematic pair as the target kinematic pair, it is easy to determine the corresponding motion amplitude category information. Directional constraint information represents the directional restrictions on the relative motion between rigid bodies, and directional constraint information can be represented by direction vectors.
[0047] Specifically, the directional constraint information of the target kinematic pair relative to the multibody constrained geometric model can be determined based on the target geometric feature category, the motion amplitude category information of the target kinematic pair, and the preset direction vector extraction mapping relationship. In this embodiment, the preset direction vector extraction mapping relationship includes which combination of target geometric feature category and motion amplitude category information corresponds to which direction vector extraction method. For example, the specific content of the preset direction vector extraction mapping relationship may include: for the motion amplitude category information of a revolute pair, if the target geometric feature category is a vertex category, then the direction vectors of the three coordinate axes in the world coordinate system are determined as the direction constraint information in the motion constraint information; if the target geometric feature category to which the geometric feature pick point belongs is an edge category, then the direction vector corresponding to the target edge to which the geometric feature pick point belongs is determined as the direction constraint information; if the target geometric feature category to which the geometric feature pick point belongs is a face category, then the normal vector of the face to which the geometric feature pick point belongs is determined as the direction constraint information.
[0048] For example, see the schematic diagram illustrating the determination of the directional constraint information of the target kinematic pair relative to the multibody constraint geometry model. Figure 2 .like Figure 2 As shown in (a), the target geometric feature category to which the geometric feature pick point S1 belongs is the vertex category. In this case, the orientation constraint information defaults to the preset standard orientation vector, which refers to the orientation vectors of the three coordinate axes in the world coordinate system. Figure 2 As shown in (b), the target geometric feature category to which geometric feature pickup point S2 belongs is the straight line category. In this case, the direction constraint information is the direction vector of the edge line relative to the positive direction of the world coordinate system. Figure 2 As shown in (c), the target geometric feature category to which the geometric feature pick point S3 belongs is the surface category. At this time, the direction constraint information is the normal vector of the surface to which the geometric feature pick point belongs.
[0049] In this embodiment, based on the motion constraint information such as the directional constraint information and the position information of the constraint application point of the target kinematic pair relative to the multibody constrained geometric model, an initial system simulation multibody model can be created in the system simulation model platform, and these motion constraint information can be automatically configured as the parameter attribute information of the corresponding components in the initial system simulation multibody model. This can efficiently and accurately achieve the effect of converting a geometric multibody model with constraint relationships into a multibody system simulation model.
[0050] The technical solution of this invention, in response to a first trigger operation, acquires a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model. Then, in response to a geometric feature picking operation on the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first and second geometric sub-models to obtain a multi-body constrained geometric model. This determines the target geometric feature category to which the geometric feature picking point belongs. Based on the geometric feature picking point and the target geometric feature category, the position information of the constraint application point of the target kinematic pair relative to the multi-body constrained geometric model is determined. Furthermore, based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, the directional constraint information of the target kinematic pair relative to the multi-body constrained geometric model can be determined. The technical solution provided in this embodiment eliminates the need for manual measurement by the user. A simple click trigger operation automatically obtains the motion constraint information between the multi-body geometric models, simplifying the operation process for determining the motion constraint information of the geometric model and improving the efficiency and reliability of the determination of the motion constraint information.
[0051] Example 2
[0052] Figure 3 This is a schematic diagram of a method for determining model motion constraint information provided in an embodiment of the present invention. Based on the foregoing embodiments, steps S130 and 140 are further refined, and the specific implementation can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0053] like Figure 3 As shown, the method specifically includes the following steps:
[0054] S210. In response to the first triggering operation, obtain the geometric model to be processed, including the first geometric sub-model and the second geometric sub-model.
[0055] S220. In response to the geometric feature picking operation of the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first geometric sub-model and the second geometric sub-model to obtain a multibody constrained geometric model.
[0056] S230. Determine the target geometric feature category to which the geometric feature pick point belongs.
[0057] In this embodiment, the target geometric feature category includes at least one of the following: vertex category, straight line category, circular curve category, irregular curve category, plane category, cylindrical surface category, spherical surface category, and irregular curved surface category. The motion amplitude category information corresponding to the target kinematic pair includes at least one of the following: revolute joint category, prismatic joint category, spherical joint category, cylindrical joint category, universal joint category, helical joint category, fixed joint category, and planar joint category. Based on this, the specific implementation method for determining the motion constraint information of the target kinematic pair relative to the multibody constrained geometric model may include:
[0058] S240. Based on the geometric feature pick-up points, target geometric feature categories, and preset action point mapping relationships, determine the position information of the constraint action point of the target kinematic pair relative to the multibody constraint geometric model.
[0059] The preset application point mapping relationship refers to the pre-defined mapping relationship between geometric feature categories and constraint application points. Specifically, the preset application point mapping relationship can include: if the target geometric feature category is a vertex category, irregular curve category, plane category, or irregular surface category, then the constraint application point position information is the coordinates of the pick point corresponding to the geometric feature pick point; if the target geometric feature category is a straight line category, then the constraint application point position information is the coordinates of the midpoint of the edge to which the geometric feature pick point belongs; if the target geometric feature category is a circular curve category, then the constraint application point position information is the coordinates of the center of the circle to which the geometric feature pick point belongs; if the target geometric feature category is a cylindrical surface category, then the constraint application point position information is the coordinates of the midpoint of the axis of the cylindrical surface to which the geometric feature pick point belongs; if the target geometric feature category is a sphere category, then the constraint application point position information is the coordinates of the center of the sphere to which the geometric feature pick point belongs.
[0060] In this embodiment, an example table of the mapping relationship between geometric feature categories and constraint application points is shown in Table 1. As shown in Table 1, when determining the position information of the constraint application point of the target kinematic pair relative to the multibody constrained geometric model, it is not necessary to consider the differences in motion amplitude category information. Regardless of the motion amplitude category, the method for determining the position information of the constraint application point is consistent. Specifically, based on the target geometric feature category, the target application point corresponding to the target geometric feature category can be determined according to the preset application point mapping relationship. Thus, the three-dimensional position coordinates of the target application point can be determined as the position information of the constraint application point of the target kinematic pair relative to the multibody constrained geometric model.
[0061] Table 1. Methods for determining the position of kinematic pairs under different characteristics.
[0062]
[0063] Specifically, as shown in Table 1, if the target geometric feature category is a vertex, irregular curve, plane, or irregular surface, the constraint point is the geometric feature pick point, and the corresponding constraint point location information is the pick point coordinates. If the target geometric feature category is a straight line, the constraint point is the midpoint of the edge to which the geometric feature pick point belongs, and the corresponding constraint point location information is the three-dimensional coordinates of the midpoint, i.e., the midpoint coordinates. If the target geometric feature category is a circular curve, the constraint point is the center of the circle to which the geometric feature pick point belongs, and the corresponding constraint point location information is the three-dimensional coordinates of the circle, i.e., the center coordinates. If the target geometric feature category is a circular curve, the constraint point is the midpoint of the axis of the cylinder to which the geometric feature pick point belongs, and the corresponding constraint point location information is the three-dimensional coordinates of the midpoint of the axis, i.e., the axis midpoint coordinates. If the target geometric feature category is sphere, then the constraint point is the center of the sphere to which the geometric feature pick point belongs, and the corresponding constraint point position information is the three-dimensional position coordinates of the sphere center, i.e., the sphere center position coordinates.
[0064] S250. Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model.
[0065] In this embodiment, the directional constraint information is related not only to the target geometric feature category but also to the motion amplitude category information of the target kinematic pair. The directional constraint information can be characterized by the direction vector of the target kinematic pair relative to the local coordinate system of the multibody constrained geometric model, specifically by determining the Z-axis direction vector, X-axis direction vector, and Y-axis direction vector of the local coordinate system.
[0066] Specifically, determining directional constraint information mainly includes the following four scenarios, which are summarized in Table 2. These scenarios can include:
[0067] Table 2. Methods for determining the Z-axis line of the kinematic pair under different characteristics.
[0068]
[0069] In the first case, if the target geometric feature category and motion amplitude category information meet the first preset condition, then the preset standard direction is determined as the directional constraint information of the target kinematic pair relative to the multibody constrained geometric model.
[0070] The preset standard direction is the coordinate axis direction vector of the world coordinate system. The first preset condition includes: the target geometric feature category is vertex category, irregular curve category, or sphere category; or, the target geometric feature category is straight line category, circular curve category, cylindrical surface category, or irregular curved surface category, and the motion amplitude category information is fixed sub-category or planar sub-category.
[0071] In this embodiment, if the target geometric feature category is a vertex category, an irregular curve category, or a sphere category, and the motion amplitude category information is a fixed sub-category or a planar sub-category, then the Z-axis direction vector in the world coordinate system can be determined as the Z-axis direction vector in the local coordinate system, the X-axis direction vector in the world coordinate system can be determined as the X-axis direction vector in the local coordinate system, and the Y-axis direction vector in the world coordinate system can be determined as the Y-axis direction vector in the local coordinate system. Thus, the directional constraint information of the target kinematic pair relative to the multibody constrained geometric model is obtained.
[0072] In the second case, if the target geometric feature category and motion amplitude category information meet the second preset condition, then the orientation constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined based on the normal of the target surface to which the geometric feature pick point belongs.
[0073] The second preset condition includes: the target geometric feature category is a planar category or an irregular curved surface category, and the motion amplitude category information is a revolute joint category, a translating joint category, a cylindrical joint category, a universal joint category, or a helical joint category.
[0074] In this embodiment, when the target geometric feature category and motion amplitude category information meet the second preset condition, the normal vector of the target surface to which the geometric feature pickup point belongs can be determined as the straight line corresponding to the Z-axis of the local coordinate system, and the direction of the normal vector pointing to the outside of the multibody constraint geometric model can be determined as the positive direction corresponding to the Z-axis of the local coordinate system. Based on determining the straight line and positive direction of the Z-axis, the Z-axis direction vector of the local coordinate system is obtained. For example, to clearly illustrate what the direction of the normal vector pointing to the outside of the multibody constraint geometric model means, a specific example will be used below. See the diagram comparing the vector pointing to the inside and outside of the model. Figure 4 When the geometric feature pick point is located on the right face of the cube, such as Figure 4 As shown in (a), the direction the normal vector points to the right is the direction the vector points to the outside of the model; as... Figure 4 As shown in (b), the direction in which the normal vector points to the left is the direction in which the vector points to the inside of the model.
[0075] Optionally, if the target geometric feature category and motion amplitude category information meet the second preset condition, in order to ensure that the direction of the normal vector pointing to the outside of the multibody constrained geometric model can be determined as the positive direction corresponding to the Z-axis of the local coordinate system, the specific implementation steps for determining the direction constraint information of the target kinematic pair relative to the multibody constrained geometric model based on the normal of the target surface to which the geometric feature picking point belongs may include:
[0076] S1. Determine the target normal vector based on at least two non-parallel vectors on the target surface to which the geometric feature pick point belongs.
[0077] In this embodiment, the cross product method (using the cross product of two non-parallel vectors on the plane to calculate the normal vector) can be used to obtain the plane normal vector, denoted as n. pln =(n x ,n y ,n z ), which is the target normal vector. This target normal vector can be used as the initial direction of the Z-axis of the local coordinate system. Subsequently, the initial direction of the Z-axis can be corrected by the reference direction vector.
[0078] S2. Determine the reference direction vector based on the geometric feature pick points and the camera position in the current view.
[0079] Here, the camera position in the current view refers to the coordinates of the camera (or observer)'s current location within the 3D scene view. The camera position is known after the image display engine used in the current view displays the 3D model, and can be directly obtained here. The reference direction vector is the unit vector between the geometric feature pick-up point and the camera position.
[0080] Specifically, the geometric feature picking point can be represented as P pln = (x0, y0, z0), the camera position of the current view can be represented as P eye Then the reference direction vector n external It can be represented as:
[0081]
[0082] In this embodiment, since the camera position is always located in front of the model, and the point detected by the user (i.e., the geometric feature picking point) will not be obstructed, the unit vector from the geometric feature picking point to the camera position must point outward from the model. This unit vector can be used as a reference direction vector. By correcting the initial direction of the Z-axis of the local coordinate system using the reference direction vector, it can be ensured that the direction of the normal vector pointing outward from the multibody constrained geometric model is the positive direction corresponding to the Z-axis of the local coordinate system.
[0083] S3. Based on the target normal vector and the reference direction vector, determine the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
[0084] Specifically, based on the comparison between the inner product of the target normal vector and the reference direction vector and the preset value, it can be determined whether to use the target normal vector as the local coordinate Z-axis direction vector or the inverse vector of the target normal vector as the local coordinate Z-axis direction vector.
[0085] Optionally, the specific implementation of determining the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the target normal vector and the reference direction vector may include: determining the inner product result of the reference direction vector and the target normal vector; if the inner product result is less than a preset threshold, then the target normal vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the inner product result is greater than or equal to the preset threshold, then the inverse vector of the target normal vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
[0086] In this embodiment, the need to correct the initial direction of the Z-axis of the local coordinate system can be determined using the following formula:
[0087]
[0088] In the formula, n Z n represents the local coordinate Z-axis direction vector. pln ·n external This represents the inner product of the reference direction vector and the target normal vector, with a preset threshold of 0.
[0089] In this embodiment, if the dot product of the reference direction vector and the target normal vector is less than zero, it indicates that the angle between the reference direction vector and the target normal vector is greater than 90 degrees. This means that the angle between the two vectors is between 90 and 270 degrees, indicating that the two vectors are "opposite" to some extent. Since the camera position is always located in front of the model, and the point detected by the user's click (i.e., the geometric feature picking point) will not be occluded, it can be determined that the unit vector from the geometric feature picking point to the camera position must point outward from the model. If the angle between the reference direction vector and the target normal vector is obtuse, it can be known that the direction of the target normal vector points inward from the model. Therefore, the inverse vector of the target normal vector can be determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model. The initial direction of the Z-axis of the local coordinate system is corrected by the reference direction vector to ensure that the direction of the normal vector pointing outward from the multibody constrained geometric model is the positive direction corresponding to the Z-axis of the local coordinate system.
[0090] S4. Based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system, determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
[0091] Among them, the three-axis direction vectors in the world coordinate system refer to the X-axis direction vector, Y-axis direction vector, and Z-axis direction vector in the world coordinate system.
[0092] In this embodiment, when determining the local coordinate X-axis direction vector, an adaptive rule of aligning with the world coordinate can be adopted, which makes it easier to intuitively perceive the attitude of the local coordinate relative to the world coordinate.
[0093] Specifically, based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system, the specific implementation methods for determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model can include:
[0094] (1) When the geometric feature picking point is taken as the origin of the local coordinate system, determine whether the direction vector of the local coordinate Z axis is perpendicular to the direction vector of the world coordinate X axis.
[0095] (2) If so, the world coordinate X-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model;
[0096] (3) If not, and the local coordinate Z-axis direction vector is perpendicular to the world coordinate Y-axis direction vector, then the world coordinate Y-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model;
[0097] (4) If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, then the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model is determined based on the perpendicularity property between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
[0098] Optionally, the specific implementation of determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system may include: if the local coordinate Z-axis direction vector is perpendicular to the world coordinate Z-axis direction vector, then the world coordinate Z-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Z-axis direction vector, then the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model is determined based on the cross product of the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
[0099] In this embodiment, a schematic diagram illustrating the process of determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model is provided. Figure 5 .like Figure 5 As shown, firstly, the geometric feature picking point can be used as the origin of the local coordinate system. Based on the above steps, the local coordinate Z-axis direction vector has been obtained. The X-axis direction vector in the world coordinate system is a known quantity, and it is easy to determine whether the local coordinate Z-axis direction vector and the world coordinate X-axis direction vector have a mutually perpendicular positional relationship. If they have a perpendicular relationship, then step (2) is executed, that is, the world coordinate X-axis direction vector can be determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model. If they do not have a perpendicular relationship, then step (3) is executed to further determine whether the local coordinate Z-axis direction vector and the world coordinate Y-axis direction vector have a mutually perpendicular positional relationship. If the local coordinate Z-axis direction vector is perpendicular to the world coordinate Y-axis direction vector, then the world coordinate Y-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model. If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, then it is further determined whether the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector have a mutually perpendicular positional relationship.
[0100] Based on the above embodiments, see below. Figure 5 If the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector are perpendicular to each other, then the world coordinate Z-axis direction vector can be determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model. If the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector are not perpendicular to each other, then the cross product of the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector is performed to obtain the outer product result. The direction vector corresponding to this outer product result is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
[0101] S5. Based on the local coordinate Z-axis direction vector and the local coordinate X-axis direction vector, determine the local coordinate Y-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
[0102] In this embodiment, since the local coordinate system is determined by the right-hand rule and the three axes of the local coordinate system are perpendicular to each other, the direction vector of the other coordinate axis can be determined by performing a cross product of the two known direction vectors of the local coordinate system. Based on this, the direction vector of the local Y-axis of the target kinematic pair relative to the multibody constraint geometric model can be obtained.
[0103] In the third case, if the target geometric feature category and motion amplitude category information meet the third preset condition, then the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined based on the target edge to which the geometric feature pick point belongs.
[0104] The third preset condition includes: the target geometric feature category is a straight line category, and the motion amplitude category information is a revolute joint category, a translating joint category, a cylindrical joint category, a universal joint category, or a helical joint category.
[0105] In this embodiment, when the target geometric feature category and motion amplitude category information meet the third preset condition, the target line to which the geometric feature picking point belongs can be determined as the line corresponding to the Z-axis of the local coordinate system, and the direction of the target line pointing to the outside of the multibody constraint geometric model can be determined as the positive direction corresponding to the Z-axis of the local coordinate system. Based on determining the line and positive direction of the Z-axis, the Z-axis direction vector of the local coordinate system is obtained.
[0106] Specifically, the specific implementation of determining the positive direction corresponding to the Z-axis of the local coordinate system can include: determining the target line vector based on the line to which the geometric feature pick point belongs; determining the first reference direction vector based on the geometric feature pick point and the camera position of the current view; determining the dot product result of the first reference direction vector and the target line vector; if the dot product result is less than a preset threshold, then the target line vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the dot product result is greater than or equal to the preset threshold, then the inverse vector of the target line vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; further, based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system, the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model is determined; based on the local coordinate Z-axis direction vector and the local coordinate X-axis direction vector, the local coordinate Y-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model is determined.
[0107] In the fourth case, if the target geometric feature category and motion amplitude category information meet the fourth preset condition, then the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined based on the target cylindrical surface axis to which the geometric feature pick point belongs.
[0108] The fourth preset condition includes: the target geometric feature category is a circular curve category or a cylindrical surface category, and the motion amplitude category information is a revolute joint category, a translating joint category, a cylindrical joint category, a universal joint category, or a helical joint category.
[0109] In this embodiment, when the target geometric feature category and motion amplitude category information meet the fourth preset condition, the target axis of the cylindrical surface to which the geometric feature picking point belongs can be determined as the axis corresponding to the Z-axis of the local coordinate system, and the direction of the target axis pointing to the outside of the multibody constraint geometric model can be determined as the positive direction corresponding to the Z-axis of the local coordinate system. Based on determining the axis and positive direction of the Z-axis, the Z-axis direction vector of the local coordinate system is obtained.
[0110] Specifically, the specific implementation of determining the positive direction corresponding to the Z-axis of the local coordinate system can include: determining the target axis vector based on the axis of the cylindrical surface to which the geometric feature pick point belongs; determining the second reference direction vector based on the geometric feature pick point and the camera position of the current view; determining the inner product result of the second reference direction vector and the target axis vector; if the inner product result is less than a preset threshold, then determining the target axis vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the inner product result is greater than or equal to the preset threshold, then determining the inverse vector of the target axis vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system; and determining the local coordinate Y-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the local coordinate Z-axis direction vector and the local coordinate X-axis direction vector.
[0111] Specifically, as shown in Table 2, if the motion amplitude category information of the target kinematic pair is a spherical pair, regardless of the target geometric feature category to which the geometric feature pick-up point corresponds, the corresponding local coordinate Z-axis direction vector is consistent with the world coordinate Z-axis direction vector. Similarly, the local coordinate X-axis direction vector is consistent with the world coordinate X-axis direction vector, and the local coordinate Y-axis direction vector is consistent with the world coordinate Y-axis direction vector.
[0112] The technical solution of this invention includes a target geometric feature category that may include at least one of the following: vertex category, straight line category, circular curve category, irregular curve category, plane category, cylindrical surface category, spherical surface category, and irregular curved surface category. The motion amplitude category information includes at least one of the following: revolute joint category, prismatic joint category, cylindrical joint category, universal joint category, helical joint category, fixed joint category, and planar joint category. When determining the constraint point position information of the target kinematic joint relative to the multi-body constrained geometric model, the constraint point position information of the target kinematic joint relative to the multi-body constrained geometric model can be determined based on the geometric feature pick-up point, the target geometric feature category, and a preset point mapping relationship. When determining the directional constraint information of the target kinematic joint relative to the multi-body constrained geometric model, the directional constraint information is determined in different ways according to the preset conditions satisfied by the target geometric feature category and motion amplitude category information, and the Z-axis direction vector in the directional constraint information is always kept pointing outwards from the model. The technical solution provided in this embodiment, by adopting geometric feature reasoning rules to fit the multi-body modeling logic, can automatically obtain the position information and direction constraint information of the constraint action point of the multi-body constraint geometric model, avoiding the process of manually calculating parameters, which is more efficient and less prone to errors, and further improves the efficiency of determining the motion constraint information of the geometric model and the reliability of the motion constraint information.
[0113] Example 3
[0114] Figure 6 This is a schematic diagram of a model motion constraint information determination device provided in an embodiment of the present invention. The device includes: a geometric model acquisition module 310, a constraint model determination module 320, a constraint position determination module 330, and a constraint direction determination module 340.
[0115] The geometric model acquisition module 310 is used to acquire a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model, in response to a first trigger operation.
[0116] The constraint model determination module 320 is used to respond to the geometric feature picking operation of the geometric model to be processed, and apply the target motion constraint relationship corresponding to the selected target kinematic pair between the first geometric sub-model and the second geometric sub-model to obtain a multibody constraint geometric model;
[0117] The constraint position determination module 330 is used to determine the target geometric feature category to which the geometric feature pick point belongs, and to determine the constraint action point position information of the target kinematic pair relative to the multibody constraint geometric model based on the geometric feature pick point and the target geometric feature category;
[0118] The constraint direction determination module 340 is used to determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic pair.
[0119] The technical solution of this invention, in response to a first trigger operation, acquires a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model. Then, in response to a geometric feature picking operation on the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first and second geometric sub-models to obtain a multi-body constrained geometric model. This determines the target geometric feature category to which the geometric feature picking point belongs. Based on the geometric feature picking point and the target geometric feature category, the position information of the constraint application point of the target kinematic pair relative to the multi-body constrained geometric model is determined. Furthermore, based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, the directional constraint information of the target kinematic pair relative to the multi-body constrained geometric model can be determined. The technical solution provided in this embodiment eliminates the need for manual measurement by the user. A simple click trigger operation automatically obtains the motion constraint information between the multi-body geometric models, simplifying the operation process for determining the motion constraint information of the geometric model and improving the efficiency and reliability of the determination of the motion constraint information.
[0120] Based on the above-mentioned device, optionally, the constraint position determination module 330 is used to determine the constraint position information of the target kinematic pair relative to the multibody constraint geometric model based on the geometric feature picking point, the target geometric feature category and the preset action point mapping relationship.
[0121] Based on the above-mentioned device, optionally, the target geometric feature category includes at least one of the following: vertex category, straight line category, circular curve category, irregular curve category, plane category, cylindrical surface category, spherical surface category, and irregular curved surface category, and the preset action point mapping relationship includes:
[0122] If the target geometric feature category is the vertex category, the irregular curve category, the plane category, or the irregular surface category, then the constraint application point position information is the pick point position coordinates corresponding to the geometric feature pick point;
[0123] If the target geometric feature category is the straight line category, then the constraint application point position information is the coordinates of the midpoint of the edge to which the geometric feature picking point belongs;
[0124] If the target geometric feature category is the circular curve category, then the constraint application point position information is the center position coordinate of the circle to which the geometric feature picking point belongs;
[0125] If the target geometric feature category is the cylindrical surface category, then the constraint application point position information is the coordinate of the midpoint of the axis of the cylindrical surface to which the geometric feature picking point belongs;
[0126] If the target geometric feature category is the sphere category, then the constraint application point location information is the coordinate of the center position of the sphere to which the geometric feature picking point belongs.
[0127] Based on the above-mentioned device, optionally, the motion amplitude category information includes at least one of the following: revolute joint category, prismatic joint category, cylindrical joint category, universal joint category, helical joint category, fixed joint category, and planar joint category; the direction information determination module 340 includes:
[0128] The first position determination unit is configured to determine a preset standard direction as the directional constraint information of the target kinematic pair relative to the multibody constrained geometric model if the target geometric feature category and the motion amplitude category information satisfy a first preset condition; wherein the preset standard direction is a world coordinate system direction vector, and the first preset condition includes: the target geometric feature category is the vertex category, the irregular curve category, or the sphere category; or, the target geometric feature category is the straight line category, the circular curve category, the cylindrical surface category, or the irregular curved surface category, and the motion amplitude category information is the fixed sub-category or the planar sub-category;
[0129] The second position determination unit is used to determine the orientation constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the normal of the target surface to which the geometric feature picking point belongs, if the target geometric feature category and the motion amplitude category information satisfy a second preset condition; wherein, the second preset condition includes: the target geometric feature category is the planar category or the irregular curved surface category, and the motion amplitude category information is the revolute joint category, the prismatic joint category, the cylindrical joint category, the universal joint category, or the helical joint category;
[0130] The third position determination unit is used to determine the orientation constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target edge to which the geometric feature picking point belongs, if the target geometric feature category and the motion amplitude category information satisfy a third preset condition; wherein, the third preset condition includes: the target geometric feature category is a straight line category, and the motion amplitude category information is a revolute joint category, a translating joint category, a cylindrical joint category, a universal joint category, or a helical joint category;
[0131] The fourth position determination unit is used to determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target cylindrical surface axis to which the geometric feature picking point belongs, if the target geometric feature category and the motion amplitude category information satisfy the fourth preset condition; wherein, the fourth preset condition includes: the target geometric feature category is a circular curve category or a cylindrical surface category, and the motion amplitude category information is a revolute joint category, a prismatic joint category, a cylindrical joint category, a universal joint category, or a helical joint category.
[0132] Based on the above-described device, optionally, the direction constraint information includes the local coordinate system direction vector of the target kinematic pair relative to the multibody constraint geometric model, and the second position determination unit includes:
[0133] The normal vector determination sub-unit is used to determine the target normal vector based on at least two non-parallel vectors in the target surface to which the geometric feature pick point belongs;
[0134] The reference vector determination subunit is used to determine the reference direction vector based on the geometric feature pick-up point and the camera position of the current view;
[0135] Z-axis direction determination sub-unit, used to determine the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the target normal vector and the reference direction vector;
[0136] The X-axis direction determination subunit is used to determine the local X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system.
[0137] The Y-axis direction determination subunit is used to determine the local Y-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model based on the local coordinate Z-axis direction vector and the local coordinate X-axis direction vector.
[0138] Based on the above device, optionally, the Z-axis direction determination subunit is specifically used to determine the inner product result of the reference direction vector and the target normal vector; if the inner product result is less than a preset threshold, the target normal vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the inner product result is greater than or equal to the preset threshold, the inverse vector of the target normal vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
[0139] Based on the above-described device, optionally, the X-axis direction determination subunit is specifically used to determine whether the local coordinate Z-axis direction vector is perpendicular to the world coordinate X-axis direction vector when the geometric feature picking point is taken as the origin of the local coordinate system; if yes, the world coordinate X-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if no, and the local coordinate Z-axis direction vector is perpendicular to the world coordinate Y-axis direction vector, the world coordinate Y-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model is determined based on the perpendicularity attribute between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
[0140] Based on the above-mentioned device, optionally, the X-axis direction determination subunit is further configured to: if the local coordinate Z-axis direction vector is perpendicular to the world coordinate Z-axis direction vector, then determine the world coordinate Z-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; if the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Z-axis direction vector, then determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the cross product of the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
[0141] The model motion constraint information determination device provided in the embodiments of the present invention can execute the model motion constraint information determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0142] It is worth noting that the various units and modules included in the above system are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0143] Example 4
[0144] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 7 The electronic device 40 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0145] like Figure 7As shown, electronic device 40 is represented in the form of a general-purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, system memory 402, and bus 403 connecting different system components (including system memory 402 and processing unit 401).
[0146] Bus 403 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0147] Electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0148] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media (… Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0149] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 407 typically perform the functions and / or methods described in the embodiments of the present invention.
[0150] Electronic device 40 can also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 810, etc.), and with one or more devices that enable a user to interact with electronic device 40, and / or with any device that enables electronic device 40 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 411. Furthermore, electronic device 40 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 412. As shown, network adapter 412 communicates with other modules of electronic device 40 via bus 403. It should be understood that, although... Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0151] The processing unit 401 executes various functional applications and page processing by running programs stored in the system memory 402, such as implementing the model motion constraint information determination method provided in the embodiments of the present invention.
[0152] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via I / O interface 411, or installed from storage system 406. When the computer program is executed by processing unit 401, it performs the functions defined in the methods of the embodiments of the present invention.
[0153] Example 5
[0154] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a method for determining model motion constraint information, including:
[0155] In response to the first triggering operation, a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model, is obtained;
[0156] In response to the geometric feature picking operation of the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first geometric sub-model and the second geometric sub-model to obtain a multibody constrained geometric model;
[0157] Determine the target geometric feature category to which the geometric feature pick point belongs, and based on the geometric feature pick point and the target geometric feature category, determine the position information of the constraint application point of the target kinematic pair relative to the multibody constraint geometric model;
[0158] Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined.
[0159] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0160] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0161] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0162] Computer program code for performing the operations of embodiments of the present invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0163] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for determining model motion constraint information, characterized in that, include: In response to the first triggering operation, a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model, is obtained; In response to the geometric feature picking operation of the geometric model to be processed, the target motion constraint relationship corresponding to the selected target kinematic pair is applied between the first geometric sub-model and the second geometric sub-model to obtain a multibody constrained geometric model; Determine the target geometric feature category to which the geometric feature pick point belongs, and based on the geometric feature pick point and the target geometric feature category, determine the position information of the constraint application point of the target kinematic pair relative to the multibody constraint geometric model; Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined; The motion amplitude category information includes at least one of the following: revolute joint, prismatic joint, cylindrical joint, gimbal joint, helical joint, fixed joint, and planar joint. The target geometric feature category includes at least one of the following: vertex, straight line, circular curve, irregular curve, plane, cylindrical surface, spherical surface, and irregular curved surface. The determination of the directional constraint information of the target kinematic joint relative to the multibody constraint geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic joint includes: If the target geometric feature category and the motion amplitude category information satisfy the first preset condition, then the preset standard direction is determined as the directional constraint information of the target kinematic pair relative to the multibody constrained geometric model; wherein, the preset standard direction is a world coordinate system direction vector, and the first preset condition includes: the target geometric feature category is the vertex category, the irregular curve category, or the sphere category; or, the target geometric feature category is the straight line category, the circular curve category, the cylindrical surface category, or the irregular curved surface category, and the motion amplitude category information is the fixed sub-category or the planar sub-category; If the target geometric feature category and the motion amplitude category information satisfy the second preset condition, then based on the normal of the target surface to which the geometric feature picking point belongs, the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined; wherein, the second preset condition includes: the target geometric feature category is the planar category or the irregular curved surface category, and the motion amplitude category information is the revolute joint category, the prismatic joint category, the cylindrical joint category, the universal joint category, or the helical joint category; If the target geometric feature category and the motion amplitude category information satisfy the third preset condition, then based on the target edge to which the geometric feature picking point belongs, the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined; wherein, the third preset condition includes: the target geometric feature category is a straight line category, and the motion amplitude category information is a revolute joint category, a translating joint category, a cylindrical joint category, a universal joint category, or a helical joint category; If the target geometric feature category and the motion amplitude category information satisfy the fourth preset condition, then based on the target cylindrical surface axis to which the geometric feature pickup point belongs, the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model is determined; wherein, the fourth preset condition includes: the target geometric feature category is a circular curve category or a cylindrical surface category, and the motion amplitude category information is a revolute joint category, a prismatic joint category, a cylindrical joint category, a universal joint category, or a helical joint category.
2. The method according to claim 1, characterized in that, The step of determining the position information of the constraint application point of the target kinematic pair relative to the multibody constraint geometric model based on the geometric feature pick-up point and the target geometric feature category includes: Based on the geometric feature pick-up points, the target geometric feature category, and the preset point of action mapping relationship, the position information of the constraint point of the target kinematic pair relative to the multibody constraint geometric model is determined.
3. The method according to claim 2, characterized in that, The target geometric feature categories include at least one of the following: vertex category, line category, circular curve category, irregular curve category, plane category, cylindrical surface category, spherical surface category, and irregular curved surface category. The preset application point mapping relationship includes: If the target geometric feature category is the vertex category, the irregular curve category, the plane category, or the irregular surface category, then the constraint application point position information is the pick point position coordinates corresponding to the geometric feature pick point; If the target geometric feature category is the straight line category, then the constraint application point position information is the coordinates of the midpoint of the edge to which the geometric feature picking point belongs; If the target geometric feature category is the circular curve category, then the constraint application point position information is the center position coordinate of the circle to which the geometric feature picking point belongs; If the target geometric feature category is the cylindrical surface category, then the constraint application point position information is the coordinate of the midpoint of the axis of the cylindrical surface to which the geometric feature picking point belongs; If the target geometric feature category is the sphere category, then the constraint application point location information is the coordinate of the center position of the sphere to which the geometric feature picking point belongs.
4. The method according to claim 1, characterized in that, The orientation constraint information includes the local coordinate system orientation vector of the target kinematic pair relative to the multibody constrained geometric model. Determining the orientation constraint information of the target kinematic pair relative to the multibody constrained geometric model based on the normal to the target surface to which the geometric feature pick point belongs includes: The target normal vector is determined based on at least two non-parallel vectors in the target surface to which the geometric feature pick point belongs. Based on the geometric feature pick-up points and the camera position of the current view, a reference direction vector is determined; Based on the target normal vector and the reference direction vector, determine the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; Based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system, the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model is determined; Based on the local coordinate Z-axis direction vector and the local coordinate X-axis direction vector, the local coordinate Y-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model is determined.
5. The method according to claim 4, characterized in that, The step of determining the local Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the target normal vector and the reference direction vector includes: Determine the dot product of the reference direction vector and the target normal vector; If the inner product result is less than a preset threshold, then the target normal vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; If the inner product result is greater than or equal to the preset threshold, then the inverse vector of the target normal vector is determined as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model.
6. The method according to claim 4, characterized in that, The step of determining the local X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system includes: When the geometric feature picking point is taken as the origin of the local coordinate system, it is determined whether the local coordinate Z-axis direction vector is perpendicular to the world coordinate X-axis direction vector. If so, the world coordinate X-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model; If not, and the local coordinate Z-axis direction vector is perpendicular to the world coordinate Y-axis direction vector, then the world coordinate Y-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model; If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, then the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model is determined based on the perpendicularity property between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
7. The method according to claim 6, characterized in that, The step of determining the local X-axis direction vector of the target kinematic pair relative to the multibody constrained geometric model based on the relative position information of the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system includes: If the local coordinate Z-axis direction vector is perpendicular to the world coordinate Z-axis direction vector, then the world coordinate Z-axis direction vector is determined as the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model; If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Z-axis direction vector, then the local coordinate X-axis direction vector of the target kinematic pair relative to the multibody constraint geometric model is determined based on the cross product of the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
8. A device for determining model motion constraint information, characterized in that, The device includes: The geometric model acquisition module is used to acquire a geometric model to be processed, including a first geometric sub-model and a second geometric sub-model, in response to a first trigger operation. The constraint model determination module is used to respond to the geometric feature picking operation of the geometric model to be processed, and apply the target motion constraint relationship corresponding to the selected target kinematic pair between the first geometric sub-model and the second geometric sub-model to obtain a multibody constraint geometric model; The constraint position determination module is used to determine the target geometric feature category to which the geometric feature pick point belongs, and based on the geometric feature pick point and the target geometric feature category, determine the constraint application point position information of the target kinematic pair relative to the multibody constraint geometric model; The constraint direction determination module is used to determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic pair; The motion amplitude category information includes at least one of the following: revolute joint category, translating joint category, cylindrical joint category, universal joint category, helical joint category, fixed joint category, and planar joint category; the target geometric feature category includes at least one of the following: vertex category, straight line category, circular curve category, irregular curve category, plane category, cylindrical surface category, spherical surface category, and irregular curved surface category. The constraint direction determination module includes the following block: The first position determination unit is configured to determine a preset standard direction as the directional constraint information of the target kinematic pair relative to the multibody constrained geometric model if the target geometric feature category and the motion amplitude category information satisfy a first preset condition; wherein the preset standard direction is a world coordinate system direction vector, and the first preset condition includes: the target geometric feature category is the vertex category, the irregular curve category, or the sphere category; or, the target geometric feature category is the straight line category, the circular curve category, the cylindrical surface category, or the irregular curved surface category, and the motion amplitude category information is the fixed sub-category or the planar sub-category; The second position determination unit is used to determine the orientation constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the normal of the target surface to which the geometric feature picking point belongs, if the target geometric feature category and the motion amplitude category information satisfy a second preset condition; wherein, the second preset condition includes: the target geometric feature category is the planar category or the irregular curved surface category, and the motion amplitude category information is the revolute joint category, the prismatic joint category, the cylindrical joint category, the universal joint category, or the helical joint category; The third position determination unit is used to determine the orientation constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target edge to which the geometric feature picking point belongs, if the target geometric feature category and the motion amplitude category information satisfy a third preset condition; wherein, the third preset condition includes: the target geometric feature category is a straight line category, and the motion amplitude category information is a revolute joint category, a translating joint category, a cylindrical joint category, a universal joint category, or a helical joint category; The fourth position determination unit is used to determine the directional constraint information of the target kinematic pair relative to the multibody constraint geometric model based on the target cylindrical surface axis to which the geometric feature picking point belongs, if the target geometric feature category and the motion amplitude category information satisfy the fourth preset condition; wherein, the fourth preset condition includes: the target geometric feature category is a circular curve category or a cylindrical surface category, and the motion amplitude category information is a revolute joint category, a prismatic joint category, a cylindrical joint category, a universal joint category, or a helical joint category.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the model motion constraint information determination method according to any one of claims 1-7.