<GitHub>
[solvespace] michthom commented on issue #96: This is the epitome of speedy service! I was running it under LLDB, so when it stopped I dumped the "thread backtrace all" above. Stupidly I didn't then write a core file to analyse. I'll try to reproduce it now. https://github.com/solvespace/solvespace/issues/96#issuecomment-258600971
mumptai_ has quit [Quit: Verlassend]
_whitelogger has joined #solvespace
whitequark has joined #solvespace
<ohsix>
so was reading some of the bugs and saw there's some type of expression support, reading the code and mashing buttons in constraints
<ohsix>
so far pi and pi+/* / numbers work, but i see stuff for names, where can i enter those
<whitequark>
you can't
<whitequark>
there's only i
<whitequark>
pi
<ohsix>
oh i see
<ohsix>
i saw the name parsing code and didn't register that pi/sin/whatever followed
<ohsix>
and underscore is just in there in case some_values or expressions show up later?
<ohsix>
longjmp is going to leak across all those edges that call AllocExpr :p
<whitequark>
nope
<whitequark>
AllocExpr uses an arena allocator
<whitequark>
see FreeAllTemporary
<ohsix>
nice
<ohsix>
yea
<whitequark>
we in fact run solvespace under valgrind and other memory leak checkers
<ohsix>
it was kind of a joke
<whitequark>
ah
<ohsix>
i'm math dumb, where's the actual solver-iest bit of the solver located
<ohsix>
and is there a name or citation i can start reading to see why i couldn't do the obvious to me thing, and just put the expressions in place of the value and have it work
<ohsix>
ignoring loops and other dependencies of course, just trivial cases
<whitequark>
constrainteq.cpp, system.cpp
<whitequark>
expressions in place of value?
<ohsix>
yea, you evaluate an expression on entry, 'merely' letting you reference a value and keeping Expr around for the constraint, evaluating it in the solver
<ohsix>
i'm sure there's an obvious way it won't work but i don't have a great math background
<ohsix>
way/reason
<whitequark>
no, there's no real reason what you say can't be implemented
<whitequark>
it just... isnt
<whitequark>
mostly the UI is missing
<ohsix>
oh, nice
<ohsix>
k, i misread some stuff that implied numerical problems
<ohsix>
not a hueg fan of c++ but this looks like a decent application of it
<whitequark>
c++ is atrocious
<ohsix>
like for vectors and quaternions and basic things
<ohsix>
yea
<whitequark>
we've had to fight it constantly
<whitequark>
anyway
<whitequark>
a full rewrite would not happen with solvespace, so we're stuck with c++
<ohsix>
there usually aren't a lot of is-a relationships that make it broad enough to be worth doing, and people try and force it with weird objects all over and extensibility that isn't strictly called for
<whitequark>
no point in discussing it much
<whitequark>
yeah
<whitequark>
one of the many issues
<ohsix>
oh, no argument from me, it was a compliment
<ohsix>
it was one of the few chances i actually get to say it huhuhu
<ohsix>
it was fun to model a laser stage and a pantograph by just doing the obvious
<ohsix>
aside from the line i had to put in the drawing just to keep the arcs equal length ;]
<ohsix>
there's two operations you can do when you constrain length/distance/radius for an arc, and i wanted length, it took a bit to figure out
<ohsix>
heheh but the motor is the actuator that moves the mirror, the angle of the laser just changes with respect to the 'mirror', i did it as an illustration for a friend
<ohsix>
i couldn't think of a way to actuate it on a pivot in plane, center with the mirror like a galvanometer would
<ohsix>
that's why i did the pantograph, it's got a rotate-y thing
<ohsix>
it has a long sliding handle and doesn't go in a full revolution :]
<whitequark>
oh i see
<whitequark>
>maxim chip datasheet
<ohsix>
i think i mentioned this last time, but i can build a paper model and it might help teaching
<whitequark>
you are so innocent :D
<ohsix>
yes that's to remind me i am putting something off
<ohsix>
i don't really need the datasheet anymore, figured that part otu a while ago and started messing with the fx2 logic analyzer thing instead
<ohsix>
been doign electronics since i was a kid but only recently has ebay and china made it really cheap for me to kit up on stuff
<ohsix>
this isn't really a request or problem, but the arc thing, since it is ambiguous which you might want, could/should there be ui asking you which? or otherwise letting you choose