On Jun 28, 2013, at 1:17 PM, Harmanpreet Singh wrote: > I started with making a simple BRL-CAD database file having a object > (sphere) and converted it to text format using g2asc. I found all > input information, category of entity and additional information in > the form of A (x1, y1, z1), B(x2, y2, z2) and C(x3, y3, z3). Then used > "l" (small L) command in command window, and concluded that these may > be the vectors since magnitude value is written alongside.
Excellent, I suggest having your viewer front-end work directly with NURBS geometry or facetizations thereof. If you run the brep command on your sphere object, you can create a sphere.brep object. The facetize command (I think) will turn that sphere.brep into polygons. The bot_dump command will export to a variety of standard polygonal text formats you can easily read in your viewer. You can use those polygons to display the geometry in your viewer. Alternatively, you could export the brep directly and figure out how to visualize NURBS geometry directly if you find a web technology that supports them. > Then added other objects such as rcc and rpp to examine how they are > represented in database. There are more than two dozen objects and many are FAR more complex than sph, rcc, and rpp. You don't want to make the front end interface aware of so many types and several are far too complicated to deal with directly. The web interface should probably either deal only with viewing polygonal (triangles) or brep (NURBS) objects. > This text format of geometry file will help to perform operations of > reading / parsing and obtaining the required information to fed to > webGL functions. g2asc is really suboptimal. I suggest using the brep+facetize+botdump commands inside mged. > Also I was working on patch this time more seriously and I got the > logic of f_journal(). But I didn't found any code block within that > function that write data in journal file. Where the f_journal() is > called? f_journal() is registered as a callback function in src/mged/setup.c and called through that table when a user runs the journal command. Cheers! Sean ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
