On Tue, Apr 3, 2012 at 10:12 AM, phoenix <284281...@qq.com> wrote:

>
> That's to say, I should add to my proposal in which way I'm going to
> implement the user interface?
>

Well, minimally, be sure you schedule some time to work on implementing
some means of converting arbitrary CSG primitives to brep form - csgbrep is
going to be too inflexible for general testing.  You'll want the basic
primitive -> brep ability early in the process, since it will be key to
testing your results.


> I think the way you mention above is really a good idea. There is already
> a "brep" command in MGED. I can add an option to it to do the conversion,
> like this:
>         brep obj [brepname]
>
>
 It detects whether the object is an implicit primitive and does the
> conversion if it is. Otherwise it just acts like what it does before.
>

Sounds good - you would want to make sure brepname doesn't already exist.


> And after all primitives can be converted, I'd like to expand this command
> to converted a CSG tree. The converter walks the CSG tree and convert all
> the implicit primitives to breps. So the command can be like this:
>         brep root
>  In this way to type the output names would be inconvenient. So the breps
> generated are named in an automatic way.
>  Is it a good idea?
>

I think so - certainly a good place to start.  For tree conversion, I would
suggest a slightly different syntax:

brep -t root [suffix]

The -t option would denote you want to output a tree, and root_brep would
contain a reproduction of the tree structure of root using names for
objects with_suffix appended, defaulting to _brep if no root_suffix string
is supplied.  This would leave the original tree intact, which you will
want to use for comparisons.  The "brep root" form of the command suggests
to me generating a single brep representing the entire evaluated CSG tree,
which requires NURBS surface/surface intersection - a major project all by
itself.  We will eventually want to do that, so we want to leave the logic
syntax for it open, but it's for later - for this project we want to just
duplicate the CSG tree structure while pointing to the brep representations
of the individual implicit primitives.

However you want to suggest doing it, you'll want to call out some time in
your schedule specifically to implement the tree conversion functionality -
you'll definitely need it once you've worked through the individual
primitives.

Cheers,
CY
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to