Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Carsten Arnholm

Pages: [1]
AngelCAD version 1.4-00 was released 28 July 2020, so this post is a belated announcement of that fact. The post is made so that users know about the latest publically available version.

Windows and Ubuntu binaries at

Changes in this version
  • fixed missing member functions in spline2d and spline3d. This makes it possible to use spline curves directly in script code.
  • angelcad-samples: fixed segfault error for polygon & polyhedron
  • added new pointcloud to allow reading points from external files. This makes it easier to use external data to make for example a convex hull from a point cloud
  • added dxfread application to read DXF files. This is a stand alone console application that can convert 2d DXF files into an AngelCAD function for use in e.g. linear extrude
  • Windows version now built with MSVC2019. Now using an up to date Windows compiler to Build AngelCAD

General Discussion / Planned new features in AngelCAD
« on: 2020-09-06, 22:41:56 »
Here is a quick summary of things coming to AngelCAD. This thread is for discussing already planned features as listed. If you want to propose new features, feel free to start a new thread with a suitable subject heading.

Import of DXF files
This is not a language feature, but instead an external application (dxfread) that can be used alone, or from a new File -> Import DXF .. menu item in the AngelCAD IDE. When used, it generates an AngelCAD *.as file containing a function returning a shape2d@ object that you can use with linear_extrude, rotate_extrude, sweep etc.  For example, if you have a file "nice_drawing.dxf" and import it, you get a file "" containing a function with signature

Code: [Select]
shape2d@ nice_drawing_dxf();
In your main AngelCAD script you include the file

Code: [Select]
#include ""
And then call the nice_drawing_dxf() as required.

Support for script arguments
This allows some of the script variables to be defined outside the script. The variables become available via the the "args" input argument of the main_shape() function, and the script can extract the values as shown below and in the attached screenshot. If the variable is not provided by the user, a default value is specified in the script

Code: [Select]
// AngelCAD code.
#include ""

shape@ main_shape(as_args@ args)
   double height = args.get_unsigned_double("height",def:1.0);
   return linear_extrude(DXF447_dxf(),height);

Optional "post-build" export of generated files to a predefined directory
Using this option, a disk folder can be defined as the export directory for generated files, regardless of where the AngelCAD source is executed. This is a convenient feature where for example your slicer program can pick up STL files.

Processing of OpenSCAD csg files in AngelCADs xcsg engine
If you have an OpenSCAD .scad file, for example  "myfile.scad", you can use OpenSCAD to generate "myfile.csg"

$ openscad --o myfile.csg myfile.scad

The above is a fast process, even for large models because no boolean operations are involved (CGAL is not involved). Given the generated .csg file, you will then be able to use it as input to AngelCADs xcsg engine and create e.g. an STL file ! :

$ xcsg --stl myfile.csg

This can be many times faster than doing it directly in OpenSCAD. Granted, there are some limitations, not all .csg commands will be supported. This includes import,  surface, text and resize and some other things. But many models do not use these features, and sometimes this can be a big time saver. There is also a possibility that using this feature from the AngelCAD IDE might become possible, no decision yet.

The website "Hacker News" showcased AngelCAD on saturday, causing a sudden inflow of visitors to the AngelCAD GitHub pages, more than 3100 unique visitors in one day to be precise. I had no part in the appearance on Hacker News, I was informed after the fact by one of the moderators.

Hacker News is simply a list of topics where your story "slide off" the end fairly quickly, but it is a rather active site with some interesting topics, both software and other things. Below is the AngelCAD thread discussion link

AngelCAD: Script-based 3D solid modeller

This forum is being monitored even if not much has happened lately.
You are welcome to start a new topic about AngelCAD, questions or suggestions, If you do you will get a reply!

Looking forward to seeing you!

Using AngelCAD / Radiator fix
« on: 2019-10-06, 20:24:44 »
AngelCAD was used to design a part in order to fix a broken radiator, and the result turned out well, the radiator can be used again! Image of printed part is attached.

More images as well as STL for this part can be found at

Source code for the part follows
The code illustrates 2d and 3d features of AngelCAD, plus using variables for parametric modeling.

// AngelCAD code:

shape@ main_shape()
   double dx  = 59.0;
   double dy  = 26.0;
   double dy1 = 6.0;
   double th  = 2.0;   // thickness
   double h1  = 13.0;  // height of circular part
   double r_hscrew = 2.3;     // radius of horizontal screw holes
   double r_vscrew = 2.0;     // radius of vertical screw holes
   double x_screw = 20.0;     // x-coordinate of screw holes
   double y_screw = dy - 8.5; // y-coordinate of vertical holes
   double z_screw = 7.0;      // z-coordinate of horizontal holes
   double r_power = 10.5/2;   // radius of power hole
   double y_power = dy - 8.5 - 5.0;
   double x_flange = 10.0;

   // bottom plate is intersection between curcle and rectangle
   shape2d@ rect = translate(-dx/2,0)*rectangle(dx,dy);
   circle@  circ = circle({-dx/2,dy1},{0,0},{+dx/2,dy1});
   // main part consiste of horizontal and vertical pieces
   solid@  horiz = linear_extrude(rect & circ,th);
   solid@  vert  = linear_extrude(rect & (circ - translate(0,th)*circ),h1);
   solid@ main_part = horiz + vert;
   // holes for the vertical screws
   solid@ v_screw = cylinder(r:r_vscrew,h:50,center:true);
   @main_part = main_part - translate(+x_screw,y_screw,0)*v_screw;
   @main_part = main_part - translate(-x_screw,y_screw,0)*v_screw;
   // holes for the horizontal screws
   solid@ h_screw = cylinder(r:r_hscrew,h:50,center:true);
   @main_part = main_part - translate(+x_screw,0,z_screw)*rotate_x(deg:90)*h_screw;
   @main_part = main_part - translate(-x_screw,0,z_screw)*rotate_x(deg:90)*h_screw;
   // slot for the power wire
   solid@ power1 = cylinder(r:r_power,h:50,center:true);
   solid@ power2 = translate(0,dy,0)*power1;
   @main_part = main_part - translate(0,y_power)*hull3d(power1,power2);
   // slots for the flanges in the radiator plastic
   solid@ flange = rotate_x(deg:45)*cuboid(dx:3.0,dy:18,dz:15,center:true);
   @main_part = main_part - translate(+x_flange,0,0)*flange;
   @main_part = main_part - translate(-x_flange,0,0)*flange;
   // add triangular flanges for increased stiffness
   solid@ triangle = translate(0,3,1)*rotate_y(deg:-90)*linear_extrude(polygon({0,0},{10,0},{0,10}),th);
   @main_part = main_part + translate(+x_flange+5,0,0)*triangle;
   @main_part = main_part + translate(-x_flange-3,0,0)*triangle;

   @main_part = main_part + translate(+x_flange+17,3,0)*triangle;
   @main_part = main_part + translate(-x_flange-15,3,0)*triangle;

   return main_part;

void main()
   shape@ obj = main_shape();

Announcements / AngelCAD V1.3-02 released
« on: 2019-08-18, 22:10:40 »
A new version v1.3-02 of AngelCAD is out, linux and windows binaries available at

The upgraded version provides the following new features
  • projection2d allows projection of solids down to xy-plane and become 2d shapes. There is a new sample in the samples repository:

  • The AngelScript interpreter has been upgraded to version 2.33.0

  • try/catch has been enabled in the script language

General Discussion / AngelCAD on other linux distros?
« on: 2019-08-11, 09:22:41 »
At present, AngelCAD has prebuilt-binaries for Windows and Ubuntu

If there is sufficient demand, we could add support for one or two more linux distros. I would ask users to reply in this thread and say which distro they would like to see prebuilt-binaries for, and it will then be considered. No guarantees, though.

Using AngelCAD / AngelCAD on Thingiverse
« on: 2019-07-20, 10:39:15 »
This thread shall contain pointers to use of AngelCAD found on Thingiverse (or other similar sites). The idea is to show practical use of the software.

Of course, you can always use a generic search for items tagged with AngelCAD

A concrete example is the remixed "Finger Flobber" I made with AngelCAD . In this case an original STL was converted to OFF format using AngelCADs "polyfix" utility, and then imported and modified. See the *.as source file for details.

Announcements / AngelCAD v1.3-01 released
« on: 2019-05-30, 16:14:15 »
A new version v1.3-01 of AngelCAD is out, linux and windows binaries available at

1. The new version allows translating an object using a vec3d vector as an alternative to providing the x,y,z values directly. This can be especially convenient when the vector is the result of some calculation.

   vec3d v(100,0,0);
   solid@ object= translate(v)*sphere(50);

2. convenient initializer list construction for pos2d/3d and vec2d/3d has been introduced. For example, to define an array of pos3d objects, one can now write

   array<pos3d@> p = {{0,0,0},{1,0,0},{1,2,0},{1,2,3}};

3. Improved user documentation at

4. A new console application polyfix is now bundled with AngelCAD. This application can be used for repairing some mesh files in STL or other formats, and it can be used for remeshing to allow 'bending' or 'morphing' in AngelCAD. polyfix will be discussed in a separate forum thread.

Announcements / User documentation update
« on: 2019-05-18, 13:13:24 »
The AngelCAD language extension has today been updated to be more complete, with descriptive text for all scripting types and member functions. Also new is that return types are now shown correctly with the AngelScript handle symbol @ . In addition, the documentation search feature has been enabled, see top right of any documentation page. For example, type 'poly' there and the alternatives polygon and polyhedron are listed for selection.

These improvements should make it a better reference when using AngelCAD.

The update is the result of a new system for generating documentation from the scripting types, making it much easier to maintain.

General Discussion / User libraries
« on: 2019-05-04, 10:43:24 »
AngelCAD contains a number of built-in features, but since it is based on a scripting language, i.e. AngelScript with AngelCAD language extension, any user can create reusable *.as files and store them under the AngelCAD libraries folder.

To detect where the AngelCAD libraries folder is on your computer, use the menu item File -> Show Libraries Folder, which will open the file browser in that location. To create a new library called "mylib", you create a subfolder "mylib" and put your *.as files there. Then, from any other AngelCAD *.as source file, you can refer to your library using an #include statement. If we assume you created a file, it can be referenced as follows

#include "mylib/"

As an example of an existing library, see . If you open the libraries folder, and from ther issue the command
$ git clone

You can then use the solid trimming feature via an #include from another source file

#include "aclib/"

Installation and troubleshooting / How to install AngelCAD
« on: 2019-05-04, 10:25:32 »
To install AngelCAD, please go to and follow the Downloads link to download the pre-built executable for your operating system (Windows and Linux Ubuntu supported).

For Windows run the setup program to install the software. For Linux, run the install script as shown in this YouTube Video.

Using AngelCAD / Get started with AngelCAD samples
« on: 2019-05-04, 09:59:10 »
Once you have downloaded and installed AngelCAD, it is time to try some examples to illustrate the features. Like most things AngelCAD, there is a GitHub repository of existing samples that you can try.  There are 2 ways you can access the samples


1. Download samples zip-file from Github at
Extract the contents to a folder in your computer, then open and run the contained *.as files using AngelCAD


2. Clone the Github angelcad-samples repository. For this you must first install Git. Then from some relevant local folder on your computer, clone the repository
$ git clone
This will generate a subfolder angelcad-samples with *.as files to open and run in AngelCAD. 

The *.as files can be opened using File->Open ... in AngelCAD, or you can simply use file drag/drop from the file browser into the AngelCAD. Then build the sample using the Build menu or F6 shortcut, and view the result using the Tools menu or F7 shortcut.

Announcements / Forum Rules
« on: 2019-05-04, 09:28:46 »
This forum is for discussing issues relating to the AngelCAD software, especially how to install and how to use it. We expect a respectful and on-topic discussion, and encourage users to help each other.

Before you post, please make sure you post in the correct category and also use the search facilities to see if your question has already been covered. Do not make multiple threads on the same issue.

Commercial advertising is not allowed on this board without prior written agreement with the board owners.

In case we find posts that contain illegal material or are otherwise off topic, such posts may be deleted and users posting such material may find themselves excluded from the forum.

Announcements / Software download and documentation
« on: 2019-05-04, 09:05:40 »
AngelCAD is open source located at GitHub. Pre-built binaries for Windows and Linux is available there. For download links and documentation, please visit angelcad-docs.

Pages: [1]