Machining method of numerical control machine, numerical control machine and storage medium
By obtaining the position information of the limit points and the measurement points and building a mapping relationship between the measurement points, CNC machines can achieve accurate positioning and processing of processing objects, solving the problem of poor processing effects caused by inaccurate positioning in the prior art.
Patent Information
- Application Number
- CN202411637062.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-12-30
- Filing Date
- 2023-06-30
- Publication Date
- 2025-05-13
AI Technical Summary
CNC machines find it difficult to achieve precise positioning when positioning processing objects, resulting in poor processing results.
By obtaining the two-dimensional position of the limit point, detecting the height distribution of the area where the measurement point is located, constructing a mapping relationship between the measurement points, and processing according to the target processing graph.
Accurate positioning and processing of processing objects is achieved, and the quality of processing effects is improved.
Smart Images

Figure CN119987287A_ABST
Abstract
Description
[0001] This case was filed on June 30, 2023, with the application number: "202380010982X", and the name of the invention is: "A processing method and device for a CNC machine, a divisional application of the CNC machine" case. Technical Field
[0002] The present application relates to the field of laser processing, and in particular to a processing method of a numerical control machine, a numerical control machine, and a storage medium. Background Art
[0003] With the development of CNC machines from industry to terminal applications, CNC machines will no longer be limited to their industrial applications, but will become intelligent hardware that can be used by terminals. People will be able to perform processing on the processing objects through the use of CNC machines.
[0004] In order to improve the operability and convenience of CNC machines and ensure high-quality processing results, processing alignment is often performed before processing the processing object. Processing alignment refers to the act of adjusting the positional relationship between the processing pattern and the processing object in the real world, with the purpose of ensuring that the positional relationship between the processing pattern and the processing object in the real world can meet user expectations.
[0005] After the processing alignment is completed, the processing process performed by the CNC machine enables the surface provided by the processing object to be engraved with the pattern desired by the user.
[0006] However, the processing object is often unable to be accurately positioned, which results in the inability of the CNC machine to accurately process the processing object, resulting in a poor processing effect of the processing object. Therefore, the inability of CNC machines to perform accurate processing is a dilemma that needs to be solved urgently. Summary of the invention
[0007] The purpose of this application is to explore how to measure a processing object without the aid of a camera device, so as to reduce the measurement cost of a CNC machine.
[0008] According to one aspect of an embodiment of the present application, the present application provides a processing method of a numerical control machine, the method comprising:
[0009] Obtaining a two-dimensional position of a limit point, wherein the limit point indicates an area where a measurement point is located;
[0010] Detecting the height distribution of the area where the measuring point is located at the limit point to obtain the spatial position corresponding to the area where the measuring point is located;
[0011] Constructing a mapping relationship between measurement points according to the spatial positions of the measurement points;
[0012] The mapping relationship is adapted according to the target processing pattern, and processing of the target processing pattern on the processing object is performed.
[0013] According to one aspect of an embodiment of the present application, obtaining the two-dimensional position of the limit point includes:
[0014] The two-dimensional position of the limit point is obtained through the two-dimensional position corresponding to the light spot or the detector.
[0015] According to one aspect of an embodiment of the present application, obtaining the two-dimensional position of the limit point through the two-dimensional position corresponding to the light spot or the detector includes:
[0016] When the light source or the detector is driven to move toward the limit point, the moving distance is extracted to obtain the moving distance;
[0017] According to the moving distance, the two-dimensional position corresponding to the light spot or the detector is obtained as the two-dimensional position of the limit point.
[0018] According to one aspect of an embodiment of the present application, before detecting the height distribution of the area where the measuring point is located at the limit point and obtaining the spatial position corresponding to the area where the measuring point is located, the method further includes:
[0019] generating a measurement point matrix according to the two-dimensional positions of the limit points;
[0020] The two-dimensional position of each measuring point in the measuring point matrix is obtained, and the measuring point is used for height detection to obtain the height distribution of the area where the measuring point is located.
[0021] According to one aspect of an embodiment of the present application, the limit points are distributed on the same straight line, and the generating of the measurement point array according to the two-dimensional positions of the limit points includes:
[0022] The connecting line between the limiting points is taken as a diagonal line, and the rectangle where the diagonal line is located forms a limiting area;
[0023] A measurement point array is generated for the defined area.
[0024] According to one aspect of an embodiment of the present application, acquiring a two-dimensional position of each measuring point in the measuring point array includes:
[0025] According to the two-dimensional position of the limit point and the number of rows and columns of the measurement point array, the two-dimensional position of each measurement point in the measurement point array is calculated and obtained.
[0026] According to one aspect of an embodiment of the present application, the step of calculating and obtaining the two-dimensional position of each measurement point in the measurement point array according to the two-dimensional position of the limit point and the number of rows and columns of the measurement point array includes:
[0027] According to the two-dimensional position of the limit point, the two-dimensional position of the measurement point that coincides with the limit point is obtained;
[0028] The two-dimensional position of each measuring point is calculated based on the obtained two-dimensional position of the measuring point and the spacing distance between the rows and columns of the measuring point array.
[0029] According to one aspect of an embodiment of the present application, the step of calculating and obtaining the two-dimensional position of each measurement point in the measurement point array according to the two-dimensional position of the limit point and the number of rows and columns of the measurement point array includes:
[0030] Using the two-dimensional position of the limit point, the two-dimensional position of the measurement point that coincides with the limit point is obtained;
[0031] The two-dimensional position of each measuring point is calculated and obtained according to the two-dimensional position of the measuring point that coincides with the limit point and the number of rows and columns of the measuring point array.
[0032] According to one aspect of an embodiment of the present application, detecting the height distribution of the area where the measuring point is located at the limit point to obtain the spatial position corresponding to the area where the measuring point is located includes:
[0033] According to the two-dimensional position of the measuring point, the detector is driven to move to the measuring point, and the height of the measuring point is detected;
[0034] Until the height detection of all the measuring points in the measuring point array is completed, the height distribution of the area where the measuring points are located is obtained in combination with the two-dimensional positions of the measuring points.
[0035] According to one aspect of an embodiment of the present application, the step of driving the detector to move to the measurement point according to the two-dimensional position of the measurement point and detecting and obtaining the height of the measurement point includes:
[0036] Return the detector to the detection starting point;
[0037] According to the two-dimensional position of the measuring point, the detector is moved to the measuring point;
[0038] Drive the detector down until it contacts the measuring point, and obtain the detector lowering distance;
[0039] The height of the measuring point is obtained according to the lowering distance of the detector.
[0040] According to one aspect of an embodiment of the present application, the mapping relationship is characterized as a spatial model, and the step of constructing a mapping relationship between measurement points according to the spatial positions of the measurement points includes:
[0041] Perform segmented fitting according to the spatial positions corresponding to the measurement points to obtain a number of fitting lines;
[0042] Smoothing is performed between adjacent fitting lines to obtain a spatial model.
[0043] According to one aspect of an embodiment of the present application, the step of adapting the mapping relationship according to the target processing graphic and performing processing of the target processing graphic on the processing object includes:
[0044] Adapting the pattern mapped by the target processing pattern to the mapping relationship for processing and alignment, and obtaining pattern transformation data of the target processing pattern adapted to the mapping relationship;
[0045] The pattern mapped by the target processing graphic is processed onto the processing object according to the pattern transformation data.
[0046] According to one aspect of an embodiment of the present application, the step of adapting the pattern mapped to the target processing graphic to the mapping relationship for processing and aligning to obtain pattern transformation data of the target processing graphic adapted to the mapping relationship includes:
[0047] Obtain target processing graphics;
[0048] The alignment and deformation of the pattern are performed according to the mapping relationship to obtain pattern transformation data of the target processing figure.
[0049] The step of processing the pattern mapped by the target processing graphic onto the processing object according to the pattern transformation data includes:
[0050] Acquiring processing parameters executed on the processing object;
[0051] The processing object is processed according to the processing parameters and the pattern transformation data to obtain a processing object including a target processing pattern.
[0052] According to one aspect of the embodiment of the present application, the method further includes:
[0053] Rendering the spatial model to the captured image of the processing object to obtain the loading of the mesh surface corresponding to the spatial model in the captured image;
[0054] The pattern mapped by the target processing graphic is rendered onto the mesh surface according to the pattern transformation data to obtain a preview graphic, wherein the preview graphic is used to preview the pattern engraving to be performed on the processing object.
[0055] According to one aspect of an embodiment of the present application, the CNC machine comprises a movable head, at least a portion of the processing object is located in a processing space of the CNC machine, and the movable head is capable of transmitting electromagnetic energy to the processing space to process the processing object;
[0056] The numerical control machine further comprises a housing, the processing space is at least partially formed by the housing, the movable head is arranged in the housing, the housing comprises an openable barrier, the barrier is capable of weakening the transmission of electromagnetic energy between the processing space and the exterior of the numerical control machine;
[0057] The step of adapting the spatial model according to the target processing pattern and performing processing of the target processing pattern on the processing object includes:
[0058] generating a machining motion plan of the movable head based on the mapping relationship;
[0059] generating a preview image including the target processing pattern expected to be manufactured on the processing object;
[0060] The numerical control machine transmits electromagnetic energy to a processing object based on the processing motion plan to achieve a change in the material of the processing object.
[0061] According to one aspect of an embodiment of the present application, the present application provides a numerical control machine, comprising:
[0062] A housing, a detector, a light source, a track device for moving the detector and the light source, a memory, and a processor;
[0063] An internal space is formed in the shell, the detector, the light source and the track device are arranged in the internal space, and the memory is used to store computer-readable instructions;
[0064] The processor connected to the memory by electrical signals reads the computer-readable instructions stored in the memory to execute any one of the above-mentioned methods.
[0065] According to one aspect of an embodiment of the present application, the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor of a computer, the computer executes any one of the above-described spatial measurement methods.
[0066] In the processing process implemented in the embodiment of the present application, the spatial position of the measuring point of the processing object is first obtained to measure the area to be processed of the processing object, and then a spatial model is constructed according to the spatial position of the measuring point. Finally, the spatial model is adapted by the target processing graphic to execute the processing of the target processing graphic on the processing object. The present application obtains the spatial position of the measuring point of the processing object to provide measurement data for the precise processing of the processing object, and at the same time makes the target processing graphic adapt to the spatial model constructed according to the measuring point to execute the processing of the target processing graphic on the processing object, thereby ensuring the precise processing of the processing object.
[0067] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0068] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0070] Figure 1 A flow chart of a processing method according to an embodiment of the present application is shown.
[0071] Figure 2 A flow chart of obtaining the spatial position of a measurement point of a processing object according to an embodiment of the present application.
[0072] Figure 3 A flow chart is shown for determining the position of a positioning light spot or a detector end as a limit point and obtaining a two-dimensional position of the limit point according to an embodiment of the present application.
[0073] Figure 4 A flowchart of a spatial measurement method according to an implementation of the present application before obtaining the spatial position corresponding to the area where the measurement point is located.
[0074] Figure 5 A flow chart of generating a measurement point array according to the two-dimensional positions of the limit points according to an embodiment of the present application is shown.
[0075] Figure 6 A flowchart for calculating and obtaining the two-dimensional position of each measuring point in the measurement point array according to the two-dimensional position of the limit point and the number of rows and columns of the measurement point array according to an embodiment of the present application.
[0076] Figure 7 A flowchart for calculating and obtaining the two-dimensional position of each measuring point in the measuring point array according to the two-dimensional position of the limiting point and the number of rows and columns of the measuring point array according to one embodiment of the application.
[0077] Figure 8 According to an implementation of the present application, a flow chart of driving the detector to move according to a limit point, detecting the height distribution of the area where the measurement point is located, and obtaining the spatial position corresponding to the area where the measurement point is located.
[0078] Fig. 9 According to an implementation of the present application, a flow chart is provided in which a detector is driven to move to a measuring point according to a two-dimensional position of the measuring point, and the detector moved to the measuring point detects and obtains a height of the measuring point.
[0079] Fig.10A flow chart of constructing a spatial model according to the spatial positions of measurement points according to one embodiment of the present application is shown.
[0080] Fig.11 A flowchart of an embodiment of the present application is shown for adapting a spatial model according to a target processing graphic and executing processing of the target processing graphic on a processing object.
[0081] Fig.12 A flowchart of one embodiment of the present application is shown for processing and aligning a pattern adaptation space model mapped to a target processing graphic to obtain pattern transformation data of the target processing graphic on the space model.
[0082] Fig.13 A flow chart of one embodiment of the present application is shown, which processes a pattern mapped by the target processing graphic onto the processing object according to pattern transformation data.
[0083] Fig.14 A flow chart of a processing method according to an embodiment of the present application is shown.
[0084] Fig.15 , Fig.16 A schematic diagram of surface generation of a curved surface machining object according to an embodiment of the present application is shown.
[0085] Fig.17 , Fig.18 A schematic diagram is shown of performing machining alignment on a pattern adaptation surface model mapped to a target machining graphic to obtain a pattern of the target machining graphic on the surface model according to an embodiment of the present application.
[0086] Fig.19 A hardware schematic diagram of a numerical control machine according to an embodiment of the present application is shown.
[0087] Fig. 20 A hardware structure diagram of a processing method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0088] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0089] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0090] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0091] A CNC machine can be used as a terminal of a processing method. It combines its own configured hardware device to measure the measurement points generated by the processing object, obtain the spatial position of the measurement points, and construct a spatial model to accurately process the processing object.
[0092] See also Figure 1 , Figure 1 A flowchart of a processing method according to an embodiment of the present application is shown. The present application embodiment provides a processing method, including:
[0093] Step S110, obtaining the spatial position of the measuring point of the processing object;
[0094] Step S120, constructing a mapping relationship between the measurement points according to the spatial positions of the measurement points;
[0095] Step S130 , executing processing of the target processing pattern on the processing object according to the target processing pattern adaptation mapping relationship.
[0096] The above three steps are described in detail below.
[0097] The processing object is a workpiece to be processed, which provides a processing area for the processing implemented by the CNC machine. For example, laser engraving and / or laser cutting and other processing processes will be implemented in the processing area provided by the processing object. It should be clear that the processing object includes but is not limited to metal materials and wooden materials.
[0098] It can be understood that the area to be processed provided by the processing object can be a plane or a curved surface.
[0099] In step S110, the measuring point is used to calibrate the area to be processed on the processing object. In other words, the measuring point is related to the area to be processed on the processing object. Therefore, the measuring point can be located at any position that is suitable for the area to be processed, and is not limited here. In the execution of step S110, it is only necessary to determine the measuring point that is suitable for the area to be processed of the processing object, and then obtain its spatial position. The spatial position of the measuring point refers to the spatial position of the measuring point. The measurement of the processing process is achieved by obtaining the measuring points related to the processing object, and then the accurate processing of the processing object is achieved through accurate measurement.
[0100] The acquisition of the relevant measurement points of the processing object includes the execution process on the processing object and the execution process on the supporting surface of the processing object. That is, according to the different processing operations to be performed, the measurement points acquired for the processing object are located on the processing object and / or on the supporting surface of the processing object.
[0101] During the processing of the processing object, the spatial position of the measuring point on the processing object or the supporting surface of the processing object is obtained, and the spatial position of the obtained measuring point is obtained to clarify the spatial position of the area to be processed of the processing object, providing data support for the CNC machine to perform processing operations on the processing object.
[0102] In different embodiments, different execution processes may be implemented to obtain the spatial position of the measuring point of the processing object. Exemplarily, the process of obtaining the spatial position of the measuring point will be described in the following three implementations.
[0103] In some embodiments: the measuring points are detected one by one by a configured positioning device to obtain the spatial position of the measuring point, that is, the spatial position of the measuring point. In this application, the spatial position of the measuring point and the spatial position are not distinguished.
[0104] See also Figure 2 , Figure 2 A flowchart of obtaining the spatial position of a measurement point of a processing object according to an embodiment of the present application. The step S110 of obtaining the spatial position of a measurement point of a processing object provided in the embodiment of the present application includes:
[0105] Step S111b, obtaining the two-dimensional position of the limit point;
[0106] Step S112b, detecting the height distribution of the area where the measuring point is located at the limit point, and obtaining the spatial position corresponding to the area where the measuring point is located.
[0107] The above two steps are described in detail below.
[0108] In step S111b, when processing the processing object, first select a limit point on the processing object, and the limit point is used to indicate the area where the measurement point is located. The area where the measurement point is located is the area to be measured for the processing to be performed on the processing object. The purpose of obtaining the spatial position of the area where the measurement point is located is to provide processing data when processing the processing object, clarify the processing path of the processing object, and realize accurate processing of the processing object.
[0109] It should be clear that the edge of the area where the measuring point is located can be on the processing object or on the plane carrying the processing object, which is not limited here.
[0110] A positioning device is configured in the CNC machine, and the positioning device includes but is not limited to a position sensor for obtaining the two-dimensional position of the limit point. It should be supplemented that the two-dimensional position of the limit point describes the position of the limit point mapped relative to a horizontal plane, such as a horizontal plane carrying a processing object. Exemplarily, it can be represented by the two-dimensional coordinates mapped by the limit point.
[0111] In one embodiment of the present application, the two-dimensional position of the limit point is obtained by a positioning device configured by a CNC machine. For example, the position sensor configured by the CNC machine can be driven to move to the limit point, and the position sensor feeds back the two-dimensional coordinates in the CNC machine coordinate system in real time, so that the two-dimensional position of the limit point can be obtained.
[0112] The limit point is used to indicate the area where the measuring point is located. For example, with a limit point as the center and a preset distance as the radius, the circular area obtained is the area where the measuring point is located; or with the limit point as the intersection of the diagonals, a rectangle with a preset side length is the area where the measuring point is located; or with the line connecting the two limit points as the diagonal to obtain a rectangle, which is the area where the measuring point is located; or with the line connecting the two limit points as one side of the square, the square is the area where the measuring point is located; or with the line connecting the two limit points as the diameter of a circular area, the circular area is the area where the measuring point is located. According to processing requirements, the area where the measuring point is located can be limited according to different numbers of limit points.
[0113] In another embodiment of the present application, in order to obtain the two-dimensional position of the limit point, the CNC machine deploys at least one light source and / or detector, and the light spot formed by the light beam emitted by the light source can be used to locate the limit point in the present application. Exemplarily, the light spot is moved to the limit point, and the two-dimensional position of the light spot is the two-dimensional position of the limit point. In addition, the light source can also be used for processing. Based on this, the light source used to emit the light spot in the present application includes a laser emitting light source (processing light source) and a visible light emitting light source, both of which can be used to locate the limit point.
[0114] To further illustrate, in an embodiment of the present application, for a CNC machine, a visible light emitting light source and a detector may be disposed on a movable head of the CNC machine. For example, the movable head may be a laser head and / or a tool head for cutting, etc.
[0115] In other words, the light source of the CNC machine will be used to locate the limit point, and laser processing can also be performed on this basis. The movable head is provided with a laser emitting light source, a combination of a laser emitting light source and a visible light emitting light source, a combination of a laser emitting light source and a detector, a combination of a visible light emitting light source and a detector, and any combination of a laser emitting light source, a detector and a visible light emitting light source.
[0116] In the case where the laser head is only provided with a laser emitting light source, the positioning limit point and laser processing are performed by the laser emitting light source; when the laser head is provided with a combination of a laser emitting light source and a visible light emitting light source, the positioning limit point can be performed by the laser emitting light source or the visible light emitting light source, and then the laser processing is performed by the laser emitting light source. When the laser head is provided with a combination of a laser emitting light source and a detector, the positioning limit point can be performed by the detector or the laser emitting light source, and then the laser processing is performed by the laser emitting light source. When the laser head is provided with a combination of a laser emitting light source, a detector and a visible light emitting light source, the positioning limit point can be performed by the detector, the visible light emitting light source or the laser emitting light source, and then the laser processing is performed by the laser emitting light source.
[0117] In the process of realizing the positioning of the limit point through the light spot, the light source is first driven to emit a light beam so that the light beam is irradiated on the plane of the processing object or the plane carrying the processing object to form a light spot. The light spot is used to mark the position where the light beam emitted by the current light source is irradiated, and the limit point is positioned based on this position.
[0118] The light source emits a light beam to the processing object or the plane carrying the processing object to form a light spot. When the light source and the light spot may not be on the same vertical line, the two-dimensional position of the light source is consistent with the two-dimensional position of the light spot. However, since the light source and the light spot may not be on the same vertical line, the two-dimensional position of the light source may not be the position of the light spot. In view of the above situation, the relative position relationship between the light source and the light spot is obtained in advance. In other words, as long as the two-dimensional position of the light source is known, the position of the light spot can be obtained based on the relative position relationship between the light source and the light spot. The position of the light spot and the two-dimensional position of the light source are used to record the positions of the light source and the light spot in the coordinate system of the CNC machine.
[0119] It should be clear that different models of CNC machines have different options for locating the limit point. As mentioned above, the limit point can be located by moving the light spot, or by the position where the end of the movable detector is close to.
[0120] Specifically, on one hand, for the positioning of the limit point, first, the light source is driven to move so that the light source emits a light beam to illuminate the limit point, forming a light spot at the limit point; then the two-dimensional position of the limit is determined according to the position of the light spot. The limit point refers to a point selected on the processing object or on the plane carrying the processing object. In one embodiment of the present application, the point selected on the horizontal plane carrying the processing object refers to a limit point selected near the processing object to indicate the measurement area on the surface of the processing object.
[0121] On the other hand, the detector is driven to move up and down so that the end of the detector is close to the processing object below or the plane where the processing object is located to mark the two-dimensional position of the detector; then the detector is continued to be moved so that the detector coincides with the limit point; finally, the two-dimensional position of the detector at this time is obtained, which is the position of the limit point. It should be clarified that the two-dimensional position of the detector is used to record the position of the detector in the coordinate system where the processing object is located. That is, the location of the detector, light source and light spot indicates their position on the coordinate system of the CNC machine.
[0122] It should be clear that the term "laser emitting light source" as used herein includes any electromagnetic radiation or focused or coherent energy source, that is, it can emit electromagnetic energy, which uses photons to modify the substrate or cause some changes or changes in the material hit by the photons. The laser emitting light source (whether a cutting tool or a diagnostic tool) can emit any desired wavelength, and laser emission includes, for example, microwaves, lasers, infrared lasers, visible light lasers, UV lasers, X-ray lasers, X-ray lasers, etc.
[0123] It should be further clarified that in another embodiment of the present application, for the movement of the light source or the detector, the light source or the detector can be controlled to move to a specified position according to the instruction information so that the light spot or the end of the detector is located at a limit point.
[0124] In addition, the light source or detector can also be moved under the dragging of the user, which is not limited here. The instruction information is generated by the operation action initiated by the user on the control panel of the CNC machine or the host computer constituted by the terminal device.
[0125] See also Figure 3 , Figure 3 A flow chart of obtaining the two-dimensional position of a limit point by the two-dimensional position corresponding to a light spot or a probe according to an embodiment of the present application is shown. The embodiment of the present application provides steps of obtaining the two-dimensional position of a limit point by the two-dimensional position corresponding to a light spot or a probe, including:
[0126] Step S310b, when the light source or the detector is driven to move toward the limit point, the moving distance is extracted to obtain the moving distance;
[0127] Step S320b, according to the moving distance, the two-dimensional position corresponding to the light spot or the detector is obtained as the two-dimensional position of the limit point.
[0128] The above two steps are described in detail below.
[0129] In step S310b, to obtain the two-dimensional position of the light source or detector, the moving distance of the light source or detector is calculated with the origin of the coordinate system as the starting point, and the moving distance of the light source or detector on each axis of the CNC machine coordinate system is obtained according to the movement of the light source or detector, and then the two-dimensional position of the light source or detector is obtained from the moving distance on each axis.
[0130] It should be made clear that in one embodiment of the present application, in order to prevent the two-dimensional position of the light source or detector from being unclear or inaccurate due to the inability to accurately obtain the moving distance of the light source or detector, the light source or detector should be homed first. After the homed is completed, the moving distance of the light source or detector is calculated starting from the origin of the CNC machine coordinate system, so that the two-dimensional position of the light source or detector becomes accurate, ensuring the accuracy of the two-dimensional position of the light source or detector obtained subsequently.
[0131] To home the light source or detector is to move the light source or detector to the origin of the CNC machine coordinate system. Specifically, the light source or detector can be homed according to the instruction information and moved to the origin of the CNC machine coordinate system; or the user can directly hold the light source or detector and drag it to home the light source or detector to the origin of the CNC machine coordinate system.
[0132] It is further clarified that in another embodiment of the present application, when the two-dimensional position of the light source can be determined accurately, it is not necessary to home the light source, and the moving distance is directly obtained as the two-dimensional position of the light source as the light source moves. The two-dimensional position of the light source is calculated based on the moving distance of the light source relative to the origin of the coordinate system of the CNC machine. As long as there are no external factors that cause the movement of the light source to be unrecorded, there is no need to home the light source.
[0133] In one embodiment of the present application, the numerical control machine synchronously displays a cursor corresponding to the two-dimensional position of the light spot or the detector on a display device in real time according to the moving distance of the light source or the detector.
[0134] In step S320b, after obtaining the moving distance of the light source or the detector on each axis of the CNC machine coordinate system according to the movement of the light source or the detector, the two-dimensional position of the light source or the two-dimensional position of the detector is calculated based on the moving distance of the light source or the detector on each axis of the CNC machine coordinate system, and then the position of the light spot or the end of the detector is obtained based on the relative position relationship between the light source and the light spot, or the relative position relationship between the detector and the end of the detector, that is, the two-dimensional position of the limit point is obtained.
[0135] See also Figure 4 , Figure 4 According to an implementation of the present application, a flow chart of a spatial measurement method before obtaining the spatial position corresponding to the area where the measurement point is located. The present application embodiment provides a spatial measurement method before obtaining the spatial position corresponding to the area where the measurement point is located, including:
[0136] Step S410b, generating a measurement point array according to the two-dimensional position of the limit point;
[0137] Step S420b, obtaining the two-dimensional position of each measuring point in the measuring point matrix.
[0138] The above two steps are described in detail below.
[0139] In step S410b, the height distribution of the area where the measuring point is located can be obtained by setting a number of measuring points in the area where the measuring point is located to form a measuring point matrix, and then detecting each measuring point in the measuring point matrix to obtain the height of the measuring point to obtain the height distribution of the area where the measuring point is located.
[0140] The measurement point matrix is generated based on the two-dimensional position of the limit point. The two-dimensional position of the limit point provides a reference for the generation of the measurement point matrix. For example, when the number of limit points is 1, the upper left vertex of the rectangular measurement point matrix is overlapped with the limit point, thereby generating the measurement point matrix. Of course, the measurement point that overlaps with the limit point can not only be the vertex of the rectangular measurement point matrix, but also any other measurement point.
[0141] It should be further explained that the two-dimensional position of the limit is only to provide a position reference for the generation of the measurement point matrix, and the limit point may not coincide with the measurement point. The measurement point matrix can be rectangular, circular, or other situations, which are not limited here.
[0142] In step S420b, because the measurement point matrix is generated based on the two-dimensional position of the limit point, there is a corresponding relationship between the measurement point matrix and the limit point. The two-dimensional position of the measurement point in the measurement point matrix can be calculated based on the two-dimensional position of the limit point through the corresponding relationship, such as the measurement point in the measurement point matrix coincides with the limit point.
[0143] The distance between each row and column in the measurement dot matrix is, for example, that the distance between the rows and columns of the measurement dot matrix remains unchanged. Alternatively, the distance between each row and the distance between each column in the measurement dot matrix remain consistent. The distance between each row in the measurement dot matrix may also remain consistent, and the distance between each column may also remain consistent, but the distance between each row and the distance between each column may not be consistent. At this time, based on the corresponding relationship between the measurement dot matrix and the limit point, the two-dimensional position of each measurement point in the measurement dot matrix can be obtained.
[0144] Exemplarily, when there is one limit point, the upper left vertex of the rectangular measurement dot matrix is overlapped with the limit point, that is, the upper left vertex of the rectangular measurement dot matrix is overlapped with the limit point, and then the two-dimensional position of each measurement point in the rectangular measurement dot matrix is obtained based on the two-dimensional position of the upper left corner measurement point of the rectangular measurement dot matrix and the spacing distance relationship between each row and column in the rectangular measurement dot matrix.
[0145] See also Figure 5 , Figure 5 A flow chart of generating a measurement dot matrix according to the two-dimensional position of the limit points according to an embodiment of the present application is shown. The limit points are distributed on the same straight line. In this embodiment, the limit points are distributed on the same straight line. The embodiment of the present application provides a step S410b of generating a measurement dot matrix according to the two-dimensional position of the limit points, including:
[0146] Step S411b, taking the connecting line between the limiting points as the diagonal line, and forming a limiting area by the rectangle where the diagonal line is located;
[0147] Step S412b: generating a measurement point array for the limited area.
[0148] The above two steps are described in detail below.
[0149] In step S411b, when the limit points are on a straight line, all limit points are connected to obtain a line segment. A rectangle is obtained with the line segment as a diagonal line, and the limited area is used to provide a reference for the generation position of the measurement point. It should be clear that two limit points can be arbitrarily selected according to processing needs, and a rectangle is obtained with the line connecting the two limit points as a diagonal line, which is the limited area.
[0150] In step S412b, after the limited area is determined, a measurement point array is generated for the limited area. It should be clear that the range of the measurement point array is not necessarily less than or equal to the limited area, but can also be larger than the limited area. In addition, the distribution density of the measurement points can be adjusted according to the accuracy requirements of the height distribution of the area where the measurement points are located.
[0151] According to the number of rows and columns of the measuring point matrix and the corresponding relationship between the limit points and the measuring point matrix, the two-dimensional position of each measuring point in the measuring point matrix is calculated.
[0152] See also Figure 6 , Figure 6 According to an embodiment of the present application, a flowchart of calculating and obtaining the two-dimensional position of each measurement point in the measurement lattice according to the two-dimensional position of the limit point and the number of rows and columns of the measurement lattice is provided. The embodiment of the present application provides a step of calculating and obtaining the two-dimensional position of each measurement point in the measurement lattice according to the two-dimensional position of the limit point and the number of rows and columns of the measurement lattice, including:
[0153] Step S501b, obtaining the two-dimensional position of the measurement point that coincides with the limit point according to the two-dimensional position of the limit point;
[0154] Step S502b: Calculate the two-dimensional position of each measuring point according to the obtained two-dimensional position of the measuring point and the spacing distances between rows and columns of the measuring point array.
[0155] The two steps are described in detail below.
[0156] In step S501b, a point in the measurement point matrix coincides with the limit point, that is, a measurement point in the measurement point matrix coincides with the limit point, and the two-dimensional position of the measurement point coincident with the limit point is obtained according to the two-dimensional position of the limit point.
[0157] In step S502b, according to the number of rows and columns of the measurement dot matrix, there is a preset spacing distance between rows and columns, that is, the spacing distance between rows and columns in the measurement dot matrix has a fixed value. For example, for a 3x3 measurement dot matrix, the spacing distance between each measurement point, that is, between rows and columns, is always 3 cm. For a 5x5 measurement dot matrix, the spacing distance between each row is always 2 cm, and the spacing between each column is 2.5 cm, or, no matter how many rows and columns the measurement dot matrix has, the spacing distance between the measurement dot matrix is the same.
[0158] According to the two-dimensional position of the measuring point that coincides with the limit point and the spacing distance between the rows and columns of the measuring point matrix, the two-dimensional position of the measuring point adjacent to the measuring point is calculated; finally, according to the measuring point with known two-dimensional position, the two-dimensional position of the remaining measuring points is calculated.
[0159] See also Figure 7 , Figure 7 According to an embodiment of the application, a flowchart of calculating and obtaining the two-dimensional position of each measurement point in the measurement lattice according to the two-dimensional position of the limit point and the number of rows and columns of the measurement lattice. The embodiment of the application provides a step of calculating and obtaining the two-dimensional position of each measurement point in the measurement lattice according to the two-dimensional position of the limit point and the number of rows and columns of the measurement lattice, and also includes:
[0160] Step S601b, using the two-dimensional position of the limit point, obtain the two-dimensional position of the measurement point that coincides with the limit point;
[0161] Step S602b, calculating and obtaining the two-dimensional position of each measuring point according to the two-dimensional position of the measuring point that coincides with the limit point and the number of rows and columns of the measuring point array.
[0162] In step S601b, two measuring points in the measuring point matrix overlap with the limit point, that is, two measuring points in the measuring point matrix overlap with the limit point, and the two-dimensional position of the measuring point that overlaps with the limit point is obtained according to the two-dimensional position of the limit point. In order to make two measuring points in the measuring point matrix overlap with the limit point, the measuring point matrix can be stretched, that is, the spacing distance between each row and / or each column of the measuring point matrix is changed.
[0163] In step S602b, the spacing between each row of the measurement point matrix is equal, the spacing between each column is the same, and a rectangular area is formed with the line connecting the two limit points as the diagonal line. According to the number of rows and columns of the measurement points in the rectangular area, the spacing between each row of the measurement point matrix and the spacing between each column are obtained, and then according to the two-dimensional position of the measurement point that coincides with the limit point, the two-dimensional position of each measurement point in the measurement point matrix is obtained.
[0164] Exemplarily, the two-dimensional positions of the limit points are (a, b) and (x, y) (a>x, b>y), respectively. The line connecting the two limit points is used as the diagonal line, and the rectangular area formed contains 3 rows and 2 columns of measurement points (excluding the measurement points that coincide with the edge of the rectangular area). The distance between rows and columns in the measurement point matrix is calculated to be , and the distance between columns is calculated to be . According to the two-dimensional position of the measurement point that coincides with the limit point, the two-dimensional position of the adjacent measurement point is calculated, and the two-dimensional position of the remaining measurement points is calculated in turn. For example, for the measurement point (a, b), the two-dimensional position of the adjacent measurement point on its right is , and the two-dimensional positions of all measurement points can be obtained by analogy.
[0165] In step S112b, the detector configured by the CNC machine is started to detect the area where the measuring point is located at least once to obtain the height distribution of the area where the measuring point is located. It should be clear that when the area to be measured by the CNC machine is small enough, the area where the measuring point is located can also be just a point, such as the position of the limit point is the area where the measuring point is located.
[0166] According to the two-dimensional position of the limit point, the two-dimensional position of the measuring point can be obtained, and then the detector is driven to detect the height distribution of the area where the measuring point is located. The height distribution of the area where the measuring point is located is marked by the height of a set number of points in the area where the measuring point is located. The height of each part of the area where the measuring point is located; finally, combined with the two-dimensional position of a set number of measuring points in the area where the measuring point is located, the spatial position of the area where the measuring point is located can be obtained, providing data support for subsequent processing by CNC machines, so that the CNC machine can perform high-precision processing on the area to be processed in the area where the measuring point is located.
[0167] There are two main ways to detect measurement points using a detector: one is contact detection, such as a probe sensor, and the other is non-contact detection, such as infrared ranging, ultrasonic ranging, etc.
[0168] See also Figure 8 , Figure 8 According to an implementation of the present application, the limit point detects the height distribution of the area where the measuring point is located, and obtains the flow chart of the spatial position corresponding to the area where the measuring point is located. The embodiment of the present application provides a step S112b of detecting the height distribution of the area where the measuring point is located by the limit point, and obtaining the spatial position corresponding to the area where the measuring point is located, including:
[0169] Step S1121b, driving the detector to move to the measuring point according to the two-dimensional position of the measuring point, and detecting to obtain the height of the measuring point;
[0170] Step S1122b, until the height detection of all measuring points in the measuring point array is completed, the height distribution of the area where the measuring points are located is obtained in combination with the two-dimensional positions of the measuring points.
[0171] The above two steps are described in detail below.
[0172] In step S1121b, according to the two-dimensional position of the measuring point, the detector is driven to move so that the end of the detector is placed above the measuring point, and the height of the measuring point is measured. Exemplarily, in one embodiment of the present application, the height of the detector at the top is recorded, and then the detector is moved in the vertical direction, with the detector at the top as the starting point of the movement and the end point when the end of the detector contacts the measuring point as the end point. The height of the measuring point can be obtained based on the moving distance from the starting point to the end point and the height of the detector at the top.
[0173] In step S1122b, the method described in step S221 is used to detect all the measuring points in the measuring point array to obtain the height of the measuring points, and then the two-dimensional positions of each measuring point are combined to obtain the height distribution of the area where the measuring points are located.
[0174] See also Fig. 9 , Fig. 9 According to an implementation of the present application, a flow chart of driving a detector to move to a measurement point according to a two-dimensional position of a measurement point, and detecting and obtaining a height of the measurement point by the detector moved to the measurement point. The embodiment of the present application provides a step of driving a detector to move to a measurement point according to a two-dimensional position of a measurement point, and detecting and obtaining a height of the measurement point is S1121b, including:
[0175] Step S701b, returning the detector to the detection starting point;
[0176] Step S702b, moving the detector to the measurement point according to the two-dimensional position of the measurement point;
[0177] Step S703b, driving the detector to descend until the detector contacts the measuring point, and obtaining the detector descending distance;
[0178] Step S704b, obtaining the height of the measuring point according to the lowering distance of the detector.
[0179] The above four steps are described in detail below.
[0180] In step S701b, the detector is driven to move up and down, and the detector is returned to the detection starting point of a known height. The detector height refers to the height of the detector relative to the plane where the processing object is located.
[0181] In step S702b, the detector is driven to move according to the two-dimensional position of each measuring point, so that the detector moves above the measuring point, so that the detector can detect the measuring point.
[0182] In step S703b, the detector located above the measuring point is driven to detect downward until the detector contacts the measuring point, and the lowering distance of the detector is obtained.
[0183] In step S704b, the height of the detector when the detector contacts the measuring point, ie, the height of the measuring point, is calculated based on the lowering distance of the detector and the height of the detection starting point.
[0184] In step S120, a mapping relationship between the measuring points is established according to the measuring points and the spatial positions of the measuring points acquired in step S110. The mapping relationship is used to describe the spatial distribution of the measuring points and the positional relationship between them.
[0185] For ease of understanding, the mapping relationship between measurement points can be represented as a spatial model style. The mapping relationship between measurement points is materialized through the spatial model.
[0186] For example, when there is only one measuring point and the plane where the measuring point is located is horizontal, according to the measured spatial position, with the measuring point as the center of the diagonal, a rectangle is selected according to the processing requirements to establish a plane space model to adapt the target processing graphics to obtain processing parameters. In addition, when there are multiple measuring points, the measuring points are fitted with lines respectively, and the surface fitting between the measuring points is achieved based on the fitting of the lines between the measuring points. In this way, the spatial model is constructed.
[0187] In other words, the spatial model is a numerical description of the area where the measurement points are located for the processing object. For the processing performed by the CNC machine, the generated spatial model is used to perform processing alignment for the processing site of the CNC machine on the one hand, and on the other hand, it can also provide processing preview services.
[0188] See also Fig.10 , Fig.10 A flowchart of constructing a mapping relationship between measurement points according to the spatial positions of the measurement points in one embodiment of the present application is shown. The mapping relationship is characterized as a spatial model. The embodiment of the present application provides a step S120 of constructing a mapping relationship between measurement points according to the spatial positions of the measurement points, including:
[0189] Step S121, performing piecewise fitting according to the spatial positions corresponding to the measurement points, to obtain a number of fitting lines;
[0190] Step S122, performing smoothing processing between adjacent fitting lines to obtain a spatial model.
[0191] The above two steps are described in detail below.
[0192] In step S121, for discretely distributed measurement points, piecewise fitting is performed according to the spatial positions of the corresponding measurement points to obtain a number of fitting lines;
[0193] In step S122, the spatial model is generated by the least squares method MLS (Moving Lest Squares), and then the segmented fitting and smoothing processing is performed for a single measurement point or discretely distributed measurement points to obtain the spatial model. The least squares method fitting line mentioned here refers to fitting a line that best fits the processing object between each adjacent measurement point in the longitudinal or transverse direction. The least squares method calculates the line function parameters with the smallest error between the data points based on the coordinates of each measurement point, and uses the line function parameters to achieve the best effect of line fitting. After the line is fitted, the least squares method is used again to fit the line through the corresponding points on the two parallel lines, thereby forming countless fitting lines between the two parallel lines, thereby realizing the establishment of the spatial model. It should be clear that lines include but are not limited to curves and straight lines.
[0194] In step S130, the spatial model is a numerical description of the area where the measurement points provided by the processing object are located. For the processing performed by the CNC machine, the generated spatial model is used to perform processing alignment for the processing site on the one hand, and can also provide processing preview services on the other hand. This will be used to process the processing object.
[0195] See also Fig.11 , Fig.11 The flowchart of one embodiment of the present application is shown, which performs processing of the target processing graphic on the processing object according to the target processing graphic adaptation mapping relationship. The embodiment of the present application provides a step S130 of performing processing of the target processing graphic on the processing object according to the target processing graphic adaptation mapping relationship, including:
[0196] Step S131, performing processing alignment on the pattern adaptation mapping relationship of the target processing graphic mapping to obtain pattern transformation data of the target processing graphic adaptation mapping relationship;
[0197] Step S132, processing the pattern mapped by the target processing graphic onto the processing object according to the pattern transformation data.
[0198] The above two steps are described in detail below.
[0199] In step S131, the target processing graphics are screenshots of the CNC machine from the library of the host computer, user input, audio-visual files, etc. The target processing graphics are used to provide a processing pattern for the current processing to be performed, that is, the pattern mapped by the target processing graphics. The target processing graphics include but are not limited to fonts, lines, patterns, etc.
[0200] In other words, the processing performed in the present application is to process the pattern mapped by the target processing graphic on the processing object. The pattern mapped by the target processing graphic is adapted to the area where the measuring point is located, so that the pattern is processed at a specific position of the processing object.
[0201] It should be understood that the position of the pattern processed on the processing object and its placement at this position can be specified, and the size of the processed pattern is also adapted to the specified placement position. Therefore, the pattern can be rotated, translated and scaled according to the specified configuration, and the processing surface of the curved surface processing object can also be adapted to the corresponding ups and downs deformation.
[0202] By performing pattern alignment on the spatial model, the pattern mapped by the target processing graphic is transformed, thereby obtaining pattern transformation data, which numerically characterizes and describes the processed pattern.
[0203] See also Fig.12 , Fig.12 The flowchart of one embodiment of the present application is shown, which processes and aligns the pattern adaptation mapping relationship of the target processing graphic mapping, and obtains the pattern transformation data of the target processing graphic adaptation mapping relationship. The embodiment of the present application provides a step S131 of processing and aligning the pattern adaptation mapping relationship of the target processing graphic mapping, and obtaining the pattern transformation data of the target processing graphic adaptation mapping relationship, including:
[0204] Step S1311, obtaining a target processing graph;
[0205] Step S1312, performing alignment and deformation of the pattern according to the mapping relationship to obtain pattern transformation data of the target processed graphic.
[0206] As mentioned above, the target processing graphics can be imported by the host computer for the processing performed by the CNC machine, and the target processing graphics can be a bitmap or a vector map. The target processing graphics imported by the host computer are subjected to pattern extraction to obtain the pattern processed on the processing object.
[0207] Pattern alignment refers to the rotation, translation and scaling of the pattern on the spatial model so that the pattern is placed at the specified position on the processing object.
[0208] In step S132, processing parameters are obtained for adapting the processing object to the processing site. The obtained processing parameters include parameters such as power and laser head movement speed, which are used to configure the power of the laser emitted by the light source and the movement speed of the light source for the processing performed by the CNC machine. Exemplarily, the processing parameters can be transmitted from the host computer to the CNC machine for use by the CNC machine.
[0209] The processing process of the pattern mapped by the target processing graphic on the processing object is executed under the control of the processing parameters and the pattern transformation data.
[0210] See also Fig.13 , Fig.13 A flowchart of processing a pattern mapped by the target processing graphic onto the processing object according to pattern transformation data in one embodiment of the present application is shown. The present application embodiment provides a step S132 of processing a pattern mapped by the target processing graphic onto the processing object according to pattern transformation data, including:
[0211] Step S1321, obtaining processing parameters executed on the processing object;
[0212] Step S1322, processing the processing object according to the processing parameters and the pattern transformation data to obtain the processing object including the target processing pattern.
[0213] The acquired processing parameters are adapted to the material of the processing object and the processing process, and then used by the CNC machine to realize processing and motion control.
[0214] The CNC machine will drive the light source to move according to the processing parameters, process the pattern onto the processing object, and then obtain the processing object with the pattern processed.
[0215] See also Fig.14 , Fig.14 A flowchart of a processing method according to an embodiment of the present application is shown. The steps of the processing method provided in the embodiment of the present application include:
[0216] Step S801, rendering the spatial model to the captured image of the processing object, and obtaining the loading of the mesh surface corresponding to the spatial model in the captured image;
[0217] Step S802, rendering the pattern mapped by the target processing graphic to the mesh surface according to the pattern transformation data to obtain a preview graphic, wherein the preview graphic is used to preview the processing to be performed on the processing object.
[0218] Under the effect of the generated spatial model and the pattern transformation data obtained by adapting the spatial model, a preview of the processing of the processing object is performed to ensure the processing effect, so that the processing performed by the user using the CNC machine is a what-you-see-is-what-you-get processing process.
[0219] The spatial model generated by rendering is exemplarily rendered by an OpenGL rendering engine, so as to obtain the loading and display of the corresponding mesh surface.
[0220] In one embodiment of the present application, for a curved surface processing object, refer to Fig.15 , Fig.16 , Fig.15 , Fig.16 A schematic diagram of surface generation of a curved surface machining object according to an embodiment of the present application is shown. Fig.15 In the surface generation stage of the surface machining object, the measuring point matrix composed of the measuring points is subjected to the piecewise fitting based on the measured data using the moving least squares method MLS, and the spatial positions of the measuring points are used to obtain several fitting curves, and then smoothing is performed between adjacent fitting curves, such as Fig.16 To obtain the surface model of the curved surface processing object, the surface model of the processing object and the high-definition photo of the processing object are rendered by an OpenGL rendering engine to generate the surface model of the curved surface processing object.
[0221] See also Fig.17 , Fig.18 , Fig.17 , Fig.18 The schematic diagram of the process of adapting the pattern mapped by the target processing pattern to the surface model for processing alignment according to one embodiment of the present application is shown. After the surface model of the surface processing object is formed, the pattern mapped by the target processing pattern is adapted to the already formed surface model for processing alignment. During the alignment process, the pattern mapped by the engraving object can be rotated, translated, and scaled, and the bitmap data is deformed according to the surface, so as to obtain the following Fig.15 The target processing figure is shown as a pattern on the surface model.
[0222] In one embodiment of the present application, the CNC machine includes a movable head, at least a portion of a processing object is located in a processing space of the CNC machine, and the movable head can transmit electromagnetic energy to the processing space to process the processing object.
[0223] In another embodiment of the present application, the step of adapting the spatial model according to the target processing pattern and executing the processing of the target processing pattern on the processing object includes:
[0224] Generate a machining motion plan of the movable head based on the mapping relationship;
[0225] generating a preview image including an expected manufacturing target processing pattern on a processing object;
[0226] The CNC machine transmits electromagnetic energy to the object to be processed based on the processing motion plan to achieve the change of the material of the object to be processed. The material change includes engraving, cutting, creasing, and printing with raw materials.
[0227] The CNC machine includes a shell, the processing space is at least partially formed by the shell, the movable head is arranged in the shell, and the shell includes an openable blocking member, which can weaken the transmission of electromagnetic energy between the processing space and the outside of the CNC machine, reducing the damage to the user caused by electromagnetic energy such as laser overflowing from the shell.
[0228] The numerically controlled machine includes at least one camera disposed in a processing space and capable of capturing an image including at least a portion of a processing object.
[0229] Fig.19 FIG. 1 shows a hardware schematic diagram of a numerical control machine according to an embodiment of the present application. Fig.19 As shown, the CNC machine 100 includes a housing, a laser head 50, a laser tube 30, and a close-up camera. The housing includes an upper shell 90 and a bottom shell 70. The close-up camera is arranged on the laser head 50. The CNC machine 100 integrates a camera, including but not limited to a panoramic camera for shooting a panoramic processing screen, and the aforementioned close-up camera, and the movable close-up camera will perform movement and shooting.
[0230] A reflector 10 is disposed between the laser head 50 and the laser tube 30 . The laser generated by the laser tube 30 is reflected by the reflector 10 to the laser head 50 , and then is reflected, focused, etc. and emitted to process a workpiece.
[0231] The housing of the numerical control machine 100 is as follows Fig.12 The upper shell 90 and the bottom shell 70 shown together enclose an internal space that can accommodate the processing object. In order to implement laser processing, a laser head 50, a laser tube 30, and a close-up camera are arranged in the internal space. The laser head 50 and the close-up camera slide through a configured track device.
[0232] The upper shell 90 is also provided with a rotatable cover plate, and the operator can open or close the cover plate to open the internal space to put in or take out the workpiece.
[0233] The blocking and / or filtering effects of the upper shell 90 and the bottom shell 70 can prevent the laser emitted by the laser head 50 from overflowing during operation and causing personal injury to the operator.
[0234] For example, a track device may be provided in the internal space, and the laser head 50 may be installed on the track device. The track device may be an X-axis and a Y-axis guide rail, and the X-axis and the Y-axis guide rail may be a linear guide rail, or a guide rail in which an optical axis and a roller slide together, etc. It is sufficient to be able to drive the laser head 50 to move and process on the X-axis and the Y-axis. A Z-axis moving track may also be provided in the laser head 50, which is used to move and focus and process on the Z-axis direction before and / or during processing.
[0235] The processing object can be placed at the bottom of the internal space. The user can open the cover 10 to put the processing object in and then close it, and can also open the cover 10 to take out the processing object.
[0236] The obtained spatial position can be used to determine the area where the measurement point is located, and then a spatial model is generated based on this.
[0237] The processing device of the embodiment of the present application mainly includes the following modules:
[0238] An acquisition module 910 is used to construct a mapping relationship between measurement points according to the spatial positions of the measurement points;
[0239] A construction module 920, configured to adapt the mapping relationship according to a target processing pattern and execute processing of the target processing pattern on a processing object;
[0240] The adaptation module 930 is used to adapt the mapping relationship according to the target processing pattern and execute the processing of the target processing pattern on the processing object.
[0241] The processing method according to the embodiment of the present application can be Fig. 20 The following is a reference to the CNC machine. Fig. 20 To describe a numerical control machine according to an embodiment of the present application. Fig. 20 The CNC machine shown is merely an example and should not bring any limitation to the functions and scope of application of the embodiments of the present application.
[0242] like Fig. 20 As shown, the CNC machine may be in the form of a general-purpose computing device. The components of the CNC machine may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).
[0243] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 810 can perform the following steps: Figure 1 The steps shown in .
[0244] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0245] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0246] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0247] The CNC machine may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the CNC machine, and / or any device that enables the CNC machine to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the CNC machine may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the CNC machine, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0248] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0249] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the above method embodiment.
[0250] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0251] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, visible light, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0252] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0253] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0254] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0255] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0256] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0257] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0258] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions applied for herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that the present application does not apply for. The specification and embodiments are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. A processing method for a numerical control machine, characterized in that: The method comprises: Obtaining a two-dimensional position of a limit point, wherein the limit point indicates an area where a measurement point is located; Detecting the height distribution of the area where the measuring point is located at the limit point to obtain the spatial position corresponding to the area where the measuring point is located; Constructing a mapping relationship between measurement points according to the spatial positions of the measurement points; The mapping relationship is adapted according to the target processing pattern, and processing of the target processing pattern on the processing object is performed.
2. The method according to claim 1, characterized in that The obtaining of the two-dimensional position of the limit point comprises: The two-dimensional position of the limit point is obtained through the two-dimensional position corresponding to the light spot or the detector.
3. The method according to claim 2, characterized in that The step of obtaining the two-dimensional position of the limit point by using the two-dimensional position corresponding to the light spot or the detector includes: When the light source or the detector is driven to move toward the limit point, the moving distance is extracted to obtain the moving distance; According to the moving distance, the two-dimensional position corresponding to the light spot or the detector is obtained as the two-dimensional position of the limit point.
4. The method according to claim 1, characterized in that Before detecting the height distribution of the area where the measuring point is located at the limit point to obtain the spatial position corresponding to the area where the measuring point is located, the method further includes: generating a measurement point matrix according to the two-dimensional positions of the limit points; The two-dimensional position of each measuring point in the measuring point matrix is obtained, and the measuring point is used for height detection to obtain the height distribution of the area where the measuring point is located.
5. The method according to claim 4, characterized in that The limiting points are distributed on the same straight line, and the generating of the measurement point array according to the two-dimensional positions of the limiting points includes: The connecting line between the limiting points is taken as a diagonal line, and the rectangle where the diagonal line is located forms a limiting area; A measurement point array is generated for the defined area.
6. The method according to claim 4, characterized in that The step of obtaining the two-dimensional position of each measuring point in the measuring point matrix comprises: According to the two-dimensional position of the limit point and the number of rows and columns of the measurement point array, the two-dimensional position of each measurement point in the measurement point array is calculated and obtained.
7. The method according to claim 6, characterized in that The step of calculating and obtaining the two-dimensional position of each measuring point in the measuring point array according to the two-dimensional position of the limiting point and the number of rows and columns of the measuring point array comprises: According to the two-dimensional position of the limit point, the two-dimensional position of the measurement point that coincides with the limit point is obtained; The two-dimensional position of each measuring point is calculated based on the obtained two-dimensional position of the measuring point and the spacing distance between the rows and columns of the measuring point array.
8. According to claim 6, it is characterized in that The step of calculating and obtaining the two-dimensional position of each measuring point in the measuring point array according to the two-dimensional position of the limiting point and the number of rows and columns of the measuring point array comprises: Using the two-dimensional position of the limit point, the two-dimensional position of the measurement point that coincides with the limit point is obtained; The two-dimensional position of each measuring point is calculated and obtained according to the two-dimensional position of the measuring point that coincides with the limit point and the number of rows and columns of the measuring point array.
9. The method according to claim 1, characterized in that: The detecting the height distribution of the area where the measuring point is located at the limit point to obtain the spatial position corresponding to the area where the measuring point is located includes: According to the two-dimensional position of the measuring point, the detector is driven to move to the measuring point, and the height of the measuring point is detected; Until the height detection of all the measuring points in the measuring point array is completed, the height distribution of the area where the measuring points are located is obtained in combination with the two-dimensional positions of the measuring points.
10. The method according to claim 9, characterized in that The step of driving the detector to move to the measurement point according to the two-dimensional position of the measurement point and detecting and obtaining the height of the measurement point includes: Return the detector to the detection starting point; According to the two-dimensional position of the measuring point, the detector is moved to the measuring point; Drive the detector down until it contacts the measuring point, and obtain the detector lowering distance; The height of the measuring point is obtained according to the lowering distance of the detector.
11. The method according to claim 1, characterized in that: The mapping relationship is represented as a spatial model, and the mapping relationship between the measuring points is constructed according to the spatial positions of the measuring points, including: Perform segmented fitting according to the spatial positions corresponding to the measurement points to obtain a number of fitting lines; Smoothing is performed between adjacent fitting lines to obtain a spatial model.
12. The method according to claim 1, characterized in that The step of adapting the mapping relationship according to the target processing pattern and performing processing of the target processing pattern on the processing object includes: Adapting the pattern mapped by the target processing pattern to the mapping relationship for processing and alignment, and obtaining pattern transformation data of the target processing pattern adapted to the mapping relationship; The pattern mapped by the target processing graphic is processed onto the processing object according to the pattern transformation data.
13. The method according to claim 12, characterized in that The step of adapting the pattern mapped to the target processing graphic to the mapping relationship for processing and aligning, and obtaining pattern transformation data of the target processing graphic adapted to the mapping relationship, includes: Obtain target processing graphics; The alignment and deformation of the pattern are performed according to the mapping relationship to obtain pattern transformation data of the target processing figure. The step of processing the pattern mapped by the target processing graphic onto the processing object according to the pattern transformation data includes: Acquiring processing parameters executed on the processing object; The processing object is processed according to the processing parameters and the pattern transformation data to obtain a processing object including a target processing pattern.
14. The method according to claim 11, characterized in that The method further comprises: Rendering the spatial model to the captured image of the processing object to obtain the loading of the mesh surface corresponding to the spatial model in the captured image; The pattern mapped by the target processing graphic is rendered onto the mesh surface according to the pattern transformation data to obtain a preview graphic, wherein the preview graphic is used to preview the pattern engraving to be performed on the processing object.
15. The method according to claim 1, characterized in that The CNC machine comprises a movable head, at least a portion of the processing object is located in a processing space of the CNC machine, and the movable head is capable of transmitting electromagnetic energy to the processing space to process the processing object; The numerical control machine further comprises a housing, the processing space is at least partially formed by the housing, the movable head is arranged in the housing, the housing comprises an openable barrier, the barrier is capable of weakening the transmission of electromagnetic energy between the processing space and the exterior of the numerical control machine; The step of adapting the spatial model according to the target processing pattern and performing processing of the target processing pattern on the processing object includes: generating a machining motion plan of the movable head based on the mapping relationship; generating a preview image including the target processing pattern expected to be manufactured on the processing object; The numerical control machine transmits electromagnetic energy to a processing object based on the processing motion plan to achieve a change in the material of the processing object.
16. A numerically controlled machine, characterized in that: include: A housing, a detector, a light source, a track device for moving the detector and the light source, a memory, and a processor; An internal space is formed in the shell, the detector, the light source and the track device are arranged in the internal space, and the memory is used to store computer-readable instructions; The processor connected to the memory by electrical signals reads the computer readable instructions stored in the memory to execute the method of any one of claims 1-15.
17. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the spatial measurement method according to any one of claims 1 to 15.