Drawing in Linux

Feb 03, 2009 66 Replies

But FreeBSD is going to be part of Debian:

formatting link

The FreeBSD kernel, you mean, right?

This is a good idea, actually.

Yes, and there are others too. Point being that these are managed collections of software and it is quite accurate to claim somthing is "part of" them. Bug/problem reports are forwarded upstream (eg, to QCad's Ribbonsoft) if it's something other than packaging bugs. Responses from upstream are in turn forwarded back to the originator (ie, "you"). It's a system that works and everyone benefits.

I personally wrote several GNU copyrighted programs as a way to "give back" to the community.

Very cool. Anything shop related?

I wrote this to calculate single point gear cutters using the button method. It's ugly, I know. For some reason I never prettied it up. It runs on Windows too, if

formatting link
Perl is installed. Maybe someone will find it entertaining.

#!/usr/bin/perl -w # # -- cutter.pl -- Program to calculate button dimensions and gear # blanks for gear cutting. # use Term::ReadLine; $input = new Term::ReadLine ""; $input->ornaments(0);

$bb = $input->readline("Number of teeth in gear: "); $c = $input->readline("Pressure Angle: "); $a = $input->readline("Diametral Pitch: "); print "\n";

$Pi = 22/7; $dd=($bb+2)/$a;# od of gear $e=1/$a;# addendum

$f=.455/$a; # # TODO: Nose radius of each corner is .3/DP # $gg=$bb/$a;# pd of gear $i=2.25/$a;# full tooth depth $Clearance = .250/$a; if ($c == 14.5) { $i=2.157/$a; $Clearance = .157/$a; } $ll=($gg*sin($c*($Pi/180)))/2; # button radius $oo=$ll*(1-sin($c*($Pi/180)))+$f; # cross slide infeed $pp=$ll*(1-cos($c*($Pi/180)))+$e; # longitudinal feed $mm = ($Pi*$dd)/$bb; # circular pitch $c2c = ($mm + ($ll * 2)) - (2 * $pp); # buttons, center to center

print "$bb Tooth gear information\n"; print" O.D. of gear blank= $dd\n"; print" Pitch Diameter of gear: $gg\n"; print" Thickness of cutter blank: $mm\n"; print" Button diameter: ",$ll * 2,"\n"; print" Infeed (crossfeed): $oo\n"; print" Longitudinal (compound) feed: $pp\n"; print" (Dual buttons, center to center = $c2c)\n"; print" Depth Of Cut: $i\n"; print" (Add Clearance: $Clearance)\n\n"

One was a script for milling a circle on a mill using regular mill handles. It is like a CNC instruction.

#!/usr/bin/perl

use strict;

my $pi = 3.1415926;

my $r = 1/8; # 1/4" endmill

my $phi_start = 0; my $phi_end = 2*$pi;

my $phi_step_degrees = 2; # 2 degrees my $phi_step = $phi_step_degrees * (2*$pi/360);

my $xmark = 0.001; my $x_circle = 200; # 0.1"

my $ymark = 0.001; my $y_circle = 200; # 0.1"

my $x0 = 0; my $y0 = 0; my $R = 1;

my $x_start = $x0 + ($R-$r)*cos( $phi_start ); my $y_start = $y0 + ($R-$r)*sin( $phi_start );

my $x_start_dial = 0; my $y_start_dial = 0;

my $old_x_dial = $x_start_dial; my $old_y_dial = $y_start_dial;

my $old_x_move = 0; my $old_y_move = 0;

my $old_x = $x_start; my $old_y = $y_start;

sub direction { my $q = shift; return "" if $q > 0; return "=="; }

print "Set X dial to $x_start_dial\n"; print "Set Y dial to $y_start_dial\n";

my $i = 0;

for( my $phi = $phi_start + $phi_step; $phi I wrote this to calculate single point gear cutters using the button

show off..I might borrow some of that. :-) I'd like to output DXF files, but I don't understand the format. Plotting into QCad files is what I'd like to do.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required