Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Its no more possible to add objects to ScriptOp #349

Open
GoogleCodeExporter opened this issue Feb 14, 2016 · 1 comment
Open

Its no more possible to add objects to ScriptOp #349

GoogleCodeExporter opened this issue Feb 14, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Hello,
thank you for your great work!

I'm using 1.0.0+svn201407270103~ubuntu10.04.1

What steps will reproduce the problem?
1. Select an object (Face, Line, Point) and create a Script Operation 
2. The Script Operation is created but does not contain the selected
   Geometrical objects. So it is not possible to write scripts depending
   on geometrical objects any more. 

this was a very useful feature for e.g. thread milling where you have a 
script producing a helix and get the x/y starting positions from the center 
points from the geometry you need for your drilling operation anyway.

Following script producing 1 1/4" thread works great in previous HeeksCNC 
versions
uncomment the lines and comment the last two ones for the actual HeeksCNC 
version. 
#--------------------------------------------------------------------------
from math import fabs
def helical_hole2(xPos, yPos, dia,  final_depth, clearance, step_down, 
step_over, tool_dia, start_depth):
    '''
    inner helical bore
    '''
    if (tool_dia > dia):
        raise "tool wider than inner bore diameter"


    if (step_over > fabs(yPos+dia/2.0- tool_dia/2.0)):
        raise "step over too big"

    ydelta = (yPos+dia/2.0- tool_dia/2.0)
    rapid(z=clearance)
    rapid(x=xPos,y=ydelta)

    feed(z=start_depth)

    currentDepth = start_depth- step_down
    while currentDepth > final_depth :
        arc_cw(x=xPos,y=ydelta,z=currentDepth,i=xPos,j=yPos)
        currentDepth = currentDepth - step_down
    feed(xPos,yPos)
    rapid(z=clearance)
    end_CRC()

bore_diameter = 42.1
tool_diameter = .25
start_depth = 0.0
final_depth = -10
step_down =2.309
step_over = .01
clearance = 5.0

#helical_hole2(0.0,0.0,bore_diameter,final_depth,clearance, step_down, 
step_over, #tool_diameter,start_depth)

for i in graphics.points:
    helical_hole2(i.x,i.y,bore_diameter,final_depth,clearance, step_down, step_over, tool_diameter,start_depth)

#----------------------------------------------------------------------

Original issue reported on code.google.com by [email protected] on 27 Jul 2014 at 11:30

@GoogleCodeExporter
Copy link
Author

Hi,

When you said previous versions, is it a recent one or an old one?

Original comment by [email protected] on 11 Mar 2015 at 11:46

  • Added labels: Component-Logic, OpSys-All

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant