Skip to content

Commit

Permalink
ohh javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Oct 7, 2024
1 parent 070e119 commit 59e4130
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
49 changes: 38 additions & 11 deletions shared-data/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,52 @@ export type LabwareWell = LabwareWellProperties & {
export interface SphericalSegment {
shape: 'spherical'
radiusOfCurvature: number
depth: number
topHeight: number
bottomHeight: number
}

export interface CircularBoundedSection {
shape: 'circular'
diameter: number
export interface ConicalFrustum {
shape: 'conical'
bottomDiameter: number
topDiameter: number
topHeight: number
bottomHeight: number
}

export interface RectangularBoundedSection {
shape: 'rectangular'
xDimension: number
yDimension: number
export interface CuboidalFrustum {
shape: 'cuboidal'
bottomXDimension: number
bottomYDimension: number
topXDimension: number
topYDimension: number
topHeight: number
bottomHeight: number
}

export interface InnerWellGeometry {
frusta: CircularBoundedSection[] | RectangularBoundedSection[]
bottomShape?: SphericalSegment | null
export interface SquaredConeSegment {
shape: 'squaredcone'
bottomCrossSection: string
circleDiameter: number
rectangleXDimension: number
rectangleYDimension: number
topHeight: number
bottomHeight: number
}

export interface RoundedCuboidSegment {
shape: 'roundedcuboid'
bottomCrossSection: string
circleDiameter: number
rectangleXDimension: number
rectangleYDimension: number
topHeight: number
bottomHeight: number
}

export type WellSegment = CuboidalFrustum | ConicalFrustum | SquaredConeSegment | SphericalSegment | RoundedCuboidSegment

export type InnerWellGeometry = {

Check failure on line 209 in shared-data/js/types.ts

View workflow job for this annotation

GitHub Actions / js checks

Use an `interface` instead of a `type`

Check failure on line 209 in shared-data/js/types.ts

View workflow job for this annotation

GitHub Actions / js checks

Use an `interface` instead of a `type`
sections: WellSegment[]
}

// TODO(mc, 2019-03-21): exact object is tough to use with the initial value in
Expand Down
2 changes: 1 addition & 1 deletion shared-data/labware/fixtures/3/fixture_2_plate.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"daiwudhadfhiew": {
"sections": [
{
"shape": "pyramidal",
"shape": "cuboidal",
"topXDimension": 127.76,
"topYDimension": 85.8,
"bottomXDimension": 70.0,
Expand Down
2 changes: 1 addition & 1 deletion shared-data/labware/schemas/3.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
"properties": {
"shape": {
"type": "string",
"enum": ["roundedpyramid"]
"enum": ["roundedcuboid"]
},
"bottomCrossSection": {
"type": "string",
Expand Down

0 comments on commit 59e4130

Please sign in to comment.