586,076 active members*
3,954 visitors online*
Register for free
Login
IndustryArena Forum > CAD Software > Rhino 3D > Macro/script-can this be done?
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    453

    Macro/script-can this be done?

    Hi,
    I'm looking for a way to modify the direction of a series of lines. To give you a grounding of what I'm trying to acheive, I want to find out if some tool path data can be changed which was greated in CNC Toolkit www.rainnea.com/cnc
    CNC toolkit generates code by projecting a spline in the shape of the desired toolpath onto the surface of the model. Once on the surface a series of lines at a user defined interval along the spline is produced normal to surface, the g-code is created for the 5 axies from the lines. This works well for a convexed shape where the head is allways away (on the outside) of the stock, on a concaved shape the head would be in the cavity and because the toolpath is based around normal to surface the head can crash very easily. Think of machining a square pocket with virticle walls and a flat bottom and tight raduis corners, the head would crash into the sides and bottom.
    My question is this, is it possible to write a script or macro which can allign selected tool position lines with a user defined point in space? This should allow the opperator to highlight groups of lines which may cause problems and allign them such that they work ok. Can this be done in Rhino or other cad software?
    At this point I shold tell you I know nothing about programing.

    Cheers
    Splint

  2. #2
    Join Date
    Apr 2003
    Posts
    1357
    I think this is possible. You could window around a series of lines, extract either the curve start or end using the Rhino.CurveStartPoint or Rhino.CurveEndPoint methods. Then by selecting the point in space, you could extract the XYZ value and compare the end or start points. A little simple math will determine which is closer. Those that are in the wrong direction could be toggled with Rhino.Command "Dir"

    Of course this is just off the top of my head, but it seems pretty straight forward.

    I don't know anything about that software you are using, but it seems that the direction of tool approach should be an option. I know it is for my 5X programs.

    Hope this helps,

    Dan
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Jun 2003
    Posts
    453
    Thanks Dan,
    CNC Toolkit is freeware, it is a script which works in G Max (also freeware), it's fairly simplistic but the machining which can be done with it is quiet good. Have a look at the link in my first post for some examples.

    Cheers
    Splint

  4. #4
    Join Date
    Jun 2003
    Posts
    2103
    Hi Dan,

    The CNCToolkit is the software I referenced in one of our pm exchanges or on the other thread.

    Mike
    No greater love can a man have than this, that he give his life for a friend.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •