Set relative position in flair

hello everyone. I am designing a filter stack for laser-driven particles. The basic structure is as below:
I am using different filters and each of them is attached with an imaging plate. I want to scanning different parameters of the filters so I will change the thickness of them.
Here is my question: Is there any way to set relative position in the geometry so that when I change the thickness of one filter the remaining part are closely attached with each other(no space and no intersection)?
currently I am using define preprocessor inherent in flair, for example define thickness of f1. the first part works well but when the defined variable is added to a number it causes error.(see the attachment pic) I googled many tutorials still can’t find a good solution. Can anybody provide any idea? thanks in advance.


Dear Zhuo,

The way you did is correct for your purposes.
The problem is how you call the defined variable β€œf1” in the definition of the bodies. If the variable is not part of an expression: β€œ$f1” is correct. When using β€œf1” in an expression, remove the $-symbol and add β€œ=”, i.e., replace β€œ$f1+9e-5” by β€œ=f1+9e-5”.

As a side note, do not name the variable as one of the bodies in order to avoid possible naming-conflicts. In your case your are using β€œf1” twice.

Hope it helps.

Kind regards,
Marta

1 Like

it wooooooooorks! thanks and i will pay attention on the naming conflicts.