Page 2 of 2 FirstFirst 12
Results 13 to 22 of 22

Thread: Parametric math queastion

  1. #13
    Registered bigz1's Avatar
    Join Date
    Apr 2006
    Location
    NZ
    Posts
    487
    Downloads
    0
    Uploads
    0
    I have been trying to figure how to make your program parmetric based on 4 sets of 3 lines within the rectangle(REC). I have used MRK1 formula and have substituted a for AA etc.

    N10 G71 LX=400 LY=500 LZ=39 HC1 Z=PRK
    N20 REC=50 YYY=LPY-(REC*2) XXX=LPX-(REC)*2
    N25 AA=50 BB=14 CC=(YYY-AA+XXX-AA-(3*BB)/3 AB=C-(3*BB)

    The boarder rectangles are both easy to make parametric.

    But the diagonals do present an intresting problem. Its easy to make parrallel lines parametric as long as they say on the same x,y origin that the first set was made. The difficulty I am having is trying to make the lines stay within the boarder when they run past the first corner. Just to compound the problem a set of lines could start either side of the corner depending on the size of the panel.


  2. #14
    Registered M.B. Vanities's Avatar
    Join Date
    May 2009
    Location
    Australia
    Posts
    20
    Downloads
    0
    Uploads
    0

    Still working on it

    The rec design is no problem, already have that as parametric. If you look at the attached code the rec is from N10-N360. The rec is actually a 3 cut design with a base rout then inside profile and a v-cuter to square of the corners. This is an existing design that I am adding the lines to make one of my other designs. The lines are also no prob and the way I got around the problem of overshooting the lines is to break them up into 2 sections 1 way if they don’t overshoot and another if they do (simple jump query) as for the line sets yes there will always be 4 sets of 4 lines. The line sets in the top left and bottom right are also the easy bit as they are always the same. As for how I work out the spacing manually the previous attached drawings are from Autocad. All I do is stretch the squares design out then extend or trim the lines and take the three sizes (labeled ab in my in previous post) add them together and divide by three gives me the measurement but as you said this is not so easy to do parametrically as in Autocad I can dump the lines anywhere and work it out. How I do most of my Gcode for a design would be to do what I want in Autocad and just convert that process into Gcode. I have yet to work out this design though. I have a basic understanding of the Gcode and have had no real difficulty working it out but this one has stumped me. I’m shore there is a way but as of yet I haven’t found it. The problem is that the lines won’t always be on the same plane. Have attached the Gcode and a pic of what the design looks like.
    Attached Thumbnails Attached Thumbnails Parametric math queastion-new_picture.jpg  
    Attached Files Attached Files
    Measure twice, cut once and if it ain't broke, don't fix it.
    There are 3 types of peaple in this world, those that can count and those that can't.


  3. #15
    Registered bigz1's Avatar
    Join Date
    Apr 2006
    Location
    NZ
    Posts
    487
    Downloads
    0
    Uploads
    0
    Your problem is of intrest to me as I have a similar design for a multipanel door with diagonals in it.

    In my opinion the easiest way to make your design parametric using the ab gap formula.Would be to start in the RH top and use the gap in the Yaxis working down. Use the BA comand with a counter and negation jumps(too stop it overide the far right boundary). This is for the first 2 sets lines only. Then start in the bottom left hand corner and repeat the process but use the gap in Y axis working up.

    Its not fully parametric. But to do that with this design you could put more negation jumps to decide whether or not to draw the lines in the X or Y axis.


    Could add a few more comments in your program. As its been a long day at work.
    Last edited by bigz1; 05-03-2010 at 05:51 AM.


  4. #16
    Registered M.B. Vanities's Avatar
    Join Date
    May 2009
    Location
    Australia
    Posts
    20
    Downloads
    0
    Uploads
    0

    Bingo

    OK I posted my question on a mathematics website to see if they could help and they did. I received a reply with a calculation that works and thought id post it here. I checked it bigz1 and hope it helps you. Below are my question and the answer.

    Question
    "Ok I have tried all other avenues and thought why not. I am a cabinetmaker trying to program a parametric design into a point to point router. The design (see attached) has been giving me problems. I need to find a calculation for the space between the line sets (A). basics are that both X and Y can vary greatly (from about 250-2400), all measurements that are there are constant, all must be done on the X and Y planes (no 45 offsets lines in line sets are always 14 apart along the XY etc). Any help?"

    Answer
    The hint is in the bottom line that overruns to show you with a 45-degree pattern, the total pattern space is just the width + height.

    Width = Y (linear units)
    Height = X (linear units)
    Flat SpaceWidth = FSY = 75 (linear units)
    Flat Space Height = FSX = 75 (linear units)
    Pattern Border Width = PBY = 5 (linear units)
    Pattern Border Height = PBX = 5 (linear units)
    Projected Interline Distance = PID = 14 (linear units)
    Projected Line Thickness = PLT = 0 ?? (linear units) (0 makes sense if we measure to centerline of router path)
    Projected Spacing Distance = A (linear units)
    Projected Pattern Offset = PPO = 50 (linear units)
    Pattern Small Repeats = PSR = 4
    Pattern Large Repeats = PLR = 4

    Formula:
    (X - 2 FSX - 2 PBX ) + ( Y - 2 FSY - 2 PBY ) = 2 PPO + PLR PSR PLT + PLR ( PSR - 1) PID + ( PLR - 1 ) A

    or
    A = ( X + Y - 2 (FSX + PBX + FSY + PBY + PPO) - PLR PSR PLT - PLR ( PSR - 1) PID ) / ( PLR - 1 )
    = ( X + Y - 2 ( 75 + 75 + 5 + 5 + 50 ) - (4)(4)(0) - (4)(3)(14) ) / (3)
    = ( X + Y - 420 - 0 - 168 ) / (3)
    = ( X + Y - 420 - 0 - 168 ) / (3)
    = ( X + Y - 588 ) / (3)
    Attached Thumbnails Attached Thumbnails Parametric math queastion-design.jpg  
    Measure twice, cut once and if it ain't broke, don't fix it.
    There are 3 types of peaple in this world, those that can count and those that can't.


  • #17
    Registered bigz1's Avatar
    Join Date
    Apr 2006
    Location
    NZ
    Posts
    487
    Downloads
    0
    Uploads
    0
    Could you share your code for the finished program?

    I used to make traditional solid timber kitchen doors before moving to NZ. Now I make internal house doors.

    I don't know if you have looked at my thread "Biesse Numerical Functions?". but I created a Fixed Cycle that is useful for altering the panel dimensions from the Automatic Page:-

    Fixed Cycle GDIM:-

    :1
    N10 JM!(XXX>0):2
    N20 LPX=XXX
    ;LENGTH OVERIDE?
    :2
    N30 JM!(YYY>0):3
    N40 LPY=YYY
    :WIDTH OVERIDE?
    :3
    N50 JM!(ZZZ>0):4
    N60 LPZ=ZZZ
    ;THICKNESS OVERIDE?
    :4


    The list can be extended to include more variables. Just make sure you substitute the variable in the program for something different for the Automatic screen. and put the Fixed cycle after the defined variable in the program.

    To overide panel dimensions on the Automatic screen:-

    LINE | PROGRAM | QTA | CONT | COMMENT
    | | | |
    | KITCHEN | 8 | 0 | $XXX=720 YYY=496 ZZZ=18$

    Using this fixed Cycle also allows me to use the worklist function with standard sizes using only one program for futur recall:-

    LINE | PROGRAM | QTA | CONT | COMMENT
    | | | |
    | KITCHEN | 5 | 0 | $XXX=720 YYY=596 ZZZ=18$
    | KITCHEN | 1 | 0 | $XXX=720 YYY=546 ZZZ=18$
    | KITCHEN | 0 | 0 | $XXX=720 YYY=496 ZZZ=18$
    | KITCHEN | 8 | 0 | $XXX=720 YYY=446 ZZZ=18$
    | KITCHEN | 0 | 0 | $XXX=720 YYY=396 ZZZ=18$
    | KITCHEN | 0 | 0 | $XXX=720 YYY=346 ZZZ=18$

    etc.....


  • #18
    Registered M.B. Vanities's Avatar
    Join Date
    May 2009
    Location
    Australia
    Posts
    20
    Downloads
    0
    Uploads
    0

    Talking Code

    The code is attached but as I said it is a little mixed up. Was done at the machine in a hurry and on the fly so go easy on me, will clean it up one day.
    Also my design is meant to be totally parametric so all i do is load the program in the worklist and add the length and width in the comments section.
    All the work is then done in the program for any size i like (one program does all)

    Worklist comments would be "$L1=(length of LPX) L2=(length of LPY)"
    Attached Thumbnails Attached Thumbnails Parametric math queastion-4_cut_design_follows.pdf  
    Last edited by M.B. Vanities; 05-30-2010 at 08:11 PM. Reason: Add info
    Measure twice, cut once and if it ain't broke, don't fix it.
    There are 3 types of peaple in this world, those that can count and those that can't.


  • #19
    Registered bigz1's Avatar
    Join Date
    Apr 2006
    Location
    NZ
    Posts
    487
    Downloads
    0
    Uploads
    0
    Thank you for the code. Its very much appreciated. I want to give it a try to fully understand what you have done.

    Regarding Worklist. I understand your program is fully paramtric. But are you aware that instead of selecting a program and entering comments you can save a group of programs and comments to the Worklist dirctory for future recall?

    To save a worklist just press the Shift Softkey. Press Write Worklist. Write a suitable name and save. To recall Press Read Worklist type in the Worklist name and all your programs and comments will appear. Sorry if you know this already but I find this a great time saver.

    I see what you have done with L1 and L2.

    Because their are a couple of operators on my machine I use the fixed cycle. As sometimes they just want one program and enter the size directly in the first program page. Unfortunately being human nature they may not change it back to L1 or L2 afterwards. I also use the draw option alot as we get asked for some special requests that require tweaks of existing parametric programs.


  • #20
    Registered
    Join Date
    Feb 2008
    Location
    uk
    Posts
    395
    Downloads
    0
    Uploads
    0
    a huge program for a small door!
    so much to learn, so much to pass on.


  • #21
    Registered
    Join Date
    Feb 2008
    Location
    uk
    Posts
    395
    Downloads
    0
    Uploads
    0
    just as an aside. ive started using sheetcam for the biesse. wrote a post that covers 3 axis plus drilling for it. a very simple cheap cam program that works well and with my post spits out minimum code. great if you need to add text, graphic outlines etc to your doors. its the first post ive written that has run right at the machine every time!
    then use machine scale function to change sizes.
    its made my life easier! But i still love parametrics if programming at the machine.
    so much to learn, so much to pass on.


  • #22
    Registered M.B. Vanities's Avatar
    Join Date
    May 2009
    Location
    Australia
    Posts
    20
    Downloads
    0
    Uploads
    0

    Not for me

    I understand about saving worklists and I do have some saved but I specialize in custom sizes so are more likely to do odd sizes than standard ones, no 2 production runs are ever the same. That’s why I really heavily on the paramertric’s as it gives me the option of 1 program per design that will do any size door I have to do. The code I listed will now do 99% of the doors I will get by simply adding the door size in the work list and I am the only operator at this time so it suits me this way (self taught). I have a little black book that I list my designs in and the comments needed for reference (in case of heavy night) for future users.

    As for the program length, its not my best effort but does the job. Will go through it when i have spare time and clean it up, could probable reduce it by a third if remove repedative code, but as i said done at the machine, on the fly and in a hurry.

    Will look at SheetCam, thanks.
    Measure twice, cut once and if it ain't broke, don't fix it.
    There are 3 types of peaple in this world, those that can count and those that can't.


  • Page 2 of 2 FirstFirst 12

    Similar Threads

    1. Parametric programming.
      By chrisryn in forum Parametric Programing
      Replies: 32
      Last Post: 01-26-2009, 06:14 AM
    2. New to Parametric Programming
      By weaston in forum G-Code Programing
      Replies: 4
      Last Post: 02-27-2007, 08:40 AM
    3. Parametric Programming
      By weaston in forum General CAM Discussion
      Replies: 4
      Last Post: 02-20-2007, 08:25 AM
    4. Parametric Programming
      By widgitmaster in forum BobCad-Cam
      Replies: 7
      Last Post: 05-04-2006, 02:04 PM
    5. Parametric equations
      By itsme in forum General CAM Discussion
      Replies: 4
      Last Post: 06-16-2004, 04:34 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.