Source code for kittycad.models.input_format

from typing import Literal, Union

from pydantic import BaseModel, Field, RootModel
from typing_extensions import Annotated

from ..models.system import System
from ..models.unit_length import UnitLength


[docs]class fbx(BaseModel): """Autodesk Filmbox (FBX) format.""" type: Literal["fbx"] = "fbx"
[docs]class gltf(BaseModel): """Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" type: Literal["gltf"] = "gltf"
[docs]class obj(BaseModel): """Wavefront OBJ format.""" coords: System type: Literal["obj"] = "obj" units: UnitLength
[docs]class ply(BaseModel): """The PLY Polygon File Format.""" coords: System type: Literal["ply"] = "ply" units: UnitLength
[docs]class sldprt(BaseModel): """SolidWorks part (SLDPRT) format.""" type: Literal["sldprt"] = "sldprt"
[docs]class step(BaseModel): """ISO 10303-21 (STEP) format.""" type: Literal["step"] = "step"
[docs]class stl(BaseModel): """*ST**ereo**L**ithography format.""" coords: System type: Literal["stl"] = "stl" units: UnitLength
InputFormat = RootModel[ Annotated[ Union[ fbx, gltf, obj, ply, sldprt, step, stl, ], Field(discriminator="type"), ] ]