Skip to content

Commit 680b0ed

Browse files
zoo-github-actions-auth[bot]github-actions[bot]Irev-Dev
authored
Update api spec (#220)
* YOYO NEW API SPEC! * Generated new lib * bump v --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <[email protected]>
1 parent cd8b791 commit 680b0ed

File tree

3 files changed

+295
-1
lines changed

3 files changed

+295
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kittycad/lib",
3-
"version": "0.0.54",
3+
"version": "0.0.55",
44
"description": "Javascript library for KittyCAD API",
55
"type": "module",
66
"keywords": [

spec.json

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15976,6 +15976,100 @@
1597615976
"cap"
1597715977
]
1597815978
},
15979+
"FaceGetGradient": {
15980+
"description": "The gradient (dFdu, dFdv) + normal vector on a brep face",
15981+
"type": "object",
15982+
"properties": {
15983+
"df_du": {
15984+
"description": "dFdu",
15985+
"allOf": [
15986+
{
15987+
"$ref": "#/components/schemas/Point3d"
15988+
}
15989+
]
15990+
},
15991+
"df_dv": {
15992+
"description": "dFdv",
15993+
"allOf": [
15994+
{
15995+
"$ref": "#/components/schemas/Point3d"
15996+
}
15997+
]
15998+
},
15999+
"normal": {
16000+
"description": "Normal (||dFdu x dFdv||)",
16001+
"allOf": [
16002+
{
16003+
"$ref": "#/components/schemas/Point3d"
16004+
}
16005+
]
16006+
}
16007+
},
16008+
"required": [
16009+
"df_du",
16010+
"df_dv",
16011+
"normal"
16012+
]
16013+
},
16014+
"FaceGetPosition": {
16015+
"description": "The 3D position on the surface that was evaluated",
16016+
"type": "object",
16017+
"properties": {
16018+
"pos": {
16019+
"description": "The 3D position on the surface that was evaluated",
16020+
"allOf": [
16021+
{
16022+
"$ref": "#/components/schemas/Point3d"
16023+
}
16024+
]
16025+
}
16026+
},
16027+
"required": [
16028+
"pos"
16029+
]
16030+
},
16031+
"FaceIsPlanar": {
16032+
"description": "Surface-local planar axes (if available)",
16033+
"type": "object",
16034+
"properties": {
16035+
"origin": {
16036+
"nullable": true,
16037+
"description": "plane's origin",
16038+
"allOf": [
16039+
{
16040+
"$ref": "#/components/schemas/Point3d"
16041+
}
16042+
]
16043+
},
16044+
"x_axis": {
16045+
"nullable": true,
16046+
"description": "plane's local x-axis",
16047+
"allOf": [
16048+
{
16049+
"$ref": "#/components/schemas/Point3d"
16050+
}
16051+
]
16052+
},
16053+
"y_axis": {
16054+
"nullable": true,
16055+
"description": "plane's local y-axis",
16056+
"allOf": [
16057+
{
16058+
"$ref": "#/components/schemas/Point3d"
16059+
}
16060+
]
16061+
},
16062+
"z_axis": {
16063+
"nullable": true,
16064+
"description": "plane's local z-axis (normal)",
16065+
"allOf": [
16066+
{
16067+
"$ref": "#/components/schemas/Point3d"
16068+
}
16069+
]
16070+
}
16071+
}
16072+
},
1597916073
"FailureWebSocketResponse": {
1598016074
"description": "Unsuccessful Websocket response.",
1598116075
"type": "object",
@@ -19540,6 +19634,87 @@
1954019634
"type"
1954119635
]
1954219636
},
19637+
{
19638+
"description": "Determines whether a brep face is planar and returns its surface-local planar axes if so",
19639+
"type": "object",
19640+
"properties": {
19641+
"object_id": {
19642+
"description": "Which face is being queried.",
19643+
"type": "string",
19644+
"format": "uuid"
19645+
},
19646+
"type": {
19647+
"type": "string",
19648+
"enum": [
19649+
"face_is_planar"
19650+
]
19651+
}
19652+
},
19653+
"required": [
19654+
"object_id",
19655+
"type"
19656+
]
19657+
},
19658+
{
19659+
"description": "Determines a position on a brep face evaluated by parameters u,v",
19660+
"type": "object",
19661+
"properties": {
19662+
"object_id": {
19663+
"description": "Which face is being queried.",
19664+
"type": "string",
19665+
"format": "uuid"
19666+
},
19667+
"type": {
19668+
"type": "string",
19669+
"enum": [
19670+
"face_get_position"
19671+
]
19672+
},
19673+
"uv": {
19674+
"description": "The 2D paramter-space u,v position to evaluate the surface at",
19675+
"allOf": [
19676+
{
19677+
"$ref": "#/components/schemas/Point2d"
19678+
}
19679+
]
19680+
}
19681+
},
19682+
"required": [
19683+
"object_id",
19684+
"type",
19685+
"uv"
19686+
]
19687+
},
19688+
{
19689+
"description": "Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v",
19690+
"type": "object",
19691+
"properties": {
19692+
"object_id": {
19693+
"description": "Which face is being queried.",
19694+
"type": "string",
19695+
"format": "uuid"
19696+
},
19697+
"type": {
19698+
"type": "string",
19699+
"enum": [
19700+
"face_get_gradient"
19701+
]
19702+
},
19703+
"uv": {
19704+
"description": "The 2D paramter-space u,v position to evaluate the surface at",
19705+
"allOf": [
19706+
{
19707+
"$ref": "#/components/schemas/Point2d"
19708+
}
19709+
]
19710+
}
19711+
},
19712+
"required": [
19713+
"object_id",
19714+
"type",
19715+
"uv"
19716+
]
19717+
},
1954319718
{
1954419719
"description": "Send object to front or back.",
1954519720
"type": "object",
@@ -21390,6 +21565,63 @@
2139021565
"type"
2139121566
]
2139221567
},
21568+
{
21569+
"description": "The response to the 'FaceIsPlanar' endpoint",
21570+
"type": "object",
21571+
"properties": {
21572+
"data": {
21573+
"$ref": "#/components/schemas/FaceIsPlanar"
21574+
},
21575+
"type": {
21576+
"type": "string",
21577+
"enum": [
21578+
"face_is_planar"
21579+
]
21580+
}
21581+
},
21582+
"required": [
21583+
"data",
21584+
"type"
21585+
]
21586+
},
21587+
{
21588+
"description": "The response to the 'FaceGetPosition' endpoint",
21589+
"type": "object",
21590+
"properties": {
21591+
"data": {
21592+
"$ref": "#/components/schemas/FaceGetPosition"
21593+
},
21594+
"type": {
21595+
"type": "string",
21596+
"enum": [
21597+
"face_get_position"
21598+
]
21599+
}
21600+
},
21601+
"required": [
21602+
"data",
21603+
"type"
21604+
]
21605+
},
21606+
{
21607+
"description": "The response to the 'FaceGetGradient' endpoint",
21608+
"type": "object",
21609+
"properties": {
21610+
"data": {
21611+
"$ref": "#/components/schemas/FaceGetGradient"
21612+
},
21613+
"type": {
21614+
"type": "string",
21615+
"enum": [
21616+
"face_get_gradient"
21617+
]
21618+
}
21619+
},
21620+
"required": [
21621+
"data",
21622+
"type"
21623+
]
21624+
},
2139321625
{
2139421626
"description": "The response to the 'PlaneIntersectAndProject' endpoint",
2139521627
"type": "object",

src/models.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,27 @@ export interface ExtrusionFaceInfo_type {
12241224
face_id?: string;
12251225
}
12261226

1227+
export interface FaceGetGradient_type {
1228+
df_du: Point3d_type /* dFdu */;
1229+
df_dv: Point3d_type /* dFdv */;
1230+
normal: Point3d_type /* Normal (||dFdu x dFdv||) */;
1231+
}
1232+
1233+
export interface FaceGetPosition_type {
1234+
pos: Point3d_type /* The 3D position on the surface that was evaluated */;
1235+
}
1236+
1237+
export interface FaceIsPlanar_type {
1238+
/* nullable:true, description:plane's origin */
1239+
origin?: Point3d_type;
1240+
/* nullable:true, description:plane's local x-axis */
1241+
x_axis?: Point3d_type;
1242+
/* nullable:true, description:plane's local y-axis */
1243+
y_axis?: Point3d_type;
1244+
/* nullable:true, description:plane's local z-axis (normal) */
1245+
z_axis?: Point3d_type;
1246+
}
1247+
12271248
export interface FailureWebSocketResponse_type {
12281249
errors: ApiError_type[] /* The errors that occurred. */;
12291250
/*{
@@ -2291,6 +2312,23 @@ export type ModelingCmd_type =
22912312
tolerance: LengthUnit_type /* The maximum acceptable surface gap computed between the filleted surfaces. Must be positive (i.e. greater than zero). */;
22922313
type: 'solid3d_fillet_edge';
22932314
}
2315+
| {
2316+
/* format:uuid, description:Which face is being queried. */
2317+
object_id: string;
2318+
type: 'face_is_planar';
2319+
}
2320+
| {
2321+
/* format:uuid, description:Which face is being queried. */
2322+
object_id: string;
2323+
type: 'face_get_position';
2324+
uv: Point2d_type /* The 2D paramter-space u,v position to evaluate the surface at */;
2325+
}
2326+
| {
2327+
/* format:uuid, description:Which face is being queried. */
2328+
object_id: string;
2329+
type: 'face_get_gradient';
2330+
uv: Point2d_type /* The 2D paramter-space u,v position to evaluate the surface at */;
2331+
}
22942332
| {
22952333
front: boolean /* Bring to front = true, send to back = false. */;
22962334
/* format:uuid, description:Which object is being changed. */
@@ -2788,6 +2826,27 @@ export type OkModelingCmdResponse_type =
27882826
}
27892827
| {
27902828
/*{
2829+
"$ref": "#/components/schemas/FaceIsPlanar"
2830+
}*/
2831+
data: FaceIsPlanar_type;
2832+
type: 'face_is_planar';
2833+
}
2834+
| {
2835+
/*{
2836+
"$ref": "#/components/schemas/FaceGetPosition"
2837+
}*/
2838+
data: FaceGetPosition_type;
2839+
type: 'face_get_position';
2840+
}
2841+
| {
2842+
/*{
2843+
"$ref": "#/components/schemas/FaceGetGradient"
2844+
}*/
2845+
data: FaceGetGradient_type;
2846+
type: 'face_get_gradient';
2847+
}
2848+
| {
2849+
/*{
27912850
"$ref": "#/components/schemas/PlaneIntersectAndProject"
27922851
}*/
27932852
data: PlaneIntersectAndProject_type;
@@ -4515,6 +4574,9 @@ export interface Models {
45154574
ExtendedUserResultsPage_type: ExtendedUserResultsPage_type;
45164575
ExtrusionFaceCapType_type: ExtrusionFaceCapType_type;
45174576
ExtrusionFaceInfo_type: ExtrusionFaceInfo_type;
4577+
FaceGetGradient_type: FaceGetGradient_type;
4578+
FaceGetPosition_type: FaceGetPosition_type;
4579+
FaceIsPlanar_type: FaceIsPlanar_type;
45184580
FailureWebSocketResponse_type: FailureWebSocketResponse_type;
45194581
FbxStorage_type: FbxStorage_type;
45204582
FileCenterOfMass_type: FileCenterOfMass_type;

0 commit comments

Comments
 (0)