Lenght in funcion of two diameters

Lenght in funcion of two diameters

luca_pozzetto
Explorer Explorer
316 Views
2 Replies
Message 1 of 3

Lenght in funcion of two diameters

luca_pozzetto
Explorer
Explorer

Hi,

 

i'll explain my situation.

I have a tube that has a rectangular solid attached on one of the two faces.

This solid is constrained 2mm away from the external diameter, and must be 3 to 8 mm above the internal diameter.

The length must be a multiple of 5.

 

I'd rather use Ilogic.

 

Thank you in advice!!

0 Likes
Accepted solutions (1)
317 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

You could make an extra parameter with the formula:

Wall_thickness = ( external_daimater - internal_diameter ) / 2 ul

Then the formula for the bottom parameter would be:

bottom = ( Wall_thickness - 2 mm - 3 mm ) % 5 mm + 3 mm

in my fast sketch that would look like this:

JelteDeJong_0-1713553745899.png

Of course, this could also be done in 1 formula in the bottom parameter. But would make it more difficult to understand the formula.

If you are wondering what % means in this formula have a look at "modulo operator". In short, it divides 2 numbers and gives as a result the remainder. As an example:

Wall_thickness = ( external_daimater - internal_diameter ) / 2 ul = 13

bottom = ( Wall_thickness - 2 mm - 3 mm ) % 5 mm + 3 mm

              = ( 13 mm - 2 mm - 3 mm ) % 5 mm + 3 mm

              = ( 8 mm ) % 5 mm + 3 mm

              = 3 mm + 3 mm

              = 6 mm

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 3

J-Camper
Advisor
Advisor

I'm not sure you need to do any iLogic for this.  See my attached part file.

 

It will force the external diameter to allow for a minimum 5mm rectangle length, 3mm bottom offset, and 2mm top offset.  Do not manually overwrite the "actual_external_diameter" parameter.

 

Let me know if you have any questions.

 

Edit: Didn't see @JelteDeJong 's post before posting.  I did a similar route using modulo to hold the rectangle to 5mm increments.  I did include a separate model parameter for the external diameter to prevent a user from creating an impossible external diameter.

0 Likes