From: Bryan Bishop <kanzure@gm...>  20090323 14:19:37

On Thu, Mar 19, 2009 at 4:41 PM, Christopher Sean Morrison <brlcad@...> wrote: > On Thursday, March 19, 2009, at 03:12PM, "Bryan Bishop" <kanzure@...> wrote: >>Can someone help clarify the following section? >>""" >>Implicit : Constraints implicit in the definition of a primitive : >>Tangency or perpendicularity of Vectors, Equality of scalars etc. >>Explicit : Constraints explicitly expressed between two or more primitives. >> >>One of the intricate parts of the work is the actual integration of >>libpc with librt. Associated work going on with libpc involves the >>creation of a Math Virtual Machine for parsing and evaluating (math) >>expressions which would be used for stating the constraints, along >>with the grammar. >>""" > > Dawn can explain it in better detail, but consider a simple sphere that > is simply stored as a point and two vectors. To be "a sphere", there is > an implicit constraint that the vectors are equal in magnitude (equal to > the radius of the sphere) and for orientation purposes, they should be > perpendicular to each other. Now take two spheres and you might want to > guarantee that they are always perfectly tangent to each other  that'd be > an explicit constraint. Or consider just the one sphere and say that you > want to require that the sphere always have a radius between 1 meter and > 12 meters  another explicit constraint. Those constraints, whether implicit > or explicit are a series of expressions that associate with and refer to geometric > entities. The MVM he refers to there is a system for evaluation those > expressions and constraints. I see. I need to think some more about how to represent the difference between explicit and implicit constraints if something like GraphSynth were to be used. Implicit constraints seem to be attached to objects, while explicit constraints seem to be externally imposed either a constant, or related to another variable and how that other variable changes. An MVM does sound useful, and I think it would be even more appropriate, rather than just having a small data structure for the expression of these types of constraints that would be converted into the GraphSynth GXML format directly. Actually, since it's still raw data it can conceptually be converted, but I don't know if I want to write a compiler grammar for doing that :) and an MVM might be more useful. So that's something to take into account. > This is pretty common in most CAD systems where you can > fully/under/over constrain a given model. Some even give you > a convenient little red light / green light to let you know when you're > fully constrained. Yes, I've seen something like that before, and actually I was wondering at the time when I saw a conflict of constraints in a commercial CAD environment why they didn't just give me a list of possible solutions or a list of possible things that I did that foobar'd the model, which seems like something BRLCAD definitely wants to implement if it gets a constraints solver (or even constraints representation as a first step?). >>GraphSynth >>http://graphsynth.com/ > > Interesting project, assuming it could be made available under some compatible license. LGPL? Okay. I'll look into it. > Practical integration and portability issues given it was implemented in C#, though. Hrm, well, luckily the code base is wellseparated, and it would be possible to rewrite chunks of it into, say, C++, since it's mostly the Representation module that's interesting here, plus another module which contains the searchandreplace backend code, which if I recall doesn't require too heavily on C# features, but I could be wrong and I agree this does make it less appealing especially if Dawn is still working on another implementation of all this :). >>Example, re: gears >>http://heybryan.org/~bbishop/docs/gears/gears.html > > The registered name servers for heybryan.org (afraid.org) seem to be dead. Might want > to consider managing your own DNS via something like zoneedit.com or figuring out why > afraid.org's DNS is down. Anything that works is very likely just giving a cached result > from before they went down but that should eventually time out. Gaah, I still have to get around to doing this. :) Thanks for the hints. >>** Relevant diagrams ** >> [ snip ] > > All interesting and food for thought, but where were you going with that (all those > situational diagrams) again? :) Otherwise, I'd need a concrete usecase example before > I could say much of value other than "ok". Ah, well, I was reading the BRLCAD wiki and there was a plea for diagrams when proposals are typed up, so those are some diagrams of the backend system of GraphSynth. For instance, a few of those were explaining how a subgraph is found and replaced such that no dangling arcs or edges are left over, among other things. Now, if GraphSynth was to be implemented which it seems increasingly like it shouldn't for BRLCAD, MVM or some data structure would be passed over, it would be converted into a graph, there'd be a set of rules (searchandreplace rules, essentially) that find constraints and then give a possible solution to that subgraph of the larger graph (the entire problem); at the end you'd get back a list set of graphs that would represent solutions, possibly with numerical values, of the solutions to the constraints problem. > Concur that a few test cases are really required. Yep, should I bug Dawn about this? >>So, if I can get some feedback on those issues, that would be great, >>and maybe also whether or not anyone would be interested in my working >>on this for GSoC? I have to admit that I'm a little sketchy on some of > > There is definitely the potential for some conflict here given it was a GSoC > project last year. I'd hate to see us lose a capable developer just because > two capable guys only applied to the same idea. Are there other projects that > interest you or is this the only one? Hrm. Yes, I remember there being something about a webbased solid geometry model repository? http://brlcad.org/wiki/Google_Summer_of_Code/Project_Ideas#Webbased_solid_geometry_model_repository I have been wanting to do something like this for a while now, *but* I've been eyeing doing it with parametrically constrained models, so I don't know how I feel about heavy integration with BRLCAD shell utilities. Any thoughts on this?  Bryan http://heybryan.org/ 1 512 203 0507 