![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Parametric Programing (custom macro b, fadal macro, okuma user task) |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
| Need to know the calculation to keep ab equal when x and y vary. the distance from the outside line to the fist inside line stays the same as well as the first set of lines in each corner. Have to program this in G-Code for my Biesse. If i can work this out i can use the parametrics.
__________________ 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. |
|
#2
| |||
| |||
| ab is a fixed measuremet like a hinge etc? do you want the measurement to stay the same or be in the same exact position on the panel? if ab is something like a hinge slot for example. write it as a subroutine at the end of program and call it with an offset shift. that way it stays the same. if this isnt exactly what you want try to describe a bit more detail of what your making
__________________ so much to learn, so much to pass on. |
|
#3
| |||
| |||
| if ab is 1/3 of x length? use a line like n100 ab=lpx/3 if ab is different size on y, say 1/5th of length use n100 aby=lpy/5 that way aby will be always 1 fith of the y length
__________________ so much to learn, so much to pass on. |
|
#4
| ||||
| ||||
| ab can vary but ab-ab-ab must stay equal (spacing between the line groups)
__________________ 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. |
|
#5
| ||||
| ||||
| This is what I have so far. I worked out that if x or y are constant I can find the calculation but it is when both vary that I have problems. Say that y=500 then the calculation would be (x-86)/3=ab and that would work no matter what x equals. But if you change y then it no longer works. The same will work if x is a constant and y varies. But I just can’t find the calculation if both x and y vary.
__________________ 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. |
| Sponsored Links |
|
#6
| |||
| |||
| if this is for kitchen doors etc you need all lines to be the same angle? so x would matter but y would have to be sacrificed, otherwise angle would change? you could offset by frame width in x and y then do segment, angle (use finish coordinate for segment) increment in y segment angle increment in x segment angle increment in 7y segment angle increment by ab repeat
__________________ so much to learn, so much to pass on. |
|
#8
| |||
| |||
| Assuming the endpoints of the corner lines are equal distances from the corners (ie the line is at a 45 degree angle) the solution is: c = (y-a+x-a-3b) / 3 ab = c-3b Example: Given x=16, y=10, a=3, b=0.353553 (offset between lines is 0.250 c = (10-3+16-3-(3*0.353553)) / 3 = 6.313113 ab = 6.313113-1.060659 = 5.252452 |
|
#9
| ||||
| ||||
| Ok maybe a bit more detail will help. What I want is to go from one size to the other in the attachment by only altering the x and y value. At the moment I have all the programming to do this design but I have to manually insert the measurement for ab when I put in the x and y value (in the attachment ab is rounded to 0 decimal places). The constants are as follows- All lines are 45 deg angles x and y spacing between lines (not offset spacing) is 14mm from both corners to first set of lines is 50mm (x-y spacing not offset) outside edge to fist square is offset 74mm from 1st square to second is offset 5mm this is a door design I have always done manually on an old Multicam with no parametric. I am now swapping this design to my Biesse.
__________________ 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. |
|
#10
| ||||
| ||||
| Just thought id throw in my Gcode. Yes I know its messy but it was done at the machine on the fly and in a hurry so I have yet to clean it up. KK is where the calculation I'm after would go, but at the moment I work it out by designing it in autocad then throw in the lines and equal them up to get the measurement.
__________________ 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. |
| Sponsored Links |
|
#11
| ||||
| ||||
| I am a bit confused. It would help me if you could describe how you manually get the ab. eg (Overall width or height?-((First edge of square=72mm X 2)+(Offset 2nd square= 5mm X 2))-Gap to 45degree line 50mm)/???=ab Looking at your drawing I would probably redefine ab as the first line of the first set to the first line of the 2nd set. To get a whole number I use "I_" So if ab=4.925 and I want a whole number. GAP=I_AB Gap will now equal 4. I actually round up numbers in work and use a calculation like this SPA=LPY/100+1 GAP=I_SPA eg 810(LPY)/100+1=9.1(SPA) I_9.1(SPA)=9 Once you have the ratio sorted. I would use the segment angle command that Batwell suggests. Plus jump commands to make it fully parametric. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parametric programming. | chrisryn | Parametric Programing | 32 | 01-26-2009 05:14 AM |
| New to Parametric Programming | weaston | G-Code Programing | 4 | 02-27-2007 07:40 AM |
| Parametric Programming | weaston | General CAM Discussion | 4 | 02-20-2007 07:25 AM |
| Parametric Programming | widgitmaster | BobCad-Cam | 7 | 05-04-2006 01:04 PM |
| Parametric equations | itsme | General CAM Discussion | 4 | 06-16-2004 03:34 PM |