WiTwin Core
Shared geometry, materials, and scene utilities for the WiTwin platform
Overview#
WiTwin Core provides the shared foundations used across all WiTwin packages. It defines geometry primitives, material models, scene base classes, and the Mitsuba renderer bridge that powers ray tracing backends.
Most users do not import witwin.core directly. The geometry and material types are re-exported through witwin.channel and witwin.maxwell for convenience.
What It Provides#
- Geometry primitives —
Box,Sphere,Cylinder, and more - Material and structure definitions shared across all solvers
SceneBase— the common base class for all WiTwin scenes- Mitsuba bridge — converts WiTwin scenes to Mitsuba renderer format
- Quaternion math utilities
Quick Links#
Geometry
Box, Sphere, Cylinder, Mesh, and all primitive types
Materials
Material, Structure, and material sample types
Installation#
pip install witwinWiTwin Core is included in the base witwin package. It is also installed automatically as a dependency of witwin-channel and witwin-maxwell.
Usage#
from witwin.core import Box, Material, Structure
wall = Structure(
name="wall",
geometry=Box(position=(0.0, 0.0, 1.5), size=(0.25, 4.0, 3.0)),
material=Material(eps_r=4.0, sigma_e=0.0),
)Or access through the solver packages:
import witwin.channel as wc
wall = wc.Structure(
name="wall",
geometry=wc.Box(position=(0.0, 0.0, 1.5), size=(0.25, 4.0, 3.0)),
material=wc.Material(eps_r=4.0, sigma_e=0.0),
)