pub enum EditOp {
Show 32 variants
InsertSurface {
at: usize,
surface: Map<String, Value>,
},
DeleteSurface {
surface: Ref,
},
SetSurface {
surface: Ref,
fields: Map<String, Value>,
},
SetSurfaceType {
surface: Ref,
typ: String,
},
SetMaterial {
surface: Ref,
material: String,
},
SetStop(StopOp<Ref>),
AddPickup(PickupOp<Ref>),
RemovePickup {
dst: Ref,
what: String,
},
AddSolve(SolveOp<Ref>),
AddMacroSolve(MacroSolveOp<Ref>),
RemoveSolve {
surface: Ref,
what: SolveWhat,
},
SetSurfaceData {
surface: Ref,
data: Map<String, Value>,
},
SetParam {
param: String,
value: Num,
},
SetSystemData {
data: Map<String, Value>,
},
DefineUnit {
name: String,
spans: Vec<[usize; 2]>,
pivot: Option<[Num; 3]>,
},
SetUnit {
unit: Ref,
name: Option<String>,
spans: Option<Vec<[usize; 2]>>,
pivot: Option<[Num; 3]>,
},
RemoveUnit {
unit: Ref,
},
AddMech {
part: MechPart,
},
SetMech {
mech: Ref,
part: Map<String, Value>,
},
RemoveMech {
mech: Ref,
},
SetConfigCount {
n: usize,
},
SetConfigRow {
param: String,
values: Vec<Num>,
},
SetConfigMaterials {
param: String,
names: Vec<String>,
},
SetConfigCoatings {
param: String,
names: Vec<String>,
},
AddConfigRow {
param: String,
},
RemoveConfigRow {
param: String,
},
SetConfig {
k: usize,
},
InsertConfig {
at: usize,
from: Option<usize>,
pickup: bool,
},
RemoveConfig {
k: usize,
},
SetConfigPickup {
param: String,
k: usize,
from: usize,
row: Option<String>,
scale: Option<Num>,
offset: Option<Num>,
},
RemoveConfigPickup {
param: String,
k: usize,
},
MakeThermal {
temps: Vec<Num>,
pressures: Vec<Num>,
},
}Expand description
系の編集の操作(serve の edit の ops の要素)。op で選ぶ
Variants§
InsertSurface
面 at の前に面を入れる(surface は面の値の名前と値、lensbench_core::edit::SURF_FIELDS)
DeleteSurface
面を消す
SetSurface
面の値を変える(名前と値、lensbench_core::edit::SURF_FIELDS。aperture は {“type”: “circular”, “max”: 3, …} か null)
SetSurfaceType
面タイプを変える
SetMaterial
材料を変える
SetStop(StopOp<Ref>)
面を絞りにする
AddPickup(PickupOp<Ref>)
ピックアップを置く
RemovePickup
ピックアップを外す
AddSolve(SolveOp<Ref>)
ソルブを置く
AddMacroSolve(MacroSolveOp<Ref>)
円錐係数・半直径・機械半径・面タイプのパラメータのマクロのソルブを置く
RemoveSolve
ソルブを外す
SetSurfaceData
面のデータを全部の項目で変える(serve の surface_data の data と同じ形、書いた項目だけ)。屈折率 n・絞り stop・
鏡 mirror は変えない(材料・set_stop で)。面タイプの形のデータ zern・grid・bin2・cylf・grin、前後の傾き偏心
before・after もここで
SetParam
パラメータの値を変える(名前は set と同じ)
SetSystemData
系の設定の項目を変える(crate::edit_ops::SYSTEM_KEYS の書いた分だけ。形は serve の system_data と同じ)
DefineUnit
玉・群を作る(spans は面の範囲 [[最初, 最後], …]、pivot は既定 [0, 0, 0])
SetUnit
玉・群を変える(書いた分だけ。範囲を変えるのは動き・移動が 0 のときだけ)
RemoveUnit
玉・群を外す(動き・移動が 0 のときだけ)
AddMech
機構部品を置く(系ファイルの mechanics の要素と同じ形)
SetMech
機構部品を変える(part は書いた項目だけ)
RemoveMech
機構部品を外す
SetConfigCount
多重構成の数
SetConfigRow
多重構成の表の行(パラメータの構成ごとの値)
SetConfigMaterials
多重構成の表の材料の行(param は N.material、構成ごとの材料の名前)
SetConfigCoatings
多重構成の表の膜の行(param は N.coating、構成ごとの膜の名前。空は膜なし)
AddConfigRow
多重構成の表に行を足す(どの構成も今の値)
RemoveConfigRow
多重構成の表の行を外す
SetConfig
構成 k(1 始まり)を系に入れる
InsertConfig
構成を at(1 始まり)に入れる。from の構成の値で(既定は今の構成、pickup なら 1)、pickup なら from を写す
RemoveConfig
構成 k を外す
SetConfigPickup
表の行 param の構成 k を構成 from から写す(× scale + offset)。row があれば表の別の行 row(同じ量の種類の行)の 構成 from から写す(OpticStudio の構成のピックアップの元の行。OpticStudio が拾わない下の行・後の構成からのものは .zmx に値だけ書く)
Fields
RemoveConfigPickup
表の行 param の構成 k の写しをやめる
MakeThermal
熱の構成を作る(OpticStudio の Make Thermal、lensbench_core::thermal)。今の構成を構成 1 にし、temps の温度
[°C] ごとに構成を足す。pressures は足す構成の気圧 [atm](省くと今の気圧)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EditOp
impl<'de> Deserialize<'de> for EditOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for EditOp
impl JsonSchema for EditOp
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for EditOp
Auto Trait Implementations§
impl Freeze for EditOp
impl RefUnwindSafe for EditOp
impl Send for EditOp
impl Sync for EditOp
impl Unpin for EditOp
impl UnsafeUnpin for EditOp
impl UnwindSafe for EditOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more