alpounet has quit [Remote host closed the connection]
alpounet has joined #ocaml
alpounet has quit [Ping timeout: 260 seconds]
huza has quit [Quit: WeeChat 0.3.8]
huza has joined #ocaml
epichero has joined #ocaml
oriba has quit [Quit: Verlassend]
ollehar has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
johnnydiabetic has quit [Quit: Leaving]
huza has quit [Quit: WeeChat 0.3.8]
huza has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
johnnydiabetic has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest95608
ygrek has joined #ocaml
Guest95608 has quit [Ping timeout: 252 seconds]
studybo__ has quit [Remote host closed the connection]
johnnydiabetic has quit [Ping timeout: 276 seconds]
huza has quit [Quit: WeeChat 0.3.8]
q66 has quit [Quit: Leaving]
huza has joined #ocaml
epichero has left #ocaml [#ocaml]
ollehar has quit [Ping timeout: 240 seconds]
ivan\ has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
johnnydiabetic has joined #ocaml
alpounet has joined #ocaml
BitPuffin has quit [Ping timeout: 252 seconds]
fraggle_laptop has quit [Remote host closed the connection]
alpounet has quit [Ping timeout: 265 seconds]
ontologiae has joined #ocaml
dotfelix has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
tlockney_away is now known as tlockney
Eyyub has quit [Ping timeout: 240 seconds]
dotfelix has quit [Ping timeout: 258 seconds]
studybot_ has joined #ocaml
manizzle has quit [Ping timeout: 264 seconds]
pyon has quit [Read error: Connection reset by peer]
pyon-cbpv has joined #ocaml
tnguyen has joined #ocaml
studybot_ has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 276 seconds]
tnguyen has quit [Quit: tnguyen]
ontologiae has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest8441
Guest8441 has quit [Ping timeout: 265 seconds]
ontologiae has quit [Ping timeout: 258 seconds]
iorivur_ has quit [Ping timeout: 252 seconds]
racycle_ has joined #ocaml
Nahra has quit [*.net *.split]
passiveobserver has quit [*.net *.split]
Valdo has quit [*.net *.split]
tizoc has quit [*.net *.split]
seliopou has quit [*.net *.split]
shalicke has quit [*.net *.split]
tlockney has quit [*.net *.split]
tizoc has joined #ocaml
shalicke has joined #ocaml
tlockney has joined #ocaml
Nahra has joined #ocaml
tlockney is now known as tlockney_away
ollehar has joined #ocaml
Valdo has joined #ocaml
passiveobserver has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
zebr has quit [Remote host closed the connection]
zebr has joined #ocaml
dotfelix has joined #ocaml
manizzle has joined #ocaml
araujo has quit [Quit: Leaving]
dotfelix has quit [Quit: Leaving]
dotfelix has joined #ocaml
dotfelix has quit [Client Quit]
dotfelix has joined #ocaml
alpounet has joined #ocaml
alpounet has quit [Ping timeout: 276 seconds]
philtor_ has joined #ocaml
dotfelix has quit [Quit: Leaving]
Zerker has joined #ocaml
philtor_ has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 264 seconds]
yacks has joined #ocaml
racycle_ has quit [Quit: ZZZzzz…]
manizzle has quit [Ping timeout: 240 seconds]
tlockney_away is now known as tlockney
cesar_ has joined #ocaml
johnnydiabetic has quit [Ping timeout: 252 seconds]
cesar_ is now known as Guest87718
Guest87718 has quit [Ping timeout: 264 seconds]
divyanshu has joined #ocaml
iorivur has joined #ocaml
Zerker has quit [Quit: Colloquy for iPad - Timeout (10 minutes)]
bjorkintosh has joined #ocaml
<whitequark>
is there an ocaml library for solving systems of polynomial equations?
huza has quit [Ping timeout: 265 seconds]
WraithM has quit [Ping timeout: 252 seconds]
yacks has quit [*.net *.split]
yacks has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
Submarine has joined #ocaml
tlockney is now known as tlockney_away
testcocoon has joined #ocaml
philtor has joined #ocaml
testcocoon has quit [Client Quit]
dotfelix has joined #ocaml
Kakadu has joined #ocaml
testcocoon has joined #ocaml
ustunozgur has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
axiles has joined #ocaml
dotfelix has quit [Quit: Leaving]
ustunozgur has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
ustunozg_ has joined #ocaml
ustunozgur has quit [Ping timeout: 252 seconds]
ustunozg_ has quit [Ping timeout: 260 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
alpounet has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest84091
Guest84091 has quit [Ping timeout: 264 seconds]
Simn has joined #ocaml
ustunozgur has joined #ocaml
divyanshu has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
maattdd has joined #ocaml
ikaros has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
rand000 has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
ikaros has quit [Quit: Ex-Chat]
ggole has joined #ocaml
<mrvn>
Not necessarily. read/write can do multiple pages.
cesar_ has joined #ocaml
cesar_ is now known as Guest86446
Guest86446 has quit [Ping timeout: 276 seconds]
<whitequark>
?
<mrvn>
ewin, sorry
<zozozo>
whitequark: not as far as i know, if you want, I have one for solving linear systems though
<whitequark>
zozozo: specifically, I want to find intersections of bezier curves
<companion_cube>
whitequark: I suppose you mean finding approximate solutions, in general?
<whitequark>
not even really in general... but yeah
<whitequark>
hm, and probably also find normals to bezier curves
<whitequark>
I have an alternative solution that involves using an ocaml program to generate a python script to invoke some C++ to generate some g-code
<whitequark>
it is somewhat involved
<companion_cube>
:D
<companion_cube>
g-code is blueprint for 3d printers, isn't it?
<whitequark>
g-code instructs a toolpath to a CNC machine
<whitequark>
in my case it's a CNC mill controlled by linuxcnc. 3D printers can use g-code too, or usually a subset thereof
<whitequark>
basically I need area clearing. use, say, an ø 1mm tool to clear a square 10x10mm.
<whitequark>
for that you usually offset the shape by d/2 until it's all filled
<whitequark>
there is inkscape's gcodetools, but it uses inkscape's internal offsetting algorithm, and it produces horrifying artifacts
<whitequark>
there's also like 50 shitty, slow, stupid open-source "CAMs" which I won't even mention because none of them deserves that
<whitequark>
except PyCAM, which, while being oddly popular, is bad enough that it can easily spend half an hour on a completely trivial model
<whitequark>
there's heekscnc however, which uses some sound math underneath and produces *amazing* gcode, but normally it's supposed to be used with heekscad, and well... see the part about shitty, slow open-source stuff above
Submarine has quit [Quit: Leaving]
michael_lee has joined #ocaml
alpounet has quit [Read error: Connection reset by peer]
alpounet has joined #ocaml
alpounet has quit [Read error: Connection reset by peer]
Sim_n has joined #ocaml
alpounet has joined #ocaml
passiveo- has joined #ocaml
ohama has quit [Disconnected by services]
demonimin_ has joined #ocaml
passiveobserver has quit [Ping timeout: 265 seconds]
ohama has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
demonimin has quit [Ping timeout: 265 seconds]
Simn has quit [Ping timeout: 265 seconds]
yacks has quit [Ping timeout: 265 seconds]
morolin has quit [Ping timeout: 265 seconds]
morolin_ has joined #ocaml
yacks has joined #ocaml
fraggle_ has joined #ocaml
alpounet has quit [Read error: Connection reset by peer]
alpounet has joined #ocaml
Thooms has joined #ocaml
Eyyub has joined #ocaml
_JokerDoom has joined #ocaml
JokerDoom has quit [Ping timeout: 240 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
avsm has joined #ocaml
huza has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest73388
Guest73388 has quit [Ping timeout: 264 seconds]
divyanshu has joined #ocaml
eikke__ has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
Eyyub has quit [Ping timeout: 240 seconds]
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 252 seconds]
avsm1 has quit [Ping timeout: 240 seconds]
Thooms has quit [Read error: No route to host]
Thooms has joined #ocaml
divyanshu has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
huza has joined #ocaml
<bernardofpc>
whitequark: two quiestions: how precise must that be, and (related) what do you mean by "clear a 10x10 using something of diameter = 1 ?
Eyyub has joined #ocaml
<whitequark>
bernardofpc: hm, well, I have repeat positioning accuracy of 50µm, so it's pointless to be more precise than that
<whitequark>
definitely pointless to be more precise than 1µm, as that's the microstepping limit
<whitequark>
well, imagine a rotary tool that, when plunged into material, mills out a cylinder
huza has quit [Client Quit]
<mrvn>
The bit is round, right? Wouldn't it make more sense to fill the area with a hex pattern?
<whitequark>
now imagine you need to make a depression in material in the form of rectangle
huza has joined #ocaml
<whitequark>
mrvn: not really, you aren't stacking balls next to each other
<whitequark>
you're trying to make a smooth flat surface
<mrvn>
And then tight stepping fo the border to get smooth edges.
<bernardofpc>
whitequark: then you get rounded corners ?
<whitequark>
bernardofpc: of course
<mrvn>
whitequark: overlaping circles in a hex pattern to fill the area.
<whitequark>
well, only concave rounded corners. convex corners are good
<whitequark>
mrvn: pointless
<mrvn>
whitequark: better than a square patern
<whitequark>
you don't lower the tool only for circles, plunging is slow and isn't good for material
<whitequark>
decreasing size square pattern results in much better finish
<bernardofpc>
whitequark: the tool drills continuously, I presume ?
<mrvn>
so what do you do? lower the tool and then move sideways?
<whitequark>
bernardofpc: mills. in principle you can stop/start it, but that's not a good idea
<whitequark>
mrvn: yes
<bernardofpc>
right, so that's the point of Bz curves
<mrvn>
ok, then yeah, hex pattern doesn't make sense.
<bernardofpc>
you "follow" those along your surface
<bernardofpc>
and you want this Bz to fill some area ?
<whitequark>
bernardofpc: um, I don't have a surface, I only need 2D
Arsenik has joined #ocaml
<whitequark>
I have a shape in SVG, SVG defines shapes via bezier curves
<mrvn>
The I would do a square first to get the border nice. Then half a tool size inset a spiral
<bernardofpc>
surface is 2d for me ^^
<whitequark>
I want to clear an arbitrarily shaped area. for that, I need to take a shape defined by bezier curves, then progressively make it smaller by d/2
<bernardofpc>
the Bz is the border of your stuff, ok
<mrvn>
whitequark: that would be the simple generalization of the suqare cutting.
<whitequark>
mrvn: order doesn't matter much, but yes, that's how it's commonly done
<whitequark>
however if you scale down the Bz curve, you get a thing called constant TEA (tool engagement angle)
BitPuffin has joined #ocaml
<bernardofpc>
and you need to find the intercepts that your SVG "specifies"
<whitequark>
basically the size of the chip your tool cuts is always constant
<whitequark>
so it deflects always the same amount (important if your tool is thin and you want it to go fast)
<whitequark>
bernardofpc: not quite, the SVG specifies non-self-intersecting shapes. convex mostly, even
<whitequark>
but imagine what would happen if I try to make a shape smaller by d/2
<mrvn>
(order doesn't matter but its easier to think that way) If you first do the border you have that exact. Then you can rasterize the interior with a 1/2 tool size grid and sort of flood fill.
<whitequark>
mrvn: see the TEA comment above
<whitequark>
bernardofpc: so, your first idea would be to just apply an affine transform to Bz, under which they're invariant
<bernardofpc>
right
<whitequark>
but that doesn't work. imagine a "dumbbell" shape, with fat ends but small center
<bernardofpc>
(smaller by 50% you mean ?)
<mrvn>
whitequark: do you have U shapes? Because if you shrink that that wo't work.
<whitequark>
oh, yeah, that too
<whitequark>
so the second idea is to project all of the control points to the curve, then move them in this normal direction
<whitequark>
does it even make sense?
<whitequark>
and yeah, if it does, at some point you'd make such a "dumbbell" shape self-intersect. then you need to cut off the part after self-intersection.
<mrvn>
You want a new curve that is never ouside the area and at most 1/2 tool size from the previous curve.
<whitequark>
mrvn: exactly.
<bernardofpc>
oh
<whitequark>
exactly = you're right and exactly = it should be exactly 1/2 tool size from the previous one
<mrvn>
doesn't hur if it is sometimes less.
<bernardofpc>
you want distance to border, not rescaling
<whitequark>
const TEA is a big win, so it hurts
<whitequark>
bernardofpc: yes!
<bernardofpc>
that's why (trivially) it's not an affine problem
<whitequark>
yes.
<bernardofpc>
I guess that's hard
<bernardofpc>
(I mean, mathematically)
<mrvn>
You might have a 8 shape and he area splits in two while you shrink.
<whitequark>
yes. I want it to split.
<mrvn>
Idea: YOu have the curve, you have the normal to the curve at the control points. If you project the control points 1/2 tool size inside what happens to te curve?
<whitequark>
mrvn: that's exactly what I have described above -_-
<mrvn>
yeah. Does that work?
<bernardofpc>
mrvn: if your control point is the middle of the 8, what do you do ?
<whitequark>
I have no idea really, but I thought it could be worthwhile to pursue
<mrvn>
You have to detect overlaps and then split the problem in two.
<whitequark>
mrvn: didn't code it, I suck at cartesian geometry
<whitequark>
mrvn: and now you've arrived to my initial question, "how do I detect that two bezier curves intersect"
<mrvn>
hehe
<mrvn>
How large is the area in terms of positional accuracy? Could you just rasterize and keep a bitmap and check for ovelas as you draw in the tools progress?
<whitequark>
I've tried to run it through <canvas> (yes, the tag) based svg2gcode
<whitequark>
it produced a 59MB file over the course of about half a hour or something
<bernardofpc>
whitequark: wild guess: if you can decompose your stuff in convex parts, then maybe scaling will be bood enouth
<whitequark>
do I have to explain how is this unacceptable?
<bernardofpc>
*good
<whitequark>
bernardofpc: hmm
<mrvn>
1) draw the original curve, 2) split into convex parts, 3) fill convex parts
<bernardofpc>
maybe more precisely : if the curvature radius of your border is >= d (maybe d/2) then I guess it is enough
<mrvn>
bernardofpc: how do you split a curve into convex parts?
<bernardofpc>
good question
eikke__ has quit [Ping timeout: 276 seconds]
<mrvn>
I guess you have to change a closed curve into an ope curve and a line between the ends.
<bernardofpc>
since we have (maybe) a stronger curvature requirement, and the border is given, it is maybe not *so* complex
<bernardofpc>
you probably have to make overlapping areas in the cut
<mrvn>
they have to overlap or you get imperfection at the border.
<whitequark>
grmbl
<bernardofpc>
(think dumbbell again, even if two big squares + one big rectangle would be nice...)
<mrvn>
whitequark: given a curve if you take half the control points plus the derivatives a the end point you can match the partial curve perfectly, right?
<bernardofpc>
algorithmic geometry is awfully simple to describe, and awfully hard to program
<mrvn>
whitequark: why is filling the shape by scanlines/floodfill bad? Do you get artefacts when you change direction by 90° or when the tool bit hits different amounts of material?
<whitequark>
when it hits different amounts of material
<mrvn>
does that change the depth or just make the positioning overshoot?
<whitequark>
it makes the tool bend, which can add artifacts or just break it entirely
<whitequark>
so you have to go sloooooooower
ygrek has joined #ocaml
<whitequark>
when you need to fill several cm² with a 0.6mm or 0.2mm tool, "slow" becomes "nope"
<mrvn>
Ok. BAD. :) I guess you have to start slow when you go from an open area to full cutting.
<mrvn>
How do you drive the machine? Do you send it x/y deltas to move the bit or angel+speed?
<mrvn>
or send a curve and wait for it to finish?
<whitequark>
a curve and wait it to finish
<whitequark>
no, feedback is not realistically possible, beginning with the fact of "how are you going to physically collect it"
axiles has quit [Remote host closed the connection]
<whitequark>
usually you'd get only machines which can interpret G1/G2/G3, which is straight feeds and arc (ellipse segment) feeds
<whitequark>
but in my case I've linuxcnc, which can interpret quadratic beizer and NURBS
<whitequark>
so I want to directly translate the SVG input to NURBS, if at all possible
<whitequark>
splitting the splines into thousands tiny straight feeds isn't good really
<whitequark>
not even in dozens of tiny arcs.
<whitequark>
although that's much better (but also interpolation from splines is a bitch, whereas for NURBS it's direct.)
<mrvn>
Idea: 1) draw original cruve as is, 2) render curve on a high resolution grid, 3) place turtle on a control point and let it walk towards the next point shifted inwards until it is 1/2 tool size from the border, 4) let the turtle follow the border smoothing the curve a bit so you don't get too many points
<mrvn>
When the turtle is stuck look for unfilled parts and repeat.
<whitequark>
what?
<whitequark>
turtle?..
<mrvn>
simulated
<whitequark>
and when does rasterization come into question?
<mrvn>
for the simulated turtle. it walks on the rasterized grid.
<whitequark>
I'm wary of anything that involves rasterizing cm² or even dm² with resolution of dozens of µm
<whitequark>
perhaps I should just bind libarea to ocaml
<mrvn>
10^-6m resolution?
<whitequark>
repeated positioning resolution of my mill is 50µm. it makes sense to go a bit further, to ensure that you don't compound the error
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
strobegen has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
Eyyub has quit [Ping timeout: 265 seconds]
agarwal1975 has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
eikke__ has quit [Ping timeout: 252 seconds]
agarwal1975 has quit [Quit: agarwal1975]
ollehar has joined #ocaml
tizoc has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest74526
agarwal1975 has joined #ocaml
Guest74526 has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
studybot_ has joined #ocaml
iorivur has quit [Ping timeout: 252 seconds]
tnguyen has joined #ocaml
struktured has joined #ocaml
racycle__ has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
Axman6 has left #ocaml ["Connection reset by beer"]
pyon-cbpv has quit [Remote host closed the connection]
eikke__ has joined #ocaml
Eyyub has joined #ocaml
bjorkintosh has quit [Ping timeout: 264 seconds]
testcocoon has joined #ocaml
troydm has quit [Ping timeout: 252 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<orbitz>
smondet: I've been following the biocaml error guidelines. What are your thoughts so far? I quite like polymorphic variants for this but I know Ashish seems to have had some negative experiences
<reynir>
I used cohttp.async for a program, but the program just closes the connection when a client makes a request with 'Connection: close' in the headers
tane has joined #ocaml
<smondet>
orbitz: I also like the polymorphic variants for errors, they require discipline which is a good thing
<orbitz>
So far I haven't had too much issue integrating it with other APIs too, you have to write some wrapper logic, usually, but that can be wrapped. But I haven't done a lot of code with this style so maybe it falls apart at scale
<smondet>
but I leave the discussion on biocaml mostly to the other guys, because I don't use biocaml right now
<orbitz>
One nice thing about biocaml is I would imagine people will mostly be living inside biocaml framework the whole time so integrating with other code is, perhaps, less problematic
<smondet>
at scale it require always more discipline :)
<orbitz>
what are you upto these days?
<smondet>
I changed jobs, I'm at Mount Sinai Health System