Description
Description
Implement a clearance
operand that allows to control clearances during optimization.
Here's how it should work:
The function computes the signed perpendicular distance (in the YZ plane) from a line A to a point B.
This is useful for creating clearance or interference constraints when you are optimizing
off-axis reflective systems, such as TMA configurations.
The line A is a reference ray (ray RA) at field FA after it leaves a specified surface SA, and the point B is the
intersection of any reference ray (ray RB) at field FB with a given surface SB.
The sign convention is such that for a ray (line A) propagating generally in the +Z direction (N direction cosine > 0),
the signed distance is positive if the “point” is on the +Y side of the line.
Therefore the distance is negative in the following figure:
Requirements
- Identify or write a function to easily retreive coordinates of a designed ray on a surface
- Compute the equation of "Line A"
- Compute the distance "Line A to Point B"
- Create the operand that constraints this distance to a target
- Add documentation
- Add unit tests.