CN114769717A - Automatic adjacent slop line cutting method, device, equipment and storage medium - Google Patents

Automatic adjacent slop line cutting method, device, equipment and storage medium Download PDF

Info

Publication number
CN114769717A
CN114769717A CN202210433229.9A CN202210433229A CN114769717A CN 114769717 A CN114769717 A CN 114769717A CN 202210433229 A CN202210433229 A CN 202210433229A CN 114769717 A CN114769717 A CN 114769717A
Authority
CN
China
Prior art keywords
line
adjacent
groove
point
lines
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210433229.9A
Other languages
Chinese (zh)
Inventor
田希文
高磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seizet Technology Shenzhen Co Ltd
Original Assignee
Seizet Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seizet Technology Shenzhen Co Ltd filed Critical Seizet Technology Shenzhen Co Ltd
Priority to CN202210433229.9A priority Critical patent/CN114769717A/en
Publication of CN114769717A publication Critical patent/CN114769717A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D31/00Shearing machines or shearing devices covered by none or more than one of the groups B23D15/00 - B23D29/00; Combinations of shearing machines
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D33/00Accessories for shearing machines or shearing devices
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D33/00Accessories for shearing machines or shearing devices
    • B23D33/12Equipment for indicating where to cut

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Numerical Control (AREA)

Abstract

The invention relates to the technical field of robot intelligent cutting, and discloses an automatic cutting method, device, equipment and storage medium for adjacent slope lines, wherein the method comprises the following steps: acquiring adjacent groove reference lines of a workpiece to be cut, searching a closed loop formed by the adjacent groove reference lines, adjusting the end-to-end connection sequence of the reference line ends of the closed loop according to a first preset rule to obtain adjusted groove reference lines, and adjusting the end-to-end connection sequence of the reference lines so as to adapt to various line type groove lines; judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut, so that the cutting strategy is adjusted according to process requirements, various process requirements are met, and the conditions that joints of different types of lines are easy to intersect, non-intersect or misplace are avoided; and cutting the workpiece to be cut according to the adjacent groove lines to be cut, so that the cutting of the groove lines is completed, and the cutting precision of the groove cutting is improved.

Description

Automatic adjacent slope line cutting method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of intelligent cutting of robots, in particular to an automatic adjacent notch line cutting method, device, equipment and storage medium.
Background
The groove cutting of the steel plate is a previous welding process, and the groove precision and the consistency are key factors influencing the welding quality. For workpieces with simple outlines, such as straight-line edge steel plates, the traditional manual groove cutting or numerical control groove cutting machine can still be adequate. However, the steel plate workpieces in modern industry have many circular arcs and curves, many kinds and continuous new increase, and the traditional groove cutting method is difficult to ensure the groove precision and consistency. Along with the increasingly wide application of industrial robots, the robots carry the grooving mode of flame cutting guns or plasma cutting guns, and the robots are gradually paid attention to the industry.
At present, the track generation method for the robot groove cutting mainly comprises 3 types of pure manual teaching, manual teaching + visual positioning and laser tracking cutting: (1) the first method is that a robot is manually operated to teach a series of track points along the contour of a workpiece, and then the robot executes a cutting operation; the second method is that the relative pose of a workpiece and a robot is fixed in off-line simulation software, and after an off-line track is generated, track points are manually corrected one by one according to an actual workpiece; (2) combining manual teaching and visual positioning, namely identifying and positioning the workpiece by using a 2D/3D visual technology on the basis of manually teaching a cutting track, and then operating the robot along the repositioned cutting track; (3) the laser tracking cutting method adopts a laser tracking technology to guide a robot to move along the contour of a workpiece.
However, the cutting trajectories generated by the various methods are not high in precision, and particularly, the connection positions of different types of lines are easy to intersect, not intersect or misplace, and especially, the method is not adaptable to various situations, such as a situation that the inner circle of the bevel line is a straight line plus an arc, a situation that two straight lines are nearly parallel, and a situation that a straight line is nearly tangent to an arc, and the like.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for automatically cutting adjacent groove lines, and aims to solve the technical problems that in the prior art, the track precision of a groove is low, the track is easy to deviate, and the cutting task cannot be normally executed.
In order to achieve the above object, the present invention provides an automatic cutting method for adjacent groove lines, which comprises the following steps:
acquiring adjacent groove reference lines of a workpiece to be cut;
searching a closed loop formed by the adjacent groove reference lines, and adjusting the end-to-end connection sequence of the reference line end points of the closed loop according to a first preset rule to obtain an adjusted groove reference line;
judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut;
and cutting the workpiece to be cut according to the adjacent groove lines to be cut.
Preferably, the cutting the workpiece to be cut according to the adjacent groove lines to be cut includes:
calculating the replacement points of the two adjacent sections of the slop lines to be cut according to the line relation of the two adjacent slop lines to be cut;
performing near point replacement on two adjacent groove lines through a near point replacement function according to the replacement points to obtain a template groove line;
and cutting the workpiece to be cut according to the template bevel line.
Preferably, the calculating, according to the line relationship between the adjacent slope lines to be cut, the replacement points of the adjacent two sections of slope lines to be cut includes:
if the line relation of the adjacent groove lines to be cut is from a straight line to a straight line, fitting a plane according to the starting point and the end point which correspond to the first section of straight groove line and the second section of straight groove line which are adjacent in the adjacent groove lines to be cut respectively;
projecting the starting points and the end points of the first section of straight line slope line and the second section of straight line slope line to the plane to obtain the starting points and the end points of the two projected straight line sections;
calculating the directions of the two segments of straight line after projection;
judging whether the product of the directions of the two projected straight line segments is smaller than a first preset value or not;
if the product of the directions of the two projected straight line segments is smaller than the first preset value, calculating a first end point which is respectively closest to the starting point and the end point of the second straight line segment and a corresponding first distance according to a near point calculation function of the first straight line segment, and calculating a corresponding replacement point of the first straight line segment and the second straight line segment according to the closest first end point and the corresponding first distance;
if the product of the directions of the two projected straight line segments is equal to zero, the calculation of a replacement point is not needed;
and if the product of the directions of the two projected straight line segments is greater than the first preset value, calculating the corresponding replacement points of the first straight line notch line and the second straight line notch line through a straight line parameter equation.
Preferably, the calculating, according to the line relationship between the adjacent slope lines to be cut, the replacement points of the adjacent two sections of slope lines to be cut includes:
if the line relationship of the adjacent slope line to be cut is from straight line to circular arc or from circular arc to straight line, calculating the direction of the straight slope line in the two adjacent slope lines to be cut;
calculating the circle center, the radius and the starting point of the circular arc groove line in the two adjacent groove lines to be cut;
calculating the closest point from the circle center of the circular arc groove line to the straight groove line;
comparing the size relation between the distance between the closest point and the circle center and the radius;
if the absolute value of the difference between the distance between the nearest point and the circle center and the radius is not larger than a second preset value, calculating a second end point closest to the nearest point according to a near point calculation function of the circular arc slotline, calculating a third end point closest to the second end point according to a near point calculation function of the linear slotline, and calculating a replacement point corresponding to the circular arc slotline and the linear slotline according to the second end point and the third end point;
if the difference between the distance between the nearest point and the circle center and the radius is larger than the second preset value, calculating a replacement point is not needed;
if the difference between the distance between the nearest point and the circle center and the radius is smaller than the inverse number of the second preset value, calculating the intersection point of the circular arc groove line and the linear groove line, and determining a replacement point corresponding to the circular arc groove line and the linear groove line according to the intersection point and the far point of the linear groove line relative to the circle center.
Preferably, the calculating, according to the line relationship between the adjacent slope lines to be cut, the replacement points of the adjacent two sections of slope lines to be cut includes:
if the line relation of the adjacent slope line to be cut is from a circular arc to a circular arc, calculating a first circle center of a first section of circular arc slope line and a second circle center of a second section of circular arc slope line in the adjacent slope line to be cut;
calculating a direction vector between the first circle center and the second circle center;
if the direction vector is smaller than a third preset value, calculating a corresponding replacement point of the first section of circular arc groove line and the second section of circular arc groove line according to the end point of the first section of circular arc and the starting point of the second section of circular arc;
if the direction vector is greater than or equal to the third preset value, calculating a module value of the vector from the first circle center to the second circle center, and a sum of a first radius of the first section of circular arc groove line and a second radius of the second section of circular arc groove line, when a difference value between the module value and the sum of the radii of the calculated vector is greater than a fourth preset value, calculating a replacement point without calculating, when the difference value between the module value and the sum of the radii of the calculated vector is not greater than the fourth preset value, calculating a replacement point corresponding to the first section of circular arc groove line and the second section of circular arc groove line according to the calculated module value of the vector, the first radius and the second radius.
Preferably, the adjusting the end-to-end connection sequence of the closed loop according to a first preset rule to obtain an adjusted groove reference line includes:
identifying an outermost closed loop and an inner closed loop of the closed loops;
adjusting the end-to-end connection sequence of the reference line end points of the outermost ring closed loop to be clockwise, and adjusting the end-to-end connection sequence of the reference line end points of the inner ring closed loop to be anticlockwise; or,
and adjusting the end-to-end connection sequence of the reference line end points of the outermost ring closed loop to be anticlockwise, and adjusting the end-to-end connection sequence of the reference line end points of the inner ring closed loop to be clockwise.
Preferably, the determining whether the adjusted groove reference line needs to be cut according to a second preset rule includes:
if the positive sign and the negative sign of the inclination angle of the adjacent notch line in the adjusted notch reference line are the same, the cutting is considered to be needed; or the like, or a combination thereof,
if the end point of the last reference line corresponding to the adjacent notch line in the adjusted notch reference lines is coincident with the starting point of the next reference line, the trimming is considered to be needed; or the like, or a combination thereof,
and if the included angle between the direction of the last groove line and the direction of the next groove line of the adjacent groove lines in the adjusted groove reference line is smaller than the preset angle, the cutting is required.
In addition, in order to achieve the above object, the present invention further provides an automatic adjacent-groove-line cutting device, including:
the acquisition module is used for acquiring adjacent groove reference lines of the workpiece to be cut;
the adjusting module is used for searching for a closed loop formed by the adjacent groove reference lines, adjusting the end-to-end connection sequence of the reference line end points of the closed loop according to a first preset rule, and obtaining an adjusted groove reference line;
the judging module is used for judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut;
and the cutting module is used for cutting the workpiece to be cut according to the adjacent groove lines to be cut.
In addition, in order to achieve the above object, the present invention further provides an automatic adjacent-groove-line cutting device, including: the automatic adjacent groove line cutting method comprises a memory, a processor and an automatic adjacent groove line cutting program which is stored on the memory and can run on the processor, wherein when the automatic adjacent groove line cutting program is executed by the processor, the automatic adjacent groove line cutting program realizes the steps of the automatic adjacent groove line cutting method.
In addition, in order to achieve the above object, the present invention further provides a storage medium, where an adjacent slotline automatic cutting program is stored, and the adjacent slotline automatic cutting program implements the steps of the adjacent slotline automatic cutting method as described above when executed by a processor.
In addition, in order to achieve the above object, the present invention further provides an automatic adjacent bevel line cutting system, including: a spectral confocal sensor, a laser interferometer, a calibration plate, and an adjacent slotline automatic clipping device as described above.
According to the method, adjacent groove reference lines of a workpiece to be cut are obtained, a closed loop formed by the adjacent groove reference lines is searched, the end-to-end connection sequence of the reference line ends of the closed loop is adjusted according to a first preset rule, the adjusted groove reference lines are obtained, and the end-to-end connection sequence of the reference lines is adjusted, so that the method is suitable for various line type groove lines; judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut, so that the cutting strategy is adjusted according to process requirements, various process requirements are met, and the conditions that joints of different types of lines are easy to intersect, non-intersect or misplace are avoided; and cutting the workpiece to be cut according to the adjacent groove lines to be cut, so that the cutting of the groove lines is completed, and the cutting precision of the groove cutting is improved.
Drawings
Fig. 1 is a schematic structural diagram of an adjacent groove line automatic cutting device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating an embodiment of a method for automatically cutting adjacent groove lines according to the present invention;
FIG. 3 is a schematic diagram illustrating a structure of calculating a line offset line in a line of a data structure in an embodiment of an automatic adjacent slotline clipping method according to the present invention;
FIG. 4 is a schematic diagram illustrating an arc offset calculation structure in a data structure arc according to an embodiment of the method for automatically cutting adjacent groove lines;
FIG. 5 is a schematic diagram illustrating a structure of calculating a circular offset in a circle in a data structure circle according to an embodiment of the method for automatically cutting an adjacent slotline;
FIG. 6 is a schematic diagram of a structure before the groove line is cut in the automatic cutting method for adjacent groove lines according to the present invention;
FIG. 7 is a schematic view of the overall process of automatic cutting of groove lines in the embodiment of the method for automatic cutting of adjacent groove lines according to the present invention;
FIG. 8 is a schematic structural diagram of the cut groove lines in the embodiment of the automatic cutting method for adjacent groove lines according to the present invention;
fig. 9 is a block diagram showing the structure of the first embodiment of the automatic adjacent slop line cutting device of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an automatic adjacent-groove-line cutting device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the adjacent-groove-line automatic cutting apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display screen (Display), and the optional user interface 1003 may further include a standard wired interface and a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or a Non-volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a definition of an adjacent slotline automatic trimming apparatus and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an adjacent slotline auto-cropping program.
In the adjacent slope line automatic cutting device shown in fig. 1, the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the adjacent bevel line automatic cutting device calls an adjacent bevel line automatic cutting program stored in the memory 1005 through the processor 1001, and executes the adjacent bevel line automatic cutting method provided by the embodiment of the invention.
Based on the hardware structure, the embodiment of the automatic cutting method for the adjacent notch line is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the automatic adjacent groove line cutting method of the present invention, and the first embodiment of the automatic adjacent groove line cutting method of the present invention is provided.
In a first embodiment, the method for automatically cutting adjacent groove lines comprises the following steps:
step S10: and acquiring adjacent groove reference lines of the workpiece to be cut.
It should be understood that the execution subject of the present embodiment is the adjacent notch line automatic cutting device, and the adjacent notch line automatic cutting device may be an electronic device such as a robot, a personal computer, or a server, which is not limited in this embodiment, and the robot is taken as an example in the present embodiment for illustration. The adjacent relation of the groove lines is the same as the lines, arcs and circles contained in the template of the workpiece to be cut, can be directly determined in the definition process of the groove lines of the template, and can store the adjacent relation of all the groove lines in the definition process of the groove lines of the template, so that when the groove lines are cut, the adjacent relation can be directly read without searching again, and the method comprises the following steps:
s11, analyzing the 2D drawing of the template of the workpiece to be cut, and converting the linear entity, the circular arc entity and the circular entity of the 2D drawing into a line data structure, an arc data structure and a circle data structure according to a preset data conversion rule respectively to obtain a plurality of template reference lines Si(i=1,2,..,Ns),NsThe total number of the reference lines is represented;
further, in step S11, after obtaining the 2D drawing of the template of the workpiece to be cut, according to the line attribute of the 2D drawing file, analyzing the preset rules of the straight line, the circular arc and the circular solid in the template of the workpiece to be cut into data structures of line, arc and circle, respectively, where the line, the arc and the circle after analysis are groove reference lines, and collecting the groove reference lines to generate the template reference line Si(i=1,2,..,Ns),NsThe total number of reference lines is indicated.
For a particular workpiece template to be cut, the 2D drawing file may be in DXF or DWG format, and the line attributes of the 2D drawing file may be identified using an open source library dxfrw. After the attributes of each line are obtained, respectively analyzing the identified straight line, circular arc and circular solid into data structures of line, arc and circle according to a preset data conversion rule, and forming each groove reference line.
The line member variables comprise the 3D coordinates of the straight line starting point and the 3D coordinates containing the straight line end point, and the line member functions comprise one or more of a line deviation calculation function, a straight line middle point calculation function, a straight line near point calculation function, a straight line far point calculation function, a straight line near point replacement function, a straight line far point replacement function and a straight line starting point end point interchange function.
The membership variable of the arc comprises a 3D coordinate of an arc starting point, a 3D coordinate of an arc middle point and a 3D coordinate of an arc center, and the membership function of the arc comprises one or more combinations of a function of arc offset calculation, a function of arc center calculation, a function of arc near point calculation, a function of arc far point calculation, a function of arc near point substitution, a function of arc far point substitution, a function of arc starting point end point interchange and the like; the arc command of the robot needs 3 point positions of a starting point, a middle point and an end point, so that the arc command of the robot corresponds to the arc command of the robot one by one.
The member variables of the circle comprise 3D coordinates of the circle center of the circle entity and the radius of the circle entity, and the member functions of the circle entity comprise a circle offset calculation function.
Data Structure line
The member variables of the line of the data structure comprise 3D coordinates of a starting point and an end point, and the member functions of the line comprise an offset line calculation function, a middle point calculation function, a near point calculation function, a far point calculation function, a near point replacement function, a far point replacement function and a starting point and end point interchange function.
(a) For a straight line entity in a 2D drawing, the starting point coordinate P of a lines=(xs,ys,zs)TReference point coordinate (x) corresponding to straight line entityb,yb) Wherein x iss=xb,ys=yb,zsLine end point coordinate P of 0e=(xe,ye,ze)TEnd point coordinate (x) of corresponding straight line entity2,y2) Wherein x ise=x2,ys=y2,zs=0。
(b) The line offset calculation function of the line comprises 2 inputs and 1 output, wherein the input 1 is a designated offset, the input 2 is an offset direction, and the output is the offset line. As shown in fig. 3, the starting point and the end point of the line have the same coordinate system, the x-axis direction of the line points to the end point along the starting point, the z-axis direction is perpendicular to the surface of the workpiece and downward, and the x-y-z axes form a right-hand coordinate system. After the offset dy is given, if the offset direction is a regular starting point and an end point, the offset dy is shifted towards the positive direction of the y axis; if the offset direction is negative, the start point and the end point are offset by dy in the negative y-axis direction.
(c) The line midpoint calculation function is used for confirming the line midpoint, the line midpoint refers to the straight line midpoint, and the 3D coordinate (x) of the midpointm,ym,zm) 3D coordinates with start and end points
xm=(xs+xe)/2,ym=(ys+ye)/2,zm=(zs+ze)/2
(d) The near point calculation function and the far point calculation function of the line are used for determining a near point and a far point of any specified point P, wherein if the distance from the starting point of the line to the specified point P is greater than or equal to the distance from the end point to the specified point P, the starting point is the far point and the end point is the near point for the specified point P; conversely, if the distance from the starting point to the point P is less than the distance from the end point to the point P, the starting point is a near point and the end point is a far point. The distances from the designated point P to the starting point and the ending point can be calculated according to the Euclidean distance.
(e) A near point replacement function of the line, which is for a specified point P, for replacing the near point with the point P; the far point replacement function is used for replacing the far point with a point P; the start point and end point interchange function is used for interchanging the start point and the end point.
(II) data Structure arc
The member variables of the data structure arc comprise 3D coordinates of a starting point, a middle point and an end point, and the member functions of the data structure arc comprise function functions of calculating offset circular arcs, circle centers, near points, far points, near point replacement, far point replacement and starting point and end point interchange.
(a) For the arc entity in the 2D drawing, the starting point coordinate P of arcs=(xs,ys,zs)TInitial angle theta corresponding to arc entitysEnd point coordinate P of arce=(xe,ye,ze)TEnd angle theta corresponding to arc entityeMid-point coordinate P of arcm=(xm,ym,zm)TClockwise and counterclockwise with respect to the arc entitycThe specific calculation steps are as follows:
(a.1) recording the center coordinate of arc as Pc=(xc,yc,zc)TAnd arc has a radius raThen, then
xc=xb,yc=yb,zc=0,ra=rb
Wherein (x)b,yb) Reference point coordinates of the corresponding arc entity, rbThe radius of the corresponding arc entity;
(a.2)xs=xc+ra cosθs,ys=yc+ra sinθs,zs=zc
(a.3)xe=xc+ra cosθe,ye=yc+ra sinθe,ze=zc
(a.3)CPs=(xs-xc,ys-yc,zs-zc)T,CPe=(xe-xc,ye-yc,ze-zc)T
(a.4)α1=atan2(ys-yc,xs-xc),α2=atan2(ye-yc,xe-xc)
(a.5) if the clockwise and counterclockwise states N of the arc entitycIs counterclockwise and alpha12Then make an order
α2=α2+2π
(a.6) if clockwise and counterclockwise states N of the arc entitycIs clockwise, and α12Then make an order
α1=α1+2π
(a.7)Δα=α21
(a.8)
Figure BDA0003611821640000101
Wherein
Figure BDA0003611821640000102
A rotation matrix representing the rotation theta around the z-axis.
(b) The circular arc offset calculation function of arc is used for confirming the offset arc, and comprises 2 inputs and 1 output, wherein the input 1 is the designated offset, the input 2 is the offset direction, and the output is the offset arc. As shown in fig. 4, after the offset dr is given, if the offset direction is a regular starting point and an end point, the offset dr is shifted in a direction in which the radius increases; if the offset direction is negative, the start point and the end point are offset dr in a direction in which the radius decreases.
(c) The circle center calculation function of the arc is used for determining the circle center of the arc and the 3D coordinate P of the circle centerc=(xc,yc,zc)TAnd the starting point PsMiddle point PmEnd point PeThe following relation is satisfied:
Figure BDA0003611821640000103
Figure BDA0003611821640000104
A=[d3-d4],
Figure BDA0003611821640000105
Figure BDA0003611821640000106
(d) the arc near point calculation function and the far point calculation function are used for determining a near point and a far point of the designated point P, wherein if the distance from the starting point to the point P is greater than or equal to the distance from the end point to the point P, the starting point is the far point of the designated point P, and the end point is the near point of the designated point P; conversely, if the distance from the starting point to the point P is less than the distance from the end point to the point P, the starting point is the far point of the point P, and the end point is the near point of the point P, wherein the distance from the starting point to the point P can be calculated by the euclidean distance.
(e) The near point replacement function of arc is used for replacing the near point with a point P; the far point replacing function is used for replacing the far point with a point P; the starting point and end point interchange function is used for interchanging the starting point and the end point according to actual requirements under the condition that the positions of the starting point and the end point are interchanged after the analysis is finished.
(III) data Structure circle
circle contains the 3D coordinates and radius of the center of the circle and calculates the function of the offset circle.
(a) For a round solid body in a 2D drawing, the circle center coordinate P of a circlec=(xc,yc,zc)TReference point coordinate (x) corresponding to circular arc entityb,yb) Radius r of circlecRadius r of corresponding round solidbThe relationship is as follows:
xc=xb,yc=yb,zc=0,rc=rb
(b) the circular offset calculation function of the circle is used for confirming the offset circle, and the offset circle comprises 2 inputs and 1 output, wherein the input 1 is a designated offset, the input 2 is an offset direction, and the output is the offset circle. As shown in fig. 5, after the offset dr is given, if the offset direction is the regular direction in which the whole circle is offset dr toward the direction in which the radius is increased; if the offset direction is negative, the entire circle is offset dr in the direction of decreasing radius.
S12, according to the 2D drawing mark, selecting the template reference line of the edge to be cut, and offsetting all the template reference lines S according to the preset direction and the preset distanceiAnd acquiring corresponding groove lines, wherein the adjacent relation of the groove lines is the same as the adjacent relation among straight lines, circular arcs and round solids in the 2D drawing.
The groove reference line is an edge profile of the workpiece, cutting cannot be directly performed according to the groove reference line, and after the groove reference line is obtained, the groove reference lines need to be shifted according to a preset distance and a preset direction so as to obtain a template groove line based on the shift of the groove reference line. The preset distance and the preset direction can be determined according to actual experience or 2D drawing labeling.
Step S20: and searching a closed loop formed by the adjacent groove reference lines, and adjusting the end-to-end connection sequence of the reference line end points of the closed loop according to a first preset rule to obtain the adjusted groove reference line.
It can be understood that the adjacent template notch lines should be connected end to end in theory, but the adjacent offset template notch lines may intersect or should be connected but do not intersect actually, as shown in fig. 6, the solid line in fig. 6 is the reference line generated according to step S1, the dashed line is the bevel line formed after the corresponding reference line is offset, the originally connected reference lines should continue to connect in theory after being offset, but intersect actually, at this time, the intersection point of the two adjacent sections of the template notch line needs to be calculated to cut the intersection point so as to obtain the final adjacent notch line to be cut.
Groove reference lines analyzed from the 2D drawing do not meet end-to-end communication, namely the end points of the 1 st section of the adjacent two groove reference lines are required to be connected with the starting point of the 2 nd section. The end connection types of the adjacent groove reference lines are 4 types: "start-end-start-end", "start-end-start", "end-start-end", "end-start-end", "end-start-end".
It should be noted that, first, the number of closed loops formed by the groove reference line needs to be found, then the end-to-end connection sequence of the reference line end points of the outermost closed loop is adjusted to be clockwise, the end-to-end connection sequence of the reference line end points of the inner closed loop is adjusted to be counterclockwise, and the groove reference line which is adjusted is obtained; or the end-to-end connection sequence of the reference line end points of the outermost ring closed loop is adjusted to be anticlockwise, the end-to-end connection sequence of the reference line end points of the inner ring closed loop is adjusted to be clockwise, and the groove-adjusted reference line is obtained.
Step S30: and judging whether the adjusted groove reference line needs to be cut according to a second preset rule, and obtaining an adjacent groove line to be cut.
In a specific implementation, whether the adjusted groove reference line needs to be cut or not needs to be determined according to whether an intersection point exists between two adjacent groove lines, so that the conditions of crossing, dislocation, connection but actual non-crossing and the like are easy to occur. Specifically, the second preset rule includes:
s31, if the adjacent bevel lines are both upper bevels or lower bevels, namely the inclination angles of the adjacent bevel lines have the same sign, the adjacent bevel lines are regarded as needing to be cut; otherwise, the clipping is deemed not to be needed;
s32, if the end point of the previous reference line corresponding to the adjacent slope line is coincident with the starting point of the next reference line, the required clipping is determined; otherwise, the clipping is deemed not to be needed;
s33, if the included angle between the direction of the previous bevel line and the direction of the next bevel line of the adjacent bevel lines is smaller than a preset value, determining that clipping is needed; otherwise, the clipping is deemed not to be needed;
in S33, if the notch line is a straight line, the direction of the notch line is a starting point and points to an ending point; if the slope line is a circular arc, the direction of the slope line is the tangential direction of the terminal point.
In this embodiment, the determining whether the adjusted groove reference line needs to be cut according to a second preset rule includes: if the positive signs of the inclination angles of the adjacent notch lines in the adjusted notch reference line are the same, the cutting is considered to be needed; or if the end point of the last reference line corresponding to the adjacent notch line in the adjusted notch reference lines is superposed with the starting point of the next reference line, the trimming is considered to be needed; or if the included angle between the direction of the last groove line and the direction of the next groove line of the adjacent groove line in the adjusted groove reference line is smaller than the preset angle, the cutting is considered to be needed.
Step S40: and cutting the workpiece to be cut according to the adjacent bevel lines to be cut.
It can be understood that all the adjacent groove lines to be cut are cut, and the whole flow is shown in fig. 7. According to different groove line attributes, the following four combinations exist in the adjacent relationship of the groove lines: line-line, line-arc/arc-line, arc-arc and a segment thereof are circle. If the adjacent groove lines are in a line-line relationship, marking the two groove lines as line1 and line2 respectively, and obtaining the intersection point of the two groove lines through a straight line-straight line intersection point calculation function; if the type of the 1 st section in the adjacent slope line is line, the type of the 2 nd section is arc, or the type of the 1 st section is arc and the type of the 2 nd section is line, obtaining the intersection point of the two slope lines through a straight line-circular arc intersection point calculation function; if the type of the 1 st section in the adjacent slope lines is arc and the type of the 2 nd section is arc, obtaining the intersection point of the two slope lines through a circular arc-circular arc intersection point calculation function; if a certain section in the adjacent slope line is circle, the intersection point is not calculated. And judging whether to perform near point replacement or not according to the calculated intersection point to obtain a template slope line, and automatically cutting the workpiece to be cut according to a final template reference line.
After all adjacent groove lines are subjected to the above cutting operation, the cutting of the groove lines can be completed, and the groove lines intersected in fig. 6 are subjected to the cutting of the groove lines by the method shown in this embodiment and then are shown in fig. 8.
In the embodiment, adjacent groove reference lines of a workpiece to be cut are obtained, a closed loop formed by the adjacent groove reference lines is searched, the end-to-end connection sequence of the reference line end points of the closed loop is adjusted according to a first preset rule, the adjusted groove reference lines are obtained, and the end-to-end connection sequence of the reference lines is adjusted, so that the method is suitable for various line type groove lines; judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut, so that the cutting strategy is adjusted according to process requirements, various process requirements are met, and the conditions that joints of different types of lines are easy to intersect, non-intersect or misplace are avoided; and cutting the workpiece to be cut according to the adjacent groove lines to be cut, so that the cutting of the groove lines is completed, and the cutting precision of the groove cutting is improved.
Based on the first embodiment of the method for automatically cutting adjacent groove lines, with continued reference to fig. 2, a second embodiment of the method for automatically cutting adjacent groove lines according to the present invention is provided.
In the second embodiment, the step S40 includes:
calculating the replacement points of the two adjacent sections of slope lines to be cut according to the line relation of the two adjacent slope lines to be cut;
performing near point replacement on the two adjacent groove lines through a near point replacement function according to the replacement points to obtain a template groove line;
and cutting the workpiece to be cut according to the template bevel line.
It can be understood that, in S41, if the adjacent groove lines are in a line-line relationship, the two groove lines are respectively marked as line1 and line2, and the intersection point of the two groove lines is obtained through a straight line-straight line intersection point calculation function, which includes the following specific steps:
(1) the starting point of line1 is denoted as P1Endpoint is P2Line2 has a starting point P3Endpoint is P4According to P1、P2、P3And P4Fitting a plane S and adding P1、P2、P3And P4Projected onto a plane S to obtain P1s、P2s、P3sAnd P4s(ii) a Then two straight lines P are calculated1sP2s、P3sP4sDirection d of1And d2
Figure BDA0003611821640000131
(1.1) if | | | d1×d2If | | | is 0, the two straight lines are parallel and have no intersection point, and line1 and line2 do not need to be replaced by near points;
(1.2) if | | | d1×d2If | | is smaller than the first preset value, the two straight lines are nearly parallel, and the starting point P from the line2 is calculated by utilizing a near point calculation function of the line13Nearest endpoint Pn1And distance dist1Calculating the end point P from line2 using the near point calculation function of line14Nearest endpoint Pn2And distance dist2
If dist1<dist2Then the replacement point is
Figure BDA0003611821640000141
Otherwise, the replacement point is
Figure BDA0003611821640000142
Figure BDA0003611821640000143
This embodiment can adapt to the situation that two straight lines are close to being parallel, avoids adjacent groove line to be that replacement point is easy to misplace, not conform to the problem of cutting technology demand when two straight lines are close to being parallel.
(1.3) if | | | d1×d2If | is larger than the first preset value, the intersection point P is obtained by utilizing the parameter equation of the straight linerAnd the intersection point of the two straight lines meets the following conditions:
P1s+k1d1=P2s+k2d2
wherein k is1And k2Is the parameter to be solved. The above formula can be converted into:
Figure BDA0003611821640000144
due to P1s、P2s、P3sAnd P4sCoplanar and the two lines are not parallel, so the equation must have a unique solution k1And k2. Intersection point P of two slope linesr=P1s+k1d1Replacement point Pt=Pr
(2) Performing near point replacement on line1 and line2, wherein the replacement point is an intersection point PtAnd the groove reference line after the intersection point replacement is the final template groove line.
The first preset value is an empirical value.
In this embodiment, the calculating, according to the line relationship between the adjacent slope lines to be cut, the replacement points of the adjacent two slope lines to be cut includes:
if the line relation of the adjacent groove lines to be cut is from a straight line to a straight line, fitting a plane according to the starting point and the end point which correspond to the first section of straight groove line and the second section of straight groove line which are adjacent in the adjacent groove lines to be cut respectively;
projecting the starting points and the end points of the first section of straight-line groove line and the second section of straight-line groove line to the plane to obtain the starting points and the end points of the two projected straight-line sections;
calculating the directions of the two projected straight line segments;
judging whether the product of the directions of the two projected straight line segments is smaller than a first preset value or not;
if the product of the directions of the two projected straight-line segments is smaller than the first preset value, calculating a first end point respectively closest to the starting point and the end point of the second straight-line segment slotline and a corresponding first distance according to a near point calculation function of the first straight-line segment slotline, and calculating corresponding replacement points of the first straight-line segment slotline and the second straight-line segment slotline according to the closest first end point and the corresponding first distance;
if the product of the directions of the two projected straight line segments is equal to zero, the calculation of a replacement point is not needed;
and if the product of the directions of the two projected straight line segments is greater than the first preset value, calculating the corresponding replacement points of the first straight line notch line and the second straight line notch line through a straight line parameter equation.
S42, if the type of the 1 st segment in the adjacent slope lines is line, the type of the 2 nd segment is arc, or the type of the 1 st segment is arc and the type of the 2 nd segment is line, obtaining the intersection point of the two slope lines through a straight line-circular arc intersection point calculation function, and the specific steps are as follows:
(1) calculating line directions
Figure BDA0003611821640000151
(2) Calculating a function by utilizing the center of the arc to obtain PCAnd calculating a radius r of arca=||Pc-P3| | where P3Is the starting point of arc;
(3) calculating PcClosest point P to linenl=P1+(Pc-P1)·dl·||P2-P1| | where P1Is the starting point of line, P2Is the end point of line;
(4) compare | | | Pc-PnlI and raThe size of the capsule is determined by the size of the capsule,
(4.1) if Pc-Pnl||-raL is not greater than a second preset value, i.e. arc center to point PnlIs close to raThen there may be 1 intersection point P between the straight line and the arcnlThere may also be 2 very close intersections; calculating distance P using near point calculation function of arcnlNearest endpoint Pa1Calculating distance P using a near point calculation function of linea1Nearest endpoint Pl1Then replace the point
Figure BDA0003611821640000152
Therefore, the method is suitable for the situation that the straight line is nearly tangent to the circular arc, and avoids the situation that the replacement point is easy to misplace and does not meet the requirements of the cutting process.
(4.2) if Pc-Pnl||-raGreater than a second predetermined value, i.e. from the centre of the arc to point PnlIs greater than raJudging that the straight line and the arc have no intersection point, and not needing to replace a near point;
(4.3) if Pc-Pnl||-raA second preset value less than negative, i.e. centre-to-point P of arcnlIs less than raThen, there are 2 intersections between the straight line _ and the circular arc _ which are respectively marked as Pi1And Pi2
Figure BDA0003611821640000153
Line _ for arc _ circle center PcHas a far point of Pf
If Pf-Pi1||<||Pf-Pi2If | then replace point Pt=Pi1
If P | |f-Pi1||≥||Pf-Pi2If | then replace point Pt=Pi2
(5) Performing near point replacement on the line and the arc, wherein the replacement point is an intersection point PtAnd the groove reference line after the intersection point replacement is the final template groove line.
The second preset value is an empirical value.
In this embodiment, the calculating, according to the line relationship between the adjacent slope lines to be cut, the replacement points of the two adjacent segments of slope lines to be cut includes:
if the line relationship of the adjacent slope line to be cut is from straight line to circular arc or from circular arc to straight line, calculating the direction of the straight slope line in the two adjacent slope lines to be cut;
calculating the circle center, the radius and the starting point of the circular arc groove line in the two adjacent groove lines to be cut;
calculating the closest point from the circle center of the circular arc groove line to the straight line groove line;
comparing the size relation between the distance between the closest point and the circle center and the radius;
if the absolute value of the difference between the distance between the nearest point and the circle center and the radius is not larger than a second preset value, calculating a second end point nearest to the nearest point according to a near point calculation function of the circular arc slope line, calculating a third end point nearest to the second end point according to a near point calculation function of the linear slope line, and calculating a replacement point corresponding to the circular arc slope line and the linear slope line according to the second end point and the third end point;
if the difference between the distance between the nearest point and the circle center and the radius is larger than the second preset value, a replacement point does not need to be calculated;
if the difference between the distance between the nearest point and the circle center and the radius is smaller than the inverse number of the second preset value, calculating the intersection point of the circular arc groove line and the linear groove line, and determining a replacement point corresponding to the circular arc groove line and the linear groove line according to the intersection point and the far point of the linear groove line relative to the circle center.
S43, if the type of the 1 st section in the adjacent slope lines is arc, and the type of the 2 nd section is arc, obtaining the intersection point of the two sections of slope lines through the arc-arc intersection point calculation function, and the concrete steps are as follows:
(1) the first section of circular arc is denoted as arc1, the second section of circular arc is denoted as arc2, and the P is obtained by utilizing a circle center calculation function of arc1C1Using the circle of arc2The heart is calculated to obtain PC2
(2) Calculating arc1 circle center Pc1To center P of arc2c2Direction vector of
Figure BDA0003611821640000161
If d iscIf the value is less than the preset value, the point is replaced
Figure BDA0003611821640000162
Wherein, P51End point of arc1, P32Directly jumping to the step (5) for the starting point of arc 2; otherwise, executing the step (3);
(3) calculating the radius r of arc1a1=||Pc-P31The radius of arc2 is ra2=||Pc-P52I, wherein P31Is the starting point of arc1, P52Is the starting point of arc 2;
(4) compare | | | Pc1-Pc2I and ra1+ra2The size of (c):
(4.1) if Pc1-Pc2||-(ra1+ra2) If the distance between the two arcs is greater than the third preset value, judging that the two arcs have no intersection point, and not needing to replace near points with arc1 and arc 2;
(4.2) if Pc1-Pc2||-(ra1+ra2) If not greater than the third preset value, calculating
Figure BDA0003611821640000171
If | cθ1|>1, then order
Figure BDA0003611821640000172
Judging that two circular arcs have 2 intersections and respectively recording the intersections as Pj1And Pj2
Pj1=Pc1+ra1·Rz(Δθ)·dc
Pj2=Pc1+ra1·Rz(-Δθ)·dc
Δθ=acos(cθ2)
Note arc1 for point Pj1Is Pn1Arc1 for point Pj2Near point of (A) is Pn2
If Pj1-Pn1||>||Pj2-Pn2If | then replace point Pt=Pj2
If P | |j1-Pn1||≤||Pj2-Pn2If | then replace point Pt=Pj1
Therefore, the method is suitable for the situation that the circle centers of the two arcs are close, and avoids the situation that the replacement points are easy to misplace and do not meet the requirements of a cutting process.
(5) Performing near point replacement on arc1 and arc2, wherein the replacement point is an intersection point PtAnd the groove reference line after the intersection point replacement is the final template groove line.
The third preset value is an empirical value.
In this embodiment, the calculating, according to the line relationship between the adjacent slope lines to be cut, the replacement points of the two adjacent segments of slope lines to be cut includes:
if the line relation of the adjacent slope line to be cut is from a circular arc to a circular arc, calculating a first circle center of a first section of circular arc slope line and a second circle center of a second section of circular arc slope line in the adjacent slope line to be cut;
calculating a direction vector between the first circle center and the second circle center;
if the direction vector is smaller than a third preset value, calculating a corresponding replacement point of the first section of circular arc groove line and the second section of circular arc groove line according to the end point of the first section of circular arc and the starting point of the second section of circular arc;
if the direction vector is greater than or equal to the third preset value, calculating a module value of the vector from the first circle center to the second circle center, and a sum of a first radius of the first section of circular arc groove line and a second radius of the second section of circular arc groove line, when a difference value between the module value and the sum of the radii of the calculated vector is greater than a fourth preset value, calculating a replacement point without calculating, when the difference value between the module value and the sum of the radii of the calculated vector is not greater than the fourth preset value, calculating a replacement point corresponding to the first section of circular arc groove line and the second section of circular arc groove line according to the calculated module value of the vector, the first radius and the second radius.
Further, in this embodiment, in the step S20, the adjusting the end-to-end connection order of the closed loop according to the first preset rule to obtain an adjusted groove reference line includes:
identifying an outermost closed loop and an inner closed loop of the closed loops;
adjusting the end-to-end connection sequence of the reference line end points of the outermost ring closed loop to be clockwise, and adjusting the end-to-end connection sequence of the reference line end points of the inner ring closed loop to be anticlockwise; or,
and adjusting the end-to-end connection sequence of the reference line end points of the outermost ring closed loop to be anticlockwise, and adjusting the end-to-end connection sequence of the reference line end points of the inner ring closed loop to be clockwise.
It should be noted that, in step S20, first, the number of closed loops formed by the groove reference line needs to be found, then the end-to-end connection sequence of the reference line ends of the outermost closed loop is adjusted to be clockwise, and the end-to-end connection sequence of the reference line ends of the inner closed loop is adjusted to be counterclockwise. The head-to-tail connectivity of all reference lines is ensured, the method can adapt to the condition that the inner ring is a straight line and a circular arc, and the problems that replacement points are easy to misplace and do not meet the requirements of a cutting process are avoided.
Further, for the case that the outermost circle is clockwise and the inner circle is counterclockwise, the specific steps are as follows:
s21, creating an empty closed-loop set Rs
S22, selecting an unsaved reference line, searching the closed loop R connected with the reference linerIf R isrIf present, then R isrIs added to the set RsAnd R isrAll the contained reference lines are marked as searched; if R isrIf not, the original 2D drawing is regarded as an errorDrawings (drawings not enclosed);
the steps of searching the connected closed loop of the reference line are as follows:
(1) creating an empty set Rr
(2) Note the current reference line SiHas an end point of PeiSearching all the reference lines which are not searched,
(2.1) if a certain reference line SjStarting point P ofsjAnd PeiIf the distance is less than the preset value, the reference line S is setiMarking as searched, and setting the current reference line as Sj
(2.2) if a reference line SjEnd point P ofejAnd PeiIf the distance is less than the preset value, the reference line S is setiMarking as searched, and setting the current reference line as SjAnd SjInterchanging the starting point and the end point of the key;
(2.3) if the starting point or the end point of all the reference lines and PeiIs not less than the preset value, the reference line is considered to have no connected closed loop, namely RrIs absent;
(3) repeating the step (2) until RrAlready contains Si
S23, repeating S22 until all reference lines are searched;
s24, traversing the set RsAll closed rings R in (1)iIf R isiIs the outermost ring closed, then RiThe end-to-end connection sequence of the reference line ends is adjusted to be clockwise; otherwise, R is addediThe end-to-end connection sequence of the reference line is adjusted to be anticlockwise.
S241, the outermost ring closure judging step is as follows:
(1) the length of each reference line of each closed loop segment is calculated,
(1.1) if the reference line is line, its length l | | | | Ps-PeL, wherein PsIs the starting point of line, PeIs the end point of line;
(1.2) if the reference line is arc, the length l | | | Ps-Pm||+||Pm-Pe| | where PsIs the starting point of arc, PmIs the midpoint of arc, PeIs the end point of arc;
(2) the maximum closed loop length is the outermost closed loop.
S242, the closed loop end-to-end connection sequence judging step is as follows:
(1) calculating the direction included angle of each 2 adjacent reference lines of the closed loop
(1.1) if the reference line is line, the direction thereof is
Figure BDA0003611821640000191
(1.2) if the reference line of the 1 st segment is arc, the direction is
Figure BDA0003611821640000192
If the 2 nd segment reference line is arc, its direction is
Figure BDA0003611821640000193
(1.3) the included angle of direction is calculated by β ═ asin (d)1×d2) In which d is1And d2Respectively the directions of the 1 st section reference line and the 2 nd section reference line;
(2) the directional angles of all adjacent reference lines are summed up,
if the summation result is less than 0, the closed loop is regarded as counterclockwise; otherwise the closed loop is considered clockwise.
And S243, the method for adjusting the head-to-tail connection sequence in a closed loop mode is to interchange the starting points and the end points of all reference lines.
In this embodiment, the replacement points of the two adjacent groove lines to be cut are calculated according to the line relationship of the two adjacent groove lines to be cut, the two adjacent groove lines are subjected to near point replacement through a near point replacement function according to the replacement points to obtain the template groove line, and the template groove line is subjected to near point replacement, so that the process requirements of various line types are met, the situations that the connection parts of the two adjacent groove lines are easy to intersect, non-intersect or misplace are avoided, the workpiece to be cut is cut according to the template groove line, and the cutting precision of the groove line is improved.
In addition, referring to fig. 9, an embodiment of the present invention further provides an automatic adjacent-groove-line cutting device, where the automatic adjacent-groove-line cutting device includes:
the acquisition module 10 is used for acquiring adjacent groove reference lines of a workpiece to be cut;
the adjusting module 20 is configured to search for a closed loop formed by the adjacent groove reference lines, and adjust an end-to-end connection sequence of the reference line end points of the closed loop according to a first preset rule to obtain an adjusted groove reference line;
the judging module 30 is configured to judge whether the adjusted groove reference line needs to be cut according to a second preset rule, so as to obtain an adjacent groove line to be cut;
and the cutting module 40 is used for cutting the workpiece to be cut according to the adjacent groove lines to be cut.
Other embodiments or specific implementation manners of the automatic adjacent groove line cutting device provided by the invention can refer to the above method embodiments, and are not described herein again.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores an adjacent slop line automatic cutting program, and the adjacent slop line automatic cutting program, when executed by a processor, implements the steps of the adjacent slop line automatic cutting method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or system in which the element is included.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order, but rather the words first, second, etc. are to be interpreted as indicating.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., a Read Only Memory (ROM)/Random Access Memory (RAM), a magnetic disk, an optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (10)

1. An automatic adjacent groove line cutting method is characterized by comprising the following steps:
acquiring adjacent groove reference lines of a workpiece to be cut;
searching a closed loop formed by the adjacent groove reference lines, and adjusting the end-to-end connection sequence of the reference line end points of the closed loop according to a first preset rule to obtain an adjusted groove reference line;
judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut;
and cutting the workpiece to be cut according to the adjacent groove lines to be cut.
2. The method for automatically cutting adjacent groove lines according to claim 1, wherein the step of cutting the workpiece to be cut according to the adjacent groove lines to be cut comprises the following steps:
calculating the replacement points of the two adjacent sections of the slop lines to be cut according to the line relation of the two adjacent slop lines to be cut;
performing near point replacement on two adjacent groove lines through a near point replacement function according to the replacement points to obtain a template groove line;
and cutting the workpiece to be cut according to the template bevel line.
3. The method for automatically cutting out adjacent slotlines as claimed in claim 2, wherein said calculating the replacement points of the two adjacent slotlines to be cut out according to the line relationship of the adjacent slotlines to be cut out comprises:
if the line relation of the adjacent groove lines to be cut is from a straight line to a straight line, fitting a plane according to the starting point and the end point which correspond to the first section of straight groove line and the second section of straight groove line which are adjacent in the adjacent groove lines to be cut respectively;
projecting the starting points and the end points of the first section of straight line slope line and the second section of straight line slope line to the plane to obtain the starting points and the end points of the two projected straight line sections;
calculating the directions of the two projected straight line segments;
judging whether the product of the directions of the two projected straight line segments is smaller than a first preset value or not;
if the product of the directions of the two projected straight line segments is smaller than the first preset value, calculating a first end point which is respectively closest to the starting point and the end point of the second straight line segment and a corresponding first distance according to a near point calculation function of the first straight line segment, and calculating a corresponding replacement point of the first straight line segment and the second straight line segment according to the closest first end point and the corresponding first distance;
if the product of the directions of the two projected straight line segments is equal to zero, the calculation of a replacement point is not needed;
if the product of the directions of the two projected straight line segments is larger than the first preset value, calculating the corresponding replacement points of the first straight line slope notch line and the second straight line slope notch line through a straight line parameter equation.
4. The method for automatically cutting out adjacent slotlines as claimed in claim 2, wherein said calculating the replacement points of two adjacent slotlines to be cut out according to the line relationship of the adjacent slotlines to be cut out comprises:
if the line relation of the adjacent slope lines to be cut is from straight line to circular arc or from circular arc to straight line, calculating the direction of the straight slope line in the two adjacent slope lines to be cut;
calculating the circle center, the radius and the starting point of the circular arc groove line in the two adjacent groove lines to be cut;
calculating the closest point from the circle center of the circular arc groove line to the straight groove line;
comparing the size relation between the distance between the closest point and the circle center and the radius;
if the absolute value of the difference between the distance between the nearest point and the circle center and the radius is not larger than a second preset value, calculating a second end point nearest to the nearest point according to a near point calculation function of the circular arc slope line, calculating a third end point nearest to the second end point according to a near point calculation function of the linear slope line, and calculating a replacement point corresponding to the circular arc slope line and the linear slope line according to the second end point and the third end point;
if the difference between the distance between the nearest point and the circle center and the radius is larger than the second preset value, calculating a replacement point is not needed;
if the difference between the distance between the nearest point and the circle center and the radius is smaller than the inverse number of the second preset value, calculating the intersection point of the circular arc groove line and the linear groove line, and determining a replacement point corresponding to the circular arc groove line and the linear groove line according to the intersection point and the far point of the linear groove line relative to the circle center.
5. The method for automatically cutting the adjacent groove line according to claim 2, wherein the calculating the replacement points of the two adjacent groove lines to be cut according to the line relationship of the adjacent groove lines to be cut comprises:
if the line relation of the adjacent slope lines to be cut is from circular arc to circular arc, calculating a first circle center of a first section of circular arc slope line and a second circle center of a second section of circular arc slope line in the adjacent slope lines to be cut;
calculating a direction vector between the first circle center and the second circle center;
if the direction vector is smaller than a third preset value, calculating a corresponding replacement point of the first section of circular arc groove line and the second section of circular arc groove line according to the end point of the first section of circular arc and the starting point of the second section of circular arc;
if the direction vector is greater than or equal to the third preset value, calculating a module value of the vector from the first circle center to the second circle center, and a sum of a first radius of the first section of circular arc groove line and a second radius of the second section of circular arc groove line, when a difference value between the module value and the sum of the radii of the calculated vector is greater than a fourth preset value, calculating a replacement point without calculating, when the difference value between the module value and the sum of the radii of the calculated vector is not greater than the fourth preset value, calculating a replacement point corresponding to the first section of circular arc groove line and the second section of circular arc groove line according to the calculated module value of the vector, the first radius and the second radius.
6. The automatic adjacent groove line cutting method according to any one of claims 1 to 5, wherein the step of adjusting the end-to-end connection sequence of the closed loop according to a first preset rule to obtain an adjusted groove reference line comprises the following steps:
identifying an outermost closed loop and an inner closed loop of the closed loops;
adjusting the end-to-end connection sequence of the reference line end points of the outermost ring closed loop to be clockwise, and adjusting the end-to-end connection sequence of the reference line end points of the inner ring closed loop to be anticlockwise; or,
and adjusting the end-to-end connection sequence of the reference line end points of the outermost ring closed loop to be anticlockwise, and adjusting the end-to-end connection sequence of the reference line end points of the inner ring closed loop to be clockwise.
7. The method for automatically cutting the adjacent groove line according to any one of claims 1 to 5, wherein the determining whether the adjusted groove reference line needs to be cut according to a second preset rule comprises:
if the positive signs of the inclination angles of the adjacent notch lines in the adjusted notch reference line are the same, the cutting is considered to be needed; or,
if the end point of the previous reference line corresponding to the adjacent notch line in the adjusted notch reference line is coincident with the starting point of the next reference line, the cutting is considered to be needed; or the like, or a combination thereof,
and if the included angle between the direction of the last groove line and the direction of the next groove line of the adjacent groove lines in the adjusted groove reference line is smaller than the preset angle, the cutting is required.
8. The utility model provides an adjacent notch line automatic cutting device which characterized in that, adjacent notch line automatic cutting device includes:
the acquisition module is used for acquiring adjacent groove reference lines of the workpiece to be cut;
the adjusting module is used for searching for a closed loop formed by the adjacent groove reference lines, adjusting the end-to-end connection sequence of the reference line end points of the closed loop according to a first preset rule, and obtaining an adjusted groove reference line;
the judging module is used for judging whether the adjusted groove reference line needs to be cut according to a second preset rule to obtain an adjacent groove line to be cut;
and the cutting module is used for cutting the workpiece to be cut according to the adjacent groove lines to be cut.
9. The utility model provides an adjacent slide cut equipment of line automatic cutout which characterized in that, adjacent slide cut equipment includes: a memory, a processor and an adjacent bevel line auto-cropping program stored on the memory and executable on the processor, the adjacent bevel line auto-cropping program when executed by the processor implementing the steps of the adjacent bevel line auto-cropping method of any one of claims 1 to 7.
10. A storage medium having stored thereon an adjacent slotline automatic cutting program which, when executed by a processor, implements the steps of the adjacent slotline automatic cutting method according to any one of claims 1 to 7.
CN202210433229.9A 2022-04-24 2022-04-24 Automatic adjacent slop line cutting method, device, equipment and storage medium Pending CN114769717A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210433229.9A CN114769717A (en) 2022-04-24 2022-04-24 Automatic adjacent slop line cutting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210433229.9A CN114769717A (en) 2022-04-24 2022-04-24 Automatic adjacent slop line cutting method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114769717A true CN114769717A (en) 2022-07-22

Family

ID=82432341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210433229.9A Pending CN114769717A (en) 2022-04-24 2022-04-24 Automatic adjacent slop line cutting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114769717A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011050975A (en) * 2009-08-31 2011-03-17 Jfe Engineering Corp Rotary submerged arc welding method
CN108000082A (en) * 2017-12-28 2018-05-08 重庆平伟汽车科技股份有限公司 A kind of method and system that layering clean-up machining is carried out to die face
US20190197202A1 (en) * 2017-12-22 2019-06-27 Dassault Systemes Method for computing an unfolded part of a modeled bended part of a 3d object
CN111753350A (en) * 2020-07-07 2020-10-09 武汉久同智能科技有限公司 Greedy algorithm-based cutting path generation method
CN111805051A (en) * 2020-06-30 2020-10-23 梅卡曼德(北京)机器人科技有限公司 Groove cutting method, device, electronic equipment and system
CN113751824A (en) * 2021-08-17 2021-12-07 熵智科技(深圳)有限公司 Automatic generation method and device for groove cutting track, computer equipment and medium
CN113927127A (en) * 2021-08-17 2022-01-14 熵智科技(深圳)有限公司 Automatic cutting method and device for bevel line, storage medium and computer equipment
CN114227706A (en) * 2021-12-15 2022-03-25 熵智科技(深圳)有限公司 Groove cutting method, device, equipment, system and medium based on 3D vision
CN114273726A (en) * 2021-12-15 2022-04-05 熵智科技(深圳)有限公司 3D visual guide groove cutting method, device, equipment, system and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011050975A (en) * 2009-08-31 2011-03-17 Jfe Engineering Corp Rotary submerged arc welding method
US20190197202A1 (en) * 2017-12-22 2019-06-27 Dassault Systemes Method for computing an unfolded part of a modeled bended part of a 3d object
CN108000082A (en) * 2017-12-28 2018-05-08 重庆平伟汽车科技股份有限公司 A kind of method and system that layering clean-up machining is carried out to die face
CN111805051A (en) * 2020-06-30 2020-10-23 梅卡曼德(北京)机器人科技有限公司 Groove cutting method, device, electronic equipment and system
CN111753350A (en) * 2020-07-07 2020-10-09 武汉久同智能科技有限公司 Greedy algorithm-based cutting path generation method
CN113751824A (en) * 2021-08-17 2021-12-07 熵智科技(深圳)有限公司 Automatic generation method and device for groove cutting track, computer equipment and medium
CN113927127A (en) * 2021-08-17 2022-01-14 熵智科技(深圳)有限公司 Automatic cutting method and device for bevel line, storage medium and computer equipment
CN114227706A (en) * 2021-12-15 2022-03-25 熵智科技(深圳)有限公司 Groove cutting method, device, equipment, system and medium based on 3D vision
CN114273726A (en) * 2021-12-15 2022-04-05 熵智科技(深圳)有限公司 3D visual guide groove cutting method, device, equipment, system and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
经小龙: "新型移动式机器人焊接中的传感定位、作业规划与反馈控制研究", 中国优秀硕士学位论文电子期刊 *

Similar Documents

Publication Publication Date Title
CN109702750B (en) Gantry type intelligent machining robot and intelligent machining method
US8779324B2 (en) Welding-line selecting method
Shin et al. Reincarnation of G-code based part programs into STEP-NC for turning applications
US8185225B2 (en) Program creation apparatus, numerical control apparatus, program creation method
CN113751824B (en) Automatic generation method and device for groove cutting track, computer equipment and medium
EP1684140A2 (en) Bending apparatus comprising a control means
EP0744046A1 (en) Intelligent system for generating and executing a sheet metal bending plan
CN108608425A (en) Six-shaft industrial robot Milling Process off-line programing method and system
CN114769717A (en) Automatic adjacent slop line cutting method, device, equipment and storage medium
CN117161582B (en) Laser cutting method based on computer vision
JP2004001226A (en) Automatic preparation system for welding robot operation program
CN113927127B (en) Automatic groove line cutting method and device, storage medium and computer equipment
CN113408042A (en) BIM-based shield segment parameterization drawing generation method and system
CN113649668B (en) Workpiece template point cloud generation method and device, computer and storage medium
Thilak et al. Computer-aided tolerance chain identification system for tolerance allocation
CN110414706A (en) The methods, devices and systems in formation curve path
CN110968040B (en) Program generation method of machining track for mechanical numerical control
JP2815278B2 (en) CAD / CAM apparatus and method for correcting solid model thereof
Kim et al. Automatic two-dimensional layout using a rule-based heuristic algorithm
CN115170659A (en) Secondary repositioning method, device and equipment for groove cutting reference line and storage medium
CN115070127A (en) Method, device and equipment for relocating groove cutting reference line and storage medium
Attila IGES-based CAD model post processing module of a Setup and Fixture Planning System for box-shaped parts
CN115035519B (en) Intelligent tolerance dimension marking method for two-dimensional engineering drawing
CN110647141A (en) Method, device and system for generating obstacle avoidance path
CN116776425A (en) Method for generating circular arc in Revit according to arc length and chord length

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220722