62 lines
1.6 KiB
Python
62 lines
1.6 KiB
Python
from __future__ import annotations
|
|
|
|
from OCC.Core.GeomAbs import (
|
|
GeomAbs_BSplineCurve,
|
|
GeomAbs_BSplineSurface,
|
|
GeomAbs_BezierCurve,
|
|
GeomAbs_BezierSurface,
|
|
GeomAbs_Circle,
|
|
GeomAbs_Cone,
|
|
GeomAbs_Cylinder,
|
|
GeomAbs_Ellipse,
|
|
GeomAbs_Hyperbola,
|
|
GeomAbs_Line,
|
|
GeomAbs_OffsetSurface,
|
|
GeomAbs_OtherCurve,
|
|
GeomAbs_OtherSurface,
|
|
GeomAbs_Parabola,
|
|
GeomAbs_Plane,
|
|
GeomAbs_Sphere,
|
|
GeomAbs_SurfaceOfExtrusion,
|
|
GeomAbs_SurfaceOfRevolution,
|
|
GeomAbs_Torus,
|
|
)
|
|
from OCC.Core.TopAbs import TopAbs_EXTERNAL, TopAbs_FORWARD, TopAbs_INTERNAL, TopAbs_REVERSED
|
|
|
|
|
|
SURFACE_TYPES = {
|
|
GeomAbs_Plane: "plane",
|
|
GeomAbs_Cylinder: "cylinder",
|
|
GeomAbs_Cone: "cone",
|
|
GeomAbs_Sphere: "sphere",
|
|
GeomAbs_Torus: "torus",
|
|
GeomAbs_BezierSurface: "bezier surface",
|
|
GeomAbs_BSplineSurface: "b-spline surface",
|
|
GeomAbs_SurfaceOfRevolution: "surface of revolution",
|
|
GeomAbs_SurfaceOfExtrusion: "surface of extrusion",
|
|
GeomAbs_OffsetSurface: "offset surface",
|
|
GeomAbs_OtherSurface: "other surface",
|
|
}
|
|
|
|
SNAPSHOT_FACE_LOGICAL_IDS_KEY = "__face_logical_ids__"
|
|
|
|
FACE_SELECTION_FEATURE_INFO_SURFACES = {"plane", "cylinder", "cone", "sphere", "torus"}
|
|
|
|
CURVE_TYPES = {
|
|
GeomAbs_Line: "line",
|
|
GeomAbs_Circle: "circle",
|
|
GeomAbs_Ellipse: "ellipse",
|
|
GeomAbs_Hyperbola: "hyperbola",
|
|
GeomAbs_Parabola: "parabola",
|
|
GeomAbs_BezierCurve: "bezier curve",
|
|
GeomAbs_BSplineCurve: "b-spline curve",
|
|
GeomAbs_OtherCurve: "other curve",
|
|
}
|
|
|
|
ORIENTATION_TYPES = {
|
|
TopAbs_FORWARD: "forward",
|
|
TopAbs_REVERSED: "reversed",
|
|
TopAbs_INTERNAL: "internal",
|
|
TopAbs_EXTERNAL: "external",
|
|
}
|