Ilogic Changing part size

Ilogic Changing part size

jamie.nelson.cubex
Contributor Contributor
271 Views
1 Reply
Message 1 of 2

Ilogic Changing part size

jamie.nelson.cubex
Contributor
Contributor

I am creating a guide that changes its width and depth based on its 2 other dimensions. I know that "If" statements would do the job. However, because there are two sizes that can change the width and depth the change does not happen linearly. The attached table details the sizes based on the two measurements. What is the best Logic to use on this? 

 

Thanks. 

0 Likes
272 Views
1 Reply
Reply (1)
Message 2 of 2

MTheDesigner
Advocate
Advocate
There are a couple ways that you can approach this problem.
1. The brute force method. You can in fact write a bunch of if statements, but because your problem space is two dimensional you will have to make longer statements such as "if a>6 and b>7 then".

2. The mathematically elegant way. you can use math to define the curves on your guide and then check to see which of the curves the 2d point falls under. for example y = mx+b plug in one of your values into X and check to see if the Y value is greater or less than your actual Y value. If the value your equation is higher than the actual, you know that it falls under your curve, and that it is part of that group. You can then do this for as many groups as you have, then at the end you can figure out what group is best for you to use.
0 Likes