Skip to content

Built‐in CAD

Yuxiang He edited this page Oct 18, 2023 · 2 revisions

Intro of Built-in CAD module (bCAD)

Motivation

The purpose of developing a compact CAD module is not to duplicate existing functions within PythonOCC, but rather to tailor these functions to specific requirements, enhance code readability, and streamline data exchange during computations.

As PythonOCC primarily serves as an interface to the OpenCascade C++ library, it conceals information within a 'black box,' limiting advanced development possibilities. Therefore, the creation of a tailored data structure becomes essential, granting full control over the properties of geometry components and enabling more intricate computational tasks.

Properties of geometry components

Every geometry component will be assigned two IDs in bCAD, namely "id" and "gid". "id" is one unique id among all components while "gid" distinguishes components in the same topological hierarchy.

While creating shapes at a high level, the need for detailed component relationships may be less critical, as the CAD kernel can handle this. However, when dealing with manipulations across hierarchies, these relationships become indispensable and highly beneficial, particularly as complexity scales up.

Topology in Buit-in CAD

Type ID TYPE NAME COUNTERPART IN OCC
0 point TopoDS_Vertex (GP_Pnt)
1 segment TopoDS_Edge
2 wire TopoDS_Wire
3 surface TopoDS_Face
4 shell TopoDS_Shell
5 solid TopoDS_Solid
6 compound TopoDS_Compound

Contents

Clone this wiki locally