3D PDF

Show off your FreeCAD projects here!
chrisb
Posts: 1649
Joined: Tue Mar 17, 2015 9:14 am

3D PDF

Postby chrisb » Wed Jan 25, 2017 7:28 pm

I have successfully created a 3D PDF and would like to share the procedure here. The idea and the meshlab script are from http://home.arcor.de/mnumberger/cad-stlto3dpdf.html

Prerequisits:
  • Meshlab
  • latex with package media9

The following steps delivered a 3D PDF, which can be opened e.g. with acrobat reader.
  • Extract the contents of the attached zip to somefolder.
  • Export the object as Mesh (extension .stl) into that folder, let's say the filename is somefolder/object3D.stl.
  • In that folder call

    Code: Select all

    meshlabserver -i object3D.stl -o object3D.u3d -s remove_duplicate_faces_vertex.mlx -om vq fq wn

    On my system it crashes but before doing so it created the u3d file object3D.u3d. It creates a latex file as well, but that didn't work for me, so I wrote a new one: pdf3d.tex.
  • If you want to change the intermediate filename from object3D.u3d to something else, you have to adapt it in the latex file pdf3d.tex as well.
  • call latex:

    Code: Select all

    pdflatex pdf3d
    pdflatex pdf3d

    Yes, you have to latex twice to fulfill some internal references, without them the pdf didn't show the 3D object.
  • You are done, the result is pdf3d.pdf
Attachments
pdf3d.zip
(911 Bytes) Downloaded 57 times
pdf3d.pdf
(42.03 KiB) Downloaded 163 times
User avatar
easyw-fc
Posts: 601
Joined: Thu Jul 09, 2015 9:34 am

Re: 3D PDF

Postby easyw-fc » Wed Jan 25, 2017 10:09 pm

Hi @chrisb
if you can use a windows pc, here an alternative method that can give you also colors on the 3D pdf
https://forum.freecadweb.org/viewtopic. ... 97#p144530
some more tips here
https://forum.freecadweb.org/viewtopic. ... 97#p144546
from the 3Dpdf you can also extract U3D data and embed that in a new pdf using LaTex

the best imo it would be to have a script to export a FC solid model to U3D or better PRC and then run Asymptote (fully open source) to generate the 3D pdf... but unfortunately nothing has been developed on this side atm...

Maurice
chrisb
Posts: 1649
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D PDF

Postby chrisb » Thu Jan 26, 2017 12:25 am

Direct export would be great. I was surprised that there are not many viewers out there, which can display one of the standard (or better: de-facto-standard) formats like STEP, STL, or OBJ or alike.
When I recently discovered 3DPDF I thought it was the end of the "Show and Tell" problems, because the Acrobat reader is widely used. But here we have the problem that it is difficult to generate the target format. So there seems to be not much desire to only view 3D files.
User avatar
NormandC
Posts: 12066
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: 3D PDF

Postby NormandC » Thu Jan 26, 2017 3:22 am

Hi Chris,

Impressive! Unfortunately I know of no way to view 3D PDFs on Ubuntu. It looks like there is no more Linux version available of Adobe Reader, there's only an Android one.
User avatar
bernd
Posts: 3869
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: 3D PDF

Postby bernd » Thu Jan 26, 2017 10:35 am

NormandC wrote:Impressive! Unfortunately I know of no way to view 3D PDFs on Ubuntu. It looks like there is no more Linux version available of Adobe Reader, there's only an Android one.
+1, AFAIK there is no software on Linux which can handle 3D pdf. We use it widely at work because any Customer has an AdobeReader but lot's do not know about ifc (building model format) and do not have an viewer for this file format. This will change but at the moment 3Dpdf is still mostly used.
User avatar
r-frank
Posts: 1962
Joined: Thu Jan 24, 2013 6:26 pm
Location: Möckmühl, Germany
Contact:

Re: 3D PDF

Postby r-frank » Thu Jan 26, 2017 10:46 am

bernd wrote:AFAIK there is no software on Linux which can handle 3D pdf


Well, yes and no ;)

Adobe has dropped Support, but you can still find ubuntu-packages on the net, see here (2nd post).

A german howto-install for Linux mint i found here ...
Deutsche FreeCAD Tutorials auf Youtube
My GrabCAD FreeCAD-Projects
FreeCAD lessons for beginners in english

Native german speaker - so apologies for my english, no offense intended :)
User avatar
bernd
Posts: 3869
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: 3D PDF

Postby bernd » Thu Jan 26, 2017 10:53 am

r-frank wrote:
bernd wrote:AFAIK there is no software on Linux which can handle 3D pdf


Well, yes and no ;)

Adobe has dropped Support, but you can still find ubuntu-packages on the net, see here (2nd post).

A german howto-install for Linux mint i found here ...
Yes I know, I have installed ut ondebian jessie, but it is really outdated, no longer maintained and has AFAIK security issues.
chrisb
Posts: 1649
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D PDF

Postby chrisb » Thu Jan 26, 2017 10:59 am

NormandC wrote:Hi Chris,

Impressive! Unfortunately I know of no way to view 3D PDFs on Ubuntu. It looks like there is no more Linux version available of Adobe Reader, there's only an Android one.

I found an old version which I was able to install, but of course I would like to have an open software displaying 3D PDF.