SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

greater than/smaller than constraints (by Mamun)
Hi,
Is there any way I can use some relational operators in the constraints? Actually I would like to set a constraint like - a line segment is greater/smaller than another line segment.

Thanks
Tue Jul 28 2015, 12:13:43
(no subject) (by Jonathan Westhues)
In SolveSpace's constraint model, inequality constraints would always be either redundant (because the solution implied by the other constraints satisfies the inequality) or inconsistent (because that solution doesn't). So they wouldn't be useful, and they're not supported.

What are you trying to do?
Wed Jul 29 2015, 00:40:51
(no subject) (by EvilSpirit)
it is possible with current solver. it can be performed throguh x - abs(x) for greater/less or min + x * cos(max - min) for ranged. we will support it.
Wed Jul 29 2015, 10:17:51
the problem (by Mamun)
@Jonathan I am trying to do this - a polygon and a center of a circle is given. my problem is to find out the minimum radius of that circle so that the whole polygon is covered (resides inside the circle).

I need to set a constraint so that every distance between the center and the corner points of the polygon is less than the radius.

Its kind of optimization problem.. and I am new in geometric constraint solving. Is it possible to solve this kind of problem using a geometric constraint solver? Your suggestion will be greatly appreciated.
Wed Jul 29 2015, 16:03:20
(no subject) (by Jonathan Westhues)
Can you restate the problem? The solution to what you wrote seems trivial, that r is just the maximum of the distances from the given center to any of the given vertices.
Wed Jul 29 2015, 16:25:03
rep:problem (by Mamun)
@Jonathan oh.. now I see that. the simpler version of my problem is actually trivial.

My original problem is: I have to draw two circles with same center, with radius r_1 and r_2 [r_2 > r_1]. The problem is to find the biggest r_1 and smallest r_2 so that the given polygon is completely outside the smaller circle and completely inside the bigger circle. [Please see the attached pic for clarification]

[Anyway, i can't figure out how to set r to the maximum of the distances from the given center to any of the given vertices? How can I use max/min functions in SolveSpace?]

Sorry for the silly questions, thanks again for your patience.
Wed Jul 29 2015, 17:29:06, download attachment Capture.JPG
(no subject) (by Jonathan Westhues)
That still doesn't seem like a constraint problem in the sense that SolveSpace uses the word. Isn't r2 just the maximum distance to any edge (which is always the distance to a vertex), and r1 the minimum (which may be the distance to the line or to a vertex)? That's O(n) in the number of edges and involves no numerical methods, as easy as it gets, ignoring the case of center inside polygon of course.
Wed Jul 29 2015, 17:58:15
clarification (by Mamun)
Hi, I still need to be clear about a few things: -
1) What I have got from your answer is: my problem is not a constraint problem because the solution does not involve any numerical methods. And therefore it can't be modelled in SolveSpace. Did I get it right?

2) Can "optimization problems" be modelled as constraint problem? For instance, following is a modification of my previous problem:

Given a polygon S and a point P. Find two numbers d1 and d2 such that, the ring formed by the circles of radius d1 and d2, centered at P, give the *highest* "cover" of the polygon S.

"Cover" is a ratio defined as:
Area of S fall inside the ring {d1,d2] divided by the area of the ring [d1,d2].

Your comments will be really helpful for my research.
Thu Aug 6 2015, 17:09:00
(no subject) (by EvilSpirit)
The problem you have explain is not seems like optimization problem, but if you know what it is optimization problem, you can not use solvespace for the solution. but you can use solvespace solver. See at R-functions for more information. https://en.wikipedia.org/wiki/Rvachev_function
Fri Aug 7 2015, 04:13:03
what is a solvespace solver? (by Mamun)
Hi EsvilSpirit, thanks for your suggestion, but what did you mean by "solvespace solver"? is there any document/link on how I can use it?
Wed Aug 12 2015, 18:47:06
(no subject) (by EvilSpirit)
rvachev functions is about mathematical representation of shapes. you need to solve non-linear system to found optimized solution. solvespace contains symbolic representation of the expressions & contains non linear equations system solver. further work needs sotmething like programmer`s skill to glue up all this together
Mon Aug 17 2015, 00:35:26
(no subject) (by EvilSpirit)
Tue Aug 1 2017, 12:32:41
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.