Page 1 of 1
hpgl integer overflow, really
Posted: Thu May 12, 2022 4:52 pm
by Shaeto
QCAD/CAM 3.27.5.0, x86_64, MacOS
post-processor HP-GL
plotter hp7475a
problem: plotter has limits for x/y = -32767 .. 32768
post-processor generates arcs with center points outside of the possible coordinates, plotter draws strange things
example : AA-36525.1849,-61167.6598,0.627
attached dxf and hpgl (as .txt)
just fyi I understand this is not a bug, i don't want to force interpolation and will try to write some post-post-processor
may be you can suggest something or add "smart" arc interpolation for small arcs
Re: hpgl integer overflow, really
Posted: Thu May 12, 2022 8:53 pm
by Husky
Just a wild guess ...
Explode all splines, generate the code again - test and see what happens ...
Re: hpgl integer overflow, really
Posted: Thu May 12, 2022 9:14 pm
by Shaeto
explode/rebuild didn't help, btw "interpolate arc by line segments" in HPGL and HP Pen Plotter postprocessors doesn't work
problem in hp7475a firmware and used mathematics libraries - it can't handle "big" (for that cpu
numbers
Re: hpgl integer overflow, really
Posted: Fri May 13, 2022 7:01 am
by CVH
Hi,
The CAM output would explode Splines to Arcs and Lines in the background to export them as G-code or as HPGL.
When I explode (XP) your drawing in layer 0 using 0.01 tolerance I get 6 arcs with a radius of over 10.000 (10k).
>> Selection filter (GF) .. Type: Arcs .. Property: Radius .. Comparison: Greater than .. 10.000
The bulging of those arc is so minute that one could replace them with line segments.
CAM would handle the exploded shape just the same but one could recombine all segments to one polyline.
Regards,
CVH
Re: hpgl integer overflow, really
Posted: Fri May 13, 2022 2:04 pm
by Shaeto
thank you, as i understand if option "interpolate arc by line segments" is enabled resulting .plt file shouldn't contain arcs (AA) but it does
Re: hpgl integer overflow, really
Posted: Fri May 13, 2022 3:21 pm
by CVH
Shaeto wrote: ↑Fri May 13, 2022 2:04 pm
if option "interpolate arc by line segments" is enabled resulting .plt file shouldn't contain arcs (AA) but it does
I agree.
The question here is if all the settings are used consecutive in this process.
From Splines with a tolerance to Polylines ...
From the resulting Polylines to Lines and Arcs ...
Interpolating the resulting Arcs with the given segment length ...
What happens if you process a simple Arc with interpolation active?
When I process it as a Polyline then my HPGL export only contains PA's (about 5.000 Plot Absolute) and no AA's (Arc Absolute).
Does the interpolating setting also turns itself off after a single use on your system?
Regards,
CVH
Re: hpgl integer overflow, really
Posted: Fri May 13, 2022 5:14 pm
by Shaeto
i have attached postprocessor settings
on simplest single arc it produces something like PA1000,0;PD;AA0,0,90;PU;
nothing changed if i play with min/max values and rebuild path
- Screenshot 2022-05-13 at 19.10.54.png (323.94 KiB) Viewed 8252 times