Three-dimensional model punching processing method, printing method, related equipment and storage medium

文档序号:443813 发布日期:2021-12-28 浏览:4次 中文

阅读说明:本技术 三维模型打孔处理方法、打印方法、相关设备和存储介质 (Three-dimensional model punching processing method, printing method, related equipment and storage medium ) 是由 刘鹏 于 2021-09-30 设计创作,主要内容包括:本申请提供了一种三维模型打孔处理方法、打印方法、相关设备和存储介质。上述三维模型打孔处理方法包括:获取打孔模型参数;根据打孔模型参数在打印模型上设置打孔标记;对设置打孔标记后的打印模型进行切片,得到目标层切片。本申请实施例中,根据获取到的打孔模型参数在打印模型上设置打孔标记,对设置打孔标记后的打印模型进行切片,得到目标层切片;而不需要计算打孔模型和打印模型的三维相交区域,并对三维相交区域内的交点进行插值计算。上述方式通过将三维空间中的模型打孔运算降至二维空间处理,减少了计算量,以此提高了对三维模型进行打孔处理的效率。(The application provides a three-dimensional model punching processing method, a printing method, related equipment and a storage medium. The three-dimensional model punching processing method comprises the following steps: acquiring parameters of a punching model; setting a punching mark on the printing model according to the punching model parameter; and slicing the printing model with the punching marks to obtain target layer slices. In the embodiment of the application, a punching mark is set on the printing model according to the obtained punching model parameters, and the printing model with the punching mark is sliced to obtain a target layer slice; and the three-dimensional intersection area of the punching model and the printing model does not need to be calculated, and the intersection point in the three-dimensional intersection area is subjected to interpolation calculation. According to the mode, the model punching operation in the three-dimensional space is reduced to the two-dimensional space processing, the calculated amount is reduced, and therefore the efficiency of punching the three-dimensional model is improved.)

1. A three-dimensional model punching processing method is characterized by comprising the following steps:

acquiring parameters of a punching model;

setting a punching mark on the printing model according to the punching model parameter;

and slicing the printing model with the punching marks to obtain target layer slices.

2. The method of claim 1, wherein the perforation mark comprises a first portion and/or a second portion; the first portion is located on the printing model surface, the second portion is located below the printing model surface, and the punched mark is an editable mark.

3. The method of claim 1, wherein the slicing the printed model after the punching mark is set to obtain the target layer slice comprises:

performing image difference processing on the first layer slice in the printing model; the first layer slice is a layer slice shared by the printing model and the punching model, and the punching model is determined based on the punching model parameters;

and determining the layer slice in the printing model after the image difference processing is carried out on the first layer slice as the target layer slice.

4. The method of claim 3, wherein the image difference processing for the first layer slice in the print model comprises:

for any first layer slice, determining a first contour region and a second contour region corresponding to the first layer slice; the first outline area is associated with a printing model, the second outline area is associated with a punching model, and at least a partial area of the second outline area is included in the first outline area;

performing image difference processing on the first contour region and the second contour region;

or;

for any first layer slice, determining a first image area and a second image area corresponding to the first layer slice; the first image area is associated with a printing model, the second image area is associated with a punching model, and at least a partial area of the second image area is included in the first image area;

converting target pixel points in the first image area into non-image pixel points, wherein the target pixel points are pixel points of the second image area included in the first image area.

5. The method of claim 4, wherein the image difference processing the first contour region and the second contour region comprises:

determining an intersecting contour region between the first contour region and the second contour region according to each coordinate point of the first contour region and the second contour region;

and determining the area except the intersection contour area in the first contour area as a target contour area.

6. The method of claim 5, wherein determining an intersecting contour region between a first contour region and a second contour region from each coordinate point of the first contour region and the second contour region comprises:

traversing each coordinate point of the first contour region and the second contour region;

determining a coordinate point of the first contour region, which is the same as the second contour region, as a first coordinate point;

determining an intersection coordinate point located in the first contour region as a second coordinate point, wherein the intersection coordinate point is an intersection point between every two adjacent line segments in the second contour region;

determining an intersecting contour region based on the first coordinate point and the second coordinate point.

7. A method of printing, the method comprising:

acquiring an image to be printed, and printing a model according to the image to be printed; wherein the image to be printed is a target layer slice generated by the three-dimensional model punching processing method according to any one of claims 1 to 6.

8. A printing system is characterized by comprising an image processing apparatus and a printing device;

the image processing device is used for executing the three-dimensional model punching processing method according to any one of claims 1-6;

and the printing equipment uses the target layer slice output by the image processing device and obtains a target model according to the target layer slice.

9. A printing apparatus comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the three-dimensional model punching processing method according to any one of claims 1 to 6.

10. A readable storage medium, on which a program or instructions are stored, which when executed by a processor, implement the steps of the three-dimensional model punching processing method according to any one of claims 1 to 6.

Technical Field

The application belongs to the technical field of printing, and particularly relates to a three-dimensional model punching processing method, a printing method, related equipment and a storage medium.

Background

The 3D printing technique is a technique of constructing an object by stacking layers one on top of another on the basis of a digital model file using a bondable material such as powdered metal or plastic.

At present, when a 3D printing technology is used to punch a printing model, a three-dimensional intersection region of the punching model and the printing model needs to be obtained through calculation, and interpolation calculation is performed on an intersection point in the three-dimensional intersection region, so as to obtain the printing model after punching.

However, the above process involves processing in a three-dimensional space, and requires interpolation calculation of the intersection point in the three-dimensional intersection region of the punching model and the printing model through relatively complicated calculation steps, which results in a large amount of calculation and consumes relatively much calculation time, which reduces the efficiency of punching the three-dimensional model.

Disclosure of Invention

The embodiment of the application aims to provide a three-dimensional model punching processing method, a printing method, related equipment and a storage medium, and can solve the problems that the existing three-dimensional model punching processing mode is large in calculation amount and low in punching processing efficiency.

In a first aspect, an embodiment of the present application provides a three-dimensional model punching method, including:

acquiring parameters of a punching model;

setting a punching mark on the printing model according to the punching model parameter;

and slicing the printing model with the punching marks to obtain target layer slices.

In a second aspect, an embodiment of the present application provides a three-dimensional model punching processing method, including:

determining a second layer of slices corresponding to the printing model and a third layer of slices corresponding to the punching model; the printing model at least partially intersects the punching model;

dividing the second layer slice into a first sublayer slice and a second sublayer slice based on the position relation between the printing model and the punching model; the first sublayer slice is a slice of the second layer slice which intersects with the third layer slice;

updating a first sub-layer slice based on an intersection region between the first sub-layer slice and an intersected third-layer slice;

and determining the second sub-layer slice and the updated first sub-layer slice as target layer slices.

Optionally, the updating the first sub-layer slice based on an intersection area between the first sub-layer slice and the intersected third layer slice includes:

determining a third image region where the image region of the first sub-layer slice intersects the image region of the intersecting third layer slice;

and converting pixel points corresponding to the third image area into non-image pixel points in the image area of the first sub-layer slice to obtain an updated first sub-layer slice.

Optionally, the dividing the second layer slice into a first sublayer slice and a second sublayer slice based on a positional relationship between the printing model and the punching model includes:

reading first coordinate information corresponding to the second layer of slices and second coordinate information corresponding to the third layer of slices;

determining a second layer slice corresponding to coordinate information common to the first coordinate information and the second coordinate information as the first sublayer slice based on the first coordinate information and the second coordinate information;

determining a layer slice of the second layer slice except the first sublayer slice as the second sublayer slice.

Optionally, after determining the second sublayer slice and the updated first sublayer slice as the target layer slice, the method further includes:

and performing three-dimensional model reconstruction by using the target layer slice to generate a target model so as to verify whether the target model is obtained after the punching operation is performed on the printing model by the punching model.

In a third aspect, an embodiment of the present application provides a printing method, including:

acquiring an image to be printed, and printing a model according to the image to be printed; wherein the image to be printed is a target layer slice generated by the method according to the first aspect, or the image to be printed is a target layer slice generated by the method according to the second aspect.

In a fourth aspect, embodiments of the present application provide a printing system, which includes an image processing apparatus and a printing device;

the image processing apparatus is configured to perform the method according to the first aspect, or perform the method according to the second aspect;

and the printing equipment uses the target layer slice output by the image processing device and obtains a target model according to the target layer slice.

In a fifth aspect, embodiments of the present application provide a printing apparatus comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method according to the first aspect or implementing the steps of the method according to the second aspect.

In a sixth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect, or implement the steps of the method according to the second aspect.

In the embodiment of the application, parameters of a punching model are obtained; setting a punching mark on the printing model according to the punching model parameter; and slicing the printing model with the punching marks to obtain target layer slices. In the embodiment of the application, a punching mark is set on the printing model according to the obtained punching model parameters, and the printing model with the punching mark is sliced to obtain a target layer slice; and the three-dimensional intersection area of the punching model and the printing model does not need to be calculated, and the intersection point in the three-dimensional intersection area is subjected to interpolation calculation. According to the mode, the model punching operation in the three-dimensional space is reduced to the two-dimensional space processing, the calculated amount is reduced, and therefore the efficiency of punching the three-dimensional model is improved.

Drawings

Fig. 1 is a flowchart of a three-dimensional model punching processing method provided in an embodiment of the present application;

fig. 2 is a schematic view of a scene in which image difference processing is performed on a first contour region and a second contour region according to an embodiment of the present application;

FIG. 3 is a flowchart of another three-dimensional model punching processing method according to an embodiment of the present disclosure;

FIG. 4 is a flow chart of a printing method provided by an embodiment of the present application;

FIG. 5 is a block diagram of a printing system provided in an embodiment of the present application;

fig. 6 is a block diagram of an electronic device provided in an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.

The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.

The three-dimensional model punching processing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.

Referring to fig. 1, fig. 1 is a flowchart of a three-dimensional model punching processing method according to an embodiment of the present application. The three-dimensional model punching processing method provided by the embodiment of the application comprises the following steps:

and S101, acquiring parameters of the punching model.

The punching model parameters are related parameters of the punching model, and the punching model parameters are used for setting punching marks on the printing model.

In the step, parameters of the punching model can be obtained based on the input of a user; or, the parameters of the puncturing model are obtained from the internet, which is not specifically limited herein.

And S102, setting a punching mark on the printing model according to the punching model parameters.

In this step, after the parameters of the punching model are obtained, a punching mark is set on the printing model, the punching mark is generated based on the parameters of the punching model, and please refer to the following embodiments regarding the specific technical content of the punching mark.

The print model may be preset, or the print model may be determined based on an input of a user, which is not specifically limited herein.

And S103, slicing the printing model with the punching marks to obtain target layer slices.

In this step, after the punching mark is set to the printing model, the printing model after the punching mark is set is sliced, and the layer slice obtained after the slicing process is determined as the target layer slice.

In the embodiment of the application, a punching mark is set on the printing model according to the obtained punching model parameters, and the printing model with the punching mark is sliced to obtain a target layer slice; and the three-dimensional intersection area of the punching model and the printing model does not need to be calculated, and the intersection point in the three-dimensional intersection area is subjected to interpolation calculation. According to the mode, the model punching operation in the three-dimensional space is reduced to the two-dimensional space processing, the calculated amount is reduced, and therefore the efficiency of punching the three-dimensional model is improved.

Optionally, the punch mark comprises a first portion and/or a second portion; the first portion is located on the printing model surface, the second portion is located below the printing model surface, and the punched mark is an editable mark.

In this embodiment, the punching mark includes a first portion and/or a second portion, where the first portion is also called a visible portion, and the first portion is located on the printing model surface, and specifically, the first portion may be a contour region of the printing model surface. The second portion, also called the invisible portion, is located below the surface of the print model.

It should be understood that the above-mentioned hole-punching marks are editable marks, that is, the hole-punching marks can be edited based on the input of the user. The punching mark does not delete the printing model and only plays a role of marking.

Optionally, the slicing the print model after the punching mark is set, and obtaining a target layer slice includes:

performing image difference processing on the first layer slice in the printing model;

and determining the layer slice in the printing model after the image difference processing is carried out on the first layer slice as the target layer slice.

In this embodiment, before the printing model is sliced, image difference processing is performed on a first layer slice in the printing model, where the first layer slice is a layer slice common to the printing model and the punching model, and the punching model is determined based on the punching model parameters. That is, the first layer slice is a layer slice of the print model that intersects the punch model.

And after the image difference processing is carried out on the first layer slice, all the layer slices in the printing model are determined as target layer slices. For a specific implementation of performing image difference processing on the first slice, please refer to the following examples.

In this embodiment, through carrying out image difference processing to the first layer section that printing model and punching model shared, realize the effect of punching in two-dimensional space, reduce the calculated amount and the calculating time of processing of punching, and then improve punching efficiency.

Optionally, the performing image difference processing on the first layer slice in the print model includes:

for any first layer slice, determining a first contour region and a second contour region corresponding to the first layer slice;

performing image difference processing on the first contour region and the second contour region;

or;

for any first layer slice, determining a first image area and a second image area corresponding to the first layer slice;

and converting the target pixel points in the first image area into non-image pixel points.

Two embodiments of image difference processing on the slice of the first layer are specifically described below:

the first implementation mode comprises the following steps: contour subtraction method

In this embodiment, for any one first layer slice, a first outline region and a second outline region corresponding to the first layer slice are determined, where the first outline region is associated with a print model, the second outline region is associated with a punch model, and at least a partial region of the second outline region is included in the first outline region. That is, the contour corresponding to the first layer slice may be determined as a first contour region, and the contour corresponding to the layer slice of the puncture model where the first layer slice intersects may be determined as a second contour region.

The image difference processing is performed on the first contour region and the second contour region, and here, the following contents are referred to in a specific technical scheme.

The second embodiment: image subtraction method

In this embodiment, for any one first layer slice, a first image area and a second image area corresponding to the first layer slice are determined, wherein the first image area is associated with a print model, the second image area is associated with a punch model, and at least a partial area of the second image area is within the first image area. That is, the first layer slice may be determined as the first image area, and a portion of the first layer slice that intersects the punch model may be determined as the second image area.

After the first image area and the second image area are obtained, a target pixel point in the first image area is determined, the target pixel point is a pixel point of the second image area included in the first image area, and the target pixel point in the first image area is converted into a non-image pixel point, so that difference processing of the images is achieved.

Optionally, the performing image difference processing on the first contour region and the second contour region includes:

determining an intersecting contour region between the first contour region and the second contour region according to each coordinate point of the first contour region and the second contour region;

and determining the area except the intersection contour area in the first contour area as a target contour area.

As described above, the first contour region is a contour corresponding to the first layer slice, and the second contour region is a contour corresponding to the layer slice of the punching model where the first layer slices intersect.

In this embodiment, an intersecting contour region between the first contour region and the second contour region may be determined based on each coordinate point of the first contour region and the second contour region, please refer to the following embodiments for a specific technical solution.

Further, the image difference processing is performed on the intersecting contour region in the first contour region, specifically, the region other than the intersecting contour region in the first contour region is determined as the target contour region, and in this way, the actual contour region of the first layer slice is determined.

Optionally, the determining an intersecting contour region between the first contour region and the second contour region according to each coordinate point of the first contour region and the second contour region comprises:

traversing each coordinate point of the first contour region and the second contour region;

determining a coordinate point of the first contour region, which is the same as the second contour region, as a first coordinate point;

determining an intersecting coordinate point located within the first contour region as a second coordinate point;

determining an intersecting contour region based on the first coordinate point and the second coordinate point.

In this embodiment, each coordinate point of the first contour region and the second contour region is traversed, that is, a first coordinate of each point in the first contour region and a second coordinate of each point in the second contour region are obtained.

If there are first coordinates and second coordinates with the same value, the coordinate points corresponding to the same coordinates are determined as first coordinate points, and it should be understood that the number of the first coordinate points is greater than or equal to 2.

And determining the intersection point between every two adjacent line segments in the second contour region, and determining the intersection coordinate point in the first contour region as a second coordinate point.

After the first coordinate point and the second coordinate point are determined, the contour region formed by the first coordinate point and the second coordinate point is determined as an intersecting contour region.

For easy understanding, referring to fig. 2, as shown in fig. 2, the first contour region is a circle and the second contour region is a triangle.

As shown in fig. 2, the first contour region includes a point a and a point B, and the second contour region also includes a point a and a point B, which may be the first coordinate point.

The point C of the second contour region is an intersection of two adjacent line segments, and the point is located within the first contour region, so that the point C can be determined as a second coordinate point.

It will be appreciated that each line segment in the first contour region may be traversed, for each line segment, cross-multiplying the start point of the line segment and the end point of the line segment as a first vector and the start point of the line segment and the intersection coordinate point as a second vector. If the cross-product operation result corresponding to each line segment indicates that the intersection coordinate point is located on the same side of the line segment, it can be determined that the intersection coordinate point is located in the first contour region, and the intersection coordinate point is determined as the second coordinate point.

In other embodiments, the first contour region and the second contour region may not have the same coordinate point, in which case, if all the coordinate points of the second contour region are located in the coordinate range represented by the coordinate points of the first contour region, it indicates that the first contour region includes all the second contour regions, so that the second contour region may be determined as the intersecting contour region.

Referring to fig. 3, fig. 3 is a flowchart illustrating another three-dimensional model punching processing method according to an embodiment of the present disclosure. The embodiment of the application also provides a three-dimensional model punching processing method, which comprises the following steps:

s201, determining a second layer slice corresponding to the printing model and a third layer slice corresponding to the punching model.

In this step, the punching model and the printing model may be virtual three-dimensional models generated based on user input, and the printing model and the punching model at least partially intersect.

In some embodiments, the print model may be a "rabbit" and the punch model is a cylinder and intersects the back of the print model "rabbit". It should be understood that in some embodiments, the perforation pattern may also be other shapes, such as a cone.

And respectively carrying out slicing processing on the printing model and the punching model to obtain a second layer of slices of the printing model and a second layer of slices corresponding to the punching model.

The images in each layer slice are images on the cross section of the slice position corresponding to each layer slice, and the images in each layer slice can be the same or different. For example, when the print model is a cube, the image in each second layer slice is a square; when the print model is a sphere, the images in each second slice are circles with different radii.

The slicing sequence for slicing the printing model and the punching model may be: firstly, slicing the printing model, and then slicing the punching model; or, firstly, slicing the punching model, and then slicing the printing model; alternatively, the punching model and the printing model may be subjected to slicing processing at the same time, which is not specifically limited herein.

S202, dividing the second layer slice into a first sublayer slice and a second sublayer slice based on the position relation between the printing model and the punching model.

The first sublayer slice is a slice of the second layer slice which intersects with the third layer slice;

as described above, the print model at least partially intersects the punching model, and based on the positional relationship between the print model and the punching model, a portion of the second-layer slice that intersects the third-layer slice is determined as the first-sublayer slice, and a portion of the second-layer slice that does not intersect the third-layer slice is determined as the second-sublayer slice.

It should be understood that the sum of the number of first sublayer slices and the number of second sublayer slices is the number of second layer slices.

S203, updating the first sub-layer slice based on an intersection region between the first sub-layer slice and the intersected third sub-layer slice.

As described above, the first sublayer slice intersects the third layer slice. In this step, the first sub-layer slice may be updated based on an intersection area between the first sub-layer slice and the third sub-layer slice that intersects with the first sub-layer slice.

And S204, determining the second sublayer slice and the updated first sublayer slice as target layer slices.

In this step, after the first sublayer slice is updated, the second sublayer slice and the updated first sublayer slice are determined as a target layer slice, and the target layer slice is printed to obtain a target model, or a virtual three-dimensional model is generated based on the target layer slice.

In the embodiment of the application, the printing model and the punching model are sliced to obtain a second layer of slices and a third layer of slices; dividing the second layer of slices into first sublayer slices and second sublayer slices based on the position relation between the printing model and the punching model, wherein the first sublayer slices are the layer slices which are intersected with the third layer of slices in the second layer of slices; updating the first sub-layer slice based on an intersection region between the first sub-layer slice and the intersected second layer slice; and determining the second sub-layer slice and the updated first sub-layer slice as the target layer slice. In the process, the three-dimensional intersection area of the punching model and the printing model does not need to be calculated, interpolation calculation is carried out on the intersection points in the three-dimensional intersection area, model punching calculation in the three-dimensional space is reduced to two-dimensional space processing, the calculated amount is reduced, and therefore the punching processing efficiency of the three-dimensional model is improved.

Optionally, the updating the first sub-layer slice based on an intersection area between the first sub-layer slice and the intersected third layer slice includes:

determining a third image region where the image region of the first sub-layer slice intersects the image region of the intersecting third layer slice;

and converting pixel points corresponding to the third image area into non-image pixel points in the image area of the first sub-layer slice to obtain an updated first sub-layer slice.

The shape of the image area of the first layer slice is related to the shape of the printing model, and the shape of the image area of the second layer slice is related to the shape of the punching model.

Illustratively, the print model is a cube, then the shape of the image area of the first sub-layer slice is a square; the perforation pattern is a cylinder, and the image area of the third slice is circular in shape.

In the present embodiment, a third image region where the image region of the first sublayer slice intersects with the image region of the intersecting third layer slice is determined. One possible case is that the image area of the first sub-layer slice comprises part of the image area of the third layer slice, in which case the area of the third image area is smaller than the area of the image area of the first sub-layer slice. Another possible situation is that the image area of the first sub-layer slice comprises the image area of all third layer slices, in which case the area of the third image area is equal to the area of the image area of the first sub-layer slice.

In this embodiment, after the third image area is determined, the pixel points corresponding to the third image area are converted into non-image pixel points in the image area of the first sub-layer slice, so as to update the first sub-layer slice.

In this embodiment, the first-layer slice is updated based on the intersection region between the first-sublayer slice and the intersected third-layer slice, so that the punching operation in the three-dimensional space is reduced to the two-dimensional space processing, the calculation amount is reduced, and the efficiency of punching the three-dimensional model is improved.

Optionally, the dividing the second layer slice into a first sublayer slice and a second sublayer slice based on a positional relationship between the printing model and the punching model includes:

reading first coordinate information corresponding to the second layer of slices and second coordinate information corresponding to the third layer of slices;

determining a second layer slice corresponding to coordinate information common to the first coordinate information and the second coordinate information as the first sublayer slice based on the first coordinate information and the second coordinate information;

determining a layer slice of the second layer slice except the first sublayer slice as the second sublayer slice.

In this embodiment, a three-dimensional rectangular coordinate system may be established with the center of the printing model as a circle center, so as to determine first coordinate information corresponding to the second layer of slices and second coordinate information corresponding to the third layer of slices. It should be understood that in other embodiments, the center of the three-dimensional rectangular coordinate system can be set in a customized manner.

The first coordinate information and the second coordinate information may be coordinate ranges, that is, the first coordinate information includes coordinate information of all pixel points in an image region corresponding to the second layer slice, and the second coordinate information includes coordinate information of all pixel points in an image region corresponding to the third layer slice.

Reading the first coordinate information and the second coordinate information, and if the coordinate range represented by the first coordinate information and the coordinate range represented by the second coordinate information have intersection, determining that the second layer slice corresponding to the first coordinate information is intersected with the third layer slice, wherein the second layer slice corresponding to the first coordinate information comprises at least a partial image area of the third layer slice. That is, the second layer slice corresponding to the first coordinate information includes coordinate information common to the first coordinate information and the second coordinate information, and in this case, the second layer slice is determined as the first sublayer slice.

In this embodiment, after the first sublayer slice is determined, the first layer slice except for the first sublayer slice in the first layer slice is determined as the second sublayer slice.

Optionally, after determining the second sublayer slice and the updated first sublayer slice as the target layer slice, the method further includes:

and performing three-dimensional model reconstruction by using the target layer slice to generate a target model so as to verify whether the target model is obtained after the punching operation is performed on the printing model by the punching model.

In this embodiment, after the target layer slice is obtained, the target layer slice may be browsed, and the target layer slice is used to perform three-dimensional model reconstruction to generate a target model, which is a virtual three-dimensional model. Therefore, the user can visually verify the virtual three-dimensional model and determine whether the target model is a punching model or not, and the model to be punched is obtained after punching operation is performed on the target model.

Optionally, before dividing the second layer slice into a first sublayer slice and a second sublayer slice based on a positional relationship between the printing model and the punching model, the method further includes:

receiving a first input;

in response to the first input, generating the print model and the punch model, and adjusting a position between the print model and the punch model such that the print model at least partially intersects the punch model.

In this embodiment, the first input may be related data input by a user, or touch input, or include related data input by a user and touch input.

In an alternative embodiment, the first input comprises user input modeling data and touch input. In response to the modeling data in the first input, a print model and a punch model are generated, and a position between the print model and the punch model is adjusted based on the touch input such that the print model and the punch model at least partially intersect.

Optionally, the generating the print model and the punch model in response to the first input, and the adjusting the position between the print model and the punch model comprises:

generating a first model and a second model in response to the model parameters;

in response to a first sub-input to the first model, tagging the first model as a punctured model;

and responding to the scene parameters, and adjusting the position relation between the punching model and a printing model, wherein the printing model is the second model.

In this embodiment, the first input includes a model parameter, a scene parameter, and a first sub-input.

And generating a first model and a second model according to the model parameters. For example, the first model may be a cylinder, and then the model parameters include, but are not limited to, length information of the cylinder and radius information of the cylinder.

After generating the first model and the second model, the first model is labeled as a punctured model in response to the first sub-input to the first model, that is, the first model is labeled as an inverse morphology. It should be appreciated that in other embodiments, the second model may also be labeled as a puncturing model.

And determining the position of the punching model according to the scene parameters. It should be noted that the number of model parameters is consistent with the number of scene parameters, and the model parameters correspond to the scene parameters one to one, and one model parameter and scene parameter having a correspondence relationship may be referred to as a set of modeling data. It should be appreciated that a set of modeling data characterizes a punch model that intersects a print model.

In some embodiments, the first input includes more than two model parameters and scene parameters, i.e., more than two sets of modeling data, such that a plurality of punching models intersecting the printing model can be created based on the modeling data.

Embodiments of the present invention also include these and other aspects as specified in the following numbered clauses:

1. a three-dimensional model punching processing method comprises the following steps:

acquiring parameters of a punching model;

setting a punching mark on the printing model according to the punching model parameter;

and slicing the printing model with the punching marks to obtain target layer slices.

2. The method of clause 1, wherein the punch mark comprises a first portion and/or a second portion; the first portion is located on the printing model surface, the second portion is located below the printing model surface, and the punched mark is an editable mark.

3. The method of clause 1, wherein said slicing the print model after the punch mark is set comprises:

performing image difference processing on the first layer slice in the printing model; the first layer slice is a layer slice shared by the printing model and the punching model, and the punching model is determined based on the punching model parameters;

and determining the layer slice in the printing model after the image difference processing is carried out on the first layer slice as the target layer slice.

4. The method of clause 3, wherein the image difference processing for the first layer slice in the print model comprises:

for any first layer slice, determining a first contour region and a second contour region corresponding to the first layer slice; the first outline area is associated with a printing model, the second outline area is associated with a punching model, and at least a partial area of the second outline area is included in the first outline area;

performing image difference processing on the first contour region and the second contour region;

or;

for any first layer slice, determining a first image area and a second image area corresponding to the first layer slice; the first image area is associated with a printing model, the second image area is associated with a punching model, and at least a partial area of the second image area is included in the first image area;

converting target pixel points in the first image area into non-image pixel points, wherein the target pixel points are pixel points of the second image area included in the first image area.

5. The method of clause 4, wherein the image difference processing the first contour region and the second contour region comprises:

determining an intersecting contour region between the first contour region and the second contour region according to each coordinate point of the first contour region and the second contour region;

and performing image difference processing on the intersected contour region in the first contour region.

6. The method of clause 5, wherein determining an intersecting contour region between a first contour region and a second contour region from each coordinate point of the first contour region and the second contour region comprises:

traversing each coordinate point of the first contour region and the second contour region;

determining a coordinate point of the first contour region, which is the same as the second contour region, as a first coordinate point;

determining an intersection coordinate point located in the first contour region as a second coordinate point, wherein the intersection coordinate point is an intersection point between every two adjacent line segments in the second contour region;

determining an intersecting contour region based on the first coordinate point and the second coordinate point.

7. A three-dimensional model punching processing method comprises the following steps: determining a second layer of slices corresponding to the printing model and a third layer of slices corresponding to the punching model; the printing model at least partially intersects the punching model;

dividing the second layer slice into a first sublayer slice and a second sublayer slice based on the position relation between the printing model and the punching model; the first sublayer slice is a slice of the second layer slice which intersects with the third layer slice;

updating a first sub-layer slice based on an intersection region between the first sub-layer slice and an intersected third-layer slice;

and determining the second sub-layer slice and the updated first sub-layer slice as target layer slices.

8. The method of clause 7, wherein updating the first sub-layer slice based on an intersection region between the first sub-layer slice and an intersecting third layer slice comprises:

determining a third image region where the image region of the first sub-layer slice intersects the image region of the intersecting third layer slice;

and converting pixel points corresponding to the third image area into non-image pixel points in the image area of the first sub-layer slice to obtain an updated first sub-layer slice.

9. The method of clause 7, wherein said dividing the second-layer slice into a first-sublayer slice and a second-sublayer slice based on the positional relationship between the print model and the punch model comprises:

reading first coordinate information corresponding to the second layer of slices and second coordinate information corresponding to the third layer of slices;

determining a second layer slice corresponding to coordinate information common to the first coordinate information and the second coordinate information as the first sublayer slice based on the first coordinate information and the second coordinate information;

determining a layer slice of the second layer slice except the first sublayer slice as the second sublayer slice.

10. The method of clause 7, after determining the second sub-layer slice and the updated first sub-layer slice as target layer slices, the method further comprising:

and performing three-dimensional model reconstruction by using the target layer slice to generate a target model so as to verify whether the target model is obtained after the punching operation is performed on the printing model by the punching model.

11. A method of printing, the method comprising:

acquiring an image to be printed, and printing a model according to the image to be printed; the image to be printed is a target layer slice generated by the three-dimensional model punching processing method in any one of clauses 1-6, or the image to be printed is a target layer slice generated by the three-dimensional model punching processing method in any one of clauses 7-10.

12. A printing system includes an image processing apparatus and a printing device;

the image processing apparatus is configured to execute the three-dimensional model punching processing method according to any one of clauses 1 to 6, or execute the three-dimensional model punching processing method according to any one of clauses 7 to 10;

and the printing equipment uses the target layer slice output by the image processing device and obtains a target model according to the target layer slice.

13. A printing apparatus comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the three-dimensional model punching processing method of any of clauses 1-6, or implementing the steps of the three-dimensional model punching processing method of any of clauses 7-10.

14. A readable storage medium storing thereon a program or instructions which, when executed by a processor, implements the steps of the three-dimensional model punching processing method according to any one of clauses 1 to 6, or implements the steps of the three-dimensional model punching processing method according to any one of clauses 7 to 10.

An embodiment of the present application further provides a printing method, as shown in fig. 4, the printing method includes:

s301, obtaining an image to be printed, and printing a model according to the image to be printed.

The image to be printed is the target layer slice generated by the three-dimensional model punching processing method.

It should be understood that the printing method provided in the embodiment of the present application can implement each process of the foregoing three-dimensional model punching processing method embodiment, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.

The embodiment of the present application further provides a printing system, as shown in fig. 5, the printing system 400 includes an image processing apparatus 401 and a printing device 402;

the image processing apparatus 401 is configured to execute each process of the three-dimensional model punching processing method embodiment;

the printing device 402 uses the target layer slice output by the image processing apparatus 401, and obtains a target model according to the target layer slice.

It should be understood that the printing system 400 provided in this embodiment of the present application can implement each process of the foregoing three-dimensional model punching processing method embodiment, and can achieve the same technical effect, and for avoiding repetition, details are not described here again.

The embodiment of the present application further provides a printing apparatus, which includes a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, where the program or the instruction is executed by the processor to implement each process of the three-dimensional model punching processing method embodiment, and can achieve the same technical effect, and no further description is given here to avoid repetition.

Optionally, as shown in fig. 6, an electronic device 500 is further provided in this embodiment of the present application, and includes a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and executable on the processor 501, where the program or the instruction is executed by the processor 501 to implement each process of the foregoing three-dimensional model punching processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.

The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the foregoing three-dimensional model punching processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.

While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种应用于颧骨3D打印中三维图像处理方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!