Asymptote: Difference between revisions

From FreeCAD Documentation
(Removed the convert to WebGL info. The Std_Export command can directly produce such a file.)
(Increased icon size from 16px to 24px.)
Line 17: Line 17:


<!--T:17-->
<!--T:17-->
# Optionally assign colors to the faces of the object you want to export with the [[Image:Part_FaceColors.svg|16px]] [[Part_FaceColors|Part FaceColors]] command.
# Optionally assign colors to the faces of the object you want to export with the [[Image:Part_FaceColors.svg|24px]] [[Part_FaceColors|Part FaceColors]] command.
# Change to the [[Image:Workbench_Mesh.svg|16px]] [[Mesh Workbench|Mesh Workbench]].
# Change to the [[Image:Workbench_Mesh.svg|24px]] [[Mesh Workbench|Mesh Workbench]].
# Create a mesh from the object with the [[Image:Mesh_FromPartShape.svg|16px]] [[Mesh_FromPartShape|Mesh FromPartShape]] command.
# Create a mesh from the object with the [[Image:Mesh_FromPartShape.svg|24px]] [[Mesh_FromPartShape|Mesh FromPartShape]] command.
# Select the new mesh object.
# Select the new mesh object.
# Invoke the [[Image:Mesh_Export.svg|16px]] [[Mesh_Export|Mesh Export]] command.
# Invoke the [[Image:Mesh_Export.svg|24px]] [[Mesh_Export|Mesh Export]] command.
# Select the {{FileName|*.asy}} file format in the dialog box.
# Select the {{FileName|*.asy}} file format in the dialog box.
# Enter a filename.
# Enter a filename.

Revision as of 14:26, 26 December 2020

Other languages:

Description

Asymptote is a vector language for 2D and 3D computer graphics. Asymptote code can be included in LaTeX documents 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.

Asymptote support was added in FreeCAD version 0.19.

Exporting

  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.

Converting

You need the Asymptote compiler to convert *.asy files. To convert to PDF a LaTeX system is also required. The compiler is a command line tool.

To covert to PDF you can use this syntax:

PathToAsyExecutable/asy -f pdf AsymptoteFileName.asy

Related

Video tutorials

The following videos are in Spanish: