[x3d-public] file converter based on JavaScript

John Carlson yottzumm at gmail.com
Sun Apr 19 21:51:02 PDT 2020


Note to avoid confusion (I was confused), it's  convertJsonToStl

Thanks,

John

On Sun, Apr 19, 2020 at 5:50 PM Don Brutzman <brutzman at nps.edu> wrote:

> aha, belay my last request for code with thanks for these.
>
> for clarity am noting that "Json" in following is X3dJdon, as in
> convertX3dJsonToStl
>
> Looks like your importers for Ply and STL are about 200-300 lines each,
> including lotsa brackets.
>
> Perhaps we can meet to adapt to Java and Python using existing data
> structures in X3DJSAIL and X3DPSAIL?  those utility methods could then be
> part of library autogeneration.  If you can sketch out the respective Java
> and Python code first that would be great.
>
> Looks like your X3dJsonToStl goes through a transformLDNodesToTriangles()
> method which supports IndexedFaceSet, IndexedTriangleSet, IndexedTriangle,
> or IndexedTriangleFanSet?
>
>
> On 4/18/2020 4:20 PM, John Carlson wrote:
> > Here's the matrix of relevant code:
> >
> >
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/convertJsonToStl.js
> >
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/convertPlyToJson.js
> >
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/convertStlToJson.js
> >
> > Note that these run in browser, so no need for a docker image, jupyter,
> or complex setups.
> >
> > John
> >
> > On Sat, Apr 18, 2020 at 6:11 PM John Carlson <yottzumm at gmail.com
> <mailto:yottzumm at gmail.com>> wrote:
> >
> >     Note that X3DJSONLD has a PLY-> X3D converter and would appreciate
> contributions of an X3D to PLY converter.  Also advancement of the X3D ->
> STL converter would also be appreciated, in particular, the converter could
> use tessellation of faces plus additional X3D geometries.
> >
> >     I have a web page @ coderextreme.net/X3DJSONLD <
> http://coderextreme.net/X3DJSONLD> which shows off capabilities.
> >
> >     It’s not python.
> >
> >     John
> >
> >     On Fri, Apr 17, 2020 at 7:16 PM Andreas Plesch <
> andreasplesch at gmail.com <mailto:andreasplesch at gmail.com>> wrote:
> >
> >         Did somebody put together an x3d converter based on pythonocc ?
> >
> >         Here is an example:
> >
> >         https://senties-martinelli.com/software/cad-viewer
> >
> >         It could convert  step, stp, igs, iges, obj and stl formats.
> Format
> >         import and export is only a small subset of pythonocc
> >         (https://github.com/tpaviot/pythonocc-core) but I think just
> making
> >         this functionality easy to use with a dedicated converter could
> be
> >         really valuable.
> >
> >         In the end, I think a  web service just for conversion would be
> most useful.
> >
> >         I played with the Jupyter notebook and could generate with only
> a few lines x3d.
> >
> >         And there are ways to generate a standalone webapp from a
> notebook:
> >
> https://discourse.jupyter.org/t/how-to-transform-a-jupyter-notebook-into-a-webapp/758/6
> >
> >         That could be quick way to offer a web service.
> >
> >         Have there been attempts of this kind ? Would there be interest
> in a
> >         open source github hosted project ?
> >
> >         -Andreas
> >
> >         --
> >         Andreas Plesch
> >         Waltham, MA 02453
> >
> >         _______________________________________________
> >         x3d-public mailing list
> >         x3d-public at web3d.org <mailto:x3d-public at web3d.org>
> >         http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200419/c0e7dbd3/attachment-0001.html>


More information about the x3d-public mailing list