Author Topic: [V1 - 69] Internal/external cut mismatch on CB V1.0  (Read 215 times)

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6682
    • View Profile
    • Cambam V1.0 French Doc
[V1 - 69] Internal/external cut mismatch on CB V1.0
« on: November 14, 2021, 21:59:02 pm »
Hello

On the following file, the profile cut is on the wrong side in CB V1.0, but it's OK on CB 0.98 ... I can't find what is the problem, the polyline seems to be OK.

The problem seems to be the same as here
https://cambamcnc.com/forum/index.php?topic=9137.msg71666#msg71666

If I insert a point in the bottom arc, that solve the problem.

++
David
« Last Edit: November 14, 2021, 22:01:53 pm by dh42 »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4854
    • View Profile
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #1 on: November 15, 2021, 07:46:41 am »
It appears to be related to Arcs.

If you use Remove Arcs it works correctly.
Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1536
    • View Profile
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #2 on: November 17, 2021, 06:46:02 am »
Hi David

I had a fiddle with the file and tried many things, redrawing the geometry completely worked.
however to get good toolpaths with the original geometry I had to explode and use the individual
components, if I then joined the geometry  it would not work again. I don't know why, when doing
the file cleaner there were some files that no matter what I did nothing worked except redrawing
the geometry or exploding the polyline and selecting them and then use the file cleaner on the
exploded lines as a group.
in the pic you can see with the closed property set to true you have an polyline with eight segments
but if you set the closed property to false one of the lines disappears and the number of segments
is 7  and you get an open poly detected (offset=-1.5)  warning on toopath generation.
I've modified the File Cleaner adding a Remove Arcs function and an 'Arc Fit' Function which will warn you if the Arc data is bad in which case you can then either run the remove arcs function or run with the 'none' option.
Tested on some of my troublesome files and yours and airnockers latest file.
The inside\outside property is also fixed.
Dave

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1842
    • View Profile
    • pixelmaker
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #3 on: November 17, 2021, 11:11:51 am »
hello all,
I actually do not know this problem. CamBam is not as evil and buggy as many write.
Therefore I treated the file as I treat all DXF.
1.) I exported the contour as DXF from CamBam.
2.) I open the DXF in Illustrator.
3.) I export the file from Illustrator as DXF R13
4) I use this DXF in CamBam. The arc is now a spline.
There is no error in this file!

I remember the rules for arcs in a Cartesian coordinate cross. Each coordinate of an arc or circle may exist only once.
This leads to the fact that CamBam, e.g. in a circle, does not set the coordinates of the knot points symmetrically. I think this is the problem. It also explains why David solves the problem by inserting another knot points.
When I convert the spline from the Illustrator DXF back into a polyline in CamBam, the knot points are also asymmetrical.

Before I talk about a bug in CamBam, I would check if this contour with the symmetrical knots fulfills the rules of an arc in a Cartesian coordinate cross, or if CamBam is expected to do something that is mathematically impossible.

ralf

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4854
    • View Profile
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #4 on: November 17, 2021, 11:44:45 am »
So why does it work okay in 0.9.8 but not in 1.0 ?
Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1536
    • View Profile
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #5 on: November 17, 2021, 12:37:21 pm »
HI Eddy

That was just a quick open plugin,select line,click run, It's only CB nerds like us that care why a polyline
might be dodgy whereas most users just want to fix a polyline enough where their mops will cut the file
especially where they have hundreds or thousands of lines like an engraving where the polylines can have
different problems.
Sometimes when I have extensively cut and shut lines in CB using 'Break at Intersections' this can happen too.
You can use the Duplicates and joining tolerance textbox's as a filter to change how many points or segments
make up a polyline in the working layer other functions are run sequentially either before or after those to
functions are performed and can effect the outcome depending on what's wrong with the polyline in the first place.

One thing to know is that you can generate a working layer and if the result is not to your liking instead deleting
the working layer tring different settings on the original line, use the polylines in the working layer.

I don't know why some files (usually imported .dxf's) manage to corrupt the data structure on the
polyline, It doesn’t happen so much anymore. Early Inscape files were terrible and some Autocad files
as well, if you inspect the polyline property's with VS  you can see things are not Kosher, It can
be a mix of things each file is different.

Sometimes it's a dodgy pointer or ID and  just running some of the CB api functions on the line fixes
some of them. these functions are not available to a CB user through the UI.
In the bluegill file there is a graphic table showing how various settings for the textboxes effect the
polyline.
There are some polylines in files that no matter what I did nothing worked even though I couldn't see
anything wrong inspecting the points and more importantly the data structures that make up a polyline.
For someone like me who can be 'persistent beyond reason' this is irritating beyond measure.

Ralf  I do the same thing with freecad\Inscape doesn't always work maybe it's Illustrators
export libs, there a big company and are for sure using the Autocad licensed export libs
where Freecad and Inscape are using approximated export libs.
Sometimes I'll open up 0.98 and copy and paste into 1.0.
Dave

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6682
    • View Profile
    • Cambam V1.0 French Doc
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #6 on: November 17, 2021, 17:00:53 pm »
Hello

Quote
There are some polylines in files that no matter what I did nothing worked even though I couldn't see
anything wrong inspecting the points and more importantly the data structures that make up a polyline.
For someone like me who can be 'persistent beyond reason' this is irritating beyond measure.

Yes +1 ....

On this file I tried to move the shape, to restrict number of decimals, to use a remove overlap, a remove duplicate, changing the start point, revert polyline redrawing the whole shape manually ... no way ...

I also tried to cut the top of the arc so the arc is < to 180° .... and it's worst, I get only a small TP in the "grove" ...

Really a mystery !!!

++
David

Online dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6682
    • View Profile
    • Cambam V1.0 French Doc
Re: [V1 - 69] Internal/external cut mismatch on CB V1.0
« Reply #7 on: November 17, 2021, 17:32:54 pm »
This problem with arc sweep too large, I also have it with V-Engrave, and the fix is the same, adding new point in arcs ... (With V-engrave, when arc sweep is too large, the cut is a straight line instead an arc.

I do some other tests, reducing the arc sweep works but the limit is not 180° as I thought ... very strange  ??? ::)

Arc sweep:

179.926° > OK
180.795° > OK
181.169° > OK
182.623° > Bad

++
David