CAD software wanted - Page 1
Forum section: electronics / general

author: alah
author_rank: Contributor
timestamp: October 07, 2019, 09:02:04 pm
content: Hi everybody; I need some free simple software, only to draw pentagons and save the file with .dwg extesion. Suggestions, please.Thanks, Alberto.

author: amspire
author_rank: Super Contributor
timestamp: October 07, 2019, 09:23:28 pm
content: If you can live with DXF format, then there are lots of options. Any program that can read a dwg file can read a dxf file.For DXF files, you can look at inkscape and librecad.I was going to suggest qcad, but I see that they have now gone professional, and to get the DWG support, you need to pay 33 euros.When you specify DWG format, you usually have to say which DWG format since the different versions are not backward compatible. For simple shapes, DWG R12 is basically readable by everything that can read DWG files.

author: ebclr
author_rank: Super Contributor
timestamp: October 07, 2019, 10:19:26 pm
content: https://www.freecadweb.org/

author: sokoloff
author_rank: Super Contributor
timestamp: October 07, 2019, 10:19:35 pm
content: If you can use DXF, OpenSCAD (free) can do it.Here's the code sample:Code:// Define the functionmodule regular_polygon(order = 4, r=1){angles=[ for (i = [0:order-1]) i*(360/order) ];coords=[ for (th=angles) [r*cos(th), r*sin(th)] ];polygon(coords);}// Draw one near the originregular_polygon(5, r = 10);// Draw a larger one centered on [30, 0]translate([30, 0, 0])regular_polygon(5, r = 15);// Draw a smaller one centered on [30, 30]translate([30, 30, 0])regular_polygon(5, r = 5);That makes this DXF output:pentagons.txt (rename it to pentagons.DXF)pentagons.txt(1 kB - downloaded 94 times.)Which is this preview:pentagons.png

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 08, 2019, 12:12:41 am
content: I second the use of OpenSCAD. Great stuff. I used it to design custom enclosures.

author: alah
author_rank: Contributor
timestamp: October 25, 2019, 03:38:35 pm
content: Hi, the best I could do was with inkscape, but it draws the pentagon filled in black. I need to print concentric pentagonsoutlineson a single page, save as pdf, print to se which size suits my need, then convert to send to a shop to cut some pieces. Help, please and thanks to ALL.

author: sokoloff
author_rank: Super Contributor
timestamp: October 26, 2019, 01:18:59 am
content: Code:module regular_polygon_outline(order = 4, r=1, t=0.1){angles = [ for (i = [0:order-1]) i*(360/order) ];coords = [ for (th=angles) [r*cos(th), r*sin(th)],for (th=angles) [(r-t)*cos(th), (r-t)*sin(th)] ];paths = [[ for (i = [0:order-1]) i], [for (i = [1:order]) order*2 - i]];polygon(coords, paths, 10);}// Loop from 5 to 21 by 2for (i = [5 : 2 : 21]) {// Draw a polygon of 5 sides, radius of 1, thickness of 0.1regular_polygon_outline(5, r = i, t = 0.1);}yields this preview:pentagons2.txt(5.44 kB - downloaded 84 times.)And produces the attached dxf: (rename txt to dxf):

author: sokoloff
author_rank: Super Contributor
timestamp: October 26, 2019, 01:19:54 am
content: If you just need this one time and can't figure out the code, tell me what sizes you need and I'll generate a dxf for you matching those specs.

author: beanflying
author_rank: Super Contributor
timestamp: October 26, 2019, 02:12:40 am
content: Quote from: alah on October 25, 2019, 03:38:35 pmIn Inkscape you can control both the fill and stroke (outline). If you are sending it out to be Laser Cut then SVG format should be fine too as most software will handle that. I am not a fan of doing actual drawings in Inkscape as it is clunky compared to a CAD package.If you want something to grow into for more complex designs later then Fusion 360 for most smaller users remains free. I actually run my exported nested materials from Fusion 360 through Inkscape to tweak the cut layout (reduce spacing and rotate parts) and line colours before sending the sheets to my Laser for cutting or engraving.