Method for generating geodesic track on free-form surface based on CAD engine

By generating geodesic trajectories point by point through an interface based on a CAD engine, the problem of poor compatibility between geodesic trajectory generation and CAD engines in existing technologies is solved, achieving efficient generation of geodesic trajectories on freeform surfaces, and is suitable for wire laying trajectory generation software.

CN118940344APending Publication Date: 2024-11-12BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410926389.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In existing technologies, the geodesic trajectory generation method based on CAD engine is not well compatible with the functions of CAD engine and cannot directly output the parametric equations of freeform surfaces, which leads to difficulties in software development.

Method used

By using the interface provided by the CAD engine, point-to-surface projection, surface normal vector lookup, and vector operations are used to generate geodesic trajectories point by point, including initial direction determination, point-by-point trajectory generation, and boundary point acquisition, thus avoiding the solution of differential equations.

Benefits of technology

It achieves high compatibility between geodesic trajectory generation and CAD engine, is suitable for wire laying trajectory generation software, and simplifies the software development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940344A_ABST
    Figure CN118940344A_ABST
Patent Text Reader

Abstract

The invention discloses a method for generating a geodesic track on a free-form surface based on a CAD engine, and belongs to the field of track planning. The method comprises the steps that firstly, a model file of a laying mold is imported into CAD software, and a free-form surface S needing to be laid and formed is picked up through a mouse; the method comprises the following steps: selecting a midpoint of a free-form surface S as an initial point P1, calculating a tangent vector # imgabs0 # corresponding to the initial point, then setting a step length Len, and generating a geodesic track point by point from the initial point P1; thirdly, taking the reverse direction of a tangent vector # imgabs1 # corresponding to the initial point, and repeatedly generating a geodesic track point array in the other direction point by point; and finally, starting from the last track point of the forward track point array, sequentially and reversely splicing until the last track point of the reverse track point array is reached, namely, the whole geodesic track is obtained. The evaded differential equation solution is more adaptive to an interface provided by a CAD engine, and is suitable for realization of fiber placement track generation software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of trajectory planning, and in particular relates to a method for generating a geodesic trajectory on a free-form surface based on a CAD engine. Background Art

[0002] Placement trajectory planning refers to pre-planning the placement path to control the movement of the placement head on the placement surface. Geodesic trajectory is one of the commonly used trajectory types. To generate a geodesic trajectory on a free-form surface, a parametric equation based on the free-form surface is generally used to obtain the trajectory point by point using a differential equation solution method.

[0003] The CAD engine has interfaces such as model display, Boolean operation and projection, which are suitable for trajectory generation; the source codes of commonly used CAD engines such as Opencascade and ACIS are all C++ versions, and C++ has complex algorithms when dealing with differential equation solving problems; at the same time, the CAD engine cannot directly output the parametric equations of free-form surfaces.

[0004] In summary, the existing geodesic trajectory generation method is not highly compatible with the functions that can be provided by the CAD engine, which is not conducive to software development. Summary of the invention

[0005] In view of the above problems, the present invention designs a method for generating geodesic trajectories on free-form surfaces based on a CAD engine. The geodesic trajectories can be generated through an interface provided by the CAD engine, thereby achieving ultra-high functional matching between the two.

[0006] The method for generating geodesic trajectories on a free-form surface based on a CAD engine comprises the following specific steps:

[0007] Step 1: Import the model file of the placement mold into the CAD software, and use the mouse to pick up the free-form surface S to be placed and formed;

[0008] Step 2: Take the midpoint of the free surface S as the initial point P1 and calculate the tangent vector corresponding to the initial point

[0009] The tangent vector The calculation formula is:

[0010] Among them, θ is the angle between the trajectory direction at the initial point P1 and the reference axis direction; and is an intermediate variable;

[0011] Step 3: Set the step length Len and generate the geodesic trajectory point by point starting from the initial point P1;

[0012] For the Kth point P K Get K+1 points P K+1The steps are:

[0013] The initial value of K is 1;

[0014] Step S301: Set the current point P K Translate along its tangent vector by a step length Len to obtain the tangent point P′ K+1 :

[0015]

[0016] is the current point P K The corresponding tangent vector;

[0017] Step S302: Set the tangent point P′ K+1 Project onto the laying surface to obtain K+1 point P K+1 ;

[0018] Step S303: Determine point P K+1 Is it within the boundary of the free surface S? If so, point P K+1 Count into the trajectory array and go to step S304; otherwise, go to step 307;

[0019] Step S304: Call the class function to query the K+1 point P K+1 The face normal vector

[0020] Step S305: According to the normal vector Combined tangent vector Calculate the tangent vector at point K+1

[0021]

[0022] is an intermediate variable.

[0023] Step S306: Set K+1 point P K+1 Along its tangent vector Translate a step length Len to obtain a tangent point and project it onto the laying surface to obtain the next point, and return to step S303 to continue judging;

[0024] Step S307: When P K is a point within the boundary range, the next point P K+1 For points outside the boundary range, they are continuously subdivided by dichotomy, and finally the point P on the boundary is obtained 边 , add the point to the trajectory point array and end.

[0025] Step 4: The tangent vector corresponding to the initial point Take the reverse direction and repeat point by point to generate an array of geodesic trajectory points in the other direction.

[0026] Step 5: Starting from the last track point of the forward track point array, stitch backwards in sequence until reaching the last track point of the reverse track point array, which is the entire geodesic track.

[0027] The advantages of the present invention are:

[0028] The differential equation solution avoided in the present invention is more adapted to the interface provided by the CAD engine and is suitable for the implementation of the wire laying trajectory generation software. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 The present invention is a flow chart of a method for generating geodesic trajectories on a free-form surface based on a CAD engine.

[0030] Figure 2 It is a schematic diagram of the initial direction calculation method of the present invention.

[0031] Figure 3 It is a schematic diagram of the point-by-point generation method of the geodesic trajectory of the present invention.

[0032] Figure 4 It is a flow chart of the trajectory boundary point acquisition method of the present invention.

[0033] Figure 5 It is a schematic diagram of the geodesic trajectory calculated by the present invention using a 90° bending plate mold. DETAILED DESCRIPTION

[0034] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0035] The present invention provides a method for generating geodesic trajectories on a free-form surface based on a CAD engine, which only relies on interfaces and vector operations of "projection of a point onto a surface", "search for surface normal vectors of points on the surface", and "position relationship between a point and a surface" that can be provided by the CAD engine; the method includes an initial direction determination method, a point-by-point generation method for geodesic trajectories, and a trajectory boundary point acquisition method.

[0036] like Figure 1 As shown, the specific steps are as follows:

[0037] Step 1: Import the model file of the laying mold (igs, stp and other formats) into the CAD software, and use the mouse to pick up the free-form surface S to be laid out;

[0038] Step 2: Take the midpoint of the free surface S as the initial point P1 and calculate the tangent vector corresponding to the initial point

[0039] The user enters the initial point P1, the reference axis vector The trajectory direction at the initial point P1 and the direction vector of the reference axis The angle θ and the step length Len. The initial point P1 is generally the midpoint of the free surface S, and the step length Len is generally four times the width of the fiber;

[0040] The tangent vector The calculation formula is:

[0041] in, and is an intermediate variable, and the specific calculation is as follows:

[0042]

[0043] in, is the surface normal vector of the reference point;

[0044] Step 3: Set the step length Len and generate the geodesic trajectory point by point starting from the initial point P1;

[0045] For the Kth point P K Get K+1 points P K+1 The steps are:

[0046] The initial value of K is 1;

[0047] Step S301: Set the current point P K Along its tangent vector Translate a step length Len to get the tangent point P′ K+1 :

[0048]

[0049] is the current point P K The corresponding tangent vector;

[0050] Step S302: Set the tangent point P′ K+1 Project onto the laying surface to obtain K+1 point P K+1 ;

[0051] The projection can be implemented by calling the "GeomAPI_ProjectPointOnSurf" class of the Opencascade engine;

[0052] Step S303: Determine point P K+1 Is it within the boundary of the free surface S? If so, move point P K+1 Count into the trajectory array and go to step S304; otherwise, go to step 307;

[0053] Step S304: Call the class function to query the K+1 point P K+1 The face normal vector

[0054] The D1() function of the BRepAdaptor_Surface class of the Opencascade engine can be called;

[0055] Step S305: According to the normal vector Combined tangent vector Calculate the tangent vector at point K+1

[0056]

[0057] is an intermediate variable, and its calculation formula is

[0058] Step S306: Set K+1 point P K+1 Along its tangent vector Translate a step length Len to obtain a tangent point and project it onto the laying surface to obtain the next point, and return to step S303 to continue judging;

[0059] Step S307: When P K is a point within the boundary range, the next point P K+1 For points outside the boundary range, they are continuously subdivided by dichotomy, and finally the point P on the boundary is obtained 边 , add the point to the trajectory point array, P K+1 Do not add the trajectory point array and end.

[0060] Step 4: The tangent vector corresponding to the initial point Take the reverse direction and repeat point by point to generate an array of geodesic trajectory points in the other direction.

[0061] Step 5: Starting from the last track point of the forward track point array, stitch backwards in sequence until reaching the last track point of the reverse track point array, which is the entire geodesic track.

[0062] If the user thinks there are too many trajectory points, the trajectory points can be fitted into curves (which can be implemented by calling the GeomAPI_Interpolate class of the Opencascade engine), and then discretized into trajectory points (which can be implemented by calling the GCPnts_QuasiUniformDeflection class of the Opencascade engine), so as to reduce the number of trajectory points while ensuring accuracy.

[0063] Example:

[0064] S100: The user selects the laying surface S and enters the reference axis vector Reference point P1 and the initial angle θ parameter at that point;

[0065] S110: Calculate the tangent vector of the initial direction through the "initial direction calculation method"

[0066] S120: Calculate the trajectory points point by point by using the “geodesic trajectory point by point generation method” until the boundary of the laying surface S is reached;

[0067] S130: Obtaining a trajectory point on the boundary, i.e., the end point of the trajectory in this direction, through a “trajectory boundary point acquisition method”;

[0068] S140: The tangent vector of the initial direction Reverse direction, repeatedly calculate the trajectory point array in the reverse direction;

[0069] S150: Merge the two side tracks to obtain the geodesic track.

[0070] like Figure 2 FIG. 1 is a schematic diagram of the “initial direction calculation method” described in S110, and the calculation formula is:

[0071]

[0072] in, is the direction vector of the reference axis, is the surface normal vector of the reference point, and θ is the initial angle of the trajectory.

[0073] like Figure 3 As shown, it is a schematic diagram of the “geodesic trajectory point-by-point generation method” described in S120, and the steps of obtaining point P2 according to point P1 are:

[0074] S200: Move point P1 along its tangent vector Translate a step length Len and get the point The step length Len is an empirical parameter, determined according to the size of the surface S;

[0075] S210: Projecting point P2′ onto the laying surface to obtain point P2;

[0076] S220: Query the surface normal vector of point P2

[0077] S230:

[0078] Coordinates of point 2 P2, normal vector and the tangent vector Get them all.

[0079] have therefore and Coplanar, satisfying the geodesic condition.

[0080] like Figure 4 The flowchart of the “track boundary point acquisition method” described in S130 is shown, and the specific steps are:

[0081] S300: after step S120, two consecutive points P1 and P2 are obtained, wherein point P1 is within the boundary of the laying surface S, and point P2 is outside the boundary of the laying surface S;

[0082] S310: Calculate the midpoint P3 between point P1 and point P2: P3 = (P1 + P2) / 2;

[0083] S320: Projecting point P3 onto the laying surface S to obtain point P4;

[0084] S330: Determine the positional relationship between point P4 and the laying surface S: when point P4 is on the boundary of the laying surface S, output point P4; when point P4 is within the boundary of the laying surface S, P1=P4, go to S310; when point P4 is outside the boundary of the laying surface S, P2=P4, go to S310.

[0085] like Figure 5 As shown, the red line is the boundary line of the free-form surface, the gray surface is the free-form surface (two planes + one curved surface) to be laid on the mold, and the black line is the geodesic trajectory finally generated in this embodiment.

Claims

1. A method for generating geodesic trajectories on a free-form surface based on a CAD engine, characterized in that: The specific steps are as follows: Step 1: Import the model file of the fiber placement mold into the CAD software, and use the mouse to pick up the free-form surface S to be placed and formed; Step 2: Take the midpoint of the free surface S as the initial point P1 and calculate the tangent vector corresponding to the initial point The tangent vector The calculation formula is: Among them, θ is the angle between the trajectory direction at the initial point P1 and the reference axis direction; and is an intermediate variable; Step 3: Set the step length Len and generate the geodesic trajectory point by point starting from the initial point P1; For the Kth point P K Get K+1 points P K+1 The steps are: The initial value of K is 1; Step S301: translate the current point PK along its tangent vector by a step length Len to obtain the tangent point P′ K+1 : is the current point P K The corresponding tangent vector; Step S302: Set the tangent point P′ K+1 Project onto the laying surface to obtain K+1 point P K+1 ; Step S303: Determine point P K+1 Is it within the boundary of the free surface S? If so, move point P K+1 Count into the trajectory array and go to step S304; otherwise, go to step 307; Step S304: Call the class function to query the K+1 point P K+1 The face normal vector Step S305: According to the normal vector Combined tangent vector Calculate the tangent vector at point K+1 is an intermediate variable, and its calculation formula is Step S306: Set K+1 point P K+1 Along its tangent vector Translate a step length Len to obtain a tangent point and project it onto the laying surface to obtain the next point, and return to step S303 to continue judging; Step S307: When P K is a point within the boundary range, the next point P K+1 For points outside the boundary range, they are continuously subdivided by dichotomy, and finally the point P on the boundary is obtained 边 , add the point to the trajectory point array and end; Step 4: The tangent vector corresponding to the initial point Take the reverse direction and repeatedly generate the geodesic trajectory point array in the other direction point by point; Step 5: Starting from the last track point of the forward track point array, stitch backwards in sequence until reaching the last track point of the reverse track point array, which is the entire geodesic track.

2. A method for generating geodesic trajectories on a free-form surface based on a CAD engine as claimed in claim 1, characterized in that: In the step 2, the intermediate variable and The specific calculation is as follows: in, is the direction vector of the reference axis, is the surface normal vector of the reference point.

3. A method for generating geodesic trajectories on a free-form surface based on a CAD engine as claimed in claim 1, characterized in that: In step S302, the projection is implemented by calling the "GeomAPI_ProjectPointOnSurf" class of the Opencascade engine.

4. A method for generating geodesic trajectories on a free-form surface based on a CAD engine as claimed in claim 1, characterized in that: In step S304, query point P K+1 The face normal vector Call the D1 function of the BRepAdaptor_Surface class of the Opencascade engine.

5. The method for generating geodesic trajectories on a free-form surface based on a CAD engine as claimed in claim 1, characterized in that: In the entire geodesic trajectory, when the user believes that the trajectory points are greater than a set threshold, the trajectory points are first fitted into a curve and then discretized into trajectory points, so that the number of trajectory points can be reduced while ensuring accuracy.