A three-dimensional curve offset method, system, device and storage medium

CN118505948BActive Publication Date: 2024-11-05DAJIE INTELLIGENT TECH (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410679809.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-11-05
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

但由于三维线段复杂多变性,导致三维线段的偏置十分困难,即使在商业软件中,对于稍微复杂的三维线段的偏置也可能失败,且其偏置方向也很单一,只能沿着某一个单一方向进行偏置

Benefits of technology

[0038] Embodiments of the present invention include the following beneficial effects: In this embodiment, after generating an ordered discrete point set for the trimming line segment to be offset, the offset direction is determined based on the projection direction of the trimming line segment, and the offset reference point and offset distance are combined. The initial offset point corresponding to each discrete point in the ordered discrete point set can be obtained; the final offset point is selected from the initial offset point based on the offset distance, and the offset is generated based on the screened final offset point The trimmed line segment after. The invention improves the efficiency of bias implementation and can obtain better bias effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118505948B_ABST
    Figure CN118505948B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of mold design, and specifically to a three-dimensional curve offset method, system, device and storage medium. The method comprises: obtaining a three-dimensional model of a mold and a three-dimensional curve in the three-dimensional model, selecting a trimming line segment for a trimming insert from the three-dimensional curve in the three-dimensional model, and generating an ordered discrete point set corresponding to the trimming line segment; obtaining a projection direction of the trimming line segment, and an offset reference point and an offset distance for offsetting the trimming line segment, and determining an initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance; selecting a final offset point from the initial offset point based on the offset distance, and generating an offset trimming line segment based on the selected final offset point; the present invention improves the efficiency of offset implementation and can obtain a better offset effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mold design, and in particular to a three-dimensional curve offset method, system, device and storage medium. Background Art

[0002] The offset of three-dimensional line segments is very common in the design of trimming inserts. For example, in the field of stamping die design, the design of trimming inserts involves a large number of trimming line segments (three-dimensional line segments) offset to form various auxiliary surfaces. However, due to the complexity and variability of three-dimensional line segments, the offset of three-dimensional line segments is very difficult. Even in commercial software, the offset of slightly complex three-dimensional line segments may fail, and the offset direction is also very single, and can only be offset along a single direction. Some scholars have also extended the two-dimensional rolling algorithm to the three-dimensional case, but the offset direction of the algorithm is still very single, and can only be offset along the projection direction of the three-dimensional line segment, which cannot support the entire insert design. Some scholars have also proposed a three-dimensional line segment offset algorithm based on the theory of progressive iterative approximation. When dealing with offset anomalies, the algorithm is too complicated. It can be seen that the solutions in the relevant technology are difficult to achieve good offset effects, and the offset efficiency of trimming line segments is not high. Summary of the invention

[0003] In view of this, the purpose of the embodiments of the present invention is to provide a three-dimensional curve biasing method, system, device and storage medium to solve one or more technical problems existing in the prior art and at least provide a beneficial choice or create conditions.

[0004] On the one hand, an embodiment of the present invention provides a three-dimensional curve offset method for offsetting a trimming line segment in a trimming insert design of a mold, the method comprising the following steps:

[0005] Acquire a three-dimensional model of the mold and a three-dimensional curve in the three-dimensional model, select a trimming line segment for trimming the insert from the three-dimensional curve in the three-dimensional model, and generate an ordered discrete point set corresponding to the trimming line segment; wherein the ordered discrete point set includes a plurality of discrete points selected in sequence from the trimming line segment;

[0006] Acquire the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determine the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance;

[0007] A final offset point is selected from the initial offset points based on the offset distance, and an offset trimming line segment is generated based on the selected final offset point.

[0008] Optionally, the acquiring the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determining the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance, comprises:

[0009] Acquire a projection surface of the trimming line segment, and determine a projection direction of the trimming line segment based on the projection surface;

[0010] Obtaining an offset reference point for offsetting the trimming line segment, and determining a projection vector of the discrete point based on the offset reference point and the projection direction of the trimming line segment, recorded as a first projection vector;

[0011] Determine a bias unit vector of a discrete point based on the projection direction and the first projection vector;

[0012] Obtaining an offset distance for offsetting the trimming line segment, and determining an offset vector of a discrete point according to the offset unit vector and the offset distance;

[0013] Each discrete point is traversed, and the corresponding discrete point is offset according to the offset vector of the discrete point to obtain the initial offset point corresponding to each discrete point.

[0014] Optionally, determining a biased unit vector of a discrete point based on the projection direction and the first projection vector includes:

[0015] If it is determined that the offset direction of the discrete point is the same as the projection direction of the trimming line segment, the tangent vector of the discrete point is obtained, and the offset unit vector of the discrete point is determined based on the first projection vector and the tangent vector.

[0016] Optionally, the bias unit vector of the discrete point is calculated by the following formula:

[0017] n1=k×τ;

[0018] Among them, n1 is the bias unit vector of the discrete point, k is the projection vector, and τ is the tangent vector of the discrete point.

[0019] Optionally, the determining the biased unit vector of the discrete point based on the projection direction and the first projection vector further includes:

[0020] If it is determined that the offset direction of the discrete point is different from the projection direction of the trimming line segment, then obtaining the tangent vector of the discrete point;

[0021] Determine the projection vector of the tangent vector on a plane perpendicular to the first projection vector, recorded as the second projection vector;

[0022] An offset unit vector of a discrete point is determined based on the first projection vector, the second projection vector and the tangent vector.

[0023] Optionally, determining the biased unit vector of the discrete point based on the first projection vector, the second projection vector and the tangent vector includes:

[0024] Cross-product the first projection vector and the second projection vector to obtain an auxiliary vector;

[0025] The bias unit vector of the discrete point is obtained by cross-producting the tangent vector and the auxiliary vector.

[0026] Optionally, the selecting a final bias point from the initial bias points based on the bias distance includes:

[0027] If the direction of the offset unit vector of the determined discrete point is the same as the projection direction of the trimming line segment, then the final offset point selected from the initial offset points satisfies: the closest distance to the trimming line segment is greater than or equal to the offset distance;

[0028] If the direction of the offset unit vector of the determined discrete point is different from the projection direction of the trimming line segment, the final offset point selected from the initial offset points satisfies: the closest distance to the trimming line segment is greater than or equal to the offset distance, and the closest distance from the projection point on the projection plane to the projection curve of the trimming line segment on the projection plane is greater than or equal to the offset distance.

[0029] On the other hand, an embodiment of the present invention provides a trimming line segment offset system for offsetting trimming line segments in the trimming insert design of a mold, the system comprising:

[0030] The first module is used to obtain a three-dimensional model of the mold and a three-dimensional curve in the three-dimensional model, select a trimming line segment for trimming the insert from the three-dimensional curve in the three-dimensional model, and generate an ordered discrete point set corresponding to the trimming line segment; wherein the ordered discrete point set includes a plurality of discrete points selected in sequence from the trimming line segment;

[0031] The second module is used to obtain the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determine the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance;

[0032] The third module is used to select a final offset point from the initial offset points based on the offset distance, and generate an offset trimming line segment based on the selected final offset point.

[0033] On the other hand, an embodiment of the present invention provides a three-dimensional curve biasing device, comprising:

[0034] at least one processor;

[0035] at least one memory for storing at least one program;

[0036] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0037] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to perform the above method.

[0038] The embodiment of the present invention has the following beneficial effects: after generating an ordered discrete point set from the trimming line segment to be offset, the offset direction is determined according to the projection direction of the trimming line segment, and the initial offset point corresponding to each discrete point in the ordered discrete point set can be obtained by combining the offset reference point and the offset distance; the final offset point is screened out from the initial offset point based on the offset distance, and the offset trimming line segment is generated based on the screened final offset point. The present invention improves the efficiency of offset implementation and can obtain a better offset effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 It is a schematic diagram of the steps of a three-dimensional curve offset method provided by an embodiment of the present invention;

[0041] Figure 2 is a schematic diagram of a two-dimensional curve projection provided by an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of an embodiment of the present invention when the trimming line segments have the same projection direction;

[0043] Figure 4 is a schematic diagram of the trimming line segments in different projection directions in an embodiment of the present invention;

[0044] Figure 5 is a schematic diagram of an embodiment of the present invention in which the offset direction is the same as the projection direction of the trimming line segment;

[0045] Figure 6 is a schematic diagram of an embodiment of the present invention when the offset direction is different from the projection direction of the trimming line segment;

[0046] Figure 7 It is a structural block diagram of a trimming line segment biasing system provided by an embodiment of the present invention;

[0047] Figure 8 It is a structural block diagram of a three-dimensional curve biasing device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] 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.

[0049] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0051] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0052] The block diagrams shown in the accompanying drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware charging modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0053] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0054] like Figure 1 As shown, Figure 1A three-dimensional curve offset method provided in an embodiment of the present invention is used for offsetting trimming line segments in the trimming insert design of a mold, and the method comprises the following steps:

[0055] S100, obtaining a three-dimensional model of a mold and a three-dimensional curve in the three-dimensional model, selecting a trimming line segment for trimming an insert from the three-dimensional curve in the three-dimensional model, and generating an ordered discrete point set corresponding to the trimming line segment; wherein the ordered discrete point set includes a plurality of discrete points selected in sequence from the trimming line segment;

[0056] Specifically, an original trimming line segment to be offset is given and discretized into an ordered discrete point set; the method for generating an ordered discrete point set can refer to the Chinese patent application number CN202310069913.8.

[0057] S200, obtaining a projection direction of a trimming line segment, and an offset reference point and an offset distance for offsetting the trimming line segment, and determining an initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance;

[0058] It should be noted that the offset of the trimming line segment can be regarded as the offset of the discrete points on the trimming line segment along the normal vector of its tangent vector. For a two-dimensional curve, its offset direction can be uniquely determined according to the offset reference point. The offset reference point is used to specify the offset direction of the curve, because the normal vector of the tangent vector of its discrete point has only two directions n1 and n2, such as "up" or "down". Figure 2 Taking the two-dimensional curve offset in as an example, the offset reference point P1 specifies the offset direction of the trimming segment as "upward", and P2 specifies the offset direction as "downward".

[0059] However, for the tangent vector of the discrete point in the trimming line segment, since only the normal plane of the tangent vector can be determined, its normal vector has no fixed direction (normal vectors in the normal plane are all acceptable), so its offset direction cannot be uniquely determined. The present invention determines the offset direction by means of the projection direction of the trimming line segment, and combines the offset reference point and the offset distance to obtain the initial offset point corresponding to each discrete point in the ordered discrete point set.

[0060] S300, selecting a final offset point from the initial offset points based on the offset distance, and generating an offset trimming line segment based on the selected final offset point.

[0061] Specifically, the final bias point selected can be used to generate the biased trimming line segment by spline fitting. The present invention simplifies the bias implementation process and can also obtain a better bias effect.

[0062] In some embodiments, the obtaining of the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determining the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance, comprises:

[0063] Acquire a projection surface of the trimming line segment, and determine a projection direction of the trimming line segment based on the projection surface;

[0064] Obtaining an offset reference point for offsetting the trimming line segment, and determining a projection vector of the discrete point based on the offset reference point and the projection direction of the trimming line segment, recorded as a first projection vector;

[0065] Determine a bias unit vector of a discrete point based on the projection direction and the first projection vector;

[0066] Obtaining an offset distance for offsetting the trimming line segment, and determining an offset vector of a discrete point according to the offset unit vector and the offset distance;

[0067] Each discrete point is traversed, and the corresponding discrete point is offset according to the offset vector of the discrete point to obtain the initial offset point corresponding to each discrete point.

[0068] In some embodiments, determining the biased unit vector of the discrete point based on the projection direction and the first projection vector includes:

[0069] If it is determined that the offset direction of the discrete point is the same as the projection direction of the trimming line segment, the tangent vector of the discrete point is obtained, and the offset unit vector of the discrete point is determined based on the first projection vector and the tangent vector.

[0070] The bias unit vector of the discrete point is calculated by the following formula:

[0071] n1=k×τ;

[0072] Among them, n1 is the bias unit vector of the discrete point, k is the projection vector, and τ is the tangent vector of the discrete point.

[0073] In some embodiments, determining the biased unit vector of the discrete point based on the projection direction and the first projection vector further includes:

[0074] If it is determined that the offset direction of the discrete point is different from the projection direction of the trimming line segment, then obtaining the tangent vector of the discrete point;

[0075] Determine the projection vector of the tangent vector on a plane perpendicular to the first projection vector, recorded as the second projection vector;

[0076] An offset unit vector of a discrete point is determined based on the first projection vector, the second projection vector and the tangent vector.

[0077] In some embodiments, determining the biased unit vector of the discrete point based on the first projection vector, the second projection vector and the tangent vector comprises:

[0078] Cross-product the first projection vector and the second projection vector to obtain an auxiliary vector;

[0079] The bias unit vector of the discrete point is obtained by cross-producting the tangent vector and the auxiliary vector.

[0080] Specifically, the present invention determines the bias direction by means of the projection direction of the trimming line segment, and divides the bias directions into two categories:

[0081] One type is the same as the projection direction of the trimming line segment, such as Figure 3 As shown, taking the offset reference point P1 as an example, the offset unit vector of each discrete point is calculated by the following formula: n1=k×τ; wherein n1 is the offset unit vector of the discrete point, k is the projection vector, and τ is the tangent vector of the discrete point.

[0082] The other type is different from the projection direction of the trimming line segment, such as Figure 4 As shown, taking the offset reference point P1 as an example, the offset unit vector of each discrete point is calculated by the following formula:

[0083] τ2=k×τ1;

[0084] n1 = τ × τ2;

[0085] Among them, τ1 is the projection vector of the tangent vector τ on the plane perpendicular to the projection vector k, that is, the second projection vector, and τ2 is the auxiliary vector obtained by cross-producting the projection vector k and the projection vector τ1.

[0086] For each discrete point, the above steps are used to calculate the bias unit vector n1. Assuming the bias distance is d, the bias vector of the discrete point is: n=d*n1; where n is the bias vector.

[0087] In some embodiments, selecting a final bias point from the initial bias points based on the bias distance comprises:

[0088] If the direction of the offset unit vector of the discrete point is determined to be the same as the projection direction of the trimming line segment, the final offset point selected from the initial offset points satisfies the following conditions:

[0089] It is not located in a cylinder with the trimming line segment as the axis and the offset distance as the radius; that is, the closest distance to the trimming line segment is greater than or equal to the offset distance;

[0090] If the direction of the offset unit vector of the determined discrete point is different from the projection direction of the trimming line segment, the final offset point selected from the initial offset points satisfies the following conditions:

[0091] The closest distance to the trimming line segment is greater than or equal to the offset distance, and the closest distance from the projection point on the projection plane to the projection curve of the trimming line segment on the projection plane is greater than or equal to the offset distance.

[0092] Specifically, the initial bias points obtained in step S200 may have self-intersections and need to be screened. There are still two cases:

[0093] When the offset direction is the same as the projection direction of the trimming line segment, all offset points must meet one of the following conditions:

[0094] It is not located in a cylinder with the trimming line segment as the axis and the radius as the offset distance d. That is, the closest distance between the offset point and the trimming line segment is greater than or equal to the offset distance d.

[0095] When the offset direction is different from the projection direction of the trimming line segment, all offset points must meet the following two conditions:

[0096] It is not located in a cylinder with the trimming line segment as the axis and the radius as the offset distance d. That is, the closest distance between the offset point and the trimming line segment is greater than or equal to the offset distance d;

[0097] Moreover, the shortest distance between the projection point of the offset point on the projection plane and the projection curve of the trimming line segment on the projection plane is greater than or equal to the offset distance d.

[0098] The above process can obtain the final offset point, generate the spline trimming line segment based on the final offset point, and obtain the offset trimming line segment. Figure 5 and Figure 6 As shown, Figure 5 and Figure 6 The red line in the middle is the original trimming line segment, and the blue line is the trimming line segment after offset.

[0099] See also Figure 7 , an embodiment of the present invention provides a trimming line segment offset system, comprising:

[0100] The first module is used to obtain a three-dimensional model of the mold and a three-dimensional curve in the three-dimensional model, select a trimming line segment for trimming the insert from the three-dimensional curve in the three-dimensional model, and generate an ordered discrete point set corresponding to the trimming line segment; wherein the ordered discrete point set includes a plurality of discrete points selected in sequence from the trimming line segment;

[0101] The second module is used to obtain the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determine the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance;

[0102] The third module is used to select a final offset point from the initial offset points based on the offset distance, and generate an offset trimming line segment based on the selected final offset point.

[0103] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0104] See also Figure 8 , an embodiment of the present invention provides a three-dimensional curve biasing device, comprising:

[0105] at least one processor;

[0106] at least one memory for storing at least one program;

[0107] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0108] It can be seen that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0109] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.

[0110] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the charging modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0111] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional charging modules / units in the systems and devices may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0112] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0113] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0118] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A three-dimensional curve offset method, characterized in that: The method for offsetting a trimming line segment in a trimming insert design of a mold comprises the following steps: Acquire a three-dimensional model of the mold and a three-dimensional curve in the three-dimensional model, select a trimming line segment for trimming the insert from the three-dimensional curve in the three-dimensional model, and generate an ordered discrete point set corresponding to the trimming line segment; wherein the ordered discrete point set includes a plurality of discrete points selected in sequence from the trimming line segment; Acquire the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determine the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance; Filtering out a final offset point from the initial offset points based on the offset distance, and generating an offset trimming line segment based on the filtered out final offset point; The step of obtaining the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determining the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance, comprises: Acquire a projection surface of the trimming line segment, and determine a projection direction of the trimming line segment based on the projection surface; Obtaining an offset reference point for offsetting the trimming line segment, and determining a projection vector of the discrete point based on the offset reference point and the projection direction of the trimming line segment, recorded as a first projection vector; Determine a bias unit vector of a discrete point based on the projection direction and the first projection vector; Obtaining an offset distance for offsetting the trimming line segment, and determining an offset vector of a discrete point according to the offset unit vector and the offset distance; Each discrete point is traversed, and the corresponding discrete point is offset according to the offset vector of the discrete point to obtain the initial offset point corresponding to each discrete point.

2. The method according to claim 1, characterized in that The step of determining the biased unit vector of the discrete point based on the projection direction and the first projection vector comprises: If it is determined that the offset direction of the discrete point is the same as the projection direction of the trimming line segment, the tangent vector of the discrete point is obtained, and the offset unit vector of the discrete point is determined based on the first projection vector and the tangent vector.

3. The method according to claim 2, characterized in that The bias unit vector of the discrete point is calculated by the following formula: n1=k×τ; Among them, n1 is the bias unit vector of the discrete point, k is the projection vector, and τ is the tangent vector of the discrete point.

4. The method according to claim 1, characterized in that: The determining of the biased unit vector of the discrete point based on the projection direction and the first projection vector further includes: If it is determined that the offset direction of the discrete point is different from the projection direction of the trimming line segment, then obtaining the tangent vector of the discrete point; Determine the projection vector of the tangent vector on a plane perpendicular to the first projection vector, recorded as the second projection vector; An offset unit vector of a discrete point is determined based on the first projection vector, the second projection vector and the tangent vector.

5. The method according to claim 4, characterized in that The determining of the biased unit vector of the discrete point based on the first projection vector, the second projection vector and the tangent vector comprises: Cross-product the first projection vector and the second projection vector to obtain an auxiliary vector; The bias unit vector of the discrete point is obtained by cross-producting the tangent vector and the auxiliary vector.

6. The method according to claim 1, characterized in that The step of selecting a final bias point from the initial bias points based on the bias distance includes: If the direction of the offset unit vector of the determined discrete point is the same as the projection direction of the trimming line segment, then the final offset point selected from the initial offset points satisfies: the closest distance to the trimming line segment is greater than or equal to the offset distance; If the direction of the offset unit vector of the determined discrete point is different from the projection direction of the trimming line segment, the final offset point selected from the initial offset points satisfies: the closest distance to the trimming line segment is greater than or equal to the offset distance, and the closest distance from the projection point on the projection plane to the projection curve of the trimming line segment on the projection plane is greater than or equal to the offset distance.

7. A trimming line segment offset system, characterized in that: For offsetting a trimming line segment in a trimming insert design of a mold, the system comprises: The first module is used to obtain a three-dimensional model of the mold and a three-dimensional curve in the three-dimensional model, select a trimming line segment for trimming the insert from the three-dimensional curve in the three-dimensional model, and generate an ordered discrete point set corresponding to the trimming line segment; wherein the ordered discrete point set includes a plurality of discrete points selected in sequence from the trimming line segment; The second module is used to obtain the projection direction of the trimming line segment, and the offset reference point and offset distance for offsetting the trimming line segment, and determine the initial offset point corresponding to each discrete point in the ordered discrete point set according to the projection direction, the offset reference point and the offset distance; A third module is used to select a final offset point from the initial offset points based on the offset distance, and generate an offset trimming line segment based on the selected final offset point; The second module is specifically used for: Acquire a projection surface of the trimming line segment, and determine a projection direction of the trimming line segment based on the projection surface; Obtaining an offset reference point for offsetting the trimming line segment, and determining a projection vector of the discrete point based on the offset reference point and the projection direction of the trimming line segment, recorded as a first projection vector; Determine a bias unit vector of a discrete point based on the projection direction and the first projection vector; Obtaining an offset distance for offsetting the trimming line segment, and determining an offset vector of a discrete point according to the offset unit vector and the offset distance; Each discrete point is traversed, and the corresponding discrete point is offset according to the offset vector of the discrete point to obtain the initial offset point corresponding to each discrete point.

8. A three-dimensional curve biasing device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 6 when executed by the processor.