On Jul 15, 2015, at 10:58 PM, Clifford Yapp <cliffy...@gmail.com> wrote:
> Brad, > > Started looking over http://brlcad.org/wiki/MGED_CMD_nmg - like how > you're laying out the design. Ditto Brad, though I’m still yearning to focus on a higher-level abstraction, not directly exposing all the complexity and terminology of the nmg code. We should avoid the whole “use” lingo altogether (faceuse, vertexuse, etc) — it’s just awkward and confusing. > My first comment (and this may warrant > discussion) is that we want to avoid statefulness in the command. Double ditto. > So we don't want the behavior of running nmg a second time to depend on > what was run the first time, except insofar as the first command > changed the nmg primitive data itself. Instead of creating a stateful description in terms of “selections", an action could be encoded as nmg metadata where subentities are “marked” and you can perform actions on things marked. Basically, this would change the nmg — writing the marked data to disk just like any other change — but leveraging the concept in the command-line interface in leu of temporary selections. Marked data could also have other purposes too like “mark all topological gaps” which we could then visualize (automatically) in the GUI to highlight cracks, etc. Regardless, the first focus should be on a declarative syntax for creation, which you have started there with the cmface subcommand. Something similar to the conventions in https://en.wikipedia.org/wiki/Polygon_mesh whereby we declare vertices, edges, and faces, which get stitched together into an NMG will likely be more compact. Building on the existing serialization (sans braces) is definitely worth considering too, described on http://brlcad.org/wiki/NMG — Something like this would create a set of vertices: nmg myobject create V 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 Something like this would create faces (implicitly creating the corresponding edges) from those vertex indices: nmg myobject create F 4 5 6 7 F 0 1 6 5 F 1 2 7 6 F 2 3 4 7 F 0 5 4 3 That of course makes a simple box. That create “F” subcommand is pretty much the same as cmface except it utilizes indices instead of vertex values (note the massive reuse, which is desirable when describing topological structure. It gets monotonous otherwise. > Sean, any thoughts on preferred ways to specify nmg "bits" to operate on? Nothing more concrete than above, but I do think it should be something about that simple (at least for starters). The next logical step would then be “delete” and “update” subcommands, probably followed by an introspective reporting function (e.g., something that reports if it’s topologically solid). Cheers! Sean ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel