Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Fast way to create points in the center of multiple arcs?


Bill K
 Share

Recommended Posts

Here is a script I had lying around that might be of interest. I believe SP2 is required to run this script.

 

code:

' -- Start Script

Call Main()

 

 

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

 

 

Dim bRet, intPoints

Dim CArc, CPoint

 

' -- Start our database search

bRet = StartDBSearch(mc_alive, mc_arctype)

 

Do While bRet

 

Set CArc = New McAr

 

' -- Get this arc properties

If GetArcData(GetEntityEptr, CArc) Then

 

Set CPoint = New McPt

 

' -- Assign this arcs location for the new point

With CPoint

 

.X = CArc.X

.Y = CArc.Y

.Z = CArc.Z

 

End With

 

' -- Create the point

If CreatePoint(CPoint, GetEntityColor, GetEntityLevel) = mcENTITY_INVALID Then

' -- Failed to create point....

Else

' -- Keeping score

intPoints = intPoints + 1

End If

End If

' -- Keep searching

bRet = NextDBSearch

 

Set CArc = Nothing

 

Loop

 

' -- How many points?

If intPoints = 0 Then

ShowString "No points created"

Else

ShowString intPoints & " points created"

End If

 

 

End Sub

Link to comment
Share on other sites

Good day,

 

Drillpt.dll is good

 

but small arcs has other options

 

like delete orig arc and size filter.

 

It never stops amaizing me that EVERYTIME

 

I TOUCH MasterCam I Learn something new

 

The only limits on this software are the

Parts and The people doin the programming.

 

Hoo-Ray for the forum and all you great

G code Heads

 

Thanks again...and again... cheers.gif

HTH

Tony G

Almost Employed Senior Programmer

N.E Massachusetts - Southern New Hampshire

_________________________________________

End mills and tooling are like The "AMMO"

And coolant and chips are like the enemy

Under your boots as you advance in the

Manufacturing Battle

--------------------------------------------------

 

[ 12-10-2003, 07:52 PM: Message edited by: CNCme ]

Link to comment
Share on other sites

Mick

 

I need to get more involved in Those scripts

 

they look interisting and useful

 

I've copied most of your script "posts"

 

and just need a little time to go over

them...Thanks again

 

Tony G

Almost Employed Senior Programmer

N.E Massachusetts - Southern New Hampshire

_________________________________________

End mills and tooling are like The "AMMO"

And coolant and chips are like the enemy

Under your boots as you advance in the

Manufacturing Battle

--------------------------------------------------

Link to comment
Share on other sites
  • 2 weeks later...

quote:

We have a job in here now where all of our holes are defined by points. How about the opposite?

Is there a way of putting an arc on a point?

Well....

Lets say I've got 200 random points

I define an endmill with 0 diameter (yeah mc will warn you but you can still do it )

Then I go to toolpaths/next menu/circ tlpths/circle mill

window pts ( or however you want to select them )

turn off your retracts, clearance and feed planes

set the diameter you want, start and end angle at 0

hit ok

then backplot this toolpath with save as geometry selected and step mode set to endpoints.

hit ok

mc will warn you again about the 0 dia tool but its ok.

then just delete all color yellow or whatever your rapid moves come out as.

voilla arcs at every point you selected.

Thats one way to do it, one of the gurus may have a better way like a c-hook or something.

cheers.gif Happy Holidays.

Link to comment
Share on other sites

Kathy,

 

NOTE: The latest release of mcamvb chook is required to execute this script, contact your dealer for more information.

 

code:

' -- Start Script

Call Main()

 

 

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

 

 

Dim bRet, intArcs, dblRadius

Dim CArc, CPoint

 

 

If Not askValue("Enter an Arc Radius", 0.1, 10.00, dblRadius) Then Exit Sub

 

' -- Start our database search

bRet = StartDBSearch(mc_alive, mc_pointtype)

 

Do While bRet

 

Set CPoint = New McPt

 

' -- Get this arc properties

If GetPointData(GetEntityEptr, CPoint) Then

 

Set CArc = New McAr

 

' -- Assign this arcs location for the new point

With CArc

 

.X = CPoint.X

.Y = CPoint.Y

.Z = CPoint.Z

.R = dblRadius

.SW = 360

.SA = 0

.VIEW = GetCPlaneNumber

 

End With

 

' -- Create the point

If CreateArc(CArc, GetEntityColor, GetEntityLevel) = mcENTITY_INVALID Then

' -- Failed to create arc....

Else

' -- Keeping score

intArcs = intArcs + 1

End If

End If

' -- Keep searching

bRet = NextDBSearch

 

Set CArc = Nothing

 

Loop

 

' -- How many points?

If intArcs = 0 Then

ShowString "No arcs created"

Else

ShowString intArcs & " arcs created"

End If

 

 

End Sub

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...