Editing Geometric Constraint Solver

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Previous GSoC projects have made progress towards a parametrics/constraint library. Please check [[libpg : A parametrics/constraint library|libpc Developer Doc]] as well as the [http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/libpc/ libpc source]. For this year's project, we're suggesting a specific direction as outlined below.
+
BRL-CAD supports many primitives, including a 2D sketch primitive, but we do not presently provide the means to specify values that are undetermined or otherwise dependent calculations. That is to say that there is no support for constraints and parametrics such that a modeler can define a sphere such that the sphere's radius necessarily maintains tangency with a given planar surface or (in the 2D case) that a line segment must remain at a fixed angle relative to another line segment.
  
BRL-CAD does not presently provide the means to specify values that are undetermined or otherwise dependent calculations. That is to say that there is no support for constraints and parametrics such that a modeler can define a sphere such that the sphere's radius necessarily maintains tangency with a given planar surface. This task would focus on implementing basic support for this feature in the BRL-CAD geometry format. Parametric representation of Geometry (and constraints) provides a good foundation for various aspects of Design computation, Geometry Generative Algorithms, and A more logically connected model not to mention significant reduction in Modeling time (since the process of modeling during an actual design cycle is inherently iterative).
+
This task would focus on implementing basic support for this feature in the BRL-CAD geometry format. Past work has focused on a full, generic constraint system for 2D and 3D modeling.  For this year's task, we are proposing a slightly different approach to the problem, with more "incremental" steps towards the final goal:
  
Since the initial work on libpc began, the open source gecode constraint solver has released version 4.0 with support for floating point data types.   The work to be done is to put gecode's constraint solver "underneath" the libpc API in place of the existing solver and demonstrate successful soltions to primitive constraint equation systems. (Discuss these with the BRL-CAD developers.)
+
* Beginning with the 2D sketch primitive, integrate existing BSD licensed 2D constraint solving functionality from exising projects:
 +
** https://code.google.com/p/psketcher/
 +
** https://code.google.com/p/sketchsolve/
 +
 
 +
In particular, psketcher offers some Qt visualizations of sketch editing - a good "first step" would be to make a "Qt sketch editor" for BRL-CAD's sketch objects.  Note that this will require replacing GSL with something else (probably Eigen) for matrix functionality in psketcher's src/mmcMatrix/mmcMatrix.cpp, and possibly other refactoring.
 +
 
 +
* Once a solving framework is in place and working with BRL-CAD sketch objects, test out the Gecode constraint solver by defining the 2D constraints from the above solvers in the Gecode framework - see how its solving speed compares to the dedicated 2D solutions, and how straightforward it is to use Gecode to solve such problems.
 +
** http://www.gecode.org/
 +
** http://www.gecode.org/doc-latest/reference/classCartesianHeart.html
 +
 
 +
* If Gecode proves viable, begin expressing 3D constraints.
  
 
=References=
 
=References=
 
+
* https://code.google.com/p/psketcher/
 +
* https://code.google.com/p/sketchsolve/
 
* http://www.gecode.org/
 
* http://www.gecode.org/
 
* http://www.gecode.org/doc-latest/reference/classCartesianHeart.html
 
* http://www.gecode.org/doc-latest/reference/classCartesianHeart.html
* http://www.nist.gov/manuscript-publication-search.cfm?pub_id=822720
+
* src/librt/primitives/sketch
* src/libpc
+
** contains sources pertaining to BRL-CAD's 2D sketch primitive
* include/pc.h
 
* src/librt/primitives/table.c
 
** contains primitive callback definitions
 
* src/librt/primitives/**
 
** each primitive needs to implement a routine that returns available parameters, rt_*_param().
 
  
 
Requirements:
 
Requirements:
  
 
* Familiarity with C/C++
 
* Familiarity with C/C++
* General understanding of constraint solving
+
 
 +
Note: Previous GSoC projects have made some progress towards a parametrics/constraint library. Please check [[libpg : A parametrics/constraint library|libpc Developer Doc]] as well as the [http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/libpc/ libpc source]. While it is certainly a viable route to pick up where those efforts left off, the above approaches are likely to require less "up front" work for visible results.

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)