Search found 7434 matches

by DeepSOIC
Tue Mar 31, 2020 5:51 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

abdullah wrote:
Tue Mar 31, 2020 5:30 pm
I have started rewriting the solver interface of SketchObject to accomodate different solvers.
Great news! :D
by DeepSOIC
Tue Mar 31, 2020 4:08 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

abdullah wrote:
Tue Mar 31, 2020 3:01 pm
I guess you are looking for a general method for other closed curves too, not only for an ellipse.
Well, a general method is better than ellipse-specific, but either will do.
by DeepSOIC
Tue Mar 31, 2020 4:05 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

abdullah wrote:
Tue Mar 31, 2020 3:01 pm
Surely you know about the specific infinite series for the ellipse.

Something like "Infinite Series 2" of:
https://www.mathsisfun.com/geometry/ell ... meter.html

Then you do not have to subdivide...
No, I didn't. Is there a version for an arc, not full ellipse?
by DeepSOIC
Sat Mar 28, 2020 10:58 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

No, things are worse than that. I changed a to 0.1, and now it takes 32 subdivisions to arrive at error better than 1e-6 :(
And in this case, the accuracy is improving extremely slowly as the number of subdivisions is increased, which is depressing. Something's wrong with my estimate.
by DeepSOIC
Sat Mar 28, 2020 10:53 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

tried. def integrate_ellipse(n): import math from math import sin, cos, sqrt x1 = 0; x2 = math.tau/4 x_samples = [x1 + i/n*(x2-x1) for i in range(n+1)] a = 0.5; b = 1 y_samples = [sqrt((a*cos(x))**2 + (b*sin(x))**2) for x in x_samples] import scipy.integrate return scipy.integrate.simps(y_samples, x...
by DeepSOIC
Sat Mar 28, 2020 10:51 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

okay, so from my estimate above, I arrived at that to achieve a tolerance of 1e-6*b, I should sibdivide a quadrant of the ellipse into 22 segments for integration. Ok... I probably should give it a try, to see if the value of the integral changes with subdivision by more or less than expected.
by DeepSOIC
Sat Mar 28, 2020 10:23 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

Mark Szlazak wrote:
Sat Mar 28, 2020 9:35 pm
...
Actually, that is quite useful. It took me a while, but I estimated that the value will not exceed 40*b in magnitude, probably somewhat less that that in fact, as I mostly assumed that sin^2 and cos^2 are +1, and I flipped quite a few minuses with pluses along the way.
by DeepSOIC
Sat Mar 28, 2020 9:49 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

Mark Szlazak wrote:
Sat Mar 28, 2020 9:35 pm
I got this mess for an exact value.
Thanks, but it's not very useful. I need some clue on what maximum or average of this thing gets to. I actually would prefer an approximation rather than an exact value, something like "4th derivative is about a*100 in magnitude". Any ideas?
by DeepSOIC
Sat Mar 28, 2020 4:13 pm
Forum: Assembly
Topic: Reimplementing constraint solver
Replies: 255
Views: 11990

Re: Reimplementing constraint solver

@abdullah
I know you can use sage. Can you please figure out average value of fourth derivative of sqrt(sq(a*cos(u)) + sq(b*sin(u))) across the period? I'm trying to find out, how many slices should I take for length integration for arc ellipse to achieve a cretain precision, using Simpson's rule.
by DeepSOIC
Sat Mar 28, 2020 3:41 pm
Forum: Help on using FreeCAD
Topic: [ Solved ] silly problem using partdesign workbench and sketcher
Replies: 8
Views: 227

Re: silly problem using partdesign workbench and sketcher

I would guess you don't know that in openinventor navi style, you have to Ctrl+click to draw and move stuff...