A method for detecting defects of a 3D printed part based on machine vision

CN122966639APending Publication Date: 2026-10-23JIANG SU GE LAI BO SHU ZI KE JI YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611368265.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

因此,图像中各像素的形成时刻与受热次数互不相同,图像上相邻的像素未必由相邻的成型矢量形成,纹理主方向逐层改变;且正常成型必然产生道间沟槽、搭接凸脊、矢量端点堆积及分区缝合线等规则表观,其灰度与纹理特征同断道、搭接不足、球化等缺陷不可分

Benefits of technology

1、本发明将成型层图像投影至与参考轨迹同尺度、同朝向的坐标系,并依据层厚修正成像比例随成型高度产生的变化;利用条带间凹槽提取条带中心线,结合执行顺序、连接拓扑、轨迹连通性及不交叉性完成条带中心线与路径指令段的全局对应,同时对表面起伏造成的中心线中断及相邻条带交叠进行处理。由此能够在条带密集、局部遮挡及成型高度变化的情况下保持图像特征与路径指令之间的正确对应,提高横向偏差序列的准确性和连续性,为缺陷判定提供可靠的数据基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966639A_ABST
    Figure CN122966639A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image detection, in particular to a 3D printing part defect detection method based on machine vision, the present application extracts the strip center line by collecting the forming layer image, and the strip center line is corresponded to the path instruction segment according to the execution order and the connection topology, so as to obtain the transverse deviation sequence; the response characteristics under different plane positions and forming heights are determined according to the periodic fluctuation of the long straight reference track segment and the reference advancing speed, the short wavelength component is inhibited, and the fluctuation caused by the direction change is deducted, so as to obtain the trajectory type anomaly and the purified trajectory; the strip width is measured along the normal direction of the purified trajectory, the width reference is established by grouping the trajectory segments, and the normal width increment at the inflection point is deducted, so as to obtain the width type anomaly; finally, the reference track segment number, the arc length interval and the layer number corresponding to the anomaly are output. The present application can reduce the interference of normal dynamic response on defect detection, and improve the accuracy of defect identification and positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, specifically to a method for detecting defects in 3D printed parts based on machine vision. Background Technology

[0002] 3D printing involves layer-by-layer molding, and defects often arise during the molding process. Therefore, it is necessary to collect and identify images of the layer surfaces during printing to determine the type and location of defects.

[0003] Existing recognition schemes fall into two categories: one directly extracts grayscale, edge, or texture features from the layer surface image, or inputs the image into a model such as a convolutional neural network to identify defect areas using the local neighborhood of the image as the basic unit; the other renders the layer contour in the slice file as a binary image and registers it with the layer surface image, separates the forming area from the background area, and then identifies the defect area in the aforementioned manner.

[0004] However, the surface of the forming layer is formed sequentially by scanning vectors along a predetermined path using an energy beam or extrusion head. The scanning direction rotates layer by layer, and the scanning sequence is performed according to zones. Therefore, the formation time and heating times of each pixel in the image are different, and adjacent pixels in the image may not be formed by adjacent forming vectors. The main direction of the texture changes layer by layer. Furthermore, normal forming inevitably produces regular appearances such as inter-channel grooves, overlapping ridges, vector endpoint accumulation, and zone stitching lines. Their grayscale and texture features are inseparable from defects such as broken channels, insufficient overlap, and spheroidization. The above schemes all use the image spatial neighborhood as the basic unit, implicitly assuming that each pixel is formed simultaneously, that spatial adjacency is correlated, and that the appearance is isotropic. The introduced printing data is only used as a binary mask to distinguish the forming area from the background area, without establishing a correspondence between pixels and forming vectors. As a result, appearance anomalies in the image cannot be attributed to the forming vector that produced the appearance. Regular appearances are misjudged as defects, single deteriorated vectors are missed in regular textures, and the recognition results are no longer reliable after the scanning strategy is changed.

[0005] To address this, a machine vision-based defect detection method for 3D printed parts is proposed. Summary of the Invention

[0006] The purpose of this invention is to provide a defect detection method for 3D printed parts based on machine vision. By image trajectory correspondence, response characteristic identification and trajectory fluctuation subtraction, trajectory-type anomalies and width-type anomalies are extracted respectively, and the location is output according to the reference trajectory segment, arc length interval and layer number.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A machine vision-based defect detection method for 3D printed parts includes: Acquire images of the forming layer, extract the center line of the strip, and match the center line of the strip with the path instruction segment according to the execution order and the connection topology to obtain the lateral deviation sequence; The response characteristics of the trajectory generation chain at the plane position and forming height of the trajectory generation end are obtained by using the ratio of the spatial period of the periodic fluctuations on the long straight reference trajectory segment to the reference propulsion rate. Using the wavelength corresponding to the response characteristics as the boundary, the short-wavelength components along the arc length of the strip centerline are suppressed to obtain the measured trajectory; the fluctuations after the change of direction are predicted by the response characteristics are subtracted from the lateral deviation sequence to obtain the trajectory-type anomaly, and the purification trajectory is obtained from the actual motion trajectory. The width of the strip is measured along the normal direction of the purification trajectory. Reference trajectory segments with the same reference width parameter and not located at the block boundary are grouped together. The width deviation sequence is obtained based on the median strip width within the group. The turning points are grouped according to the turning angle, the reference advance rate on both sides of the turning point and the length of the reference trajectory segment on both sides. The width anomaly is obtained by subtracting it from the width deviation sequence based on the median width increment within the group. Output the reference trajectory segment number, arc length interval, and layer number to which the trajectory-type anomaly and width-type anomaly belong.

[0008] Preferably, obtaining the lateral deviation sequence includes: projecting the forming layer image onto a coordinate system of the same scale and orientation as the reference trajectory, and correcting the imaging ratio according to the layer thickness and the change with the forming height; taking the dark band in the projected image as the groove between the strips, taking the midline of the groove between two adjacent strips as the strip center line, and continuing the strip center line interrupted by surface undulations along the direction; within the arc length interval where adjacent strips overlap, taking the later strip center line as the visible strip center line according to the execution order of the reference trajectory segment; making a global assignment between the strip center line and the reference trajectory segment according to the execution order and connection topology, the assignment result satisfying the connectivity and non-intersection of the reference trajectory; sampling along the direction of the reference trajectory segment with a fixed arc length step, and taking the lateral deviation of the strip center line relative to the reference trajectory segment point by point to form the lateral deviation sequence.

[0009] Preferably, the process of obtaining response characteristics includes: selecting a long, straight reference trajectory segment with a change in direction and a length covering multiple cycles before the starting point in the lateral deviation sequence as an observation segment; taking the spatial period and amplitude attenuation data of periodic fluctuations on each observation segment along the arc length; comparing at least two observation segments with different reference propulsion rates within the same planar region, accepting the observation segment whose spatial period is proportional to the reference propulsion rate, and discarding the observation segment whose spatial period is not proportional; determining the response frequency and attenuation data of the planar region at the current forming height based on the accepted results, thus constituting the response characteristics; for planar regions where no accepted results are obtained, using the response characteristics of adjacent planar regions at the same forming height; organizing the response characteristics of each planar region according to the planar position and forming height of the trajectory generation end and updating them layer by layer, thus constituting the response characteristic distribution.

[0010] Preferably, obtaining the measured trajectory includes: for each reference trajectory segment, obtaining the response wavelength from the response frequency corresponding to the plane position and forming height in the response characteristic distribution, and the reference propulsion rate of the reference trajectory segment; dividing the component of the strip centerline position along the arc length into two parts: shorter than the boundary and not shorter than the boundary, based on the set proportion of the response wavelength; for the part shorter than the boundary, suppressing the position of adjacent strip centerlines at the same arc length within the same continuous direction, excluding adjacent strip centerlines crossing trajectory interruptions and crossing blocks; retaining the part not shorter than the boundary as is; and synthesizing the strip centerline position from the suppressed part and the retained part to form the measured trajectory.

[0011] Preferably, the process of obtaining trajectory-type anomalies and cleanup trajectories includes: for each inflection point in the current layer, taking the response frequency and attenuation data of the trajectory generation end at the plane position and forming height of the inflection point, together with the departure side reference propulsion rate, to obtain the starting position, spatial period, and attenuation envelope of the lateral fluctuations after the inflection point; grouping inflection points with the same inflection angle and departure side reference propulsion rate into the first inflection point group, and taking the median of the measured starting amplitude within the first inflection point group as the amplitude reference of the first inflection point group; deducting the lateral fluctuations after the inflection point from the lateral deviation sequence according to the starting position, spatial period, attenuation envelope, and amplitude reference; the deviations that are continuous along the arc length and exceed the tolerance after deduction constitute trajectory-type anomalies, and are classified into three types according to their shape: single-axis step-like and not recovering thereafter, unidirectional drift with the layer number, and repeated occurrence in a fixed plane coordinate range; removing the components corresponding to the deducted lateral fluctuations from the measured trajectory to form the cleanup trajectory.

[0012] Preferably, the width deviation sequence is obtained by: using the purification trajectory as a reference centerline, measuring the strip width point by point along the normal of the reference centerline, and updating the measurement direction point by point according to the local direction of the reference centerline; within the arc length interval where the distance between two adjacent strips is less than the reference distance, using the centerline of the groove between the strips as the boundary determination benchmark; grouping reference trajectory segments with the same reference width parameter in this layer and not located at the block boundary into a width group, and grouping reference trajectory segments located at the block boundary into a separate boundary width group according to the reference width parameter; taking the median value of the strip width in the width group and the boundary width group as their respective width benchmarks; and taking the deviation of the strip width relative to its respective width benchmark point by point to form a width deviation sequence.

[0013] Preferably, the width-type anomalies are obtained as follows: each inflection point in this layer is grouped into a second inflection point group according to the inflection angle, the reference propulsion rate on both sides of the inflection point, and the length of the reference trajectory segment on both sides of the inflection point; inflection points whose reference trajectory segment length on the entry side is insufficient to reach the reference propulsion rate are grouped into a separate second inflection point group; the width increment at each inflection point is taken from the width deviation sequence, and the median value of the width increment within the second inflection point group is used as the increment benchmark of the second inflection point group, which is subtracted from the width deviation sequence; among the width deviations after subtraction, the arc length intervals where the strip width is continuously less than the width benchmark, the arc length intervals where there is no corresponding strip centerline on the purification trajectory and the length exceeds the width of one strip, the arc length intervals where the strip width is continuously greater than the width benchmark, and the arc length intervals where the strip width fluctuates periodically along the arc length constitute four types of width-type anomalies; according to the reference trajectory segment number and the arc length interval, the trajectory-type anomalies and width-type anomalies are output respectively.

[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention projects the image of the formed layer onto a coordinate system of the same scale and orientation as the reference trajectory, and corrects for changes in the imaging ratio caused by the forming height based on the layer thickness. It extracts the center lines of the strips using the grooves between the strips, and combines the execution order, connection topology, trajectory connectivity, and non-intersection to achieve a global correspondence between the strip center lines and the path command segments. Simultaneously, it processes center line interruptions caused by surface undulations and overlaps between adjacent strips. This allows for the maintenance of a correct correspondence between image features and path commands even with dense strips, local occlusion, and changes in forming height, improving the accuracy and continuity of the lateral deviation sequence and providing a reliable data foundation for defect determination.

[0015] 2. This invention utilizes the proportional relationship between the spatial period of periodic fluctuations on a long, straight reference trajectory segment and the reference propulsion rate to obtain the response characteristics of the trajectory generation chain under different planar positions and forming heights, and forms a layer-by-layer updated response characteristic distribution. Based on the response wavelength, short-wavelength disturbances in the strip centerline are suppressed, and the inherent lateral fluctuations caused by changes in direction are subtracted according to the starting position after the inflection point, spatial period, attenuation envelope, and amplitude reference. This allows for the differentiation between the dynamic response of the trajectory generation chain and the deviation from the actual trajectory, avoiding misjudging normal turning oscillations as defects, and preserving trajectory anomalies such as step offsets, layer-by-layer drifts, and repeated deviations from fixed positions.

[0016] 3. This invention uses the purified trajectory after removing inherent lateral fluctuations as a reference, measuring the strip width point by point along its local normal, and establishing width benchmarks for ordinary trajectory segments and block boundary trajectory segments respectively. Furthermore, it groups the turning points based on the turning angle, the reference advancement rate on both sides of the turning point, and the trajectory segment length, subtracting the normal widening effect at the turning point from the median width increment within each group. This allows for the identification of strip narrowing, strip loss, strip widening, and periodic width fluctuations under different path parameters and boundary conditions. The detection results are output according to the reference trajectory segment number, arc length interval, and layer number, improving the clarity of defect location and the traceability of results. Attached Figure Description

[0017] Figure 1 A schematic diagram of a machine vision-based defect detection method for 3D printed parts provided by the present invention; Figure 2 A schematic diagram of the response characteristic distribution acquisition process provided by the present invention; Figure 3 This is a schematic diagram of the purification trajectory acquisition process provided by the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0019] Example 1: This embodiment focuses on 3D printed parts formed layer by layer using material extrusion, and performs online detection on each formed layer during the forming process. The layer processing data, terminology definitions, and threshold value methods used in this embodiment are as follows.

[0020] The camera is fixed above the forming cavity, and the illumination uses a ring-shaped diffused light source with each light-emitting unit evenly arranged along the azimuth angle. The top surface of the strip is a convex curved surface, and the proportion of light reflected into the camera is highest at its upward-facing normal. The groove between two adjacent strips has the lowest proportion of incident light entering the camera because its solid angle is blocked by the strips on both sides. Therefore, in the image, the top surface of the strip appears as a bright band, and the groove between the strips appears as a dark band. The position of the dark band is determined by geometric occlusion and does not change with the illumination azimuth. The camera resolution and field of view are selected so that the pixel equivalent is no more than one-tenth of the width of a single strip.

[0021] An image is captured once after all reference trajectory segments of each forming layer have been executed and before the forming platform descends. At this moment, each strip has completed preliminary cooling and shrinkage, avoiding excessive strip width caused by the semi-molten state.

[0022] A checkerboard calibration plate was used to calibrate the homography relationship between the camera's internal parameters and the forming platform in a single calibration. After distortion correction using intrinsic parameters, the acquired images were projected onto a coordinate system of the same scale and orientation as the reference trajectory, ensuring that one coordinate unit in the image corresponds to one coordinate unit in the forming plane. As the forming platform descends with the forming height, the object distance increases and the imaging scale decreases. The cumulative descent is calculated based on the product of the current layer number and layer thickness. The projection scale is then adjusted according to the ratio of this descent to the object distance at calibration, and updated layer by layer.

[0023] Please see Figure 1 This invention provides a machine vision-based method for defect detection in 3D printed parts. The technical solution is as follows: Acquire images of the formed layer, extract the center line of the strip, and map the strip center line and path instruction segments according to their execution order and connection topology to obtain a lateral deviation sequence; Calculate the response characteristics of the trajectory generation chain at the plane position of the trajectory generation end and the forming height based on the ratio of the spatial period of the periodic fluctuations on the long straight reference trajectory segment to the reference propulsion rate; Suppress the short-wavelength components along the arc length of the strip center line position using the wavelength corresponding to the response characteristics as a boundary to obtain the measured trajectory; Predict the direction change based on the response characteristics. The subsequent fluctuations are subtracted from the lateral deviation sequence to obtain trajectory-type anomalies, and the purification trajectory is obtained from the actual motion trajectory. The strip width is measured along the normal of the purification trajectory, and reference trajectory segments with the same reference width parameter and not located at the block boundary are grouped. The width deviation sequence is obtained based on the median strip width within the group. The turning points are grouped according to the turning angle, the reference advance rate on both sides of the turning point, and the length of the reference trajectory segments on both sides. The width deviation sequence is subtracted based on the median width increment within the group to obtain width-type anomalies. The reference trajectory segment number, arc length interval, and layer number to which the trajectory-type anomaly and the width-type anomaly belong are output.

[0024] Further, the lateral deviation sequence is obtained, including: projecting the formed layer image onto a coordinate system of the same scale and orientation as the reference trajectory, and correcting the imaging ratio with the forming height according to the layer thickness; taking the dark band in the projected image as the groove between the strips, taking the midline between two adjacent grooves as the strip center line, and continuing the strip center line interrupted by surface undulations along the direction; within the arc length interval where adjacent strips overlap, taking the later strip center line as the visible strip center line according to the execution order of the reference trajectory segment; making a global assignment between the strip center line and the reference trajectory segment according to the execution order and connection topology, the assignment result satisfies the connectivity and non-intersection of the reference trajectory; sampling along the direction of the reference trajectory segment with a fixed arc length step, and taking the lateral deviation of the strip center line relative to the reference trajectory segment point by point to form the lateral deviation sequence.

[0025] Specifically, the orientation of all reference trajectory segments in this layer is taken, and a histogram is plotted based on their orientation angles. The orientation angle with the highest frequency is taken as the main orientation of this layer. The direction perpendicular to the main orientation is taken as the profile direction.

[0026] Along the profile direction, grayscale profiles are taken row by row on the projected image at intervals of one pixel equivalent. On each profile, the grayscale values ​​of adjacent sampling points are compared sequentially from one end to the other to identify all local minima. Among the local minima, those whose grayscale value is lower than the median grayscale value of the profile and whose grayscale value difference with the adjacent local maxima value is not less than 10% of the grayscale range of the profile are identified as groove locations between strips; the remaining local minima are identified as random surface undulations and are discarded.

[0027] On the same cross section, the midpoint of the groove between two adjacent strips is the center position of that strip on the cross section. Along the main direction, connect the center positions on two adjacent cross sections whose difference does not exceed half the width of a strip to form the strip centerline. If a cross section fails to obtain a center position due to the removal of a local minimum, it constitutes an interruption in the strip centerline: if the arc length corresponding to the number of cross sections crossed by the interruption does not exceed the width of one strip, a straight line fitted from three center positions at each end of the interruption is used for continuation, and the position of this straight line at the interruption point is taken as the center position; if the arc length crossed by the interruption exceeds the width of one strip, no continuation is made, and this arc length interval is recorded as the missing interval of the strip centerline.

[0028] When a later-printed strip covers the edge of an earlier-printed strip, within the arc length interval where adjacent strips overlap, the groove on one side of the earlier-printed strip is covered; grooves on both sides cannot be obtained simultaneously. The determination method is: if only one side of the groove position between strips is obtained on a certain cross-section for a given strip, and the other side is occupied by an adjacent strip, then that strip is considered covered on that cross-section. Following the execution order of the reference trajectory segments, the center line of the strip corresponding to the later-executed reference trajectory segment within that arc length interval is taken as the visible strip center line; the covered strip center line is not involved in subsequent processing within that interval.

[0029] The strip is extruded directly below the nozzle and immediately attached. The strip's centerline records the position traversed by the trajectory generation end, thus there is a one-to-one correspondence between the strip's centerline and the reference trajectory segment. Assignment is performed in the following order: First, establish candidates. For each strip centerline, take its two endpoints, and find those endpoints in all reference trajectory segments whose distance from the starting point coordinates or ending point coordinates to the endpoints does not exceed the width of one strip. These are listed as candidate reference trajectory segments for that strip centerline; there can be multiple candidate reference trajectory segments.

[0030] Secondly, candidates are filtered out based on the connection topology. Starting from the first reference trajectory segment in the execution order of this layer, each segment is processed sequentially. When processing the first reference trajectory segment, the candidate with the smallest endpoint distance among its candidate strip centerlines is selected as the assigned item. When processing subsequent reference trajectory segments, if there is no trajectory interruption between the segment and its preceding connected segment, the distance between the starting endpoint of the assigned strip centerline and the ending endpoint of the assigned strip centerline of the preceding connected segment must not exceed the width of one strip. Candidates that do not meet this requirement are filtered out; if there is a trajectory interruption between the segment and its preceding connected segment, this requirement is not applied.

[0031] Third, candidates are eliminated according to the requirement of non-overlap. For the candidates retained in the previous step, they are examined one by one: if the center line of a candidate strip is exchanged with the center line of the strip that has been assigned to other reference trajectory segments in the middle of the arc length, that is, the left and right order of the two strip center lines at the beginning is reversed with the left and right order at the end, then the candidate is eliminated.

[0032] Fourth, assignment and backtracking. After the above two steps of screening, only one candidate remains, which is the assignment result of the reference trajectory segment; if there are multiple candidates, the one with the smallest sum of endpoint distances is selected; if there are zero candidates, the process returns to the previously assigned reference trajectory segment, and the next best candidate is selected, and the process is repeated in the above order. Once the center line of the same strip is assigned, it is deleted from subsequent candidates; during backtracking, the candidate combinations that have been tried are recorded until a next best candidate that has not yet been tried is found. If no candidate combination meets the conditions when backtracking to the first segment of the current connection block, the connection block is recorded as an assignment failure, and its reference trajectory segment does not generate a lateral deviation sequence, nor does it enter the subsequent anomaly judgment. For successfully assigned reference trajectory segments, a one-to-one correspondence between the strip center line and the reference trajectory segment is obtained. The global assignment referred to in this embodiment means forming an overall correspondence within the entire range of all reference trajectory segments in this layer, and does not mean obtaining the global optimal value of the preset cost function.

[0033] The arc length step is an integer multiple of the pixel equivalent and no greater than one-fifth of the strip width. Along the direction of each reference trajectory segment, sampling is performed point-by-point starting from its origin according to the arc length step. At each sampling point, a straight line is drawn from that point along the normal of the reference trajectory segment. The intersection of this line and the assigned strip centerline is taken, and the distance from this intersection to the sampling point is recorded. The intersection is then assigned a positive or negative sign based on whether it lies on the positive or negative side of the normal, yielding the lateral deviation of that sampling point. The lateral deviations of each sampling point are arranged in arc length order to form the lateral deviation sequence of the reference trajectory segment. Sampling points within the missing section of the strip centerline have their lateral deviations recorded as empty and are not included in subsequent processing.

[0034] Furthermore, referring to Figure 2The process of obtaining response characteristics includes: selecting a long, straight reference trajectory segment with a change in direction and a length covering multiple cycles before the starting point in the lateral deviation sequence as the observation segment; taking the spatial period and amplitude attenuation data of periodic fluctuations on each observation segment along the arc length; comparing at least two observation segments with different reference propulsion rates within the same planar region, accepting the observation segment whose spatial period is proportional to the reference propulsion rate, and discarding the observation segment whose spatial period is not proportional; determining the response frequency and attenuation data of the planar region at the current forming height based on the accepted results, thus forming the response characteristics; for planar regions where no accepted results are obtained, using the response characteristics of adjacent planar regions at the same forming height; organizing the response characteristics of each planar region according to the planar position and forming height of the trajectory generation end and updating them layer by layer, thus forming the response characteristic distribution.

[0035] Specifically, the trajectory generation chain consists of a trajectory generation end, its guiding components, and transmission components, possessing both mass and flexibility. Each change in direction creates a step excitation for the trajectory generation chain, inducing damped vibration. This vibration causes the trajectory generation end to reciprocate in a direction perpendicular to the direction after the change, leaving periodic undulations along the arc length on the center line of the strip. The time frequency of the damped vibration is determined by the mass and stiffness of the trajectory generation chain itself. The trajectory generation end advances along the direction at a reference propulsion rate, mapping the time frequency to a spatial period along the arc length, where the spatial period is equal to the ratio of the reference propulsion rate to the time frequency.

[0036] Observation segments are selected from the lateral deviation sequence, and each observation segment must simultaneously meet three conditions: the starting point of the reference trajectory segment is an inflection point; the reference trajectory segment is a straight line segment; and the length of the reference trajectory segment is not less than the observation segment length threshold. The observation segment length threshold is obtained as follows: when the current forming layer is the first layer, or when there are no previous records in the response characteristic distribution, 30 Hz is taken as the lower limit of the time frequency. The maximum possible spatial period is obtained by dividing the lowest reference advance rate of this layer by this lower limit, and three times this value is taken as the observation segment length threshold. For subsequent layers, the previous response frequencies of the same plane region in the response characteristic distribution are taken. The spatial period is obtained by dividing the reference advance rate of the reference trajectory segment by the response frequency, and three times this value is taken as the observation segment length threshold. The arc length interval used for period extraction in the observation segment should also be located after the acceleration end position determined by the acceleration carried by the layered processing data and before the deceleration start position. If the stable advance interval cannot cover three complete periods, the reference trajectory segment is not used as an observation segment.

[0037] Zero-crossing detection is performed on the lateral deviation sequence of the observation segment along the arc length: for two adjacent sampling points with opposite signs of lateral deviation, the zero-crossing position is obtained by linear interpolation between the two points, and the zero-crossing is recorded as positive or negative according to the sign of the previous point. The arc length between two adjacent zero-crossing points in the same direction is taken as one spatial period. The median value of all spatial periods within the observation segment is taken as the spatial period of the observation segment.

[0038] The period is divided into two adjacent zero-crossing points in the same direction. Within each period, the maximum absolute value of the lateral deviation is taken as the periodic extreme value, and these are sequentially numbered from the start of the observation segment. The median of the periodic extreme values ​​of the last three periods of the observation segment is taken as the extracted noise level for that segment. Starting from the first period, the periodic extreme values ​​are examined sequentially. Periods with periodic extreme values ​​no less than three times the extracted noise level are retained. The process stops when the first period that does not meet this condition is encountered, and subsequent periods are not included in the calculation. For each retained period, the ratio of the extreme value of the next period to the extreme value of the previous period is calculated pairwise, and the median of all ratios is taken as the amplitude attenuation data for that observation segment. If fewer than three periods are retained, the observation segment is not included in the calculation of amplitude attenuation data.

[0039] The shaped plane is divided into several planar regions using a square grid. The initial grid side length is one-quarter of the side length of the shaped plane. The number of observation segments in each planar region is counted. If there is a planar region with fewer than two observation segments, the grid side length is doubled and the region is re-divided until all planar regions containing observation segments have at least two observation segments, or the grid degenerates into a single planar region.

[0040] Within the same planar region, at least two observation segments with different reference propulsion rates are selected. For each observation segment, the ratio of its spatial period to its reference propulsion rate is calculated. The median of all such ratios within the planar region is recorded as the median ratio for that region. The acceptance threshold is set at 10% of the median ratio for that region. If the absolute value of the difference between the ratio of each observation segment within a certain planar region and the median ratio for that layer does not exceed the acceptance threshold, the spatial period within that region is determined to originate from the damped vibration of the trajectory generation chain, and each observation segment is accepted. If the absolute value of the difference between the ratio of an observation segment and the median ratio for that region exceeds the acceptance threshold, it is determined to originate from other undulations on the surface of the printed part, and that observation segment is discarded.

[0041] The response frequency of a plane region at the current forming height is calculated by taking the reciprocal of the median of the ratios of the observed segments collected within the plane region. The amplitude attenuation data of the observed segments is then taken as the median of the amplitude attenuation data for that plane region. These two values ​​constitute the response characteristics of the plane region. If a plane region does not contain any observation segments that meet the conditions within this layer, or if all of its observation segments are removed, the response characteristics of the adjacent plane region that has already obtained response characteristics at the same forming height are adopted. If there are multiple adjacent plane regions, the median of the response frequency and the median of the amplitude attenuation data of each adjacent plane region are taken. The response characteristics of adjacent plane regions are only used if their source is collected within this layer and the difference between the spatial period and the reference propulsion rate ratio of each adjacent region does not exceed the collection threshold. If these conditions are not met, the region is recorded as having no response characteristics, and subsequent fluctuation deduction and anomaly determination are not performed on that region.

[0042] When the trajectory generating end moves along the forming plane, its support span changes. For forming equipment where the trajectory generating end rises with the forming height, the increase in forming height increases the cantilever length of the column. Both of these factors alter the equivalent stiffness of the trajectory generating chain, thus the response characteristics vary with the planar position of the trajectory generating end and the forming height. For forming equipment where the forming platform moves vertically and the trajectory generating end moves only in the horizontal plane, the forming height does not change the cantilever length of the trajectory generating chain, and the change in response characteristics with the forming height comes only from the change in platform load. In this case, the response characteristics of each layer are merged according to the forming height, and organized only by planar region. The printed part does not participate in the vibration of the trajectory generating chain, and the response characteristics are not taken from the geometry of the printed part. Using the planar region number and forming height as indexes, the response frequency and amplitude attenuation data at each location are stored to form a response characteristic distribution, which is updated once per layer.

[0043] Further, the measured trajectory is obtained, including: for each reference trajectory segment, the response wavelength is obtained from the response frequency corresponding to the plane position and forming height in the response characteristic distribution, and the reference propulsion rate of the reference trajectory segment; the component of the strip centerline position along the arc length is divided into two parts: shorter than the boundary and not shorter than the boundary, based on the set proportion of the response wavelength; for the part shorter than the boundary, the positions of adjacent strip centerlines within the same continuous direction at the same arc length are suppressed, and adjacent strip centerlines crossing trajectory interruptions and crossing blocks are not suppressed; the part not shorter than the boundary is retained as is; the suppressed part and the retained part are combined to form the strip centerline position, constituting the measured trajectory.

[0044] Specifically, within the stable propagation range and the identified main response frequency band in this embodiment, positional fluctuations shorter than the boundary wavelength are mainly used to characterize image extraction errors and random surface undulations. This scale division is only used to reduce the impact of local high-frequency fluctuations on subsequent judgments, and is not used to conclude that all short-wavelength components do not originate from the actual motion at the trajectory generation end.

[0045] Each reference trajectory segment is processed individually. The planar region number of the starting point of the reference trajectory segment and the current forming height are taken, and the corresponding response frequency is retrieved from the response characteristic distribution. The response wavelength of the reference trajectory segment is obtained by dividing the reference propulsion rate of the reference trajectory segment by the response frequency. When the reference trajectory segment crosses more than two planar regions, it is divided into continuous sub-segments by the boundaries of the planar regions. The response wavelength of each sub-segment is determined using the response frequency of its respective planar region and the reference propulsion rate of the reference trajectory segment, instead of merging them into a single response wavelength based on arc length ratio or the lowest response frequency.

[0046] The minimum spatial period of all observed segments in this layer is taken as the shortest actual motion wavelength. For any straight-line reference trajectory segment in this layer, the autocorrelation of its strip centerline position along the arc length is calculated: using the autocorrelation at zero arc length as a reference, the arc length corresponding to the first drop in autocorrelation to half of this reference along the increasing arc length direction is found and recorded as the extraction error correlation length. The boundary wavelength is a set fraction of the response wavelength. The set fraction is chosen such that the boundary wavelength is less than the shortest actual motion wavelength and greater than the extraction error correlation length; if multiple fractions satisfy this condition, the smallest one is taken. In this embodiment, the set fraction is one-fifth.

[0047] Two moving averages are performed along the arc length at the centerline position of the strip, with opposite directions: the first from the start to the end, and the second from the end to the start. Both calculations use the same window length, calculated as the number of sampling points obtained by dividing the boundary wavelength by the arc length step and rounding down. The second moving average is then processed in the opposite direction using the same window to reduce positional offset introduced by unidirectional smoothing. Only sampling points fully covered by the window are retained; segments not fully covered by the window are excluded from defect assessment. The resulting value represents the long-wavelength component at the strip centerline position (not shorter than the boundary wavelength). Subtracting the long-wavelength component from each point at the strip centerline position yields the short-wavelength component (shorter than the boundary wavelength).

[0048] For each reference trajectory segment, find its adjacent reference trajectory segments within the same block: the two must have the same block number and there must be no trajectory interruption between them, meaning that the subsequent connection segment numbers of each reference trajectory segment between them are not empty in the execution order. Those meeting this condition are recorded as adjacent reference trajectory segments within the same continuous direction; adjacent reference trajectory segments crossing trajectory interruptions and adjacent reference trajectory segments crossing blocks do not meet this condition and are not included in suppression. Before comparison, the arc length positive direction and arc length zero point of each adjacent sequence are unified according to the direction of the reference trajectory segment; when the execution direction is opposite, the adjacent sequences are reversed, and adjacent trajectories that cannot establish a single value correspondence in the projected overlapping interval are not included in suppression. The suppression operation is as follows: at each arc length sampling point of the reference trajectory segment, take its own short-wavelength component, and the short-wavelength component of the corresponding strip centerline of each adjacent reference trajectory segment within the same continuous direction at the same arc length position. Take the median value of the above short-wavelength components, and subtract this median value from the short-wavelength component of the reference trajectory segment itself; the result is the suppressed short-wavelength component. If no adjacent reference trajectory segment with an effective arc length can be established, adjacent trajectory common-mode suppression is not performed, its own short-wavelength component is retained, and the segment is marked as having no adjacent trajectory verification.

[0049] At each arc-length sampling point, the measured trajectory position of that point is obtained by adding the long-wavelength component to the suppressed short-wavelength component. The measured trajectory positions of each point are arranged in order of arc length to form the measured trajectory of the reference trajectory segment.

[0050] The boundary wavelength is taken only from the response wavelength, not from the reference spacing (the nominal spacing between two adjacent filling trajectories within the same block is taken from the layered processing data and recorded as the reference spacing. In this embodiment, the reference spacing is only used to determine whether adjacent strips are in a compressed state, and is not used to constrain the position of the strip centerline). The reference spacing is a quantity given by the layered processing data. When the constraint is that the spacing between the centerlines of adjacent strips should be equal to the reference spacing, the deviation to be measured is eliminated.

[0051] From the layered processing data of the self-printed part, all reference trajectory segments of this forming layer are extracted in execution order. A record is created for each reference trajectory segment, and the record includes: number, which is its sequence number in this layer's execution order; start coordinates and end coordinates, which are its two coordinate components in the forming plane; direction, which is the direction angle from the start coordinates to the end coordinates; reference feed rate, which is the feed rate recorded for this segment; reference width parameter, which is the ratio of the unit length commanded feed amount recorded for this segment to the reference feed rate; and front connection segment number and rear connection segment number, which are the numbers of the two adjacent segments in the execution order. If there are no adjacent segments, they are recorded as empty. If there is a lifting action between reference trajectory segments, the rear connection segment number is recorded as empty at that point, indicating a trajectory interruption. Reference trajectory segments within the same closed contour or the same filling block have the same block number.

[0052] Furthermore, referring to Figure 3 The process yields trajectory-type anomalies and cleanup trajectories, including: for each inflection point in the current layer, taking the response frequency and attenuation data of the trajectory generation end at the plane position and forming height of the inflection point, along with the departure side reference propulsion rate, to obtain the starting position, spatial period, and attenuation envelope of the lateral fluctuations after the inflection point; grouping inflection points with the same inflection angle and departure side reference propulsion rate into the first inflection point group, and taking the median of the measured initial amplitude within the first inflection point group as the amplitude reference of the first inflection point group; deducting the lateral fluctuations after the inflection point from the lateral deviation sequence according to the starting position, spatial period, attenuation envelope, and amplitude reference; deviations that are continuous along the arc length and exceed the tolerance after deduction constitute trajectory-type anomalies, and are classified into three types according to their shape: single-axis step-like and non-recovering, unidirectional drift with the layer number, and repeated occurrence in a fixed plane coordinate range; removing the components corresponding to the deducted lateral fluctuations from the measured trajectory to form the cleanup trajectory.

[0053] The common endpoint of two connected reference trajectory segments, where the absolute value of the difference between their two sides exceeds the angle determination threshold, is recorded as an inflection point. The absolute value of this difference is recorded as the angle of inflection at that point, and the turning direction (left or right) is recorded according to the directional turning angle from the entry side to the exit side. The angle determination threshold is obtained as follows: the printer's corner speed limit and the minimum reference advance rate of the current layer are extracted from the layered processing data. The minimum difference between the corner speed limit and the minimum reference advance rate is found, and this difference is used as the angle determination threshold.

[0054] Specifically, for each inflection point in this layer, the planar region number where the inflection point is located and the current forming height are taken, and the corresponding response frequency and amplitude attenuation data are retrieved from the response characteristic distribution. In the departure-side lateral deviation sequence, the first zero-crossing point adjacent to and before the first extreme value is found after the inflection point, and the arc length position of the zero-crossing point is taken as the starting position of the lateral fluctuation; if the zero-crossing point is not obtained, fluctuation deduction is not performed on the inflection point. The arc length position of the inflection point on the departure-side reference trajectory segment is taken as the starting position of the lateral fluctuation. The spatial period of the lateral fluctuation is obtained by dividing the departure-side reference propulsion rate by the response frequency. The amplitude of the first period is one, the amplitude of the second period is the amplitude attenuation data, the amplitude of the third period is the square power of the amplitude attenuation data, and so on, decreasing the amplitude attenuation data period by period according to the period number until the amplitude drops to less than one-tenth of the amplitude of the first period. The obtained amplitudes of each period constitute the attenuation envelope of the lateral fluctuation.

[0055] The initial amplitude of the lateral fluctuation depends on the change in velocity vector at the inflection point and the printer's jerk setting. These two factors are not recorded in the layered processing data and cannot be uniquely determined by the single shape of the strip centerline; therefore, no inverse solution is performed. Inflection points in this layer are grouped into the first inflection point group based on the same turning direction, an angle difference not exceeding five degrees, and the same reference propulsion rate on the departure side. For each inflection point in the first inflection point group, the first extreme value is found along the arc length on the lateral deviation sequence on the departure side from its starting position. The sign of this extreme value is retained, and its signed lateral deviation is taken as the measured initial amplitude of that inflection point. The median of all measured initial amplitudes in the first inflection point group is taken as the amplitude reference for that group. When the number of inflection points in the first inflection point group is less than five, the first inflection point group with the closest angle is merged, and then the median value is taken.

[0056] Starting from the initial position, a sinusoidal wave is formed point by point along the arc length according to the spatial period. The amplitude in the first period is taken as the amplitude reference of the first inflection point group to which the inflection point belongs. The amplitude in subsequent periods decreases periodically according to the decaying envelope. The wave has zero phase at the initial position determined by the aforementioned zero-crossing point, and its initial direction of change is determined by the sign of the amplitude reference. If the extremum sign order of the wave in the first two periods is inconsistent with the measured lateral deviation, the inflection point is recorded as a template mismatch, and wave subtraction is not performed. On the lateral deviation sequence of the departure side reference trajectory segment, the corresponding value of the wave is subtracted point by point from the initial position to obtain the subtracted lateral deviation.

[0057] The median of the absolute values ​​of the lateral deviations after deduction is taken, and three times that value is the tolerance. Among the deducted lateral deviations, arc length intervals that continuously exceed the tolerance constitute trajectory-type anomalies. Trajectory-type anomalies are classified into three types based on their morphology: First, the deducted lateral deviation rises or falls in a step-like manner from a certain arc length position along a single coordinate axis, and does not return to within the tolerance at any point until the end of that reference trajectory segment; second, the deducted lateral deviation at the same plane coordinate position increases unidirectionally with the layer number; third, trajectory-type anomalies within the same plane coordinate interval recur in multiple layers.

[0058] The second and third categories require cross-layer judgment. The lateral deviations after deduction for each layer are stored in the deviation record according to their planar coordinates within the forming plane. The deviation record uses the planar coordinates as an index, adding one entry for each layer, with the number of layers retained not less than the number required for cross-layer judgment. During the current layer's inspection, the lateral deviations after deduction for the same planar coordinates in previous layers are retrieved from the deviation record and compared with the current layer's lateral deviations after deduction in layer number order: those layers with unidirectionally increasing values ​​are classified as the second category; those layers with more than half of the previously retained layers where the same planar coordinate interval was judged as trajectory-type anomalies are classified as the third category.

[0059] At each arc-length sampling point, the deducted lateral fluctuation value at that point is subtracted from the measured trajectory position to obtain the cleaned trajectory position at that point. The cleaned trajectory positions of each point are arranged in arc-length order to form the cleaned trajectory of the reference trajectory segment.

[0060] Further, a width deviation sequence is obtained, including: using the purification trajectory as the reference centerline, measuring the strip width point by point along the normal of the reference centerline, with the measurement direction updated point by point according to the local orientation of the reference centerline; within the arc length interval where the distance between two adjacent strips is less than the reference distance, using the centerline of the groove between the strips as the boundary determination benchmark; grouping reference trajectory segments with the same reference width parameter in this layer and not located at the block boundary into a width group, and grouping reference trajectory segments located at the block boundary into a separate boundary width group according to the reference width parameter; taking the median value of the strip width within the width group and the boundary width group as their respective width benchmarks; and taking the deviation of the strip width relative to its respective width benchmark point by point to form a width deviation sequence.

[0061] Specifically, the strip centerline retains the periodic lateral oscillation after the inflection point. When the strip centerline is used as the reference centerline, the normal measurement direction oscillates periodically, and the measured strip width changes periodically with the arc length, becoming confused with the periodic fluctuations of the strip width itself.

[0062] Along the reference centerline, sampling is performed point-by-point with the same arc length step size as the lateral deviation sequence. At each sampling point, the perpendicular line connecting the two points of the reference centerline one arc length step before and after that point is taken as the normal of that point, and the measurement direction is updated point-by-point according to the local orientation of the reference centerline. Extrapolating outward from the sampling point along the normal on both sides: on the side with adjacent reference trajectory segments, the centerline of the first groove between strips is taken as the boundary of that side; on the side belonging to the free edge of the block, within the transition range from the bright area of ​​the strip to the unformed background, the point with the largest absolute value of grayscale gradient on the continuous edge is taken as the boundary of that side. When both boundaries can be uniquely identified, the distance between the two boundaries is taken as the strip width at that point; when either boundary cannot be continuously and uniquely identified, the sampling point is recorded as having unmeasurable width and is not included in the width benchmark calculation and width anomaly determination.

[0063] If the distance between the center lines of the adjacent strips on both sides of the point and the reference center line is less than the reference spacing, it is determined that the adjacent strips at the point are in a state of compression. The adjacent strips compress each other, causing the outer edge position to be distorted. At this time, the center line of the groove between the two strips is taken as the two side boundaries, and the distance between the two boundaries is the strip width at the point. The full width is not estimated by doubling the distance from the single side boundary to the center line.

[0064] The cross-sectional shape of the strip differs at the free edge and at the overlap. Therefore, converting the absolute value of the strip width from the reference width parameter requires the cross-sectional shape to remain unchanged, which is invalid; hence, this conversion is not performed. Reference trajectory segments with the same reference width parameter within this layer and not located at block boundaries are grouped into a width group; reference trajectory segments located at block boundaries, i.e., those without adjacent reference trajectory segments on one side, are separately grouped into a boundary width group based on the reference width parameter. The median value of the strip widths of all sampling points within a width group is taken as the width reference for that width group, and the median value of the strip widths of all sampling points within a boundary width group is taken as the width reference for that boundary width group.

[0065] Determination of identical reference width parameters: Take the median value of the reference width parameters of all reference trajectory segments in this layer. If the absolute value of the difference between the reference width parameters of two reference trajectory segments does not exceed 10% of the median value, they are determined to have identical reference width parameters.

[0066] At each sampling point, the width deviation of that point is obtained by subtracting the width reference of its group from the strip width of that point. The width deviations of each point are arranged in order of arc length to form a width deviation sequence.

[0067] Furthermore, width-type anomalies are obtained, including: classifying each inflection point in this layer into a second inflection point group based on the inflection angle, the reference propulsion rate on both sides of the inflection point, and the length of the reference trajectory segment on both sides of the inflection point; classifying inflection points whose reference trajectory segment length on the entry side is insufficient to reach the reference propulsion rate into a separate second inflection point group; taking the width increment at each inflection point from the width deviation sequence, and using the median value of the width increment within the second inflection point group as the increment benchmark for the second inflection point group, and subtracting it from the width deviation sequence; among the width deviations after subtraction, the arc length intervals where the strip width is continuously less than the width benchmark, the arc length intervals where there is no corresponding strip centerline on the purification trajectory and the length exceeds the width of one strip, the arc length intervals where the strip width is continuously greater than the width benchmark, and the arc length intervals where the strip width fluctuates periodically along the arc length, constitute four types of width-type anomalies; and outputting trajectory-type anomalies and width-type anomalies according to the reference trajectory segment number and arc length interval, respectively.

[0068] Specifically, at the inflection point, the feed rate decreases, and the pressure established in the feed channel cannot be released synchronously. The decrease in extrusion volume per unit time lags behind the decrease in feed rate, thus increasing the deposition volume per unit length, which manifests as a width increment in the strip width. This increment depends on the printer's acceleration / deceleration settings, the feed channel volume, and the rheological properties of the material, none of which are recorded in the layered processing data, and therefore are not analyzed in reverse.

[0069] Each inflection point in this layer is grouped into a second inflection point group based on the following criteria: the difference in inflection angle does not exceed five degrees; the reference propulsion rates on both sides of the inflection point are the same; and the difference in the length of the reference trajectory segments on both sides of the inflection point does not exceed ten times the width of a strip. Insufficient length on the entry side reference trajectory segment is grouped into a separate second inflection point group. "Insufficient length" means that the length of the reference trajectory segment is less than the distance required to accelerate from rest to the reference propulsion rate according to the acceleration settings recorded in the layered processing data; this distance is directly obtained from the reference propulsion rate and acceleration settings.

[0070] For each inflection point in the second inflection point group, examine the width deviation along the arc length from its starting position to both sides: find the arc length required for the width deviation to fall back to the width reference of the group from its extreme value, and take the median value of this arc length of all inflection points in the group as the value range of the group. Before and after each inflection point, take the maximum value of the width deviation within this value range as the width increment of the inflection point.

[0071] Take the median value of all width increments within the second inflection point group as the increment benchmark for that group. Within the range of values ​​before and after each inflection point, subtract this increment benchmark point by point from the width deviation sequence. The amount subtracted decreases linearly to zero at both ends of the range along the arc length, resulting in the width deviation after subtraction.

[0072] The median of the absolute values ​​of the width deviations after deduction is taken, and three times that value is the width tolerance. The deducted width deviations are categorized into four types of width anomalies: First, a continuous arc length interval where the strip width is consistently less than the corresponding width benchmark and the absolute value of the width deviation exceeds the width tolerance; second, in intervals where the strip centerline is missing, there is no corresponding strip centerline on the purification trajectory, and the length of this interval exceeds the width of one strip; third, a continuous arc length interval where the strip width is consistently greater than the corresponding width benchmark and the absolute value of the width deviation exceeds the width tolerance; fourth, a continuous arc length interval where the width deviation fluctuates periodically along the arc length, the median of the absolute extreme values ​​of the width deviations in each period exceeds the width tolerance, and the difference between its fluctuation period and the fluctuation period of other periodically fluctuating intervals in this layer does not exceed one-tenth of that fluctuation period. The fluctuation period is determined using the same zero-crossing detection method as the lateral deviation sequence, taking the median value of the arc length between two adjacent zero-crossing points in the same direction.

[0073] Based on the reference trajectory segment number and arc length interval, trajectory-type anomalies and width-type anomalies are output respectively, and the corresponding layer number and morphological category are recorded. These two types of anomalies are used to indicate motion trajectory problems and deposition width problems, respectively, and are not used as a definitive diagnosis of guiding, transmission, feeding or melting components or the sole cause of failure.

[0074] Example 2: This embodiment is based on Embodiment 1 and further explains the case of a single-path distribution forming layer and the transmission of anomalies between adjacent forming layers. Other steps are performed as described in Embodiment 1: Images of the forming layer are acquired and projected onto a coordinate system of the same scale and orientation as the reference trajectory; the center lines of the strips are extracted according to the center lines of the grooves between the strips and globally assigned, forming a lateral deviation sequence; the response characteristics are obtained according to the ratio of the spatial period to the reference propagation rate on the observed segment and organized into a response characteristic distribution; short-wavelength and long-wavelength components are divided according to the set proportion of the response wavelength and suppressed, forming a measured trajectory; lateral fluctuations are subtracted according to the starting position, spatial period, attenuation envelope, and amplitude reference at the inflection point, forming trajectory-type anomalies and cleaned trajectories; the strip width is measured along the normal of the cleaned trajectory and the median value of the width group is taken as the reference, forming a width deviation sequence; after subtraction according to the incremental reference of the second inflection point group, four types of width-type anomalies are classified. This embodiment elaborates on the supplementary processing of the above steps in the case of cross-layer situations.

[0075] Furthermore, there are no planar regions within this forming layer that have at least two observation segments with different reference propulsion rates. The response characteristics of the same planar region in the previous forming layer are taken as the response characteristics of the planar region in this forming layer. Only response characteristics that are directly derived from the acceptance results of the previous forming layer are used. The number of consecutively used layers does not exceed the upper limit of the number of used layers. For planar regions where the number of consecutively accepted layers is not less than the lower limit of the number of drift statistics layers, the sequence formed by arranging the response frequencies of each layer according to the layer number is taken. The difference between the response frequencies of the first and last layers of the sequence is divided by the number of interval layers to form the interlayer drift of the response frequency of the planar region.

[0076] Specifically, after dividing the planar regions as described in Example 1, each region is examined individually: if there are no at least two observation segments with different reference propulsion rates within a certain planar region, and no accepted results are obtained from any of the adjacent planar regions within this shaping layer, then the response characteristics of this planar region cannot be directly obtained within this shaping layer, nor can it be spatially inherited, thus triggering inter-layer inheritance. When the entire layer of reference trajectory segments has a consistent orientation and a single reference propulsion rate, all planar regions trigger inter-layer inheritance.

[0077] The response characteristics of the trajectory generation chain may vary with the molding height and equipment configuration. This embodiment does not assume its continuity based on a fixed ratio of layer thickness to column length; only when the response frequency of the two most recently accepted layers in the same equipment configuration and the same planar area deviates from the most recently accepted value by less than 10%, subsequent layers are allowed to inherit the response characteristics according to the following conditions; otherwise, the area is recorded as having no response characteristics.

[0078] Each item in the response characteristic distribution is marked with a source marker, which can be one of three: accepted, spatially inherited, or interlayer inherited. The response characteristics of the same planar region from the previous forming layer are extracted from the response characteristic distribution: if the source marker is accepted, it is reused; if the source marker for this item in the current forming layer is recorded as interlayer inherited, the continuous reuse count is recorded as one; if the source marker is interlayer inherited, it is reused, and the continuous reuse count is incremented by one from the count of the previous forming layer; if the source marker is spatially inherited, it is not reused. Reuse stops when the continuous reuse count reaches the upper limit of the reused layer number; if the planar region in the current forming layer does not have a recorded response characteristic, no trajectory-type anomalies or width-type anomalies are output. The upper limit of the number of layers to be used is obtained as follows: Take the items marked as accepted from the sources in the previous layers of the plane area, and examine the deviation of the response frequency of each accepted item relative to the accepted value along the layer number starting from the most recent accepted layer. The number of layers between when the deviation first reaches 10% of the accepted value is taken as the upper limit of the number of layers to be used. If there are fewer than two accepted items in the previous layers of the plane area, the upper limit of the number of layers to be used is one.

[0079] For a planar region where the number of consecutive layers identified as accepted by the source is no less than the lower limit of the drift statistics layer number, the response frequencies of each consecutive accepted layer are arranged in ascending order of layer number to form a sequence. The response frequency of the last layer is subtracted from the response frequency of the first layer, and then divided by the number of layers between the first and last layers. The quotient is the inter-layer drift of the response frequency in the planar region. The lower limit of the drift statistics layer number is obtained as follows: the median of the absolute values ​​of the differences between the response frequencies of two adjacent layers in the sequence is recorded as the single-layer acceptance fluctuation amplitude; the minimum number of layers required for the difference between the response frequencies of the first and last layers to exceed three times the single-layer acceptance fluctuation amplitude is taken as the lower limit of the drift statistics layer number; if no layer number satisfies this condition, it is determined that there is no inter-layer drift in the response frequency of the planar region, and the inter-layer drift of the response frequency is recorded as zero.

[0080] The direction of interlayer variation in response frequency is determined by the measured sequence of each accepted layer, without presupposing that it increases or decreases with increasing molding height or printing progress. For sequences determined to have drift according to the aforementioned rules, the mean of the difference between the response frequencies of the first and last layers is used to characterize the signed drift rate.

[0081] Furthermore, when the interlayer drift of the response frequency of a certain planar region is not zero, for the lateral deviation of each previous layer in the deviation record of the planar region, the spatial period of the lateral fluctuation is obtained again by taking the response frequency of the layer itself. The lateral fluctuation is reconstructed by the re-obtained spatial period, the attenuation envelope and amplitude reference of the layer, and then subtracted again to obtain the lateral deviation after subtraction. The corresponding item in the deviation record is replaced with the lateral deviation after subtraction, and the determination of unidirectional drift with layer number is made.

[0082] Specifically, if each layer uses the same spatial period when forming lateral fluctuations, and the response frequency of that planar region drifts with the layer number, then the spatial period of the measured fluctuations changes layer by layer. At the same arc length position, the phase difference between the formed fluctuation and the measured fluctuation accumulates with the layer number, and the absolute value of the residual after subtraction at that point increases with the layer number. This residual is consistent in data form with trajectory-type anomalies such as unidirectional drift with layer number, and the two are inseparable.

[0083] When the interlayer drift of the response frequency in a certain planar region is not zero, the transverse deviations of the previous layers in the deviation record of that planar region are re-subtracted: the response frequency recorded in the response characteristic distribution of that layer is taken, and the reference advance rate on the departure side of the inflection point of that layer is divided by the response frequency to obtain the spatial period of the transverse fluctuation of that layer; the starting position and amplitude reference are still taken from the original recorded values ​​of that layer; after the attenuation envelope is re-divided into periods according to the re-obtained spatial period, it is reconstructed by decreasing the amplitude attenuation data originally recorded in that layer periodically according to the period number; the transverse fluctuation is reconstructed according to the above items, and subtracted point by point from the original transverse deviation sequence saved in that layer to obtain the transverse deviation after re-subtraction, and the corresponding item in the deviation record of that layer is replaced.

[0084] Take the same plane coordinates from the deviation record, and after deducting the lateral deviations of the previous layers and the current forming layer, compare them in order of layer number: if the number of consecutive layers is not less than the lower limit of the drift statistics layer number, the values ​​of each layer have the same sign, the absolute value increases layer by layer, and the difference between the last layer and the first layer exceeds the tolerance described in Example 1, it is judged as a trajectory-type anomaly of unidirectional drift with layer number.

[0085] The deviation log stores the lateral deviation after subtraction for each layer, the original lateral deviation sequence for each layer, the starting position and amplitude reference for each inflection point, the response frequency of each planar region for each layer, amplitude attenuation data, and source markers. The number of layers retained in the deviation log shall not be less than the greater of the lower limit of the drift statistics layer count and the upper limit of the retained layer count.

[0086] Furthermore, for the same plane coordinates, the width deviation and purification trajectory position of two adjacent forming layers are taken; when the upper forming layer has a width anomaly at the plane coordinates, the lower forming layer has a width anomaly at the plane coordinates, the width deviations of the two forming layers have the same sign, and the absolute value of the width deviation of the lower forming layer is not greater than the absolute value of the width deviation of the upper forming layer, the width anomaly of the lower forming layer is listed as a transmission candidate for the width anomaly of the upper forming layer. After confirmation according to the rules of three consecutive forming layers described later, it is recorded as a transmission item and not output separately; when the upper forming layer has a trajectory anomaly at the plane coordinates, the lower forming layer has a width anomaly at the plane coordinates, the difference in the direction of the reference trajectory segments of the two forming layers at the plane coordinates does not exceed the direction comparison threshold, and the difference in the purification trajectory positions of the two forming layers exceeds the tolerance, the width anomaly of the lower forming layer is recorded as a transmission item for the trajectory anomaly of the upper forming layer and is output together with the trajectory anomaly of the upper forming layer.

[0087] Specifically, the reference trajectory segments of two adjacent forming layers do not overlap, and sampling points may not exist simultaneously at the same plane coordinates. Using the interval corresponding to the arc length step size described in Example 1 as the side length, a square grid is established in the forming plane. The lateral deviation, width deviation, and purification trajectory position of each sampling point in each layer are assigned to their respective grids according to their plane coordinates; when multiple sampling points exist within the same grid, the median value is taken. The transmission determination is performed grid-by-grid.

[0088] If the strip width of a certain forming layer deviates from the width reference at a certain grid, the deposition amount per unit length at that location will also deviate from the nominal value, and the forming height will also deviate from the nominal value. When the next forming layer is deposited at that grid, the gap between the nozzle and the substrate changes accordingly: if the previous forming layer is higher, the gap decreases, the extrudate is subjected to increased compression, and the strip width is wider; if the previous forming layer is lower, the gap increases, the compression is reduced, and the strip width is narrower. The above mechanism is only used to illustrate that this embodiment selects the same sign and decreasing absolute value as the criteria for the transfer candidate; it is a sufficient condition for discrimination, not a necessary evolution law under all materials, equipment configurations, and control parameters. If it is not satisfied, the abnormality of each layer will be output separately.

[0089] The determination is performed as follows: Take the width deviation of the same grid across three consecutive forming layers. If all three layers exhibit width anomalies at that grid, have the same sign for the width deviations, and the absolute value of the width deviation decreases with the layer number, record the width anomalies of the latter two forming layers as a propagation item for the width anomaly of the first forming layer, and do not output them separately. The width anomaly of the first forming layer is output as is, and the layer number range reached by the propagation is recorded in its record. If three consecutive layers have width anomalies with different signs or whose absolute values ​​do not decrease, output the width anomalies of each layer separately.

[0090] The transmission of trajectory-type anomalies to width-type anomalies occurs when a trajectory-type anomaly exists at a certain grid in a certain forming layer, where the actual spacing between adjacent strips deviates from the reference spacing. When the next forming layer measures the strip width at that grid along the normal direction of the purification trajectory as described in Example 1, the position of the groove between the two strips shifts with the change in the spacing of the previous forming layer, and the measured strip width changes accordingly. This change is not caused by the feeding and melting process of the next forming layer.

[0091] The determination is performed as follows: The clean trajectory position and reference trajectory segment direction of the same grid in two adjacent forming layers are taken. If the upper forming layer has a trajectory anomaly at this grid, the lower forming layer has a width anomaly at this grid, the difference between the reference trajectory segments of the two forming layers at this grid does not exceed the direction comparison threshold, and the difference between the clean trajectory positions of the two forming layers exceeds the tolerance described in Example 1, then the width anomaly of the lower forming layer is recorded as a transitive term of the trajectory anomaly of the upper forming layer, and is output along with the trajectory anomaly of the upper forming layer, not as a width anomaly output separately. This marker only indicates cross-layer correlation in image observation and is not used to determine that the width change of the lower layer is uniquely caused by the trajectory anomaly of the upper layer. The direction comparison threshold is obtained as follows: On any straight reference trajectory segment of this forming layer, the absolute value of the difference between the direction of the strip centerline at two adjacent arc length sampling points is taken, and the median value of the sum of the absolute values ​​of all sampling points contained in a strip width is taken as the direction comparison threshold.

[0092] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for defect detection in 3D printed parts based on machine vision, characterized in that, include: Acquire images of the forming layer, extract the center line of the strip, and match the center line of the strip with the path instruction segment according to the execution order and the connection topology to obtain the lateral deviation sequence; The response characteristics of the trajectory generation chain at the plane position and forming height of the trajectory generation end are obtained by using the ratio of the spatial period of the periodic fluctuations on the long straight reference trajectory segment to the reference propulsion rate. Using the wavelength corresponding to the response characteristics as the boundary, the short-wavelength components along the arc length of the strip centerline are suppressed to obtain the measured trajectory; the fluctuations after the change of direction are predicted by the response characteristics are subtracted from the lateral deviation sequence to obtain the trajectory-type anomaly, and the purification trajectory is obtained from the actual motion trajectory. The width of the strip is measured along the normal direction of the purification trajectory. Reference trajectory segments with the same reference width parameter and not located at the block boundary are grouped together. The width deviation sequence is obtained based on the median strip width within the group. The turning points are grouped according to the turning angle, the reference advance rate on both sides of the turning point and the length of the reference trajectory segment on both sides. The width anomaly is obtained by subtracting it from the width deviation sequence based on the median width increment within the group. Output the reference trajectory segment number, arc length interval, and layer number to which the trajectory-type anomaly and width-type anomaly belong.

2. The method for defect detection of 3D printed parts based on machine vision according to claim 1, characterized in that: The lateral deviation sequence is obtained by: projecting the formed layer image onto a coordinate system of the same scale and orientation as the reference trajectory, and correcting the imaging ratio with the forming height according to the layer thickness; taking the dark band in the projected image as the groove between the strips, taking the midline of the groove between two adjacent strips as the strip center line, and continuing the strip center line interrupted by surface undulations along the direction; within the arc length interval where adjacent strips overlap, taking the later strip center line as the visible strip center line according to the execution order of the reference trajectory segment; making a global assignment between the strip center line and the reference trajectory segment according to the execution order and connection topology, and the assignment result satisfies the connectivity and non-intersection of the reference trajectory; sampling along the direction of the reference trajectory segment with a fixed arc length step, and taking the lateral deviation of the strip center line relative to the reference trajectory segment point by point to form the lateral deviation sequence.

3. The method for defect detection of 3D printed parts based on machine vision according to claim 2, characterized in that: The process of obtaining response characteristics includes: selecting a long, straight reference trajectory segment with a change in direction and a length covering multiple cycles before the starting point in the lateral deviation sequence as the observation segment; taking the spatial period and amplitude attenuation data of the periodic fluctuations on each observation segment along the arc length; comparing at least two observation segments with different reference propulsion rates within the same planar region, accepting the observation segment whose spatial period is proportional to the reference propulsion rate, and discarding the observation segment whose spatial period is not proportional; determining the response frequency and attenuation data of the planar region at the current forming height based on the accepted results, thus constituting the response characteristics; for planar regions where no accepted results are obtained, using the response characteristics of adjacent planar regions at the same forming height; organizing the response characteristics of each planar region according to the planar position and forming height of the trajectory generation end and updating them layer by layer, thus constituting the response characteristic distribution.

4. The method for defect detection of 3D printed parts based on machine vision according to claim 3, characterized in that: The measured trajectory is obtained by: obtaining the response wavelength for each reference trajectory segment based on the response frequency corresponding to the plane position and forming height in the response characteristic distribution, and the reference propulsion rate of the reference trajectory segment; dividing the strip centerline position along the arc length into two parts: shorter than the boundary and not shorter than the boundary, using the set proportion of the response wavelength as the boundary; for the part shorter than the boundary, suppressing the position of adjacent strip centerlines within the same continuous direction at the same arc length position, excluding adjacent strip centerlines crossing trajectory interruptions and crossing blocks; retaining the part not shorter than the boundary as is; and combining the suppressed part with the retained part to synthesize the strip centerline position, thus forming the measured trajectory.

5. The method for defect detection of 3D printed parts based on machine vision according to claim 4, characterized in that: The process involves obtaining trajectory-type anomalies and cleanup trajectories, including: for each inflection point in the current layer, taking the response frequency and attenuation data of the trajectory generation end at the plane position and forming height of the inflection point, along with the departure side reference propulsion rate, to obtain the starting position, spatial period, and attenuation envelope of the lateral fluctuations after the inflection point; grouping inflection points with the same inflection angle and departure side reference propulsion rate into the first inflection point group, and taking the median of the measured initial amplitude within the first inflection point group as the amplitude reference of the first inflection point group; deducting the lateral fluctuations after the inflection point from the lateral deviation sequence according to the starting position, spatial period, attenuation envelope, and amplitude reference; deflections that are continuous along the arc length and exceed the tolerance after deduction constitute trajectory-type anomalies, and are classified into three types according to their shape: single-axis step-like and non-recovering, unidirectional drift with the layer number, and repeated occurrence in a fixed plane coordinate range; removing the components corresponding to the deducted lateral fluctuations from the measured trajectory to form the cleanup trajectory.

6. The method for defect detection of 3D printed parts based on machine vision according to claim 5, characterized in that: The width deviation sequence is obtained, including: taking the purification trajectory as the reference center line, measuring the strip width point by point along the normal of the reference center line, and updating the measurement direction point by point according to the local direction of the reference center line; within the arc length interval where the distance between two adjacent strips is less than the reference distance, taking the center line of the groove between the strips as the boundary determination benchmark of the strip; grouping the reference trajectory segments with the same reference width parameter in this layer and not located at the block boundary into a width group, and grouping the reference trajectory segments located at the block boundary into a separate boundary width group according to the reference width parameter; taking the median value of the strip width in the width group and the boundary width group as their respective width benchmarks; taking the deviation of the strip width relative to its respective width benchmark point by point to form the width deviation sequence.

7. The method for defect detection of 3D printed parts based on machine vision according to claim 6, characterized in that: Width-type anomalies are obtained, including: classifying each inflection point in this layer into a second inflection point group based on the inflection angle, the reference advance rate on both sides of the inflection point, and the length of the reference trajectory segment on both sides of the inflection point; inflection points whose reference trajectory segment length on the entry side is insufficient to reach the reference advance rate are classified into a separate second inflection point group; taking the width increment at each inflection point from the width deviation sequence, using the median value of the width increment within the second inflection point group as the increment benchmark for the second inflection point group, and subtracting it from the width deviation sequence; among the width deviations after subtraction, the arc length intervals where the strip width is continuously less than the width benchmark, the arc length intervals where there is no corresponding strip centerline on the purification trajectory and the length exceeds the width of one strip, the arc length intervals where the strip width is continuously greater than the width benchmark, and the arc length intervals where the strip width fluctuates periodically along the arc length, constitute four types of width-type anomalies respectively; outputting trajectory-type anomalies and width-type anomalies respectively according to the reference trajectory segment number and arc length interval.