Initial commit: step2urdf tool with handtuned JSON import.
Includes FastAPI backend, vendored step2urdf frontend, and A7 handtuned arm JSON for URDF generation.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
"""STEP → URDF conversion tool (Web MVP).
|
||||
|
||||
Pipeline:
|
||||
STEP upload → assembly/part parse → profile link grouping
|
||||
→ Zhipu joint proposal → human review → URDF (+ optional meshes)
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=str(ROOT / ".env"),
|
||||
env_file_encoding="utf-8",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
zhipu_api_key: str = ""
|
||||
zhipu_model: str = "glm-4-plus"
|
||||
zhipu_base_url: str = "https://open.bigmodel.cn/api/paas/v4"
|
||||
|
||||
host: str = "127.0.0.1"
|
||||
port: int = 8787
|
||||
data_dir: Path = ROOT / "data"
|
||||
|
||||
default_step: str = ""
|
||||
|
||||
@property
|
||||
def uploads_dir(self) -> Path:
|
||||
return self.data_dir / "uploads"
|
||||
|
||||
@property
|
||||
def jobs_dir(self) -> Path:
|
||||
return self.data_dir / "jobs"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
settings.uploads_dir.mkdir(parents=True, exist_ok=True)
|
||||
settings.jobs_dir.mkdir(parents=True, exist_ok=True)
|
||||
Reference in New Issue
Block a user