forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

X3D toolkit

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
silicondale



Joined: 15 Mar 2007
Posts: 140
Location: Matlock, Derbyshire

PostPosted: Fri Dec 25, 2015 10:50 pm    Post subject: X3D toolkit Reply with quote

I have written VRML export for point clouds and sets of triangulated facets, but would like to update these by exporting in X3D format. There seem to be a (very) few C++ toolkits available (libx3d, X3DToolKit, CyberX3D) but I haven't found anything available for Fortran.

I could code it myself using the X3D definition (as I have done for 2D graphics using SVG), but the X3D format definition, like so many XML definitions, seems needlessly complicated and impenetrable.

Does anyone know of any Fortran toolkit which will export X3D ? - Could be either free or commercial, as this is for a funded project.

Supplementary question -- would be nice also to have a Fortran callable VRML/X3D renderer/browser/plugin, i.e something that can be called directly from Fortran and looks like a Clearwin+ graphic window. I know it's possible to launch a standalone program like FreeWRL from within a program but this is a bit clunky.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Norm.Campbell



Joined: 31 Aug 2007
Posts: 49

PostPosted: Sat Feb 27, 2016 6:16 am    Post subject: Reply with quote

I have data on a regular grid in X_Y_Z_intensity text format (a grey-level or colour image, and the underlying DTM).

Would your VRML code allow me to export these values in VRML, so that I can import the file into a 3D printer (a full-colour 3D Systems ProJet 660)?

Norm Campbell
Back to top
View user's profile Send private message
silicondale



Joined: 15 Mar 2007
Posts: 140
Location: Matlock, Derbyshire

PostPosted: Sat Feb 27, 2016 10:49 am    Post subject: Other geometries Reply with quote

Hi, Norm - The code I wrote was specific to the point-cloud and triangulated geometries. It would be a lot more work to create a general-purpose VRML export library.

However, I guess the point-cloud export might well do what you want, given the X,Y,Z coordinates on each point: that would be just a point cloud with points located on a regular grid. Not sure what your 3D printer will require. I guess if you just fed it a point-cloud you would finish up with myriads of separate little coloured balls that would fall in a heap! Each point would need to be defined as big enough to connect to adjacent points.

Since I also use regular grids (but haven't had to do the VRML export yet) this is something I might find time to experiment with. I don't have access to a 3D printer yet, but can play with the data formats and view the exported file through Cortona.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Norm.Campbell



Joined: 31 Aug 2007
Posts: 49

PostPosted: Sun Feb 28, 2016 12:48 pm    Post subject: Reply with quote

I’m on a very steep learning curve, knowing nothing about 3D printers and 3D file formats only a few days ago.

It seems to me from what I’ve read so far that the simplest approach would be to set up a PLY file.

The X Y Z R G B for each regular grid point would form the set of vertices, and then, subdividing each “rectangle” into two triangles, list the consecutive sets of three vertices as the face data.

Does this seem sensible?
Back to top
View user's profile Send private message
silicondale



Joined: 15 Mar 2007
Posts: 140
Location: Matlock, Derbyshire

PostPosted: Sun Feb 28, 2016 2:29 pm    Post subject: Reply with quote

I've never used 3D printers - just started on a project that will need them, but someone else will be writing that bit of the software. What you suggest sounds sensible - to generate face data. If your regular X Y Z data is on a 3D grid of course, any internal points will be invisible unless you are using transparent or translucent materials in the printer. Also, of course, there are two way to split a rectangle into two triangles. Maybe better to interpolate a centre point and generate four triangles, which would give a better colour-merge over the whole face. Some formats allow you to define quadrilateral faces directly without needing to generate triangles. I suggest you also take a look at the VTK and OBJ formats before making any final decision. I am using VTK to transfer regular grid data to a colleague who has his own (non-Fortran) 3D visualisation package, and it works well. Like VRML, quite easy to code in Fortran as it is a simple sequential formatted file.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group