Asymmetric chamfer parameter conversion method and device of three-dimensional model and computer equipment
By identifying the original parameters and neighboring face relationships of the chamfered model and determining the reference neighboring face, the problem of shape differences in asymmetric chamfered parameter conversion between CAD software is solved, and the success rate of parameter conversion and the accuracy of model construction is improved.
Patent Information
- Application Number
- CN202411940518.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-26
AI Technical Summary
When converting asymmetric chamfer parameters between CAD software, due to the inconsistent processing logic of each software on the inversion direction options, the chamfer shapes generated by the same parameters in different software are different, which reduces the success rate of the conversion and the accuracy of model construction.
By obtaining the original parameters of the chamfered model, including the first distance value and the second distance value, identifying the adjacent faces associated with the chamfering process, determining the corresponding relationship between the distance value and the adjacent faces, and determining the reference adjacent faces from the adjacent faces associated with the chamfering process based on this relationship, generating the converted parameters.
It ensures the compatibility and barrier-free reading of parameters between different software platforms, accurately defines the model shape of asymmetric chamfers, solves the parameter inconsistency caused by differences in inversion parameter definitions, and improves the success rate of parameter conversion and the accuracy of model construction.
Smart Images

Figure CN119670301A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer-aided design, and in particular to a method, device and computer equipment for converting asymmetric chamfer parameters of a three-dimensional model. Background Art
[0002] In the field of CAD (Computer-Aided Design), parameter conversion refers to extracting the modeling history and data of a model from a CAD software, saving it in an intermediate format file, and importing the file into another CAD software so that the software can regenerate the model based on the historical parameters. In this process, asymmetric chamfers are a common geometric feature, which is usually defined by two distances (d1 and d2) and a flip direction (flip option).
[0003] However, the processing logic of flip options in different CAD software is not consistent, resulting in different chamfer shapes generated by the same parameters in different software. Due to the different processing methods of each software, there is no unified standard for d1, d2 directions and flip options during the conversion process. Parametric conversion usually uses the default settings, resulting in incorrect chamfer directions. Even if the direction of the converted model is wrong, it cannot be corrected, which reduces the success rate of asymmetric chamfer parameter conversion, thereby affecting the generation of subsequent features and reducing the accuracy of model construction. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for converting asymmetric chamfer parameters of three-dimensional models, which can improve the success rate of asymmetric chamfer parameter conversion and the accuracy of model construction in order to solve the above-mentioned technical problems.
[0005] In a first aspect, an embodiment of the present application provides a method for converting asymmetric chamfer parameters of a three-dimensional model. The method comprises:
[0006] Acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface;
[0007] Determine a correspondence between any distance value among the first distance value and the second distance value and any adjacent surface among the first adjacent surface and the second adjacent surface, and obtain a correspondence between the distance value and the adjacent surface;
[0008] Based on the magnitude relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, determining a reference adjacent surface from adjacent surfaces associated with the chamfering process;
[0009] The first distance value, the second distance value and the identifier of the reference adjacent surface are used as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
[0010] In one embodiment, determining a correspondence between any one of the first distance value and the second distance value and any one of the first adjacent surface and the second adjacent surface to obtain a correspondence between the distance value and the adjacent surface includes:
[0011] Identify the existence type of adjacent surfaces corresponding to the adjacent surfaces associated with the chamfering process in the chamfered model;
[0012] Determining the correspondence between the distance value and the adjacent surface based on the adjacent surface existence type;
[0013] The adjacent surface existence type is used to characterize the existence or non-existence of each adjacent surface in the adjacent surfaces associated with the chamfering process after the chamfering is implemented in the chamfered model.
[0014] In one embodiment, determining the correspondence between the distance value and the adjacent surface based on the adjacent surface existence type includes:
[0015] In a case where the adjacent surface existence type is the first type, determining a common edge between the chamfered surface in the chamfered model and the adjacent surface associated with the chamfering process;
[0016] Determining the distance value between the input edge and the common edge in the chamfered model;
[0017] Determining a corresponding relationship between the distance value and the adjacent face according to the distance value between the input edge and the common edge and a matching relationship between each distance value in the original parameter;
[0018] Among them, in the chamfered model of the first type, two adjacent surfaces among the adjacent surfaces associated with the chamfering process exist.
[0019] In one embodiment, determining the correspondence between the distance value and the adjacent surface based on the adjacent surface existence type includes:
[0020] In a case where the adjacent surface existence type is the second type, determining a common edge between the chamfered surface in the chamfered model and the adjacent surface existing in the adjacent surface associated with the chamfering process;
[0021] Determining the distance value between the input edge and the common edge in the chamfered model;
[0022] Determining a corresponding relationship between the distance value and the adjacent face according to the distance value between the input edge and the common edge and a matching relationship between each distance value in the original parameter;
[0023] In the chamfered model of the second type, one of the adjacent surfaces associated with the chamfering process exists and the other adjacent surface does not exist.
[0024] In one embodiment, determining the correspondence between the distance value and the adjacent surface based on the adjacent surface existence type includes:
[0025] In the case where the adjacent surface existence type is the third type, determining a preset correspondence relationship between the distance value and the adjacent surface; the preset correspondence relationship is a correspondence relationship between any distance value of the assumed first distance value and the second distance value and any adjacent surface of the first adjacent surface and the second adjacent surface;
[0026] Based on the law of cosines, a theoretical value of the angle to be measured is determined according to the adjacent surface angle value between adjacent surfaces associated with each chamfering process in the chamfered model, the first distance value, and the second distance value;
[0027] Performing angle measurement on the angle to be measured to obtain a measurement value of the angle to be measured;
[0028] Based on the matching between the theoretical value of the angle to be measured and the measured value, determining the corresponding relationship between the distance value and the adjacent surface according to the preset corresponding relationship;
[0029] In the chamfered model of the third type, two adjacent surfaces among the adjacent surfaces associated with the chamfering process do not exist.
[0030] In one embodiment, determining a reference adjacent surface from adjacent surfaces associated with the chamfering process based on the magnitude relationship between the first distance value and the second distance value and the corresponding relationship between the distance value and the adjacent surface comprises:
[0031] Determine an adjacent surface associated with the chamfering process corresponding to a larger distance value between the first distance value and the second distance value as the reference adjacent surface;
[0032] Alternatively, the adjacent surface associated with the chamfering process corresponding to the smaller distance value between the first distance value and the second distance value is determined as the reference adjacent surface.
[0033] In a second aspect, the present application also provides a device for converting asymmetric chamfer parameters of a three-dimensional model. The device comprises:
[0034] A data acquisition and identification module is used to acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface;
[0035] a correspondence matching module, used to determine a correspondence between any one of the first distance value and the second distance value and any one of the first adjacent face and the second adjacent face, and obtain a correspondence between the distance value and the adjacent face;
[0036] A reference adjacent surface determination module, configured to determine a reference adjacent surface from adjacent surfaces associated with the chamfering process based on a magnitude relationship between the first distance value and the second distance value, and a corresponding relationship between the distance value and the adjacent surface;
[0037] A parameter conversion module is used to use the first distance value, the second distance value and the identifier of the reference adjacent surface as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
[0038] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0039] Acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface;
[0040] Determine a correspondence between any distance value among the first distance value and the second distance value and any adjacent surface among the first adjacent surface and the second adjacent surface, and obtain a correspondence between the distance value and the adjacent surface;
[0041] Based on the magnitude relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, determining a reference adjacent surface from adjacent surfaces associated with the chamfering process;
[0042] The first distance value, the second distance value and the identifier of the reference adjacent surface are used as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
[0043] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0044] Acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface;
[0045] Determine a correspondence between any distance value among the first distance value and the second distance value and any adjacent surface among the first adjacent surface and the second adjacent surface, and obtain a correspondence between the distance value and the adjacent surface;
[0046] Based on the magnitude relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, determining a reference adjacent surface from adjacent surfaces associated with the chamfering process;
[0047] The first distance value, the second distance value and the identifier of the reference adjacent surface are used as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
[0048] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0049] Acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface;
[0050] Determine a correspondence between any distance value among the first distance value and the second distance value and any adjacent surface among the first adjacent surface and the second adjacent surface, and obtain a correspondence between the distance value and the adjacent surface;
[0051] Based on the magnitude relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, determining a reference adjacent surface from adjacent surfaces associated with the chamfering process;
[0052] The first distance value, the second distance value and the identifier of the reference adjacent surface are used as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
[0053] The asymmetric chamfer parameter conversion method, device, computer equipment, storage medium and computer program product of the above-mentioned three-dimensional model first obtain the original parameters by identifying the chamfered model, including the first distance value and the second distance value, and then determine the correspondence between the first distance value and the second distance value and the first adjacent surface and the second adjacent surface, and then determine one from the adjacent surfaces as a reference adjacent surface based on the size relationship and correspondence of the distance values, and finally use the first distance value, the second distance value and the identifier of the reference adjacent surface as the converted parameters; this embodiment ensures the compatibility and barrier-free reading of parameters between different software platforms by realizing the asymmetric chamfer parameter conversion of the three-dimensional model, and accurately defines the model shape of the asymmetric chamfer by introducing the reference adjacent surface and combining the first distance value and the second distance value, solves the problem of parameter inconsistency caused by the definition difference of the inversion parameters in different design software, ensures the consistency of the chamfer shape generated after parameter conversion from different design software, ensures the correctness of the model after parameter conversion between different design software, ensures the accurate definition of the chamfer shape, improves the success rate of asymmetric chamfer parameter conversion, and thus ensures the accurate generation of subsequent features and improves the accuracy of model construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flow chart of a method for converting asymmetric chamfer parameters of a three-dimensional model;
[0056] Figure 2 A schematic flow chart of an asymmetric chamfer parameter conversion method for a three-dimensional model in another embodiment;
[0057] Figure 3 A first principle schematic diagram corresponding to a first type of parameter conversion in an embodiment;
[0058] Figure 4 A second principle schematic diagram corresponding to the first type of parameter conversion in one embodiment;
[0059] Figure 5 A third principle schematic diagram corresponding to the first type of parameter conversion in one embodiment;
[0060] Figure 6 A fourth principle diagram corresponding to the first type of parameter conversion in one embodiment;
[0061] Figure 7 A first principle schematic diagram corresponding to the second type of parameter conversion in one embodiment;
[0062] Figure 8 A second principle schematic diagram corresponding to a second type of parameter conversion in an embodiment;
[0063] Fig. 9 A third principle diagram corresponding to the second type of parameter conversion in one embodiment;
[0064] Fig.10 A fourth principle diagram corresponding to the second type of parameter conversion in one embodiment;
[0065] Fig.11 It is a first principle schematic diagram corresponding to the third type of parameter conversion in one embodiment;
[0066] Fig.12 A second principle schematic diagram corresponding to the third type of parameter conversion in one embodiment;
[0067] Fig.13 A third principle schematic diagram corresponding to a third type of parameter conversion in an embodiment;
[0068] Fig.14 A fourth principle diagram corresponding to the third type of parameter conversion in one embodiment;
[0069] Fig.15 A fifth principle diagram corresponding to the third type of parameter conversion in one embodiment;
[0070] Fig.16 A structural block diagram of an asymmetric chamfer parameter conversion device for a three-dimensional model in one embodiment;
[0071] Fig.17 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0073] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0074] In one embodiment, Figure 1 As shown, a method for converting asymmetric chamfer parameters of a three-dimensional model is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0075] S101, obtaining original parameters corresponding to the chamfered model, and identifying adjacent surfaces associated with the chamfering process from the chamfered model.
[0076] Among them, the original parameters are asymmetric chamfer parameters read by the model after chamfering in any type of three-dimensional model design software. The original parameters include a first distance value and a second distance value. In addition, the original parameters can also include a reversal parameter for characterizing the direction of the chamfer.
[0077] For example, in a certain CAD software, the shape generated when d1=5, d2=10 and flip=false, and in another CAD software, the parameters may be expressed as d1=10, d2=5, flip=false. Among them, flip is the inversion parameter. According to the above expression of the original parameters, it can be seen that without clarifying the reference rules of the original parameters, the user cannot accurately describe the chamfering process based on the parameter values.
[0078] Among them, the adjacent face associated with the chamfering process refers to the adjacent face where the chamfering input edge is located and intersects with the chamfered surface. Generally, the adjacent faces associated with the chamfering process include the first adjacent face and the second adjacent face, which correspond to the first distance value and the second distance value respectively. The first distance value and the second distance value are used to express the distance from the input edge to the common edge. The common edge refers to the common edge of the chamfered surface and the adjacent face. Furthermore, the chamfered surface and the input edge can be obtained by identifying the model after chamfering.
[0079] S102, determining a correspondence between any distance value among the first distance value and the second distance value and any adjacent surface among the first adjacent surface and the second adjacent surface, and obtaining a correspondence between the distance value and the adjacent surface.
[0080] Exemplarily, the first distance value is recorded as d1, the second distance value is recorded as d2, the first adjacent surface is recorded as front, and the second adjacent surface is recorded as back; then the correspondence between the distance value and the adjacent surface may include: d1 corresponds to front and d2 corresponds to back; or, d2 corresponds to front and d1 corresponds to back.
[0081] S103: Based on the magnitude relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, determine a reference adjacent surface from the adjacent surfaces associated with the chamfering process.
[0082] The size relationship between the first distance value and the second distance value refers to the size relationship between the distance values. For example, d1=10cm and d2=8cm, then the size relationship is that d1 is greater than d2.
[0083] Exemplarily, after comparing the magnitude relationship between the first distance value and the second distance value, it is necessary to select one adjacent surface from the two adjacent surfaces based on a predetermined rule as a reference adjacent surface to determine the direction of the asymmetric chamfer.
[0084] S104: Use the first distance value, the second distance value, and the identifier of the reference adjacent surface as converted parameters corresponding to the original parameters.
[0085] Among them, the identifier of the reference adjacent surface is the unique identifier of the adjacent surface. The present application does not limit its specific parameter form. It only needs to meet the direction identification of the asymmetric chamfer based on the reference adjacent surface.
[0086] Among them, the converted parameters are used for use by any type of three-dimensional model design software, that is, the converted parameters obtained by the asymmetric chamfer parameter conversion method of the three-dimensional model provided in the embodiment of the present application can read and use the parameters across platforms, and can seamlessly realize the copying, modification, editing and other functions of the three-dimensional model in different software platforms.
[0087] In the above-mentioned asymmetric chamfer parameter conversion method of the three-dimensional model, the original parameters, including the first distance value and the second distance value, are first obtained by identifying the chamfered model, and then the correspondence between the first distance value and the second distance value and the first adjacent surface and the second adjacent surface is determined, and then based on the size relationship and the correspondence of the distance values, one is determined from the adjacent surfaces as a reference adjacent surface, and finally the first distance value, the second distance value and the identifier of the reference adjacent surface are used as the converted parameters; this embodiment ensures the compatibility and barrier-free reading of parameters between different software platforms by realizing the asymmetric chamfer parameter conversion of the three-dimensional model, and accurately defines the model shape of the asymmetric chamfer by introducing the reference adjacent surface and combining the first distance value and the second distance value, solves the problem of parameter inconsistency caused by the definition difference of the inversion parameters in different design software, ensures the consistency of the chamfer shape generated after parameter conversion from different design software, ensures the correctness of the model after parameter conversion between different design software, ensures the accurate definition of the chamfer shape, improves the success rate of asymmetric chamfer parameter conversion, and thus ensures the accurate generation of subsequent features and improves the accuracy of model construction.
[0088] In another embodiment, Figure 2 As shown, a method for converting asymmetric chamfer parameters of a three-dimensional model is provided, comprising the following steps:
[0089] S201, obtaining original parameters corresponding to the chamfered model, and identifying adjacent surfaces associated with the chamfering process from the chamfered model;
[0090] S202, identifying the existence type of adjacent surfaces corresponding to adjacent surfaces associated with the chamfering process in the chamfered model;
[0091] S203, when the adjacent face existence type is the first type, determining the distance value between the input edge and the common edge and the matching relationship between each distance value in the original parameter to determine the corresponding relationship between the distance value and the adjacent face;
[0092] S204, when the adjacent face existence type is the second type, determining the distance value between the common edge between the existing adjacent faces and the input edge, and the matching relationship between each distance value in the original parameter, so as to determine the corresponding relationship between the distance value and the adjacent face;
[0093] S205, when the adjacent surface existence type is the third type, determining a preset corresponding relationship, and verifying the preset corresponding relationship based on the cosine theorem, and determining a reference adjacent surface from adjacent surfaces associated with the chamfering process according to the verification result;
[0094] S206: Use the first distance value, the second distance value, and the identifier of the reference adjacent surface as converted parameters corresponding to the original parameters.
[0095] S207, determining the adjacent surface associated with the chamfering process corresponding to the larger distance value between the first distance value and the second distance value as the reference adjacent surface; or determining the adjacent surface associated with the chamfering process corresponding to the smaller distance value between the first distance value and the second distance value as the reference adjacent surface.
[0096] It should be noted that the specific definition of the above steps can be found in the specific definition of the asymmetric chamfer parameter conversion method of a three-dimensional model mentioned above, which will not be repeated here.
[0097] In one embodiment, a correspondence between any one of the first distance value and the second distance value and any one of the first adjacent face and the second adjacent face is determined to obtain a correspondence between the distance value and the adjacent face, including: identifying an adjacent face existence type corresponding to the adjacent face associated with the chamfering process in the model after chamfering; and determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type.
[0098] Among them, the adjacent surface existence type is used to characterize the existence or non-existence of adjacent surfaces in the adjacent surfaces associated with the chamfering process after the chamfering is implemented in the chamfered model. Generally, the adjacent surface existence type includes three types, namely the first type, the second type and the third type. Different types correspond to different parameter conversion methods. Specifically, the first type is also called the no overflow type, the second type is also called the unilateral overflow type, and the third type is also called the bilateral overflow type.
[0099] More specifically, in the first type of chamfering model, both of the adjacent surfaces associated with the chamfering process exist, in the second type of chamfering model, one of the adjacent surfaces associated with the chamfering process exists and the other adjacent surface does not exist; in the third type of chamfering model, both of the adjacent surfaces associated with the chamfering process do not exist.
[0100] For example, the existence of the adjacent surfaces front and back after the chamfer is generated can be divided into three categories: (1) No overflow: Both adjacent surfaces (front and back) still exist after the chamfer is generated. (2) Single-sided overflow: Only one adjacent surface exists and the other adjacent surface disappears. (3) Double-sided overflow: Both adjacent surfaces disappear.
[0101] To distinguish the three types of overflow, first obtain the permanent names frontID and backID of the two adjacent faces of the chamfer input edge before chamfering, then scroll to the state after chamfering, and use frontID and backID to try to generate the corresponding front face and back face respectively. By reading the parameters of whether the face exists, it can be judged whether the front and back exist.
[0102] Among them, "front" in this embodiment is just a label of the two adjacent faces and has no specific definition. For example, the label can come from faceList.front() and faceList.back() in the C++ data structure. It is only used to facilitate the distinction between the two adjacent faces. That is, this embodiment does not clearly determine which adjacent face is the "front", but gives a simple name to identify it, so front may correspond to the ID of the first adjacent face, or it may correspond to the ID of the second adjacent face.
[0103] Furthermore, it can be understood that front is the first adjacent surface selected by user definition in this embodiment, which may correspond to the first adjacent surface defined by the CAD software or the second adjacent surface defined by the CAD software; naturally, back is the second adjacent surface selected by user definition.
[0104] In this embodiment, the adjacent surfaces in the chamfered model are first identified to determine the existence type of adjacent surfaces associated with the chamfering process. Then, based on the existence type of adjacent surfaces, the correspondence between the distance value and the adjacent surfaces is determined. The adjacent surface existence types are then divided into three types to determine different types of parameter conversion methods. Finally, according to the identified adjacent surface types and their existence conditions, a suitable conversion strategy is selected for parameter processing. This embodiment improves the conversion accuracy and flexibility of chamfering parameters by clarifying the existence type of adjacent surfaces, and supports the conversion of asymmetric chamfering parameters in a variety of scenarios.
[0105] In one embodiment, based on the existence type of adjacent surfaces, the correspondence between the distance value and the adjacent surface is determined, including: when the existence type of the adjacent surface is the first type, determining the common edge between the chamfered surface in the chamfered model and the adjacent surface associated with the chamfering process; determining the distance value between the input edge and the common edge in the chamfered model; and determining the correspondence between the distance value and the adjacent surface based on the distance value between the input edge and the common edge and the matching relationship between the distance values in the original parameters.
[0106] For example, when the adjacent surface existence type is the first type (no overflow), both the front and back adjacent surfaces exist after the chamfer is generated. The parameter conversion process may include:
[0107] (1) Get common edges and calculate distances.
[0108] First, extract the chamfered surface, obtain the common edge between the chamfered surface and the front adjacent surface, named frontEdge, and calculate the distance from inputEdge to frontEdge, named frontDistance; similarly, extract the common edge between the chamfered surface and the back adjacent surface, named backEdge, and calculate the distance from inputEdge to backEdge, named backDistance. Obtain the common edge and calculate the two distances for the subsequent adjacent surface correspondence determination.
[0109] (2) Determine the relationship between d1, d2 and adjacent surfaces.
[0110] According to frontDistance and backDistance, determine the correspondence between d1 and d2 and the adjacent surface: if d1 = frontDistance, then d1 corresponds to front and d2 corresponds to back; if d1 = backDistance, then d1 corresponds to back and d2 corresponds to front.
[0111] (3) Record the adjacent surfaces corresponding to the long distance.
[0112] Compare the sizes of d1 and d2, and record the adjacent faces corresponding to the long distance. If d1 > d2, record the adjacent faces corresponding to d1; if d2 > d1, record the adjacent faces corresponding to d2.
[0113] More specifically, in one example, Figure 3As shown in the figure, for the three-dimensional model before parameter conversion, the parameters of a certain chamfer in a certain type of CAD program software are read as follows: d1 = 10, d2 = 20, (flip = false); according to the data of the three-dimensional model before parameter conversion, the identifiers of several edges of the chamfer are identified (specifically including the input edge inputEdge, the common edge frontEdge between the chamfer surface and the front adjacent surface, and the common edge backEdge between the chamfer surface and the back adjacent surface); the distances between the above several edges are calculated, including: frontDistance = 20, backDistance = 10; according to the read parameter values, the corresponding relationship is matched with the calculated distance values, and it can be determined that: d1 corresponds to back, and d2 corresponds to front. Then it is necessary to record the surface corresponding to the parameter with a larger chamfer distance (the adjacent surface corresponding to the long distance). Specifically, because d2 > d1, the surface corresponding to the parameter with a longer chamfer distance is front, so in the intermediate parameters, the value of the reference adjacent surface parameter is set to: the identifier of front; it is used to characterize the front adjacent surface of the chamfer as the reference adjacent surface of the intermediate parameters, and then it is convenient to use the reference adjacent surface as a benchmark to undoubtedly distinguish the meanings represented by the two chamfer parameters d1 and d2.
[0114] In another example, Figure 4 As shown in the figure, the data involved in the parameter conversion process include: d1 = 10, d2 = 20, (flip = true); frontDistance = 10, backDistance = 20; therefore, d1 corresponds to front and d2 corresponds to back. If d2 > d1, the back adjacent face is stored as the reference adjacent face.
[0115] In another example, Figure 5 As shown in the figure, the data involved in the parameter conversion process include: d1 = 20, d2 = 10, (flip = false); frontDistance = 10, backDistance = 20; therefore, d1 corresponds to back and d2 corresponds to front. If d1 > d2, the back adjacent face is stored as the reference adjacent face.
[0116] In another example, Figure 6As shown in the figure, the data involved in the parameter conversion process include: d1 = 20, d2 = 10, (flip = true); frontDistance = 20, backDistance = 10; therefore, d1 corresponds to the front and d2 corresponds to the back. If d1 > d2, the front adjacent face is stored as the reference adjacent face.
[0117] In this embodiment, the inversion parameters that are not standardized, controversial, or not cross-platform universal in the original software are cancelled, and a standardized, uncontroversial, and cross-platform universal reference adjacent surface parameter is redefined, thereby avoiding the problem of inconsistent chamfer parameter processing in different design software platforms and improving the accuracy of parameter conversion.
[0118] In one embodiment, based on the existence type of adjacent surfaces, the correspondence between the distance value and the adjacent surface is determined, including: when the existence type of the adjacent surface is the second type, determining the common edges between the chamfered surface in the chamfered model and the adjacent surfaces associated with the chamfering process; determining the distance value between the input edge and the common edge in the chamfered model; and determining the correspondence between the distance value and the adjacent surface based on the distance value between the input edge and the common edge and the matching relationship between the distance values in the original parameters.
[0119] For example, when the adjacent surface existence type is the second type (single-side overflow), only one adjacent surface exists after the chamfer is generated, and the other adjacent surface disappears. The parameter conversion process may include:
[0120] (1) Obtain the existing adjacent faces and the disappeared adjacent faces.
[0121] First, determine which adjacent surface still exists and which adjacent surface disappears. For example, if the front adjacent surface exists, the back adjacent surface disappears; if the back adjacent surface exists, the front adjacent surface disappears.
[0122] (2) Obtain the common edges between the chamfered surface and the existing adjacent surface and calculate the distance.
[0123] If the front adjacent face exists, extract the common edge frontEdge between the chamfered face and the front adjacent face, calculate the distance from inputEdge to frontEdge, and name it frontDistance. Among them, there is only one inputEdge.
[0124] If the back adjacent face exists, extract the common edge backEdge between the chamfered face and the back adjacent face, and calculate the distance from inputEdge to backEdge, named backDistance.
[0125] (3) Determine the relationship between d1, d2 and adjacent surfaces.
[0126] If the front adjacent surface exists: if d1 = frontDistance, then d1 corresponds to front and d2 corresponds to back; if d2 = frontDistance, then d2 corresponds to front and d1 corresponds to back.
[0127] If the back adjacent surface exists: if d1 = backDistance, then d1 corresponds to back and d2 corresponds to front; if d2 = backDistance, then d2 corresponds to back and d1 corresponds to front.
[0128] (4) Record the adjacent surfaces corresponding to the long distance.
[0129] Compare the sizes of d1 and d2, and record the corresponding long-distance adjacent faces: if d1 > d2, record the adjacent face corresponding to d1; if d2 > d1, record the adjacent face corresponding to d2.
[0130] More specifically, in one example, Figure 7 As shown in the figure, the data involved in the parameter conversion process include: d1 = 40, d2 = 80, (flip = false); according to the data of the 3D model before the parameter conversion, the identifiers of several edges of the chamfer are identified (specifically including the input edge inputEdge, the common edge frontEdge of the chamfered surface and the front adjacent surface); back disappears, front exists, frontDistance = 80; therefore, d2 corresponds to front, and d1 corresponds to back. If d2 > d1, the front adjacent surface is stored as the reference adjacent surface.
[0131] In another example, Figure 8 As shown in the figure, the data involved in the parameter conversion process include: d1 = 40, d2 = 80, (flip = true); back disappears, front exists, frontDistance = 40; therefore, d1 corresponds to front, and d2 corresponds to back. If d2 > d1, the back adjacent face is stored as the reference adjacent face.
[0132] In another example, Fig. 9As shown in the figure, the data involved in the parameter conversion process include: d1 = 80, d2 = 40, (flip = false); back disappears, front exists, frontDistance = 40; therefore, d1 corresponds to back, and d2 corresponds to front. If d1 > d2, the back adjacent face is stored as the reference adjacent face.
[0133] In another example, Fig.10 As shown in the figure, the data involved in the parameter conversion process include: d1 = 80, d2 = 40, (flip = true); back disappears, front exists, frontDistance = 80; therefore, d1 corresponds to front, and d2 corresponds to back. If d1 > d2, the front adjacent face is stored as the reference adjacent face.
[0134] In this embodiment, when the chamfering process causes one of the adjacent faces to overflow and no longer exist in the model after chamfering, the adjacent face that has not disappeared is used to calculate and match the distance between the common edge and the input edge, thereby realizing the determination of the reference adjacent face and the conversion of parameters, and improving the versatility of parameter conversion in multiple scenarios.
[0135] In one embodiment, based on the existence type of adjacent surfaces, the correspondence between the distance value and the adjacent surfaces is determined, including: when the existence type of the adjacent surfaces is the third type, determining a preset correspondence between the distance value and the adjacent surfaces; based on the law of cosines, determining a theoretical value of the angle to be measured according to the adjacent surface angle value, the first distance value and the second distance value between the adjacent surfaces associated with each chamfering process in the chamfered model; performing angle measurement on the angle to be measured to obtain the measured value of the angle to be measured; based on the matching between the theoretical value of the angle to be measured and the measured value, determining the correspondence between the distance value and the adjacent surface according to the preset correspondence.
[0136] The preset corresponding relationship is a corresponding relationship between any distance value of the assumed first distance value and the second distance value and any adjacent surface of the first adjacent surface and the second adjacent surface. For example, it is assumed that d1 corresponds to the front adjacent surface.
[0137] Specifically, when the theoretical value of the angle to be measured is equal to the measured value, the assumption of the preset corresponding relationship is proved to be correct, so that the preset corresponding relationship is determined to be the corresponding relationship between the distance value and the adjacent surface; if the theoretical value of the angle to be measured is not equal to the measured value, a relationship different from the preset corresponding relationship can generally be determined, for example, assuming that d1 corresponds to the back adjacent surface. Furthermore, the assumption of the preset corresponding relationship can be continuously changed, and the above verification method can be used for verification until the verification is successful.
[0138] For example, when the adjacent surface existence type is the third type (double-sided overflow), both adjacent surfaces disappear after the chamfer is generated. To determine the corresponding relationship between d1 and d2 and the adjacent surfaces, the parameter conversion process may include:
[0139] (1) Obtain the adjacent planes and their angles before chamfering.
[0140] First, get the two adjacent faces of the input edge before chamfering, and create two planes, frontPlane and backPlane. Then, calculate the angle between the two planes, which is recorded as .
[0141] (2) Calculate thirdSide.
[0142] According to the values of d1 and d2 and the adjacent angle , you can generate a Fig.11 For the triangle shown, the length of the third side of the triangle, thirdSide, can be calculated using the cosine theorem.
[0143]
[0144] At fixed d1, d2 and Next, such as Fig.11 thirdSide is shown to be a fixed scalar length, but its specific direction will change depending on the directions of d1 and d2.
[0145] (3) Construct a triangle and assume that d1 corresponds to front.
[0146] Construct a triangle ABC with d1, d2 and thirdSide, and assume that side AB represents d1, side BC represents d2, and side AC represents thirdSide. Also assume that d1 corresponds to front, that is, AB corresponds to front, d2 corresponds to back, and BC corresponds to back.
[0147] (4) Measuring angles based on assumptions.
[0148] Assuming that d1 corresponds to the front, measure the size of ∠BAC and ∠BCA. The specific steps are as follows: Based on the above assumption, ∠BAC is the angle between the frontPlane and the chamfered surface, and ∠BAC can be obtained by measuring the angle between the frontPlane and the chamfered surface; Based on the above assumption, ∠BCA is the angle between the backPlane and the chamfered surface, and ∠BCA can be obtained by measuring the angle between the backPlane and the chamfered surface.
[0149] (5) Calculate ∠BAC based on the assumptions.
[0150] Assuming that d1 corresponds to front, use the law of cosines to calculate the size of ∠BAC:
[0151]
[0152] (6) Compare the measured values with the calculated values.
[0153] If the measured ∠BAC is equal to the calculated ∠BAC, the hypothesis is established, that is, d1 corresponds to front and d2 corresponds to back; if the measured ∠BAC is not equal to the calculated ∠BAC, and the calculated ∠BAC is equal to the measured ∠BCA, the hypothesis is wrong, and the correct correspondence should be d1 corresponds to back and d2 corresponds to front.
[0154] (7) Record the adjacent surfaces corresponding to the long distance.
[0155] Finally, compare the sizes of d1 and d2, and record the adjacent faces corresponding to the long distance: if d1 > d2, record the adjacent face corresponding to d1; if d2 > d1, record the adjacent face corresponding to d2.
[0156] More specifically, in one example, Fig.12 As shown in the figure, the actual parameters are: the identified chamfer parameters are: d1 = 80, d2 = 100;
[0157] Assumption: d1 corresponds to front, d2 corresponds to back. The above assumptions are verified according to the inference steps. If the verification is successful, the assumption is correct.
[0158] Because it is recognized that d2 > d1, the identifier of the adjacent face back corresponding to d2 is stored as one of the new chamfer parameters, that is, the new chamfer parameters include (d1, d2, identifier of back).
[0159] like Fig.13 As shown, the inference steps include:
[0160] ①Measurement
[0161] ② Use the cosine theorem to calculate thirdSide;
[0162]
[0163] ③ Construct a triangle ABC with d1, d2 and thirdSide, and assume that the AB side represents d1, the BC side represents d2, and the AC side represents thirdSide. At the same time, assume that d1 corresponds to the front, that is, AB corresponds to the front, d2 corresponds to the back, and BC corresponds to the back. d1(s), d2(s) indicate that d1 and d2 are assumed directions.
[0164] ③Based on the above assumptions, measure the size of ∠BAC and ∠BCA. ∠BAC is the angle between the front and the chamfered surface. The measured ∠BAC = ; ∠BCA is the angle between the back and the chamfered surface. ∠BCA = .
[0165] ④Based on the above assumptions, calculate the size of ∠BAC.
[0166]
[0167] ⑤Compare the measured value with the calculated value.
[0168] Measured ∠BAC = , the calculated ∠BAC = , so the assumption is correct, that is, d1 corresponds to front and d2 corresponds to back.
[0169] ⑦ If d2 > d1, store back as the reference adjacent surface.
[0170] In another example, Fig.14 As shown in the figure, the actual parameters are: d1 = 80, d2 = 100; d1 corresponds to back, d2 corresponds to front; if d2 > d1, the front is stored as the reference adjacent surface.
[0171] like Fig.15 As shown, the inference steps include:
[0172] ①Measurement
[0173] ② Use the cosine theorem to calculate thirdSide;
[0174]
[0175] ③ Construct a triangle ABC with d1, d2 and thirdSide, and assume that the AB side represents d1, the BC side represents d2, and the AC side represents thirdSide. At the same time, assume that d1 corresponds to the front, that is, AB corresponds to the front, d2 corresponds to the back, and BC corresponds to the back. d1(s), d2(s) indicate that d1 and d2 are assumed directions.
[0176] ④ Based on the above assumptions, measure the size of ∠BAC and ∠BCA. ∠BAC is the angle between the front and the chamfered surface. The measured ∠BAC = ; ∠BCA is the angle between the back and the chamfered surface. ∠BCA = .
[0177] ⑤Based on the above assumptions, calculate the size of ∠BAC.
[0178]
[0179] ⑥Compare the measured value with the calculated value.
[0180] Measured ∠BAC = , the calculated ∠BAC = , the two results are not equal. At the same time, the calculated ∠BAC = , the measured ∠BCA = , the calculated ∠BAC is equal to the measured ∠BCA, proving that the assumption is wrong. Therefore, the actual situation is the opposite of the assumption, that is, d1 corresponds to back and d2 corresponds to front.
[0181] ⑦ If d2 > d1, store front as the reference adjacent face.
[0182] In another example, the actual parameters are: d1 = 100, d2 = 80; d1 corresponds to front, d2 corresponds to back; if d1 > d2 is judged, front is stored as the reference adjacent surface. In another example, the actual parameters are: d1 = 100, d2 = 80; d1 corresponds to back, d2 corresponds to front; if d1 > d2 is judged, back is stored as the reference adjacent surface. The principle of the inference step is the same as that of the above embodiment, and will not be repeated here.
[0183] In this embodiment, when the chamfering process causes two faces to overflow and not exist in the model after chamfering, an assumption is made about the matching relationship and the assumption is verified based on angle measurement and the cosine theorem, thereby realizing the determination of the reference adjacent faces and the conversion of parameters, thereby improving the versatility of parameter conversion in multiple scenarios.
[0184] In one embodiment, based on the size relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, a reference adjacent surface is determined from the adjacent surfaces associated with the chamfering process, including: determining the adjacent surface associated with the chamfering process corresponding to the larger distance value of the first distance value and the second distance value as the reference adjacent surface; or determining the adjacent surface associated with the chamfering process corresponding to the smaller distance value of the first distance value and the second distance value as the reference adjacent surface.
[0185] In this embodiment, the selection of the reference adjacent surface is achieved by using the size of the first distance value and the second distance value, and different selection rules are proposed, which improves the flexibility of the reference adjacent surface selection and further improves the diversity of the parameter conversion process.
[0186] In the prior art, the processing logic of the flip option is not consistent in various CAD software, resulting in differences in the chamfer shapes generated by the same parameters in different software. For example, the shape generated by flip=true in one CAD software may appear as flip=false in another CAD software.
[0187] Similarly, different CAD softwares have different ways of handling the directions of d1 and d2. The concept of direction handling is that the directions of d1 and d2 are set along the two adjacent faces of the chamfer input edge. d1 may be along the first adjacent face and d2 along the second adjacent face; d1 may also be along the second adjacent face and d2 along the first adjacent face. At the same time, users cannot know which adjacent face is the first adjacent face and which is the second adjacent face. The direction setting method of d1 and d2 is a technical secret of each CAD software, and the setting of the first and second adjacent faces is also a technical secret of each CAD software, and users cannot know the specific setting details.
[0188] Therefore, the shape generated when d1=5, d2=10 and flip=false in one CAD software may be represented by the parameters d1=10, d2=5, flip=false in another CAD software.
[0189] It can be seen that in the process of parameter conversion, different CAD software do not uniformly handle the d1, d2 and reverse direction options of asymmetric chamfers, which often leads to inconsistent graphics generated by different software with the same parameters.
[0190] Based on this, the embodiment of the present application provides a method for converting asymmetric chamfer parameters of a three-dimensional model. The following describes the method for converting asymmetric chamfer parameters of a three-dimensional model in detail with a specific embodiment. It is worth noting that the following description is only an exemplary description and not a specific limitation of the application.
[0191] The asymmetric chamfer parameter conversion method of the three-dimensional model provided in the present application is also called a method for converting asymmetric chamfer parameters between CAD software. By selecting an adjacent face based on the distance from the chamfer edge to the adjacent face, and combining d1, d2 and adjacent face information, the shape of the chamfer is uniquely determined. This method effectively solves the parameter conversion errors caused by inconsistent inversion options of various CAD software, and significantly improves the accuracy of asymmetric chamfer graphic conversion.
[0192] The asymmetric chamfer parameter conversion method of the three-dimensional model provided in this application proposes a new method to accurately define the shape of the asymmetric chamfer by introducing adjacent surface data. When extracting the asymmetric chamfer, an adjacent surface is selected based on the distance from the chamfer edge to the adjacent surface, and the chamfer shape is determined by combining the values of d1 and d2, thereby avoiding the problem of inconsistent flip option definitions between different CAD software.
[0193] Specifically, the present application introduces adjacent surface data and combines the values of d1 and d2 to accurately define the asymmetric chamfer shape, thereby solving the problems caused by differences in the definitions of d1, d2 directions and flip options, and ensuring that the chamfer shapes generated after parametric conversion from different CAD software are consistent; thereby ensuring that in the scenario of parametric conversion, different CAD software can correctly determine the asymmetric chamfer shape, ensuring the correctness of the model after parametric conversion between different CAD software, ensuring that the chamfer shape is accurately defined, and significantly improving the success rate of the conversion.
[0194] The asymmetric chamfer parameter conversion method for a three-dimensional model provided in this application first needs to obtain the two adjacent faces front and back of the input edge inputEdge to be chamfered. Then, the overall idea of this application is:
[0195] (1) Establish the corresponding relationship between d1, d2 and the adjacent surfaces front and back.
[0196] If d1 corresponds to front, then d2 corresponds to back, and you can set variables frontTo1 = true, backTo2 = true; if d1 corresponds to back, then d2 corresponds to front, and you can set variables frontTo2 = true, backTo1 = true.
[0197] (2) Record the adjacent surfaces corresponding to the long distance.
[0198] If d1 > d2, then record the adjacent face corresponding to d1; if d2 > d1, then record the adjacent face corresponding to d2. The data conversion process is to store the geometric data (geometric information) of geometric edges and faces into an intermediate format file, and then use these geometric data to match the required edges and faces in the target CAD software.
[0199] (3) Read the parameters in the target CAD and reconstruct the chamfer shape.
[0200] The extracted chamfer parameters, d1, d2 and the recorded adjacent faces, are stored in an intermediate format file, and the parameters are read in the target CAD to accurately reconstruct the chamfer shape.
[0201] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0202] Based on the same inventive concept, the embodiment of the present application also provides an asymmetric chamfer parameter conversion device for a three-dimensional model for implementing the asymmetric chamfer parameter conversion method for a three-dimensional model involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the embodiments of the asymmetric chamfer parameter conversion device for one or more three-dimensional models provided below can refer to the limitations of the asymmetric chamfer parameter conversion method for a three-dimensional model above, and will not be repeated here.
[0203] In one embodiment, Fig.16 As shown, a device for converting asymmetric chamfer parameters of a three-dimensional model is provided, comprising: a data acquisition and recognition module 1601, a correspondence matching module 1602, a reference adjacent surface determination module 1603, and a parameter conversion module 1604, wherein:
[0204] The data acquisition and identification module 1601 is used to acquire the original parameters corresponding to the chamfered model, and identify the adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from any type of three-dimensional model design software for the chamfered model, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface;
[0205] A correspondence matching module 1602 is used to determine a correspondence between any distance value of the first distance value and the second distance value and any adjacent surface of the first adjacent surface and the second adjacent surface, and obtain a correspondence between the distance value and the adjacent surface;
[0206] A reference adjacent surface determination module 1603 is used to determine a reference adjacent surface from adjacent surfaces associated with the chamfering process based on a magnitude relationship between the first distance value and the second distance value, and a correspondence between the distance value and the adjacent surface;
[0207] The parameter conversion module 1604 is used to use the first distance value, the second distance value and the identifier of the reference adjacent surface as converted parameters corresponding to the original parameters. The converted parameters are used for use by any type of three-dimensional model design software.
[0208] Each module in the above-mentioned asymmetric chamfer parameter conversion device for a three-dimensional model can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0209] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.17As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for converting asymmetric chamfer parameters of a three-dimensional model is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0210] Those skilled in the art will understand that Fig.17 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0211] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0212] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0213] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0214] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0215] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0216] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for converting asymmetric chamfer parameters of a three-dimensional model, characterized in that: The method comprises: Acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface; Determine a correspondence between any distance value among the first distance value and the second distance value and any adjacent surface among the first adjacent surface and the second adjacent surface, and obtain a correspondence between the distance value and the adjacent surface; Based on the magnitude relationship between the first distance value and the second distance value, and the corresponding relationship between the distance value and the adjacent surface, determining a reference adjacent surface from adjacent surfaces associated with the chamfering process; The first distance value, the second distance value and the identifier of the reference adjacent surface are used as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
2. The method according to claim 1, characterized in that The determining a correspondence between any one of the first distance value and the second distance value and any one of the first adjacent surface and the second adjacent surface to obtain a correspondence between the distance value and the adjacent surface includes: Identify the existence type of adjacent surfaces corresponding to the adjacent surfaces associated with the chamfering process in the chamfered model; Based on the existence type of the adjacent surface, determining the corresponding relationship between the distance value and the adjacent surface; The adjacent surface existence type is used to characterize the existence or non-existence of each adjacent surface in the adjacent surfaces associated with the chamfering process after the chamfering is implemented in the chamfered model.
3. The method according to claim 2, characterized in that The determining, based on the existence type of the adjacent surface, the corresponding relationship between the distance value and the adjacent surface includes: In a case where the adjacent surface existence type is the first type, determining a common edge between the chamfered surface in the chamfered model and the adjacent surface associated with the chamfering process; Determining the distance value between the input edge and the common edge in the chamfered model; Determining a corresponding relationship between the distance value and the adjacent face according to the distance value between the input edge and the common edge and a matching relationship between each distance value in the original parameter; Among them, in the chamfered model of the first type, two adjacent surfaces among the adjacent surfaces associated with the chamfering process exist.
4. The method according to claim 2, characterized in that: The determining, based on the existence type of the adjacent surface, the corresponding relationship between the distance value and the adjacent surface includes: In a case where the adjacent surface existence type is the second type, determining a common edge between the chamfered surface in the chamfered model and the adjacent surface existing in the adjacent surface associated with the chamfering process; Determining the distance value between the input edge and the common edge in the chamfered model; Determining a corresponding relationship between the distance value and the adjacent face according to the distance value between the input edge and the common edge and a matching relationship between each distance value in the original parameter; In the chamfered model of the second type, one of the adjacent surfaces associated with the chamfering process exists and the other adjacent surface does not exist.
5. The method according to claim 2, characterized in that: The determining, based on the existence type of the adjacent surface, the corresponding relationship between the distance value and the adjacent surface includes: In the case where the adjacent surface existence type is the third type, determining a preset correspondence relationship between the distance value and the adjacent surface; the preset correspondence relationship is a correspondence relationship between any distance value of the assumed first distance value and the second distance value and any adjacent surface of the first adjacent surface and the second adjacent surface; Based on the law of cosines, a theoretical value of the angle to be measured is determined according to the adjacent surface angle value between adjacent surfaces associated with each chamfering process in the chamfered model, the first distance value, and the second distance value; Performing angle measurement on the angle to be measured to obtain a measurement value of the angle to be measured; Based on the matching between the theoretical value of the angle to be measured and the measured value, determining the corresponding relationship between the distance value and the adjacent surface according to the preset corresponding relationship; In the chamfered model of the third type, two adjacent surfaces among the adjacent surfaces associated with the chamfering process do not exist.
6. The method according to claim 1, characterized in that The determining of a reference adjacent surface from adjacent surfaces associated with the chamfering process based on the magnitude relationship between the first distance value and the second distance value and the corresponding relationship between the distance value and the adjacent surface comprises: Determine an adjacent surface associated with the chamfering process corresponding to a larger distance value between the first distance value and the second distance value as the reference adjacent surface; Alternatively, the adjacent surface associated with the chamfering process corresponding to the smaller distance value between the first distance value and the second distance value is determined as the reference adjacent surface.
7. A device for converting asymmetric chamfer parameters of a three-dimensional model, characterized in that: The device comprises: A data acquisition and identification module is used to acquire original parameters corresponding to the chamfered model, and identify adjacent surfaces associated with the chamfering process from the chamfered model; the original parameters are asymmetric chamfering parameters read from the chamfered model in any type of three-dimensional model design software, the original parameters include a first distance value and a second distance value, and the adjacent surfaces associated with the chamfering process include a first adjacent surface and a second adjacent surface; a correspondence matching module, used to determine a correspondence between any one of the first distance value and the second distance value and any one of the first adjacent face and the second adjacent face, and obtain a correspondence between the distance value and the adjacent face; A reference adjacent surface determination module, configured to determine a reference adjacent surface from adjacent surfaces associated with the chamfering process based on a magnitude relationship between the first distance value and the second distance value, and a corresponding relationship between the distance value and the adjacent surface; A parameter conversion module is used to use the first distance value, the second distance value and the identifier of the reference adjacent surface as converted parameters corresponding to the original parameters, and the converted parameters are used for use by any type of three-dimensional model design software.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Chamfered surface identification method and device, electronic equipment and storage medium
CN114092932A
CAD model analysis method and device, equipment and storage medium
CN117150664A
Method for identifying chamfer manufacturing features from CAD model
CN118192432A
Novel dental forming sheet
CN216652489U
Intelligent chamfer recognition in CAD models
US20150269284A1