Skip to content

Feature: coated faces in renders and coatings in the GUI #236

Open

Description

@TacHawkes

Problem

  • A coated face of a body (surface_model!(part, face, model)) is not visible in a render: nothing shows which face of a lens or prism carries an anti-reflection, mirror or filter coating
  • The interactive GUI cannot inspect, add or change coatings. The physics and the read/write verbs exist (face_models, surface_model, surface_model!), but a GUI also needs to list and pick faces, draw them, and swap models in place

Tasks

  • Faces of a body: a way to list the faces a body offers (lens: front, back, edge; prism: a FlatFace per facet; BRep: its native faces) and to find the face at a point and normal, e.g. under the cursor. Faces are predicates today (isonface), so this is a new verb or a method of an existing one: to be decided
  • Faces without a hit: isonface(face, part, hit, point, normal) needs an Intersection. Rendering and picking need the question without a hit (point and normal only, or a face of the tessellation)
  • Render coated faces: color the triangles of a body's tessellation by the model of their face (isonface per triangle), with a material per model family (e.g. anti-reflection faint violet, mirror metallic, beamsplitter like :coating). Generic for all faces, masked ones included
  • Model of a system: surface_model!(system, model), so that e.g. ghosts can be switched on and off without rebuilding the System (the field is immutable today)
  • Getters of the models for cards (T1, N1): e.g. the layers of a ThinFilmCoating and of a SurfaceStack, Rs/Rp of a PolarizingCoating, Γ of a Retarder; reflectance/transmittance, thickness, refractive_index and retardance exist
  • Model of a CoatingLayer: the struct is immutable, so its model can only change by replacing the component. A setter, or a documented replace
  • GUI cards (BeamletOpticsGUI): card_rows per model family, reading through the getters; a coating card on bodies listing face_models(part)

Nice to have

  • A small catalog of real broadband coatings as tables (e.g. anti-reflection bands for 350-700 nm, 650-1050 nm, 1050-1700 nm), so that a coating is added by choice, not by a thin-film design
  • SpectralCoating with a function cannot be edited in a GUI; a card can edit its LinearTable form only

Notes

  • Already done: a CoatingLayer (e.g. the hypotenuse of a PolarizingCubeBeamsplitter, a pellicle) renders with the :coating material like a ThinBeamsplitter
  • After a change of a model, a new solve is enough: the model of a face is looked up at each hit, nothing is cached across solves
  • The shelved GUI commit with a card for coating layers (branch feature/coating-layer-cards in BeamletOpticsGUI) is a starting point for the cards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions