Is there a fool proof way to lineup a vector and raster image?

Is there a fool proof way to lineup a vector and raster image? If you watch the quick screen grab you’ll see that when you zoom in that the two aren’t exactly on the same plane. Because the 2nd layer floats over top (see 3D view to see what I mean) you end up with a perspective problem so you can’t tell if you are truly lined up for both operations all the way across the image.

This is especially apparent in larger images where the lines to the left of center will float to the left of the corresponding raster boundaries while the lines to the right of center will float to the right of the raster boundaries. Make sense?
https://youtu.be/PGZzGrlPbPo

I did play with the offsets for a bit and it shifts so that you can line up what is currently centered, but the forced perspective of the layers makes the outsides shift out of position. So you never really know if your size is right (i.e. is my 300dpi image really the EXACT same size as the SVG or is it really 299 or 301 as Inkscape is known to do with exports.

real world example would be to cut the same image from two pieces of card stock. Line them up with about a 1mm gap between and look through one to the other. Unless you’re looking 90-degrees through, the surrounding parts will always look out of alignment.

Now if you put those two pieces of paper together without the gap, you can get a better picture. So I guess what I’m interested in is if there is way to flatten the plane when not viewing with the 3D enabled.

I have the same issue and it really is hard to know if you have it right or not. I usually eyeball it but it would help if the vector traces did not self align to 0,0.

I can see why it was done that way but that only works if you just want to do a trace of an image.

In the case where you want to engrave a raster image and then make that image really pop with a little vector around certain areas to crisp up the edges, it is hard to do.

One way around it is to import the image into Inkscape and trace the parts you want. Next, group the traces together and take note of the x and y coordinates. Next, save it as an svg file and open both the svg and image files in Laserweb3. From there you can use the x & y coordinates from Inkscape to offset the trace back onto the image.

I used this technique to re-align two vector files where one was the cut lines and one was the score lines.

Hope that helps.

Here is an updated screen grab showing more detail. Inkscape exports SVG at 90dpi. The png is also 90dpi in this instance and there is no additional white space and both images are at 0,0 in inkscape.


It actually looks like z0, assuming the grid is on z0 is between the two layers.

+Peter van der Walt Will do

+Peter van der Walt Maybe the white space is intentionally added. Now, because the trace offsets to 0,0 the user is then forced to do extra work to correct this.

IMO, a trace of an image should remain aligned with the image and not force the user to do more work to re-align the trace back onto the image. This needlessly adds time to a user’s workflow and is counter productive.

As for the parallax issue, I am seeing the same thing. Where is this laser mode you are referring to?

@John_Seaton ​ I beleive he is referring to laser mode in CNCWeb. Go to settings and enable it, then refresh

Oh thanks, I thought he was referring to laserweb. I see from the comments the issues has been confirmed so I guess it is a moot point now lol.

I think 0,0 is fine, but for those who want their images aligned elsewhere that can also be addressed on the image setup by adding some sort of reference mark at 0,0 in your svg. A 1x1 pixel or whatever. If you have that in every image you are trying to align then it should keep you where you want to be.

That was a trick you had to use with the stock Corel Laser and the stock board.

I have seen other software implement a dithered mode to simulate the gray scale in images in response to the banggood machines (which is what I have lol) I custom built a laser module for mine so I can do gray scale but that’s beside the point. Dithering does a good job of simulating gray scale and is basically what Benbox does to allow these machines to do images.

Tracing an image is an altogether different function and used for a completely different purpose. I’m only suggesting the vector generated from tracing an image should not be shifted to 0,0 not all vectors. Opening a vector file could be shifted to 0,0 but even that should be an option to the user to enable or disable. IMO.

lol, I would have to agree there and I do prefer to do my prep work in Inkscape or Gimp prior to Laserweb. I’m not suggesting you turn this into an image editor, I was merely suggesting a different approach to solving the banggood non PWM laser modules problem.

For me, when I come to the gcode sender tool of choice, I like to keep the steps needed prior to sending the laser to a minimum because that’s what I’m there to do, print it not edit it lol. The suggestions I make are meant to improve that type of workflow.

Adding a trace is a nice feature to have if you forgot to make your vector file and it lets you add that while you’re in laserweb.

I’ll put it on my list to do and you can tell me if you like the result or not. And yes, I’m still planning on adding spline support for DXF files too.

@Carl_Fisher I’ve used a similar trick with my vectors & rasters, where with vectors I added a rectangle around the whole lot (then removed it in the CAM tree after I added the image) & rasters I just made a fully white background as big as I needed it to align it perfectly. Only issue there was that the laser would “scan” back & forth along the whole width of the white background. Could be extra time-consuming, but for my need at the time it didn’t bother me.

I live the CAM tree for deleting stuff :slight_smile:

+Peter van der Walt This looks great in v30398. Thanks!