1. Parametric math queastion

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.

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

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

4. ab can vary but ab-ab-ab must stay equal (spacing between the line groups)

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.

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

7. you would have to start at lpx/2 and increment out from there to centralise everything

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.

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.

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.

12. Jsut looking again at your drawing. Is it always 4 sets of diagonal lines in the square?

Page 1 of 2 12 Last

Posting Permissions

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!