Asymmetric chamfer parameter conversion method, device and computer equipment of three-dimensional model
By identifying and selecting reference adjacent faces, the problem of inconsistent conversion of asymmetric chamfer parameters in different CAD software was solved, achieving accurate conversion and consistency of the model across different software platforms and improving the accuracy of model construction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IND SOFTWARE DIGITAL INNOVATION (GUANGZHOU) CO LTD
- Filing Date
- 2024-12-26
- Publication Date
- 2026-06-05
AI Technical Summary
The parameter conversion for asymmetric chamfering in different CAD software has issues of directional errors and inconsistencies, which leads to a decrease in the accuracy of model construction.
By identifying the original parameters of the model after chamfering, the type of adjacent face is determined, and a reference adjacent face is selected based on the relationship between the type of adjacent face and the distance value, ensuring the compatibility and consistency of the parameters after conversion.
It improved the success rate of asymmetric chamfer parameter conversion, ensured the correctness and accuracy of the model across different software platforms, and enhanced the accuracy of model construction.
Smart Images

Figure CN119670301B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer-aided design technology, and in particular to a method, apparatus and computer device for converting asymmetric chamfer parameters of a three-dimensional model. Background Technology
[0002] In the field of Computer-Aided Design (CAD), parametric conversion refers to extracting the modeling history and data of a model from one CAD software, saving it to an intermediate format file, and then importing this file into another CAD software, enabling the latter to regenerate the model based on the historical parameters. In this process, asymmetric chamfers are a common geometric feature, typically defined by two distances (d1 and d2) and a reversal direction (the flip option).
[0003] However, different CAD software programs handle the flip option inconsistently, leading to differences in the chamfer shapes generated by the same parameters in different software. Due to these differences in processing methods, there is no unified standard for the d1 and d2 directions and the flip option during the conversion process. Parametric conversion typically uses default settings, resulting in incorrect chamfer directions. Even if the converted model has an incorrect direction, it cannot be corrected, reducing the success rate of asymmetric chamfer parameter conversion. This, in turn, affects the generation of subsequent features and reduces the accuracy of model construction. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for converting asymmetric chamfer parameters of 3D models, which can improve the success rate of asymmetric chamfer parameter conversion and the accuracy of model construction, in order to address the above-mentioned technical problems.
[0005] In a first aspect, embodiments of this application provide a method for converting asymmetric chamfer parameters of a three-dimensional model. The method includes:
[0006] Obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model; the original parameters are the asymmetric chamfering parameters read from the chamfered model in any type of 3D model design software, the original parameters include a first distance value and a second distance value, and the adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face;
[0007] Determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face to obtain the correspondence between the distance value and the neighboring face;
[0008] Based on the relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face, a reference adjacent face is determined from the adjacent faces 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 the transformed parameters corresponding to the original parameters. The transformed parameters are used by any type of 3D model design software.
[0010] In one embodiment, determining the correspondence between any one of the first distance value and the second distance value, and any one of the first neighboring face and the second neighboring face, to obtain the correspondence between the distance value and the neighboring face, includes:
[0011] Identify the type of adjacent faces that exist in the model associated with the chamfering process after chamfering;
[0012] Based on the type of neighboring faces, determine the correspondence between the distance value and the neighboring faces;
[0013] The adjacent face existence type is used to characterize whether each adjacent face exists in the adjacent face associated with the chamfering process after the chamfering is performed on the model.
[0014] In one embodiment, determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes:
[0015] If the adjacent face has a type of the first type, determine the common edge between the chamfered face in the chamfered model and the adjacent face associated with the chamfering process;
[0016] Determine the distance between the input edge and the common edge in the model after beveling;
[0017] 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, the correspondence between the distance value and the adjacent face is determined;
[0018] In the chamfered model of the first type, both adjacent faces of the adjacent faces associated with the chamfering process exist.
[0019] In one embodiment, determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes:
[0020] If the adjacent face has a type of the second type, determine the common edge between the chamfered face in the chamfered model and the adjacent face associated with the chamfering process;
[0021] Determine the distance between the input edge and the common edge in the model after beveling;
[0022] 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, the correspondence between the distance value and the adjacent face is determined;
[0023] In the second type of chamfered model, one of the adjacent faces associated with the chamfering process exists while the other adjacent face does not.
[0024] In one embodiment, determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes:
[0025] If the adjacent face has a type of the third type, a preset correspondence between the distance value and the adjacent face is determined; the preset correspondence is the 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.
[0026] Based on the law of cosines, the theoretical value of the angle to be measured is determined according to the angle between adjacent faces associated with each chamfering process in the chamfered model, the first distance value, and the second distance value.
[0027] The included angle to be measured is measured to obtain the measured value of the included angle;
[0028] Based on the matching between the theoretical value and the measured value of the included angle to be measured, the correspondence between the distance value and the adjacent surface is determined according to the preset correspondence.
[0029] In the third type of chamfered model, neither of the two adjacent faces associated with the chamfering process exists.
[0030] In one embodiment, determining a reference neighboring face from the neighboring faces associated with the chamfering process based on the magnitude relationship between the first distance value and the second distance value, and the correspondence between the distance value and the neighboring face, includes:
[0031] The adjacent face associated with the chamfering process corresponding to the larger distance value between the first distance value and the second distance value is determined as the reference adjacent face;
[0032] Alternatively, the adjacent face associated with the chamfering process corresponding to the smaller of the first distance value and the second distance value can be determined as the reference adjacent face.
[0033] Secondly, this application also provides an asymmetric chamfer parameter conversion device for a three-dimensional model. The device includes:
[0034] The data acquisition and recognition module is used to acquire the original parameters corresponding to the chamfered model and identify the adjacent faces associated with the chamfering process from the chamfered model. The original parameters are the asymmetric chamfering parameters of the chamfered model read in any type of 3D model design software. The original parameters include a first distance value and a second distance value. The adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face.
[0035] The correspondence matching module is used to determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face, so as to obtain the correspondence between the distance value and the neighboring face;
[0036] The reference adjacent face determination module is used to determine a reference adjacent face from the adjacent faces associated with the chamfering process based on the size relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face;
[0037] The parameter conversion module is used to convert the first distance value, the second distance value, and the identifier of the reference adjacent surface into converted parameters corresponding to the original parameters. The converted parameters are used by any type of 3D model design software.
[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0039] Obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model; the original parameters are the asymmetric chamfering parameters read from the chamfered model in any type of 3D model design software, the original parameters include a first distance value and a second distance value, and the adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face;
[0040] Determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face to obtain the correspondence between the distance value and the neighboring face;
[0041] Based on the relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face, a reference adjacent face is determined from the adjacent faces 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 the transformed parameters corresponding to the original parameters. The transformed parameters are used by any type of 3D model design software.
[0043] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0044] Obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model; the original parameters are the asymmetric chamfering parameters read from the chamfered model in any type of 3D model design software, the original parameters include a first distance value and a second distance value, and the adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face;
[0045] Determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face to obtain the correspondence between the distance value and the neighboring face;
[0046] Based on the relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face, a reference adjacent face is determined from the adjacent faces 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 the transformed parameters corresponding to the original parameters. The transformed parameters are used by any type of 3D model design software.
[0048] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0049] Obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model; the original parameters are the asymmetric chamfering parameters read from the chamfered model in any type of 3D model design software, the original parameters include a first distance value and a second distance value, and the adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face;
[0050] Determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face to obtain the correspondence between the distance value and the neighboring face;
[0051] Based on the relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face, a reference adjacent face is determined from the adjacent faces 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 the transformed parameters corresponding to the original parameters. The transformed parameters are used by any type of 3D model design software.
[0053] The aforementioned method, apparatus, computer device, storage medium, and computer program product for converting asymmetric chamfer parameters of a 3D model first obtains the original parameters, including a first distance value and a second distance value, by identifying the chamfered model. Then, it determines the correspondence between the first and second distance values and the first and second adjacent faces. Based on the magnitude and correspondence of the distance values, it selects one of the adjacent faces as a reference adjacent face. Finally, it uses the first distance value, the second distance value, and the identifier of the reference adjacent face as the converted parameters. This embodiment, by implementing asymmetric chamfer parameter conversion of a 3D model, ensures the compatibility and seamless reading of parameters across different software platforms. By introducing a reference adjacent face and combining the first and second distance values, it accurately defines the shape of the asymmetric chamfer model, solving the problem of parameter inconsistency caused by differences in the definition of inversion parameters in different design software. This 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. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a flowchart illustrating the method for converting asymmetric chamfer parameters in a 3D model.
[0056] Figure 2 This is a flowchart illustrating the asymmetric chamfer parameter conversion method for a 3D model in another embodiment;
[0057] Figure 3 This is a schematic diagram of the first principle corresponding to the first type of parameter conversion in one embodiment;
[0058] Figure 4 This is a schematic diagram of the second principle corresponding to the parameter conversion of the first type in one embodiment;
[0059] Figure 5 This is a schematic diagram of the third principle corresponding to the first type of parameter conversion in one embodiment;
[0060] Figure 6 This is a schematic diagram of the fourth principle corresponding to the first type of parameter conversion in one embodiment;
[0061] Figure 7 This is a schematic diagram of the first principle corresponding to the second type of parameter conversion in one embodiment;
[0062] Figure 8 This is a schematic diagram of the second principle corresponding to the second type of parameter conversion in one embodiment;
[0063] Figure 9 This is a schematic diagram of the third principle corresponding to the second type of parameter conversion in one embodiment;
[0064] Figure 10 This is a schematic diagram of the fourth principle corresponding to the second type of parameter conversion in one embodiment;
[0065] Figure 11 This is a schematic diagram of the first principle corresponding to the third type of parameter conversion in one embodiment;
[0066] Figure 12 This is a schematic diagram of the second principle corresponding to the third type of parameter conversion in one embodiment;
[0067] Figure 13 This is a schematic diagram of the third principle corresponding to the third type of parameter conversion in one embodiment;
[0068] Figure 14 This is a schematic diagram of the fourth principle corresponding to the third type of parameter conversion in one embodiment;
[0069] Figure 15 This is a schematic diagram of the fifth principle corresponding to the third type of parameter conversion in one embodiment;
[0070] Figure 16 This is a structural block diagram of an asymmetric chamfering parameter conversion device for a three-dimensional model in one embodiment;
[0071] Figure 17 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0072] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this 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, data stored, data displayed, 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 related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0074] In one embodiment, such as Figure 1 As shown, a method for converting asymmetric chamfer parameters of a 3D model is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0075] S101, obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model.
[0076] The original parameters are the asymmetric chamfer parameters read from any type of 3D model design software after chamfering. The original parameters include the first distance value and the second distance value. In addition, the original parameters may also include the inversion parameter, which is used to characterize the direction of the chamfer.
[0077] For example, in one CAD software, the shape generated when d1=5, d2=10, and flip=false; in another CAD software, the parameters might be expressed as d1=10, d2=5, and flip=false. Here, flip is the inversion parameter. Based on the above representation of the original parameters, it is clear that without a clear understanding of the reference rules for the original parameters, users cannot accurately describe the chamfering process based on the parameter values.
[0078] In this context, the adjacent faces associated with the chamfering process refer to the adjacent faces that intersect with the chamfered face and contain the chamfered input edge. Generally, the adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face, which correspond to a first distance value and a 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, which refers to the edge shared by the chamfered face and the adjacent faces. Furthermore, the chamfered face and the input edge can be obtained by identifying the chamfered model.
[0079] S102, determine the correspondence between any one of the first distance value and the second distance value and any one of the first and second adjacent faces, and obtain the correspondence between the distance value and the adjacent face.
[0080] For example, the first distance value is denoted as d1, the second distance value is denoted as d2, the first adjacent face is denoted as front, and the second adjacent face is denoted as back; then the correspondence between the distance value and the adjacent face 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 size relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face, determine the reference adjacent face from the adjacent faces associated with the chamfering process.
[0082] The relationship between the first and second distance values refers to the relative size of the distance values. For example, if d1 = 10cm and d2 = 8cm, then d1 is greater than d2.
[0083] For example, after comparing the magnitude relationship between the first distance value and the second distance value, it is necessary to select one of the two adjacent faces as a reference adjacent face based on established rules in order to determine the direction of the asymmetric chamfer.
[0084] S104, take the first distance value, the second distance value and the identifier of the reference neighbor as the transformed parameters corresponding to the original parameters.
[0085] The identifier of the reference adjacent face is a unique identifier of the adjacent face. This application does not restrict its specific parameter form, as long as it satisfies the direction of the asymmetric chamfer based on the reference adjacent face.
[0086] The converted parameters are used by any type of 3D model design software. That is, the converted parameters obtained by the asymmetric chamfer parameter conversion method of the 3D model provided in this application embodiment can be read and used across platforms, and can realize the functions of copying, modifying and editing the 3D model in different software platforms without obstacles.
[0087] In the above-mentioned method for converting asymmetric chamfer parameters of a 3D model, the original parameters, including a first distance value and a second distance value, are first obtained by identifying the chamfered model. Then, the correspondence between the first and second distance values and the first and second adjacent faces is determined. Based on the magnitude and correspondence of the distance values, one of the adjacent faces is selected as a reference adjacent face. Finally, the first distance value, the second distance value, and the identifier of the reference adjacent face are used as the converted parameters. This embodiment, by implementing asymmetric chamfer parameter conversion of a 3D model, ensures the compatibility and seamless reading of parameters across different software platforms. By introducing a reference adjacent face and combining the first and second distance values, the model shape of the asymmetric chamfer is precisely defined, solving the problem of parameter inconsistency caused by differences in the definition of inversion parameters in different design software. This 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, such as Figure 2 As shown, a method for converting asymmetric chamfer parameters of a 3D model is provided, including the following steps:
[0089] S201, Obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model;
[0090] S202, Identify the type of adjacent faces that exist in the model associated with the chamfering process after chamfering;
[0091] S203, if there are adjacent faces of type 1, determine the distance value between the input edge and the common edge, and the matching relationship between the distance values in the original parameters, so as to determine the correspondence between the distance value and the adjacent face;
[0092] S204, when the neighboring face has a type of second, determine the distance value between the common edge and the input edge between the existing neighboring faces, and the matching relationship between each distance value in the original parameters, so as to determine the correspondence between the distance value and the neighboring face;
[0093] S205, when there is a third type of adjacent face, determine the preset correspondence relationship, and verify the preset correspondence relationship based on the cosine theorem. Based on the verification result, determine the reference adjacent face from the adjacent faces associated with the chamfering process.
[0094] S206, take the first distance value, the second distance value, and the identifier of the reference neighbor as the transformed parameters corresponding to the original parameters.
[0095] S207, determine the adjacent face associated with the chamfering process corresponding to the larger of the first distance value and the second distance value as the reference adjacent face; or, determine the adjacent face associated with the chamfering process corresponding to the smaller of the first distance value and the second distance value as the reference adjacent face.
[0096] It should be noted that the specific limitations of the above steps can be found in the above description of the specific limitations of an asymmetric chamfer parameter conversion method for a three-dimensional model, and will not be repeated here.
[0097] In one embodiment, determining the correspondence between any one of the first distance value and the second distance value and any one of the first and second adjacent faces to obtain the correspondence between the distance value and the adjacent face includes: identifying the adjacent face existence type corresponding to the adjacent face associated with the chamfering process in the chamfered model; and determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type.
[0098] Among them, the adjacent face existence type is used to characterize whether each adjacent face exists in the adjacent face associated with the chamfering process after the chamfering is implemented. Generally, there are three types of adjacent face existence 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 one-sided overflow type, and the third type is also called the two-sided overflow type.
[0099] More specifically, in the first type of chamfered model, both adjacent faces associated with the chamfering process exist; in the second type of chamfered model, one adjacent face associated with the chamfering process exists and the other adjacent face does not exist; in the third type of chamfered model, neither adjacent face associated with the chamfering process exists.
[0100] For example, the existence of adjacent faces (front and back) after chamfering is generated can be divided into three categories: (1) No overflow: the two adjacent faces (front and back) still exist after chamfering is generated. (2) One-sided overflow: only one adjacent face exists, and the other adjacent face disappears. (3) Two-sided overflow: both adjacent faces disappear.
[0101] To distinguish between the three overflow types, the system first obtains the permanently named `frontID` and `backID` of the two adjacent faces of the chamfered input edge in the state before chamfering. Then, it scrolls to the state after chamfering is generated and attempts to generate the corresponding `front` and `back` faces using `frontID` and `backID` respectively. By reading the parameters indicating whether the faces exist, it can be determined whether `front` and `back` exist.
[0102] In this embodiment, "front" is just a label between two adjacent faces and has no specific definition. For example, the label can come from the C++ data structure faceList.front() and faceList.back(). It is only used to distinguish between the two adjacent faces. That is, this embodiment does not explicitly determine which adjacent face is "front", but gives a simple name to identify it. Therefore, front may correspond to the ID of the first adjacent face or the ID of the second adjacent face.
[0103] Furthermore, it can be understood that "front" is the first adjacent face selected by the user in this embodiment. "Front" may correspond to the first adjacent face defined by the CAD software, or it may correspond to the second adjacent face defined by the CAD software. Naturally, "back" is the second adjacent face selected by the user.
[0104] In this embodiment, the type of neighboring faces associated with the chamfering process is first determined by identifying the neighboring faces in the chamfered model. Then, based on the neighboring face type, the correspondence between the distance value and the neighboring face is determined. Subsequently, the neighboring face type is divided into three types to determine the parameter conversion method for different types. Finally, based on the identified neighboring face type and its existence, an appropriate conversion strategy is selected for parameter processing. This embodiment improves the accuracy and flexibility of chamfering parameter conversion by clearly defining the neighboring face type, and supports the conversion of asymmetric chamfering parameters in various scenarios.
[0105] In one embodiment, determining the correspondence between distance values and adjacent faces based on the adjacent face existence type includes: when the adjacent face existence type is the first type, determining the common edge between the chamfered face in the chamfered model and the adjacent face 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 distance values and adjacent faces based on the distance value between the input edge and the common edge and the matching relationship between each distance value in the original parameters.
[0106] For example, when the adjacent faces are of type 1 (no overflow), both the front and back adjacent faces exist after the chamfer is generated. The parameter conversion process may include:
[0107] (1) Obtain the common edge and calculate the distance.
[0108] First, extract the chamfered face and obtain the common edge between the chamfered face and the adjacent face of `front`, naming it `frontEdge`. Calculate the distance from `inputEdge` to `frontEdge`, naming it `frontDistance`. Similarly, extract the common edge between the chamfered face and the adjacent face of `back`, naming it `backEdge`, and calculate the distance from `inputEdge` to `backEdge`, naming it `backDistance`. Obtaining the common edges and calculating the two distances are used for subsequent determination of adjacent face correspondence.
[0109] (2) Determine the relationship between d1, d2 and adjacent faces.
[0110] Based on frontDistance and backDistance, determine the correspondence between d1 and d2 and their adjacent faces: 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 faces corresponding to long distances.
[0112] Compare the values of d1 and d2, and record the neighboring faces corresponding to the longer distance. If d1 > d2, record the neighboring face corresponding to d1; if d2 > d1, record the neighboring face corresponding to d2.
[0113] More specifically, in one example, such as Figure 3As shown, for the 3D model before parameter conversion, the parameters for a certain chamfer in a certain type of CAD software are read as follows: d1 = 10, d2 = 20, (flip = false). Based on the data of the 3D 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 face and the front adjacent face, and the common edge backEdge between the chamfer face and the back adjacent face). The distances between the above edges are calculated, including: frontDistance = 20, backDistance = 10. Based on the value of the read parameters and the calculated distance values, the correspondence can be matched to determine that: d1 corresponds to back, and d2 corresponds to front. Then, it is necessary to record the face corresponding to the parameter with the larger chamfer distance (the adjacent face corresponding to the longer distance). Specifically, since d2 > d1, the face corresponding to the parameter with a larger chamfer distance is front. Therefore, in the intermediate parameters, the value of the reference adjacent face parameter is set to the identifier of front; it is used to represent that the front adjacent face of the chamfer is used as the reference adjacent face of the intermediate parameter, so as to make it easy to use the reference adjacent face as a reference to distinguish the meaning represented by the two parameters d1 and d2 of the chamfer without any doubt.
[0114] In another example, such as Figure 4 As shown, the data involved in the parameter transformation process includes: d1 = 10, d2 = 20, (flip = true); frontDistance = 10, backDistance = 20; therefore, d1 corresponds to front, and d2 corresponds to back. If d2 > d1, then the back neighbor is stored as the reference neighbor.
[0115] In another example, such as Figure 5 As shown, the data involved in the parameter transformation process includes: d1 = 20, d2 = 10, (flip = false); frontDistance = 10, backDistance = 20; therefore, d1 corresponds to back, and d2 corresponds to front. If d1 > d2, then the neighboring face of back is stored as the reference neighboring face.
[0116] In another example, such as Figure 6As shown, the data involved in the parameter transformation process includes: d1 = 20, d2 = 10, (flip = true); frontDistance = 20, backDistance = 10; therefore, d1 corresponds to front, and d2 corresponds to back. If d1 > d2, then the front neighbor is stored as the reference neighbor.
[0117] In this embodiment, the non-standard, controversial, or non-cross-platform universal inversion parameters in the original software were removed. Instead, a standardized, uncontroversial, and cross-platform universal reference adjacent face parameter was defined, 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, determining the correspondence between distance values and adjacent faces based on the adjacent face existence type includes: when the adjacent face existence type is the second type, determining the common edge between the chamfered face in the chamfered model and the adjacent faces 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 face 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 face existence type is type two (single-sided overflow case), only one adjacent face exists after the chamfer is generated, and the other adjacent face disappears. The parameter conversion process may include:
[0120] (1) Obtain existing and disappearing neighboring surfaces.
[0121] First, determine which neighboring face still exists and which neighboring face has disappeared. For example, if the front neighboring face exists, then the back neighboring face disappears; if the back neighboring face exists, then the front neighboring face disappears.
[0122] (2) Obtain the common edge between the chamfered face and the still existing adjacent face, and calculate the distance.
[0123] If a front neighbor exists, extract the common edge frontEdge between the chamfered face and the front neighbor, and calculate the distance from inputEdge to frontEdge, naming it frontDistance. There is only one inputEdge.
[0124] If the back neighbor exists, extract the common edge backEdge between the chamfered face and the back neighbor, calculate the distance from inputEdge to backEdge, and name it backDistance.
[0125] (3) Determine the relationship between d1, d2 and adjacent faces.
[0126] If the front neighbor 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 adjacent face to back 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 faces corresponding to long distances.
[0129] Compare the values of d1 and d2, and record the corresponding long-distance neighboring faces: if d1 > d2, record the neighboring face corresponding to d1; if d2 > d1, record the neighboring face corresponding to d2.
[0130] More specifically, in one example, such as Figure 7 As shown, the data involved in the parameter transformation process includes: d1 = 40, d2 = 80, (flip = false); based on the data of the 3D model before the parameter transformation, the identifiers of several edges of the chamfer are identified (specifically including the input edge inputEdge, the common edge frontEdge between the chamfer face and the front adjacent face); back disappears, front exists, frontDistance = 80; therefore, d2 corresponds to front, and d1 corresponds to back. If d2 > d1, then the front adjacent face is stored as the reference adjacent face.
[0131] In another example, such as Figure 8 As shown, the data involved in the parameter transformation process includes: 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, then the neighboring face of back is stored as the reference neighboring face.
[0132] In another example, such as Figure 9As shown, the data involved in the parameter transformation process includes: 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, then the neighboring face of back is stored as the reference neighboring face.
[0133] In another example, such as Figure 10 As shown, the data involved in the parameter transformation process includes: 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, then the adjacent face of front 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 chamfered model, the distance between the common edge and the input edge is calculated and matched using the remaining adjacent face. This achieves the determination of the reference adjacent face and the conversion of parameters, improving the versatility of parameter conversion in multiple scenarios.
[0135] In one embodiment, determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes: when the adjacent face existence type is the third type, determining a preset correspondence between the distance value and the adjacent face; based on the cosine theorem, determining the theoretical value of the included angle to be measured according to the included angle value between adjacent faces associated with each chamfering process in the chamfered model, the first distance value, and the second distance value; measuring the included angle to be measured to obtain the measured value of the included angle to be measured; and determining the correspondence between the distance value and the adjacent face according to the preset correspondence based on the matching situation between the theoretical value and the measured value of the included angle to be measured.
[0136] The preset correspondence is the relationship between any one of the assumed first and second distance values and any one of the first and second adjacent faces. For example, assume d1 corresponds to the front adjacent face.
[0137] Specifically, if the theoretical and measured values of the included angle are equal, the assumption of the pre-defined correspondence is proven to be correct, thus determining that the pre-defined correspondence is the correspondence between the distance value and the adjacent face. If the theoretical and measured values of the included angle are not equal, a relationship different from the pre-defined correspondence can generally be determined, for example, assuming that d1 corresponds to the back adjacent face. Furthermore, the assumptions of the pre-defined correspondence can be changed, and the above verification method can be used for verification until the verification is successful.
[0138] For example, when the adjacent faces are of type three (bilateral overflow), both adjacent faces disappear after the chamfer is generated. To determine the correspondence between d1 and d2 and the adjacent faces, the parameter conversion process can include:
[0139] (1) Obtain the adjacent planes and their included angles before chamfering.
[0140] First, before chamfering, obtain the two adjacent faces of the input edge, front and back, and create two planes, frontPlane and backPlane. Next, calculate the angle between these two planes, denoted as . .
[0141] (2) Calculate thirdSide.
[0142] Based on the values of d1 and d2 and the included angle between adjacent faces It can generate a such Figure 11 The length of the third side of the triangle shown can be calculated using the law of cosines.
[0143]
[0144] At fixed d1, d2 and Below, such as Figure 11 The thirdSide shown is 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) Measure the angle based on assumptions.
[0148] Assuming d1 corresponds to the front, measure the sizes of ∠BAC and ∠BCA. The specific steps are as follows: Based on the above assumption, ∠BAC is the angle between the front plane and the chamfered surface; ∠BAC can be obtained by measuring the angle between the front plane and the chamfered surface. Similarly, based on the above assumption, ∠BCA is the angle between the back plane and the chamfered surface; ∠BCA can be obtained by measuring the angle between the back plane and the chamfered surface.
[0149] (5) Calculate ∠BAC based on the assumptions.
[0150] Assuming d1 corresponds to front, the magnitude of ∠BAC can be calculated using the Law of Cosines:
[0151]
[0152] (6) Compare the measured values with the calculated values.
[0153] If the measured ∠BAC is equal to the calculated ∠BAC, then the hypothesis is proven to be true, i.e., d1 corresponds to front and d2 corresponds to back. If the measured ∠BAC is not equal to the calculated ∠BAC, but the calculated ∠BAC is equal to the measured ∠BCA, then the hypothesis is proven to be false, and the correct correspondence should be d1 corresponds to back and d2 corresponds to front.
[0154] (7) Record the adjacent faces corresponding to long distances.
[0155] Finally, compare the sizes of d1 and d2, and record the neighboring faces corresponding to the longer distance: if d1 > d2, then record the neighboring face corresponding to d1; if d2 > d1, then record the neighboring face corresponding to d2.
[0156] More specifically, in one example, such as Figure 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 assumption is verified according to the inference steps. The verification is successful, and the assumption is correct.
[0158] Since d2 > d1 is detected, 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 (the identifiers of d1, d2, and back).
[0159] like Figure 13 As shown, the inference steps include:
[0160] ① Measurement
[0161] ② Calculate the thirdSide using the Law of Cosines;
[0162]
[0163] ③ Construct a triangle ABC using 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, i.e., AB corresponds to front, d2 corresponds to back, and BC corresponds to back. d1(s) and d2(s) represent the assumed directions of d1 and d2.
[0164] ③ Based on the above assumptions, measure the dimensions of ∠BAC and ∠BCA. ∠BAC is the angle between the front and the chamfered surface; the measured value of ∠BAC is... ∠BCA is the angle between the back face and the chamfered surface. ∠BCA is measured to be... .
[0165] ④ Based on the above assumptions, calculate the size of ∠BAC.
[0166]
[0167] ⑤ Compare the measured values with the calculated values.
[0168] The measured ∠BAC = The calculated ∠BAC = Therefore, the assumption is correct, that is, d1 corresponds to front and d2 corresponds to back.
[0169] ⑦ If d2 > d1, then store back as the reference neighbor.
[0170] In another example, such as Figure 14 As shown in the diagram, the actual parameters are: d1 = 80, d2 = 100; d1 corresponds to back, d2 corresponds to front; if d2 > d1, then front is stored as the reference neighbor.
[0171] like Figure 15 As shown, the inference steps include:
[0172] ① Measurement
[0173] ② Calculate the thirdSide using the Law of Cosines;
[0174]
[0175] ③ Construct a triangle ABC using 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, i.e., AB corresponds to front, d2 corresponds to back, and BC corresponds to back. d1(s) and d2(s) represent the assumed directions of d1 and d2.
[0176] ④ Based on the above assumptions, measure the dimensions of ∠BAC and ∠BCA. ∠BAC is the angle between the front and the chamfered surface; the measured value of ∠BAC is... ∠BCA is the angle between the back face and the chamfered surface. ∠BCA is measured to be... .
[0177] ⑤ Based on the above assumptions, calculate the size of ∠BAC.
[0178]
[0179] ⑥ Compare the measured values with the calculated values.
[0180] The measured ∠BAC = The calculated ∠BAC = The two results are not equal. Simultaneously, the calculated ∠BAC = The measured ∠BCA = The calculated ∠BAC is equal to the measured ∠BCA, proving the hypothesis to be incorrect. Therefore, the true situation is the opposite of the hypothesis, i.e., d1 corresponds to back and d2 corresponds to front.
[0181] ⑦ If d2 > d1, then store front as the reference neighbor.
[0182] In another example, the actual parameters are: d1 = 100, d2 = 80; d1 corresponds to front, d2 corresponds to back; if d1 > d2, then front is stored as the reference neighbor. The principle of the inference step is the same as in the above embodiment, and will not be repeated here.
[0183] In this embodiment, when the chamfering process causes two faces to overflow and no longer exist in the chamfered model, an assumption is made about the matching relationship, and the assumption is verified based on the measurement of the angle and the cosine theorem. This realizes the determination of the reference adjacent face and the conversion of parameters, and improves the versatility of parameter conversion in multiple scenarios.
[0184] In one embodiment, determining a reference neighboring face from the neighboring faces associated with the chamfering process based on the size relationship between the first distance value and the second distance value, and the correspondence between the distance value and the neighboring face, includes: determining the neighboring face associated with the chamfering process corresponding to the larger distance value of the first distance value and the second distance value as the reference neighboring face; or, determining the neighboring face associated with the chamfering process corresponding to the smaller distance value of the first distance value and the second distance value as the reference neighboring face.
[0185] In this embodiment, the selection of the reference neighbor is achieved by using the magnitude of the first distance value and the second distance value, and different selection rules are proposed to improve the flexibility of the reference neighbor selection, thereby increasing the diversity of the parameter transformation process.
[0186] In existing technologies, different CAD software programs handle the flip option inconsistently, resulting in differences in the chamfer shapes generated by the same parameters in different software. For example, the shape produced by flip=true in one CAD software may appear as flip=false in another CAD software.
[0187] Similarly, different CAD software programs handle the directions of d1 and d2 differently. The concept of direction handling is as follows: 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; or d1 may be along the second adjacent face and d2 along the first adjacent face. Furthermore, the user cannot know which adjacent face is the first and which is the second. The direction setting method of d1 and d2 is a technical secret of each CAD software program, and the setting of the first and second adjacent faces is also a technical secret of each CAD software program; the specific setting details are unknown to the user.
[0188] Therefore, the shape generated in one CAD software when d1=5, d2=10 and flip=false may be represented by parameters d1=10, d2=5 and flip=false in another CAD software.
[0189] It is known that during the parameter conversion process, different CAD software often handles the d1, d2 directions and reverse direction options of asymmetric chamfers in a inconsistent manner, which often leads to inconsistent graphics generated by the same parameters in different software.
[0190] Based on this, this application provides a method for converting asymmetric chamfer parameters of a three-dimensional model. The method is described in detail below with a specific embodiment. It is important to understand that the following description is merely illustrative and not intended to limit the scope of the application.
[0191] The asymmetric chamfer parameter conversion method for 3D models provided in this application, also known as a method for asymmetric chamfer parameter conversion between CAD software, uniquely determines the chamfer shape 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. This method effectively solves the parameter conversion errors caused by inconsistencies in the inversion options of different CAD software, and significantly improves the accuracy of asymmetric chamfer graphic conversion.
[0192] The asymmetric chamfer parameter conversion method for 3D models provided in this application proposes a novel approach to accurately define the shape of asymmetric chamfers by introducing adjacent face data. When extracting asymmetric chamfers, an adjacent face is selected based on the distance from the chamfer edge to the adjacent face, 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, this application introduces adjacent face data and combines the values of d1 and d2 to accurately define the asymmetric chamfer shape, solving the problem caused by differences in the definitions of d1, d2 directions and flip options. This ensures that the chamfer shapes generated after parametric conversion from different CAD software are consistent. Furthermore, it guarantees that different CAD software can correctly determine the asymmetric chamfer shape in parametric conversion scenarios, ensuring the correctness of the model after parametric conversion between different CAD software, ensuring accurate definition of the chamfer shape, and significantly improving the success rate of conversion.
[0194] The asymmetric chamfering parameter conversion method for 3D models provided in this application first requires obtaining the two adjacent faces, front and back, of the input edge (inputEdge) to be chamfered. Then, the overall approach of this application is as follows:
[0195] (1) Establish the correspondence between d1, d2 and the adjacent faces front and back.
[0196] If d1 corresponds to front, then d2 corresponds to back, and you can set the variables frontTo1 = true and backTo2 = true; if d1 corresponds to back, then d2 corresponds to front, and you can set the variables frontTo2 = true and backTo1 = true.
[0197] (2) Record the adjacent faces corresponding to long distances.
[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 involves storing the geometric data (geometric information) of the edges and faces into an intermediate format file, and then using this geometric data to match the required edges and faces in the target CAD software.
[0199] (3) Read the parameters from 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. The parameters can then be read in the target CAD file to accurately reconstruct the chamfer shape.
[0201] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0202] Based on the same inventive concept, this application also provides an asymmetric chamfering parameter conversion device for three-dimensional models to implement the asymmetric chamfering parameter conversion method for three-dimensional models as described above. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the asymmetric chamfering parameter conversion device for three-dimensional models provided below can be found in the limitations of the asymmetric chamfering parameter conversion method for three-dimensional models described above, and will not be repeated here.
[0203] In one embodiment, such as Figure 16 As shown, an asymmetric chamfering parameter conversion device for a 3D 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 recognition module 1601 is used to acquire the original parameters corresponding to the chamfered model and identify the adjacent faces associated with the chamfering process from the chamfered model. The original parameters are the asymmetric chamfering parameters read from any type of 3D model design software of the chamfered model. The original parameters include the first distance value and the second distance value. The adjacent faces associated with the chamfering process include the first adjacent face and the second adjacent face.
[0205] The correspondence matching module 1602 is used to determine the correspondence between any one of the first distance value and the second distance value and any one of the first and second adjacent faces, so as to obtain the correspondence between the distance value and the adjacent face;
[0206] The reference adjacent face determination module 1603 is used to determine the reference adjacent face from the adjacent faces associated with the chamfering process based on the size relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face.
[0207] The parameter conversion module 1604 is used to convert the first distance value, the second distance value, and the identifier of the reference adjacent surface into the converted parameters corresponding to the original parameters. The converted parameters can be used by any type of 3D model design software.
[0208] Each module in the asymmetric chamfering parameter conversion device for the aforementioned 3D model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0209] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 17As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an asymmetric chamfering parameter transformation method for a three-dimensional model. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0210] Those skilled in the art will understand that Figure 17 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0211] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0212] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0213] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0214] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0215] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for converting asymmetric chamfer parameters in a three-dimensional model, characterized in that, The method includes: Obtain the original parameters corresponding to the chamfered model, and identify the adjacent faces associated with the chamfering process from the chamfered model; the original parameters are the asymmetric chamfering parameters read from the chamfered model in any type of 3D model design software, the original parameters include a first distance value and a second distance value, the adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face, the adjacent faces associated with the chamfering process are the adjacent faces where the input edge is located and intersect with the chamfered face, the first adjacent face and the second adjacent face 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 is the common edge of the chamfered face and the adjacent faces associated with the chamfering process; Determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face to obtain the correspondence between the distance value and the neighboring face; Based on the relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face, a reference adjacent face is determined from the adjacent faces associated with the chamfering process; The first distance value, the second distance value, and the identifier of the reference adjacent face are used as the transformed parameters corresponding to the original parameters. The transformed parameters are used by any type of 3D model design software. Determining the correspondence between any one of the first distance value and the second distance value, and any one of the first neighboring face and the second neighboring face, to obtain the correspondence between the distance value and the neighboring face, includes: Identify the type of adjacent faces that exist in the model associated with the chamfering process after chamfering; Based on the type of neighboring faces, determine the correspondence between the distance value and the neighboring faces; The adjacent face existence type is used to characterize whether each adjacent face exists in the adjacent face associated with the chamfering process after the chamfering is performed on the model.
2. The method according to claim 1, characterized in that, Determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes: If the adjacent face has a type of the first type, determine the common edge between the chamfered face in the chamfered model and the adjacent face associated with the chamfering process; Determine the distance between the input edge and the common edge in the model after beveling; 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, the correspondence between the distance value and the adjacent face is determined; In the chamfered model of the first type, both adjacent faces of the adjacent faces associated with the chamfering process exist.
3. The method according to claim 1, characterized in that, Determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes: If the adjacent face has a type of the second type, determine the common edge between the chamfered face in the chamfered model and the adjacent face associated with the chamfering process; Determine the distance between the input edge and the common edge in the model after beveling; 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, the correspondence between the distance value and the adjacent face is determined; In the second type of chamfered model, one of the adjacent faces associated with the chamfering process exists while the other adjacent face does not.
4. The method according to claim 1, characterized in that, Determining the correspondence between the distance value and the adjacent face based on the adjacent face existence type includes: If the adjacent face has a type of the third type, a preset correspondence between the distance value and the adjacent face is determined; the preset correspondence is the 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. Based on the law of cosines, the theoretical value of the angle to be measured is determined according to the angle between adjacent faces associated with each chamfering process in the chamfered model, the first distance value, and the second distance value. The included angle to be measured is measured to obtain the measured value of the included angle; Based on the matching between the theoretical value and the measured value of the included angle to be measured, the correspondence between the distance value and the adjacent surface is determined according to the preset correspondence. In the third type of chamfered model, neither of the two adjacent faces associated with the chamfering process exists.
5. The method according to claim 1, characterized in that, The step of determining a reference neighboring face from the neighboring faces associated with the chamfering process based on the magnitude relationship between the first distance value and the second distance value, and the correspondence between the distance value and the neighboring face, includes: The adjacent face associated with the chamfering process corresponding to the larger distance value between the first distance value and the second distance value is determined as the reference adjacent face; Alternatively, the adjacent face associated with the chamfering process corresponding to the smaller of the first distance value and the second distance value can be determined as the reference adjacent face.
6. A device for converting asymmetric chamfering parameters of a three-dimensional model, characterized in that, The device includes: The data acquisition and recognition module is used to acquire the original parameters corresponding to the chamfered model and identify the adjacent faces associated with the chamfering process from the chamfered model. The original parameters are the asymmetric chamfering parameters read from the chamfered model in any type of 3D model design software. The original parameters include a first distance value and a second distance value. The adjacent faces associated with the chamfering process include a first adjacent face and a second adjacent face. The adjacent faces associated with the chamfering process are the adjacent faces where the input edge is located and intersect with the chamfered face. The first adjacent face and the second adjacent face 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 is the shared edge of the chamfered face and the adjacent faces associated with the chamfering process. The correspondence matching module is used to determine the correspondence between any one of the first distance value and the second distance value and any one of the first neighboring face and the second neighboring face, so as to obtain the correspondence between the distance value and the neighboring face; The reference adjacent face determination module is used to determine a reference adjacent face from the adjacent faces associated with the chamfering process based on the size relationship between the first distance value and the second distance value, and the correspondence between the distance value and the adjacent face; The parameter conversion module is used to take the first distance value, the second distance value, and the identifier of the reference adjacent surface as the converted parameters corresponding to the original parameters. The converted parameters are used by any type of 3D model design software. Determining the correspondence between any one of the first distance value and the second distance value, and any one of the first neighboring face and the second neighboring face, to obtain the correspondence between the distance value and the neighboring face, includes: Identify the type of adjacent faces that exist in the model associated with the chamfering process after chamfering; Based on the type of neighboring faces, determine the correspondence between the distance value and the neighboring faces; The adjacent face existence type is used to characterize whether each adjacent face exists in the adjacent face associated with the chamfering process after the chamfering is performed on the model.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.