Asymptote

From FreeCAD Documentation
Revision as of 20:03, 24 December 2020 by Roy 043 (talk | contribs) (More editing... I have removed the instructions about including asy code inside a LaTeX document.)
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Description

Asymptote is a programming language for the creation of 2D and 3D computer graphics. Asymptote code can be included in a LaTeX document or used to generate PostScript, PDF, SVG, WebGL, and PRC files.

Interactive 3D PDF files created from Asymptote code require Acrobat Reader version 9 or higher. For other PDF files any PDF reader can be used.

Asymptote support was added in FreeCAD version 0.19.

Exporting

To generate Asymptote code:

  1. Optionally assign colors to the faces of the object you want to export with the Part FaceColors command.
  2. Change to the Mesh Workbench.
  3. Create a mesh from the object with the Mesh FromPartShape command.
  4. Select the new mesh object.
  5. Invoke the Mesh Export command.
  6. Select the *.asy file format in the dialog box.
  7. Enter a filename.
  8. Press the Save button.

Creating a PDF file

To create a PDF file:

  1. Install the Asymptote compiler.
  2. Use this command line syntax:
    asy -f pdf AsymptoteFileName.asy
    

Related Pages

Related video tutorial