prdatur / heekscnc

Automatically exported from code.google.com/p/heekscnc
Other
0 stars 0 forks source link

Drill operations #75

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Rather than cutting a circular pocket, I'd like to be able to define points
in the drawing, select one or more of the points and create a drill
operation.  Ideally this would have options for peck drilling.

Original issue reported on code.google.com by shopinth...@gmail.com on 16 Mar 2009 at 9:07

GoogleCodeExporter commented 8 years ago
I agree that this one would be extremely useful. Maybe if points could be 
inserted
into a 'sketch' they could be used in the python output panel along with some 
canned
cycles in the iso.py post processor.

Thanks

Original comment by ddfalck2...@yahoo.com on 11 Apr 2009 at 6:51

GoogleCodeExporter commented 8 years ago
I have added Cutting Tool and Drilling cycle objects.  The Cutting Tool defines 
a
single cutting tool for the tool table.  Its Python code uses the G10 L1 
command to
add the tool to the machine's tool table from the program.  It also adds a 
'select
tool' before processing the Drilling cycle code.

The process is;
  - create a Cutting Tool object and set its parameters (length/width)
  - place points where you want drilling cycles to begin
  - select both the Cutting Tool object and all the points you want
  - add a Drilling Cycle object and set the depth.  The depth will be common
    to all holes drilled with this drilling cycle object.  The diameter
    of the hole will be taken from the Cutting Tool object.
  - select the drilling cycle object and rotate the view to see an
    indication as to how far and wide the hole will be on the model.

Original comment by David.Ni...@gmail.com on 13 Jun 2009 at 10:41

GoogleCodeExporter commented 8 years ago
Hi Dave,
Thanks so much for doing this .Great job. I am studying the code and learning. 
I am getting a segfault when I use the Cutting Tool Object. Drilling does work
without it though.

Thanks,
Dan Falck

Original comment by ddfalck2...@yahoo.com on 13 Jun 2009 at 11:50

GoogleCodeExporter commented 8 years ago
It makes the python script ok.
But when I press "G0" it says, in the terminal:
dan@dan:~/Desktop$ python post.py
Traceback (most recent call last):
  File "post.py", line 13, in <module>
    drill(x=11, y=0, z=0, depth=21, standoff=5, dwell=1, peck_depth=3)
TypeError: drill() got an unexpected keyword argument 'dwell'

Original comment by danhe...@gmail.com on 14 Jun 2009 at 9:37

GoogleCodeExporter commented 8 years ago
Dave, This is a great enhancement.  Thanks for doing this.  Will it be possible 
in
the future to select circles for drilling operations and have the operation use 
the
center as its reference point?

Original comment by shopinth...@gmail.com on 14 Jun 2009 at 6:47

GoogleCodeExporter commented 8 years ago
I added a feature last night that allows the user to select other types of 
objects
before creating a drilling cycle object.  The application steps through all 
selected
objects.  If it's a point that its location is used for drilling.  All other 
selected
types are intersected with each other.  All intersection points are used as 
drill
locations.  Perhaps I could extend it such that, if a circle is selected and it
doesn't intersect any other selected objects, use the circle's centre as the 
drilling
location.  I was also wondering about the idea of using the circle's diameter 
as an
indication of hole diameter.  The code could search for existing CuttingTool 
objects
that already have this diameter and refer to them in the drilling object.  I'm 
not
sure if this last it is appropriate.  It may become frustrating enough to need a
'stop pissing me off' option so that the operator can just 'add a drill cycle'
without all this extra assumption stuff.

I think the selection of a circle object that doesn't intersect any other 
elements
would be safe enough to do on its own.  I did want to be able to specify 
drilling
locations using intersections though.  Often a part has mounting holes that are
arranged at 'n' degrees around a circle's path.

Original comment by David.Ni...@gmail.com on 15 Jun 2009 at 3:03

GoogleCodeExporter commented 8 years ago
I should also mention that I have had no luck finding the Python problem shown 
above.
 On my machine, the 'make pytyon script' button generates the python script fine. 
When I press the 'G0' button it kills the application.  When I run the python 
script
from the command line it generates the GCode without error.  I am still trying 
to
figure it out.  Python is not my expertise.  The python work I have done is 
pretty
well all in this project.  I'm still trying to figure out how to get spaces 
between
the 'G' code commands I'm producing.  At the moment it's just a mess of 
characters
and digits.  If someone can help me with this part, I would be very greatfull

Original comment by David.Ni...@gmail.com on 15 Jun 2009 at 3:07

GoogleCodeExporter commented 8 years ago
I might be way off, but is it possible that the application is crashing because 
it's
trying to read gcode that isn't defined yet (like in nc_read.py)? The main app 
might
not like G10 L1

Original comment by ddfalck2...@yahoo.com on 15 Jun 2009 at 5:02

GoogleCodeExporter commented 8 years ago
I just got the same problem ( it crashed on post process ) in Windows.
I have fixed it in ColouredText::ReadFromXMLElement(), please try again and see 
if it
fixes your crash.

Original comment by danhe...@gmail.com on 15 Jun 2009 at 7:38

GoogleCodeExporter commented 8 years ago
I also think I've fixed it. (Can't help myself).  I took the advice about the
nc_read.py file and added support for parsing past the G10 L1 sequence and all 
is
well with the world.  I have only just checked it in.

I have also added the feature whereby a selected circle that does not intersect 
any
of the other selected objects may be used as a drilling location.

Original comment by David.Ni...@gmail.com on 15 Jun 2009 at 10:30

GoogleCodeExporter commented 8 years ago
I should also have added that, in order to get the circle's centre, I had to 
overload
the ArcGetCentre() routine in the CAD interface.  I was reluctant to change the
interface and I figured that a circle is really just a special case of an arc.  
This
routine now checks the object type passed in and calls either the HArc or 
HCircle
method as appropriate.  If you would rather I break it into a separate method 
and
change the interface, let me know.

In any case you will need to recompile the HeeksCAD tree before using the circle
option in the Drilling code.

Original comment by David.Ni...@gmail.com on 15 Jun 2009 at 10:37

GoogleCodeExporter commented 8 years ago
I have changed the CCutterTool class to be based on the HeeksObj class rather 
than on
CTools.  It all seems to work except for the automatic update of the object 
title
values.  The object titles are a convenient way to describe the tool (centre 
drill,
6mm bit etc.)  When I change the values, these names are not carried through to 
the
list of obects at the top.  They write to the XML data file and read back in 
alright.
 In fact one must write and re-read the data file for the title values to be
displayed correctly.

One other problem I can't figure out is where an operator updates the tool 
number in
a Drilling Cycle object.  The code tries to search for a correspondnig 
CCuttingTool
object using the GetFirstObject(), GetNextObject() loop but it never finds the
CCuttingTool objects.  I can do it if I search using the GetIDObjectType( 
CutterTool,
id) value explicitly but I am limiting functionality by looking for ID numbers 
in a
loop rather than searching the existing tree.  Again, I'm still trying to 
figure out why.

Original comment by David.Ni...@gmail.com on 16 Jun 2009 at 2:40

GoogleCodeExporter commented 8 years ago
I noticed that there are problems when using imperial/inch mode- the gcode 
seems to
be simulated in metric in the opengl screen

Original comment by ddfalck2...@yahoo.com on 16 Jun 2009 at 3:45

GoogleCodeExporter commented 8 years ago
What?  Doesn't your tool box contain a 12.7 inch diameter drill bit?  Well if 
you've
only got a few, I will have a look at it.

By the way, I fixed the problem of the Object Title not updating in the Program 
list.
 It was some computer thing I don't want to talk about.

I still can't figure out the issue of not being able to find the CuttingTool 
objects
in the main list.  I can work around it for now.  Perhaps I should do that.

Original comment by David.Ni...@gmail.com on 16 Jun 2009 at 4:02

GoogleCodeExporter commented 8 years ago
I could probably have a 12.7 drill bit made, but I sure wouldn't want to drop 
it on
my foot :)

Original comment by ddfalck2...@yahoo.com on 16 Jun 2009 at 4:09

GoogleCodeExporter commented 8 years ago
All should be well with the world now.  I store the parameters in 'mm' always 
and
convert them to inches at the time of creating a new cutting tool.  (if need be)

I have also worked around the problem of not being able to find (and hence 
verify) a
CuttingTool number when a drilling object is being updated.

Original comment by David.Ni...@gmail.com on 16 Jun 2009 at 4:39

GoogleCodeExporter commented 8 years ago

Original comment by David.Ni...@gmail.com on 19 Jun 2009 at 11:03