Model motion constraint information determination method and device and electronic equipment
By automatically obtaining motion constraint information of geometric model, the problems of cumbersome operation and inefficiency in the prior art are solved, and efficient and reliable motion constraint information determination is achieved.
Patent Information
- Application Number
- CN202510371410.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-03-27
AI Technical Summary
In the prior art, determining geometric model motion constraint information is cumbersome, inefficient and poor reliability, and relies heavily on manual participation.
The geometric sub-model is obtained by responding to the trigger operation, and the motion constraint relationship is automatically applied using the geometric feature pickup operation to determine the geometric feature category and motion amplitude category information, so as to automatically obtain the motion constraint information.
The operation process of geometric model motion constraint information is simplified, the determination efficiency and reliability are improved, and manual intervention is reduced.
Smart Images

Figure CN120296969A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method, an apparatus, and an electronic device for determining model motion constraint information. Background Art
[0002] With the improvement of user requirements and the development of technology, many single mechanical products have evolved into complex products integrating machinery, electronics, hydraulics, and control. For the design of complex products, a system modeling and simulation platform, for example, a modeling and simulation platform based on the Modelica language, can meet complex design requirements. Through the system modeling and simulation platform, visual unified modeling of multi-domain physical systems in engineering practice can be achieved. In order to perform multi-body system constraint modeling in the modeling and simulation platform, it is usually necessary to first draw a geometric model with motion constraint relationships, and then determine the motion constraint information of the geometric model, so as to construct a multi-body system constraint model based on the determined motion constraint information.
[0003] Currently, the main method for determining the motion constraint information of a geometric model with motion constraint relationships is as follows: First, analyze the motion relationships between rigid bodies in the multi-body system. Subsequently, design at least two rigid body geometric models with motion constraint relationships in a geometric drawing software, and then manually measure the motion constraint information of these geometric models with the help of the geometric drawing software to obtain direction measurement data and position measurement data.
[0004] However, the above method for determining the motion constraint information of the geometric model is not only cumbersome in operation, but also highly dependent on manual participation, and there are technical problems such as cumbersome operation, low efficiency, and poor reliability of the motion constraint information when determining the motion constraint information. Summary of the Invention
[0005] The present invention provides a method, an apparatus, and an electronic device for determining model motion constraint information, so that without manual measurement operation by the user, through simple click-trigger operations, the motion constraint information between multi-body geometric models can be automatically obtained, simplifying the operation process of determining the motion constraint information of the geometric model, and improving the determination efficiency of the motion constraint information of the geometric model and the reliability of the motion constraint information.
[0006] In a first aspect, an embodiment of the present invention provides a method for determining model motion constraint information, the method including:
[0007] In response to a first trigger operation, obtain a geometric model to be processed including a first geometric sub-model and a second geometric sub-model;
[0008] In response to a geometric feature picking operation on the geometric model to be processed, 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 multi-body constraint geometric model;
[0009] Determine the target geometric feature category to which the geometric feature picking point belongs, and based on the geometric feature picking point and the target geometric feature category, determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model;
[0010] Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0011] In a second aspect, an embodiment of the present invention further provides a device for determining model motion constraint information, and the device includes:
[0012] A geometric model acquisition module, configured 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] A constraint model determination module, configured to apply a target motion constraint relationship corresponding to a selected target kinematic pair between the first geometric sub-model and the second geometric sub-model in response to a geometric feature picking operation on the geometric model to be processed, to obtain a multi-body constraint geometric model;
[0014] A constraint position determination module, configured to determine the target geometric feature category to which the geometric feature picking point belongs, and based on the geometric feature picking point and the target geometric feature category, determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model;
[0015] A constraint direction determination module, configured to determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic pair.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, and the electronic device includes:
[0017] One or more processors;
[0018] A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement the method for determining model motion constraint information according to any one of the embodiments of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the method for determining model motion constraint information according to any one of the embodiments of the present invention when executed by a computer processor.
[0020] The technical solution of the embodiment of the present invention obtains 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. Furthermore, 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 geometric sub-model and the second geometric sub-model to obtain a multi-body constrained geometric model. Then, the target geometric feature category to which the geometric feature picking point belongs is determined. Based on the geometric feature picking point and the target geometric feature category, the position information of the constraint action point of the target kinematic pair relative to the multi-body constrained geometric model is determined, and the direction constraint information of the target kinematic pair relative to the multi-body constrained geometric model can be determined based on the target geometric feature category and the motion amplitude category information of the target kinematic pair. The technical solution provided in this embodiment does not require manual measurement operations by the user. Through simple click trigger operations, the motion constraint information between multi-body geometric models can be automatically obtained, simplifying the operation process of determining the motion constraint information of geometric models and improving the determination efficiency of the motion constraint information of geometric models and the reliability of the motion constraint information. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the introduced drawings are only the drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a schematic flowchart of a method for determining model motion constraint information provided by an embodiment of the present invention;
[0023] Figure 2 It is a schematic diagram for determining the direction constraint information of the target kinematic pair relative to the multi-body constrained geometric model according to an embodiment of the present invention;
[0024] Figure 3 It is a schematic flowchart of another method for determining model motion constraint information provided by an embodiment of the present invention;
[0025] Figure 4 It is a comparison schematic diagram of the vector pointing to the inside and outside of the model according to an embodiment of the present invention;
[0026] Figure 5 It is a schematic diagram of the process for determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constrained geometric model according to an embodiment of the present invention;
[0027] Figure 6 It is a schematic structural diagram of a device for determining model motion constraint information provided by an embodiment of the present invention;
[0028] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Specific embodiments
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that, for the sake of description, only parts related to the present invention rather than all structures are shown in the accompanying drawings.
[0030] Embodiment 1
[0031] Figure 1 A flowchart of a method for determining model motion constraint information provided by an embodiment of the present invention. This embodiment is applicable to any situation where it is necessary to determine the motion constraint information of a geometric model. This method can be executed by a model motion constraint information determination device, and the device 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, etc.
[0032] As Figure 1 shown, the method for determining model motion constraint information includes:
[0033] S110. In response to a first trigger operation, obtain a geometric model to be processed including a first geometric sub-model and a second geometric sub-model.
[0034] Wherein, the first trigger operation is an operation to obtain the geometric model to be processed. The geometric model to be processed is a multi-body three-dimensional mechanical model to which motion constraints will be applied and whose motion constraint information is determined according to the constraint application trigger point. Specifically, the geometric model to be converted can at least include a first geometric sub-model and a second geometric sub-model, that is, any at least two geometric sub-models can be used as the geometric model to be converted. The spatial position relationships between at least two geometric sub-models in the geometric model to be converted include, but are not limited to, separated, tangent, intersecting, containing, coincident, parallel, perpendicular, skew, coaxial, and symmetric, etc.
[0035] In this embodiment, the method for determining model motion constraint information can be integrated into a target tool, and the target tool can be added to a target model platform with three-dimensional model editing functions. The geometric model to be processed can be a geometric model that has been drawn and pre-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 obtained from the preset storage space. In addition, the geometric model to be processed can also be a geometric model drawn in the target tool.
[0036] Specifically, the first triggering operation may include the operation of opening the target tool and the operation of obtaining the geometric model to be processed. For example, when the user clicks the start control of the target tool in the target model platform, in response to the operation of opening the target tool, the main page of the target tool can be entered. The main page may include a target control for obtaining the geometric model to be processed that is preset. Further, when the user triggers the target control, the geometric model to be processed can be drawn or obtained from the preset storage space.
[0037] S120. In response to the geometric feature picking operation on the geometric model to be processed, 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 multi-body constrained geometric model.
[0038] Among them, the geometric feature picking operation refers to the operation of picking the geometric features (including point, line or surface features) of the first geometric sub-model and / or the second geometric sub-model through mouse operation in a three-dimensional visualization environment. The multi-body constrained geometric model refers to a mechanical three-dimensional model composed of the first geometric sub-model and the second geometric sub-model with a motion constraint relationship.
[0039] Among them, the target kinematic pair is the kinematic pair selected by the user from multiple candidate kinematic pairs. A kinematic pair refers to the connection method between two components in a mechanical system, allowing a certain relative motion between the two components. The kinematic pair restricts the degrees of freedom of the components and determines their motion modes. The target motion constraint relationship refers to the motion constraint relationship corresponding to the target kinematic pair. The motion constraint relationship refers to the limiting conditions suffered by two geometric models during the motion process, and these conditions determine their relative motion modes. More specifically, the kinematic pair may include at least one of the following categories: spherical pair, revolute pair, prismatic pair, cylindrical pair, universal joint, screw pair, fixed pair and planar pair. Different categories of kinematic pairs correspond to different motion constraint relationships. For example, the motion constraint relationship corresponding to the fixed pair is the fixed constraint relationship, and the motion constraint relationship corresponding to the revolute pair is the rotational constraint relationship, etc.
[0040] In this embodiment, multiple different types of candidate kinematic pairs can be displayed on the display page of the target tool. When the user clicks any one of these candidate kinematic pairs, the triggered candidate kinematic pair is the target kinematic pair, and at this time the target kinematic pair is in the selected state. Further, the user can perform a geometric feature picking operation on the first geometric sub-model and / or the second geometric sub-model. At this time, the trigger point clicked by the user on the first geometric model and / or the second geometric model can be determined as the geometric feature picking point. At this time, the target motion constraint relationship corresponding to the target kinematic pair in the selected state can be applied to the geometric feature picking point, thereby obtaining a multi-body constrained geometric model.
[0041] It should be specifically noted that if multiple kinematic pairs need to be applied between the first geometric model and the second geometric model, this step can be repeated.
[0042] S130. Determine the target geometric feature category to which the geometric feature pick-up point belongs. Based on the geometric feature pick-up point and the target geometric feature category, determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model.
[0043] Among them, the geometric feature pick-up point refers to the trigger point clicked by the user on the model to be processed. Among them, the target geometric feature category indicates which specific geometric feature category the geometric feature pick-up point belongs to. The geometric feature categories can include vertex categories, edge categories or face categories. The edge categories can specifically include straight line categories, circular curve categories and irregular curve categories, etc. The face categories can specifically include plane categories, cylindrical surface categories, spherical surface categories and irregular surface categories, etc. The position information of the constraint action point refers to the three-dimensional spatial coordinates corresponding to the action point of the motion constraint on the rigid body.
[0044] Specifically, if the geometric feature pick-up point is located at a vertex of the multi-body constraint geometric model, the target geometric feature category is the vertex category; if the geometric feature pick-up point is located on an edge of the multi-body constraint geometric model, the target geometric feature category is the edge category; if the geometric feature pick-up point is located on an outer surface of the multi-body constraint geometric model, the target geometric feature category is the face category. On this basis, regardless of the category of the target kinematic pair, the position information inference mapping relationship can be used to determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model according to the target geometric feature category, the geometric feature pick-up point and the preset position information. For example, the position information inference mapping relationship can include: if the target geometric feature category to which the geometric feature pick-up point belongs is the vertex category, the three-dimensional position coordinates of the geometric feature pick-up point can be determined as the position information of the constraint action point; if the target geometric feature category to which the geometric feature pick-up point belongs is the edge category, the three-dimensional position coordinates of the midpoint of the target edge to which the geometric feature pick-up point belongs can be determined as the position information of the constraint action point, etc.
[0045] S140. Based on the target geometric feature category and the motion amplitude category information of the target kinematic pair, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0046] Among them, the motion amplitude category information is used to characterize what type the kinematic pair corresponds to. For example, each candidate kinematic pair has corresponding motion category label information. When the user selects a candidate kinematic pair as the target kinematic pair, it is easy to determine the corresponding motion amplitude category information. The direction constraint information represents the direction limit of the relative motion between rigid bodies, and the direction constraint information can be characterized by a direction vector.
[0047] Specifically, the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model can be determined according to the target geometric feature category, the kinematic 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 the combination modes of what target geometric feature categories and kinematic amplitude category information, corresponding to what direction vector extraction methods. For example, the specific content of the preset direction vector extraction mapping relationship may include: for the kinematic amplitude category information being 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 pickup point belongs is an edge category, then the direction vector corresponding to the target edge to which the geometric feature pickup point belongs is determined as the direction constraint information; if the target geometric feature category to which the geometric feature pickup point belongs is a face category, then the normal vector of the face to which the geometric feature pickup point belongs is determined as the direction constraint information.
[0048] Exemplarily, for the schematic diagram of determining the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model, see Figure 2 . As Figure 2 (a) shows, the target geometric feature category to which the geometric feature pickup point S1 belongs is a vertex category. At this time, the direction constraint information is defaulted to the preset standard direction vector, and the preset standard direction vector refers to the direction vectors of the three coordinate axes in the world coordinate system; as Figure 2 (b) shows, the target geometric feature category to which the geometric feature pickup point S2 belongs is a line category. At this time, the direction constraint information is the direction vector of the edge relative to the positive direction of the world coordinate system; as Figure 2 (c) shows, the target geometric feature category to which the geometric feature pickup point S3 belongs is a face category. At this time, the direction constraint information is the normal vector of the face to which the geometric feature pickup point belongs.
[0049] In this embodiment, based on obtaining the direction constraint information and the constraint action point position information of the target kinematic pair relative to the multi-body constraint geometric model, which are the motion constraint information, an initial system simulation multi-body 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 multi-body model, so as to efficiently and accurately achieve the effect of converting the geometric multi-body model with constraint relationships into a multi-body system simulation model.
[0050] In the technical solution of the embodiment of the present invention, in response to a first trigger operation, a to-be-processed geometric model including a first geometric sub-model and a second geometric sub-model is obtained. Furthermore, in response to a geometric feature picking operation on the to-be-processed geometric model, 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 multi-body constraint geometric model. Then, the target geometric feature category to which the geometric feature picking point belongs is determined. Based on the geometric feature picking point and the target geometric feature category, the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model is determined, and the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model can be determined based on the target geometric feature category and the motion amplitude category information of the target kinematic pair. The technical solution provided in this embodiment does not require the user to perform manual measurement operations. Through simple click trigger operations, the motion constraint information between multi-body geometric models can be automatically obtained, simplifying the operation process of determining the motion constraint information of geometric models and improving the determination efficiency of the motion constraint information of geometric models and the reliability of the motion constraint information.
[0051] Embodiment 2
[0052] Figure 3 FIG. is a schematic diagram of a method for determining model motion constraint information provided by an embodiment of the present invention. On the basis of the foregoing embodiment, S130 and 140 are further refined, and the specific implementation manner can refer to the technical solution of this embodiment. Among them, the same or corresponding technical terms as those in the above embodiment will not be described again here.
[0053] As Figure 3 shown, the method specifically includes the following steps:
[0054] S210. In response to a first trigger operation, obtain a to-be-processed geometric model including a first geometric sub-model and a second geometric sub-model.
[0055] S220. In response to a geometric feature picking operation on the to-be-processed geometric model, 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 multi-body constraint geometric model.
[0056] S230. Determine the target geometric feature category to which the geometric feature picking point belongs.
[0057] In this embodiment, the target geometric feature categories include at least one of vertex category, line category, circular curve category, irregular curve category, plane category, cylindrical surface category, spherical surface category, and irregular surface category. The motion amplitude category information corresponding to the target kinematic pair includes at least one of revolute pair category, prismatic pair category, spherical pair, cylindrical pair category, universal joint category, screw pair category, fixed pair category, and planar pair category. On this basis, the specific implementation method for determining the motion constraint information of the target kinematic pair relative to the multi-body constraint geometric model may include:
[0058] S240. Determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model based on the geometric feature pick-up point, the target geometric feature category, and the preset action point mapping relationship.
[0059] Among them, the preset action point mapping relationship is the mapping relationship between the geometric feature category and the constraint action point set in advance. The preset action point mapping relationship may specifically include: if the target geometric feature category is vertex category, irregular curve category, plane category, or irregular surface category, the constraint action point position information is the pick-up point position coordinates corresponding to the geometric feature pick-up point; if the target geometric feature category is line category, the constraint action point position information is the midpoint position coordinates of the side line to which the geometric feature pick-up point belongs; if the target geometric feature category is circular curve category, the constraint action point position information is the center position coordinates of the circle to which the geometric feature pick-up point belongs; if the target geometric feature category is cylindrical surface category, the constraint action point position information is the axis midpoint position coordinates of the axis of the cylindrical surface to which the geometric feature pick-up point belongs; if the target geometric feature category is spherical surface category, the constraint action point position information is the center of the sphere position coordinates of the sphere to which the geometric feature pick-up point belongs.
[0060] In this embodiment, the example table of the mapping relationship between the geometric feature category and the constraint action point is shown in Table 1. As shown in Table 1, when determining the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model, it is not necessary to consider the differences in the motion amplitude category information. Regardless of the motion amplitude category, the implementation method for determining the constraint action point position information is the same. Specifically, based on the obtained target geometric feature category, the target action point corresponding to the target geometric feature category can be determined according to the preset action point mapping relationship, and thus the three-dimensional position coordinates of the target action point can be determined as the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model.
[0061] Table 1 Position determination methods of kinematic pairs under different features
[0062]
[0063] Specifically, as shown in Table 1, if the target geometric feature category is the vertex category, the irregular curve category, the plane category, or the irregular surface category, the constraint application point is the geometric feature picking point, and the corresponding constraint application point position information is the picking point position coordinates corresponding to the geometric feature picking point. If the target geometric feature category is the straight line category, the constraint application point is the midpoint of the side line to which the geometric feature picking point belongs, and the corresponding constraint application point position information is the three-dimensional position coordinates of the midpoint, that is, the midpoint position coordinates. If the target geometric feature category is the circular curve category, the constraint application point is the center of the circle to which the geometric feature picking point belongs, and the corresponding constraint application point position information is the three-dimensional position coordinates of the circle, that is, the center position coordinates. If the target geometric feature category is the circular curve category, the constraint application point is the midpoint of the axis of the cylindrical surface to which the geometric feature picking point belongs, and the corresponding constraint application point position information is the three-dimensional position coordinates of the midpoint of the axis, that is, the axis midpoint position coordinates. If the target geometric feature category is the spherical surface category, the constraint application point is the center of the sphere to which the geometric feature picking point belongs, and the corresponding constraint application point position information is the three-dimensional position coordinates of the center of the sphere, that is, the center of the sphere position coordinates.
[0064] S250. Determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the target geometric feature category and the kinematic pair category information of the target kinematic pair.
[0065] In this embodiment, the direction constraint information is not only related to the target geometric feature category but also to the kinematic pair category information of the target kinematic pair. The direction constraint information can be characterized by the local coordinate system direction vectors of the target kinematic pair relative to the multi-body constraint geometric model, specifically manifested as the need to determine the Z-axis direction vector, the X-axis direction vector, and the Y-axis direction vector of the local coordinate system.
[0066] Specifically, when determining the direction constraint information, it mainly includes the following four situations. The summary example table of these four situations for determining the direction constraint information is shown in Table 2, and specifically, it can include:
[0067] Table 2 Determination method of the straight line where the Z-axis of the kinematic pair is located for different features
[0068]
[0069] The first situation: If the target geometric feature category and the kinematic pair category information meet the first preset condition, then the preset standard direction is determined as the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0070] Among them, the preset standard direction is the axis direction vector of the world coordinate system. The first preset condition includes: the target geometric feature category is the vertex category, the irregular curve category or the spherical surface category; or, the target geometric feature category is the straight line category, the circular curve category, the cylindrical surface category or the irregular surface category, and the motion amplitude category information is the fixed pair category or the planar pair category.
[0071] In this embodiment, if the target geometric feature category is the vertex category, the irregular curve category or the spherical surface category, and the motion amplitude category information is the fixed pair category or the planar pair category, in this case, the Z-axis direction vector in the world coordinate system can be determined as the Z-axis direction vector of the local coordinate system, the X-axis direction vector in the world coordinate system can be determined as the X-axis direction vector of the local coordinate system, and the Y-axis direction vector in the world coordinate system can be determined as the Y-axis direction vector of the local coordinate system, thus obtaining the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0072] The second case: If the target geometric feature category and the motion amplitude category information meet the second preset condition, then based on the normal vector of the target surface to which the geometric feature pick-up point belongs, the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model is determined.
[0073] Among them, the second preset condition includes: the target geometric feature category is the plane category or the irregular surface category, and the motion amplitude category information is the revolute pair category, the prismatic pair category, the cylindrical pair category, the universal joint category or the screw pair category.
[0074] In this embodiment, when the target geometric feature category and the motion amplitude category information meet the second preset condition, the normal vector of the target surface to which the geometric feature pick-up point belongs can be determined as the straight line corresponding to the Z-axis of the local coordinate system, and the direction in which the normal vector points to the outside of the multi-body constraint geometric model can be determined as the positive direction corresponding to the Z-axis of the local coordinate system. On the basis of determining the straight line and the positive direction where the Z-axis is located, the Z-axis direction vector of the local coordinate system is obtained. Exemplarily, in order to clearly illustrate what is the direction in which the normal vector points to the outside of the multi-body constraint geometric model, a specific example will be given next. For the comparison schematic diagram of the vector pointing to the inside and outside of the model, see Figure 4 , when the geometric feature pick-up point is located on the right side of the cube, as Figure 4 (a) shows, the direction in which the normal vector points to the right is the direction in which the vector points to the outside of the model; as Figure 4 (b) shows, 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, when the target geometric feature category and the motion amplitude category information meet the second preset condition, in order to ensure that the direction with the normal vector pointing to the outside of the multi-body constraint 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 multi-body constraint 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 in the target surface to which the geometric feature picking point belongs.
[0077] In this embodiment, the vector cross product method (using the cross product of two non-parallel vectors on a 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, and subsequent correction processing can be performed on this Z-axis initial direction by referring to the reference direction vector.
[0078] S2. Determine the reference direction vector based on the geometric feature picking point and the camera position of the current view.
[0079] Among them, the camera position of the current view refers to the position coordinates of the camera (or observer) in the current 3D scene view. After the image display engine of the current view displays the 3D model, the corresponding camera position is known and can be directly obtained here. The reference direction vector is the unit vector between the geometric feature picking point and the camera position.
[0080] Specifically, the geometric feature picking point can be expressed as P pln =(x0, y0, z0), and the camera position of the current view can be expressed as P eye , then the reference direction vector n external can be expressed as:
[0081]
[0082] In this embodiment, since the camera position must be located in the front of the model, and there will be no occlusion of the point detected by the user click (i.e., the geometric feature picking point), the unit vector from the geometric feature picking point to the camera position must point to the outside of the model. This unit vector can be used as the reference direction vector, and by correcting the initial direction of the Z-axis of the local coordinate system with the reference direction vector, it can be ensured that the direction with the normal vector pointing to the outside of the multi-body constraint geometric model is the positive direction corresponding to the Z-axis of the local coordinate system.
[0083] S3. Determine the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the target normal vector and the reference direction vector.
[0084] Specifically, based on the comparison result between the inner product of the target normal vector and the reference direction vector and a preset value, it can be determined whether to use the target normal vector as the local coordinate Z-axis direction vector or the reverse vector of the target normal vector as the local coordinate Z-axis direction vector.
[0085] Optionally, the specific implementation method for determining the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint 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 the preset threshold, then determining the target normal vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; if the inner product result is greater than or equal to the preset threshold, then determining the reverse vector of the target normal vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model.
[0086] In this embodiment, the following formula can be used to determine whether it is necessary to correct the initial direction of the Z-axis of the local coordinate system:
[0087]
[0088] In the formula, n Z represents the local coordinate Z-axis direction vector, n pln ·n external represents the inner product result of the reference direction vector and the target normal vector, and the preset threshold is 0.
[0089] In this embodiment, if the inner product result of the reference direction vector and the target normal vector is less than zero, this indicates that the angle between the reference direction vector and the target normal vector is greater than 90 degrees, which means that the angle between the two vectors is between 90 degrees and 270 degrees, indicating that the two vectors are "in the opposite direction" to some extent. Since the camera position must be located in front of the model and there will be no occlusion when the user clicks on the detected point (i.e., the geometric feature picking point), it can be determined that the unit vector from the geometric feature picking point to the camera position point must point outside 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 inside the model. Therefore, the reverse 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 multi-body constraint geometric model. By correcting the initial direction of the Z-axis of the local coordinate system through the reference direction vector, it is ensured that the direction pointing outside the multi-body constraint geometric model of the normal vector is the positive direction corresponding to the Z-axis of the local coordinate system.
[0090] S4. Determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system.
[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, the rule of adapting to be flush with the world coordinates can be adopted to facilitate the intuitive perception of the attitude of the local coordinates relative to the world coordinates.
[0093] Specifically, the specific implementation method for determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system may include:
[0094] (1) When the geometric feature picking point is used as the origin of the local coordinate system, determine whether the local coordinate Z-axis direction vector is perpendicular to the world coordinate X-axis direction vector;
[0095] (2) If so, determine the world coordinate X-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint 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 determine the world coordinate Y-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body 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 determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the perpendicularity attribute between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
[0098] Optionally, the specific implementation method for determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the relative position information between 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 determine the world coordinate Z-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint 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 multi-body constraint geometric model based on the cross product result between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
[0099] In this embodiment, for the schematic diagram of the process of determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model, refer to Figure 5 . As Figure 5 shown, first, the geometric feature picking point can be used as the origin of the local coordinate system. According to the above steps, the local coordinate Z-axis direction vector has been obtained, and the X-axis direction vector in the world coordinate system is a known quantity. It is easy to determine whether the local coordinate Z-axis direction vector and the world coordinate X-axis direction vector are perpendicular to each other. If they are perpendicular, then perform step (2), 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 multi-body constraint geometric model; if they are not perpendicular, then perform step (3), and further determine whether the local coordinate Z-axis direction vector and the world coordinate Y-axis direction vector are perpendicular to each other; 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 multi-body constraint geometric model. If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, then further determine whether the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector are perpendicular to each other.
[0100] Based on the above embodiment, continue to refer to 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 multi-body constraint 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 perform a cross product calculation on the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector to obtain an outer product result, and 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 multi-body constraint 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 multi-body constraint geometric model.
[0102] In this embodiment, since the local coordinate system is determined by the right-hand rule principle and the three axes of the local coordinate system are perpendicular to each other, therefore, based on the direction vectors of any two coordinate axes of the local coordinate system, the direction vector corresponding to the other coordinate axis can be determined by performing a cross product calculation on the two known coordinate axis direction vectors. Based on this, the local coordinate Y-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model can be obtained.
[0103] Case 3: If the target geometric feature category and the kinematic pair category information satisfy the third preset condition, then based on the target edge line to which the geometric feature pick-up point belongs, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0104] Among them, the third preset condition includes: the target geometric feature category is the straight line category, and the kinematic pair category information is the revolute pair category, prismatic pair category, cylindrical pair category, universal joint category, or screw pair category.
[0105] In this embodiment, when the target geometric feature category and the kinematic pair category information satisfy the third preset condition, the target straight line to which the geometric feature pick-up point belongs can be determined as the straight line corresponding to the Z-axis of the local coordinate system, and the direction pointing outside the multi-body constraint geometric model of the target straight line is determined as the positive direction corresponding to the Z-axis of the local coordinate system. On the basis of determining the straight line where the Z-axis is located and the positive direction, the direction vector of the Z-axis of the local coordinate system is obtained.
[0106] Specifically, the specific implementation method for determining the positive direction corresponding to the Z-axis of the local coordinate system may include: determining the target straight line vector according to the straight line to which the geometric feature pick-up point belongs; determining the first reference direction vector based on the geometric feature pick-up point and the camera position of the current view; determining the inner product result of the first reference direction vector and the target straight line vector; if the inner product result is less than the preset threshold, then determine the target straight line vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; if the inner product result is greater than or equal to the preset threshold, then determine the reverse vector of the target straight line vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; further, based on the relative position information between 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 multi-body constraint geometric model; 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 multi-body constraint geometric model.
[0107] Case 4: If the target geometric feature category and the kinematic pair category information satisfy the fourth preset condition, then based on the target cylindrical surface axis line to which the geometric feature pick-up point belongs, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0108] Among them, the fourth preset condition includes: the target geometric feature category is the circular curve category or the cylindrical surface category, and the kinematic pair category information is the revolute pair category, prismatic pair category, cylindrical pair category, universal joint category, or screw pair category.
[0109] In this embodiment, when the target geometric feature category and the motion amplitude category information meet the fourth preset condition, the target axis of the cylindrical surface to which the geometric feature pickup point belongs can be determined as the axis corresponding to the Z-axis of the local coordinate system, and the direction pointing to the outside of the multi-body constrained geometric model of the target axis can be determined as the positive direction corresponding to the Z-axis of the local coordinate system. Based on the determination of the axis and the positive direction where the Z-axis is located, the direction vector of the Z-axis of the local coordinate system is obtained.
[0110] Specifically, the specific implementation method for determining the positive direction corresponding to the Z-axis of the local coordinate system may include: determining the target axis vector according to the axis of the cylindrical surface to which the geometric feature pickup point belongs; determining the second reference direction vector based on the geometric feature pickup 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 the preset threshold, determining the target axis vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constrained geometric model; if the inner product result is greater than or equal to the preset threshold, determining the reverse vector of the target axis vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constrained geometric model; determining the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constrained geometric model based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system; determining the local coordinate Y-axis direction vector of the target kinematic pair relative to the multi-body constrained geometric model based on the local coordinate Z-axis direction vector and the local coordinate X-axis direction vector.
[0111] Particularly, 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 corresponding to the geometric feature pickup point, 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] In the technical solution of the embodiment of the present invention, the target geometric feature category may include at least one of a vertex category, a straight line category, a circular curve category, an irregular curve category, a plane category, a cylindrical surface category, a spherical surface category, and an irregular surface category. The motion amplitude category information includes at least one of a revolute pair category, a prismatic pair category, a cylindrical pair category, a universal joint category, a screw pair category, a fixed pair category, and a planar pair category. When determining the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model, the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model can be determined according to the geometric feature picking point, the target geometric feature category, and a preset action point mapping relationship. When determining the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model, different methods are used to determine the direction constraint information according to the preset conditions satisfied by the target geometric feature category and the motion amplitude category information, and the Z-axis direction vector in the direction constraint information is always directed outward from the model. In the technical solution provided in this embodiment, by adopting geometric feature inference rules to conform to the multi-body modeling logic, the position information of the constraint action point and the direction constraint information of the multi-body constraint geometric model can be automatically obtained, avoiding the process of manual calculation of parameters, with high efficiency and low error rate, and further improving the determination efficiency and reliability of the motion constraint information of the geometric model.
[0113] Embodiment III
[0114] Figure 6 FIG. 7 is a schematic structural diagram of a device for determining model motion constraint information provided by 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] Among them, the geometric model acquisition module 310 is configured to obtain a to-be-processed geometric model 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 configured to 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 in response to a geometric feature picking operation on the to-be-processed geometric model to obtain a multi-body constraint geometric model;
[0117] The constraint position determination module 330 is configured to determine the target geometric feature category to which the geometric feature picking point belongs, and determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model based on the geometric feature picking point and the target geometric feature category;
[0118] A constraint direction determination module 340, configured to determine direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the target geometric feature category and the kinematic amplitude category information of the target kinematic pair.
[0119] The technical solution of the embodiment of the present invention obtains 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. Furthermore, 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 geometric sub-model and the second geometric sub-model to obtain a multi-body constraint geometric model, thereby determining 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 action point of the target kinematic pair relative to the multi-body constraint geometric model is determined, and the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model can be determined based on the target geometric feature category and the kinematic amplitude category information of the target kinematic pair. The technical solution provided in this embodiment does not require manual measurement operations by the user. Through simple click trigger operations, the motion constraint information between multi-body geometric models can be automatically obtained, simplifying the operation process of determining the motion constraint information of geometric models, and improving the determination efficiency of the motion constraint information of geometric models and the reliability of the motion constraint information.
[0120] Based on the above device, optionally, the constraint position determination module 330 is specifically configured to determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model based on the geometric feature picking point, the target geometric feature category, and a preset action point mapping relationship.
[0121] Based on the above device, optionally, the target geometric feature category includes at least one of a vertex category, a straight line category, a circular curve category, an irregular curve category, a plane category, a cylindrical surface category, a spherical surface category, and an irregular surface category. 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, the constraint action point position information is the picking point position coordinates corresponding to the geometric feature picking point;
[0123] If the target geometric feature category is the straight line category, the constraint action point position information is the midpoint position coordinates of the side line to which the geometric feature picking point belongs;
[0124] If the target geometric feature category is the circular curve category, the constraint action point position information is the center position coordinates of the circle to which the geometric feature picking point belongs;
[0125] If the target geometric feature category is the cylindrical surface category, the position information of the constraint action point is the axis midpoint position coordinates of the axis of the cylindrical surface to which the geometric feature picking point belongs;
[0126] If the target geometric feature category is the spherical surface category, the position information of the constraint action point is the center position coordinates of the sphere to which the geometric feature picking point belongs.
[0127] Based on the above device, optionally, the motion amplitude category information includes at least one of the following: revolute pair category, prismatic pair category, cylindrical pair category, universal joint category, screw pair category, fixed pair category, and planar pair category. The direction information determination module 340 includes:
[0128] The first position determination unit is configured to, if the target geometric feature category and the motion amplitude category information meet the first preset condition, determine the preset standard direction as the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model; wherein, the preset standard direction is the 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 spherical surface category; or, the target geometric feature category is the straight line category, the circular curve category, the cylindrical surface category, or the irregular surface category, and the motion amplitude category information is the fixed pair category or the planar pair category;
[0129] The second position determination unit is configured to, if the target geometric feature category and the motion amplitude category information meet the second preset condition, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the normal line of the target surface to which the geometric feature picking point belongs; wherein, the second preset condition includes: the target geometric feature category is the planar category or the irregular surface category, and the motion amplitude category information is the revolute pair category, the prismatic pair category, the cylindrical pair category, the universal joint category, or the screw pair category;
[0130] The third position determination unit is configured to, if the target geometric feature category and the motion amplitude category information meet the third preset condition, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the target edge line to which the geometric feature picking point belongs; wherein, the third preset condition includes: the target geometric feature category is the straight line category, and the motion amplitude category information is the revolute pair category, the prismatic pair category, the cylindrical pair category, the universal joint category, or the screw pair category;
[0131] A fourth position determination unit, configured to, if the target geometric feature category and the motion amplitude category information satisfy a fourth preset condition, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the axis of the target cylindrical surface to which the geometric feature pick-up point belongs; 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 pair category, a prismatic pair category, a cylindrical pair category, a universal joint category, or a screw pair category.
[0132] Based on the above device, optionally, the direction constraint information includes the local coordinate system direction vector of the target kinematic pair relative to the multi-body constraint geometric model, and the second position determination unit includes:
[0133] A normal vector determination subunit, configured to determine a target normal vector based on at least two non-parallel vectors in the target surface to which the geometric feature pick-up point belongs;
[0134] A reference vector determination subunit, configured to determine a reference direction vector based on the geometric feature pick-up point and the camera position of the current view;
[0135] A Z-axis direction determination subunit, configured to determine the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the target normal vector and the reference direction vector;
[0136] An X-axis direction determination subunit, configured to determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vector in the world coordinate system;
[0137] A Y-axis direction determination subunit, configured to determine the local coordinate Y-axis direction vector of the target kinematic pair relative to the multi-body 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 configured 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, determine the target normal vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; if the inner product result is greater than or equal to the preset threshold, determine the reverse vector of the target normal vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model.
[0139] Based on the above device, optionally, the X-axis direction determination subunit is specifically configured to determine whether the local coordinate Z-axis direction vector is perpendicular to the world coordinate X-axis direction vector when the geometric feature pickup point is used as the origin of the local coordinate system; if so, determine the world coordinate X-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; if not, and the local coordinate Z-axis direction vector is perpendicular to the world coordinate Y-axis direction vector, then determine the world coordinate Y-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; if the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, then determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model 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 device, optionally, the X-axis direction determination subunit is further specifically 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 multi-body constraint 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 multi-body constraint geometric model based on the cross product result 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 by the embodiments of the present invention can execute the model motion constraint information determination method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0142] It should be noted 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 realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present invention.
[0143] Embodiment 4
[0144] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Figure 7 The displayed electronic device 40 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0145] Such as Figure 7As shown, the electronic device 40 is presented in the form of a general-purpose computing device. The components of the electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that connects different system components (including the system memory 402 and the processing unit 401).
[0146] The bus 403 represents one or more of several types of 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. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0147] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0148] The 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. The electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 406 can be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 7 not shown, commonly referred to as a "hard disk drive"). Although Figure 7 not shown in the figure, a disk drive for reading and writing on a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing on a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to the bus 403 through one or more data media interfaces. The memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0149] A program / utility 408 having a set (at least one) of program modules 407 can be stored, for example, in the 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. The program modules 407 generally perform the functions and / or methods in the embodiments described in the present invention.
[0150] The electronic device 40 can also communicate with one or more external devices 409 (such as a keyboard, a pointing device, a display 810, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 40, and / or communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 411. Moreover, the electronic device 40 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 412. As shown in the figure, the network adapter 412 communicates with other modules of the electronic device 40 through the bus 403. It should be understood that although Figure 7 not shown in the figure, other hardware and / or software modules can be used in combination with the 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, etc.
[0151] The processing unit 401 executes various functional applications and page processing by running programs stored in the system memory 402, for example, implementing the method for determining model motion constraint information provided by the embodiments of the present invention.
[0152] Specifically, according to the embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments of the present invention include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the I / O interface 411, or installed from the storage system 406. When the computer program is executed by the processing unit 401, the above-mentioned functions defined in the methods of the embodiments of the present invention are executed.
[0153] Embodiment Five
[0154] The embodiments of the present invention also provide a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a method for determining model motion constraint information when executed by a computer processor, including:
[0155] In response to a first trigger operation, obtaining a to-be-processed geometric model including a first geometric sub-model and a second geometric sub-model;
[0156] In response to a geometric feature picking operation on the to-be-processed geometric model, applying 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 multi-body constraint geometric model;
[0157] Determine the category of the target geometric feature to which the geometric feature picking point belongs. Based on the geometric feature picking point and the category of the target geometric feature, determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model;
[0158] Based on the category of the target geometric feature and the motion amplitude category information of the target kinematic pair, determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model.
[0159] The computer storage medium of the embodiments of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The 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 of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.
[0160] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0161] The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0162] Computer program code for performing the operations of the embodiments of the present invention may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., connected through the Internet using an Internet service provider).
[0163] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments here. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments may be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining model motion constraint information, characterized in that Including: In response to a first triggering operation, obtaining a geometric model to be processed including a first geometric sub-model and a second geometric sub-model; In response to a geometric feature picking operation on the geometric model to be processed, applying a target motion constraint relationship corresponding to a selected target kinematic pair between the first geometric sub-model and the second geometric sub-model to obtain a multi-body constrained geometric model; Determining a target geometric feature category to which a geometric feature picking point belongs, and based on the geometric feature picking point and the target geometric feature category, determining position information of a constraint application point of the target kinematic pair relative to the multi-body constrained geometric model; Based on the target geometric feature category and motion amplitude category information of the target kinematic pair, determining direction constraint information of the target kinematic pair relative to the multi-body constrained geometric model.
2. The method according to claim 1, characterized in that, The determining the position information of the constraint application point of the target kinematic pair relative to the multi-body constrained geometric model based on the geometric feature picking point and the target geometric feature category includes: Based on the geometric feature picking point, the target geometric feature category, and a preset application point mapping relationship, determining the position information of the constraint application point of the target kinematic pair relative to the multi-body constrained geometric model.
3. The method according to claim 2, wherein The target geometric feature category includes at least one of a vertex category, a straight line category, a circular curve category, an irregular curve category, a plane category, a cylindrical surface category, a spherical surface category, and an irregular 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, the position information of the constraint application point is the picking point position coordinates corresponding to the geometric feature picking point; If the target geometric feature category is the straight line category, the position information of the constraint application point is the midpoint position coordinates of the side line to which the geometric feature picking point belongs; If the target geometric feature category is the circular curve category, the position information of the constraint application point is the center position coordinates of the circle to which the geometric feature picking point belongs; If the target geometric feature category is the cylindrical surface category, the position information of the constraint application point is the axis midpoint position coordinates of the axis of the cylindrical surface to which the geometric feature picking point belongs; If the target geometric feature category is the spherical surface category, the position information of the constraint application point is the center position coordinates of the sphere to which the geometric feature picking point belongs.
4. The method according to claim 1, wherein The motion amplitude category information includes at least one of a revolute pair category, a prismatic pair category, a cylindrical pair category, a universal joint category, a screw pair category, a fixed pair category, and a planar pair category. The target geometric feature category includes at least one of a vertex category, a straight line category, a circular curve category, an irregular curve category, a plane category, a cylindrical surface category, a spherical surface category, and an irregular surface category. The determining the direction constraint information of the target kinematic pair relative to the multi-body constrained geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic pair includes: If the target geometric feature category and the motion amplitude category information satisfy the first preset condition, then determine the preset standard direction as the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model; wherein, the preset standard direction is the direction vector of the world coordinate system, and the first preset condition includes: the target geometric feature category is the vertex category, the irregular curve category or the spherical category; or, the target geometric feature category is the straight line category, the circular curve category, the cylindrical surface category or the irregular surface category, and the motion amplitude category information is the fixed pair category or the planar pair category; If the target geometric feature category and the motion amplitude category information satisfy the second preset condition, then determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the normal line of the target surface to which the geometric feature picking point belongs; wherein, the second preset condition includes: the target geometric feature category is the planar category or the irregular surface category, and the motion amplitude category information is the revolute pair category, the prismatic pair category, the cylindrical pair category, the universal joint category or the screw pair category; If the target geometric feature category and the motion amplitude category information satisfy the third preset condition, then determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the target edge line to which the geometric feature picking point belongs; wherein, the third preset condition includes: the target geometric feature category is the straight line category, and the motion amplitude category information is the revolute pair category, the prismatic pair category, the cylindrical pair category, the universal joint category or the screw pair category; If the target geometric feature category and the motion amplitude category information satisfy the fourth preset condition, then determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the axis of the target cylindrical surface to which the geometric feature picking point belongs; wherein, the fourth preset condition includes: the target geometric feature category is the circular curve category or the cylindrical surface category, and the motion amplitude category information is the revolute pair category, the prismatic pair category, the cylindrical pair category, the universal joint category or the screw pair category.
5. The method according to claim 4, wherein The direction constraint information includes the local coordinate system direction vector of the target kinematic pair relative to the multi-body constraint geometric model. Determining the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the normal line of the target surface to which the geometric feature picking point belongs includes: Determine the target normal vector based on at least two non-parallel vectors on the target surface to which the geometric feature picking point belongs; Determine the reference direction vector based on the geometric feature picking point and the camera position of the current view; Determine the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the target normal vector and the reference direction vector; Determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system; 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 multi-body constraint geometric model.
6. The method according to claim 5, wherein The determining, based on the target normal vector and the reference direction vector, of the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model includes: 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, determine the target normal vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; If the inner product result is greater than or equal to the preset threshold, determine the reverse vector of the target normal vector as the local coordinate Z-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model.
7. The method according to claim 5, wherein The determining, based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system, of the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model includes: When taking the geometric feature picking point as the origin of the local coordinate system, determine whether the local coordinate Z-axis direction vector is perpendicular to the world coordinate X-axis direction vector; If so, determine the world coordinate X-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; If not, and the local coordinate Z-axis direction vector is perpendicular to the world coordinate Y-axis direction vector, determine the world coordinate Y-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Y-axis direction vector, determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the perpendicularity attribute between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
8. The method according to claim 7, wherein The determining, based on the relative position information between the local coordinate Z-axis direction vector and the three-axis direction vectors in the world coordinate system, of the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model includes: If the local coordinate Z-axis direction vector is perpendicular to the world coordinate Z-axis direction vector, determine the world coordinate Z-axis direction vector as the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model; If the local coordinate Z-axis direction vector is not perpendicular to the world coordinate Z-axis direction vector, determine the local coordinate X-axis direction vector of the target kinematic pair relative to the multi-body constraint geometric model based on the cross product result between the local coordinate Z-axis direction vector and the world coordinate Z-axis direction vector.
9. A model motion constraint information determination device, characterized in that, The device includes: A geometric model acquisition module, configured to, in response to a first trigger operation, acquire a to-be-processed geometric model including a first geometric sub-model and a second geometric sub-model; A constraint model determination module, configured to, in response to a geometric feature picking operation on the geometric model to be processed, 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, so as to obtain a multi-body constraint geometric model; A constraint position determination module, configured to determine the target geometric feature category to which the geometric feature picking point belongs, and based on the geometric feature picking point and the target geometric feature category, determine the position information of the constraint action point of the target kinematic pair relative to the multi-body constraint geometric model; A constraint direction determination module, configured to determine the direction constraint information of the target kinematic pair relative to the multi-body constraint geometric model based on the target geometric feature category and the motion amplitude category information of the target kinematic pair.
10. 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 executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the model motion constraint information determination method according to any one of claims 1-8.
Citation Information
Patent Citations
Method and device for generating space geometric information estimation model
CN113269820A
Modeling method and device, computing equipment and computer readable storage medium
CN118036270A
Wind driven generator blade detection climbing robot and motion control method thereof
CN118545181A
Auxiliary driving method, electronic equipment and storage medium
CN118746310A