Recent Posts

Pages: [1] 2
1
Using AngelCAD / Radiator fix
« Last post by Carsten Arnholm 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  https://www.thingiverse.com/thing:3900987

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

// AngelCAD code: radiator_fix.as

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();
   obj.write_xcsg(GetInputFullPath(),secant_tolerance:0.01);
}



2
Announcements / Re: Forum Rules
« Last post by Carsten Arnholm on 2019-08-25, 12:06:03 »
After having seen recent attempts of spamming the board with advertising of off-topic material, the first post of any new member will from now on be moderated.  This is done to allow new members prove their intent in discussing AngelCAD and related topics by posting at least one on-topic post.

Once the first post passes moderation, further posts will not require moderation.

Thank you for understanding that this is a required adjustment.

3
Announcements / AngelCAD V1.3-02 released
« Last post by Carsten Arnholm on 2019-08-18, 22:10:40 »
A new version v1.3-02 of AngelCAD is out, linux and windows binaries available at https://github.com/arnholm/angelcad/releases

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 projection2d.as in the samples repository: https://github.com/arnholm/angelcad-samples

  • The AngelScript interpreter has been upgraded to version 2.33.0

  • try/catch has been enabled in the script language
4
General Discussion / AngelCAD on other linux distros?
« Last post by Carsten Arnholm on 2019-08-11, 09:22:41 »
At present, AngelCAD has prebuilt-binaries for Windows and Ubuntu
https://github.com/arnholm/angelcad/releases

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.
5
General Discussion / Re: Building AngelCAD
« Last post by Carsten Arnholm on 2019-08-10, 21:21:17 »
Hi, i want to compile my own stratagus version, which some modifications, but im not able to find all the libraries files to do it, any way to get those, or a guide to compile the engine executable for windows??

Hi, thanks for posting!  I moved the question to its own thread, since the thread you posted to is for user libraries as used by AngelCAD, not for building the software.

What is a "stratagus" version?

AngelCAD contains several executables, so do you want to build everything? If so you must begin with installing Code::blocks and g++ compiler. Then build

wxWidgets - https://github.com/arnholm/cpde_utils/tree/master/doc/wxWidgets
Boost - https://github.com/arnholm/cpde_utils/tree/master/doc/boost
msgpack -https://github.com/arnholm/cpde_utils/tree/master/doc/msgpack

cpde_utils - https://github.com/arnholm/cpde_utils
 
This will give you the basic setup assuming you configure Code::Blocks properly

Next you need AngelScript via
cpde_syslibs - https://github.com/arnholm/cpde_syslibs

You also need spaceio and spacemath from
spacelibs - https://github.com/arnholm/spacelibs

Then you can build applications

xcsg- https://github.com/arnholm/xcsg
xcsg depends on carve
 * carve - https://github.com/arnholm/carve

AngelCAD - https://github.com/arnholm/angelcad

 
For Windows you must use MSVC compiler with Code::Blocks IDE, read this
https://github.com/arnholm/cpde_utils/blob/master/doc/toolchain/CodeBlocks_MSVC_setup.pdf

The Code::Blocks workspaces and project files support both Windows and Linux. On Windows, select the build targets MSVC_Debug/MSVC_Releas. On Linux, select GCC_Debug/GCC_Release

Hope this helps. Have you tried any of the prebuilt binaries on Windows or Linux?

https://github.com/arnholm/angelcad/releases

This will give you everything for Windows or Ubuntu.

 
6
General Discussion / Building AngelCAD
« Last post by KamShamn on 2019-08-10, 09:05:31 »
Hi, i want to compile my own stratagus version, which some modifications, but im not able to find all the libraries files to do it, any way to get those, or a guide to compile the engine executable for windows??
7
Using AngelCAD / AngelCAD on Thingiverse
« Last post by Carsten Arnholm 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 http://www.thingiverse.com/search?q=AngelCAD

A concrete example is the remixed "Finger Flobber" I made with AngelCAD http://www.thingiverse.com/thing:3758434 . 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 http://www.thingiverse.com/thing:3758434/files for details.
8
Announcements / AngelCAD v1.3-01 released
« Last post by Carsten Arnholm on 2019-05-30, 16:14:15 »
A new version v1.3-01 of AngelCAD is out, linux and windows binaries available at https://github.com/arnholm/angelcad/releases

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 https://arnholm.github.io/angelcad-docs/docs/annotated.html

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.

9
General Discussion / Re: User libraries
« Last post by Carsten Arnholm on 2019-05-28, 23:19:03 »
aclib also contains features for 3d font generation as shown in this example

https://www.thingiverse.com/thing:3606649

10
Announcements / User documentation update
« Last post by Carsten Arnholm 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.
Pages: [1] 2