Open CASCADE Technology (OCCT)

repository·master·Indexed 25 days ago

https://github.com/open-cascade-sas/occt

A C++ software development platform for 3D surface and solid modeling, CAD data exchange, and visualization, designed for CAD, CAM, and CAE applications. The documentation includes guides on downloading and installing packages, generating HTML documentation via Doxygen, and detailed instructions for migrating codebases to modern C++ syntax for the 8.0.0 release using provided Python scripts for handles, standard types, macros, and typedefs.

Tokens
209.4K
Snippets
407
Records
993
Agent score
83%

What's inside OCCT

  1. Introduction to OCAF (Open CASCADE Application Framework)

    master

    OCAF is a platform designed for rapidly developing sophisticated domain-specific design applications (CAD, manufacturing, simulation, etc.). It provides the underlying infrastructure required to build professional design software, allowing developers to focus on application-specific functionality rather than core architectural challenges.

    Key services provided by OCAF include:

    • Data Organization: Simplified management of attributes and modeling processes.
    • Persistence: Built-in mechanisms for saving and opening documents.
    • Document-View Management: Synchronization between data changes and visual displays.
    • Application Infrastructure: Standard menus (New, Open, Close, Save, Save As).
    • Undo-Redo: Robust, multi-level command transaction management.
  2. Overview of Open CASCADE Technology (OCCT)

    master
    Open CASCADE Technology (OCCT) is a software development platform providing services for 3D surface and solid modeling, CAD data exchange, and visualization. Most functionality is provided as C++ libraries. It is designed for applications involving 3D modeling (CAD), manufacturing/measuring (CAM), or numerical simulation (CAE).
  3. Overview of Boolean Part (BP) classes

    master

    The Building Part (BP) is used to build the results of boolean operations and provide history information (via ::Generated(), ::Modified(), and ::IsDeleted()). BP uses a Data Structure (DS) prepared by BOPAlgo_PaveFiller.

    Key implementation classes include:

    • BOPAlgo_Builder: For the General Fuse operator (GFA).
    • BOPAlgo_BOP: For the Boolean Operation operator (BOA).
    • BOPAlgo_Section: For the Section operator (SA).
    • BOPAlgo_MakerVolume: For the Volume Maker operator.
    • BOPAlgo_Splitter: For the Splitter operator.
    • BOPAlgo_CellsBuilder: For the Cells Builder operator.

    The class BOPAlgo_BuilderShape provides the interface for algorithms that return a Shape and history information.

  4. Introduction to the TObj Package

    master

    The TObj package is an add-on to the Open CASCADE Application Framework (OCAF) designed for rapid development of object-oriented data models.

    It provides a higher-level abstraction over raw OCAF labels and attributes, offering:

    • Hierarchical Organization: Data models organized as tree-like structures of objects.
    • Cross-references: Support for references between objects within or across different models.
    • Persistence: Automatic mechanism for storing and retrieving TObj objects (including derived types) in OCAF files.
    • Undo/Redo: Leverages existing OCAF mechanisms for data management.

    Best Practices & Limitations:

    • Scale: TObj is optimized for models where each level contains a limited number of objects (typically < 1000).
    • Large Datasets: For models containing a very large number of uniform objects, use alternative storage methods like arrays, while using TObj to represent the high-level structure.
  5. Overview of LDOM for XML OCAF persistence

    master

    The Light DOM (LDOM) package is used for XML OCAF persistence. It provides a memory-efficient way to represent XML documents as a tree structure in memory.

    Core components:

    • LDOM_Document: The root object containing the XML document data.
    • LDOM_Element: Represents XML elements in the tree.
    • LDOM_Parser: Reads XML files and converts them into LDOM_Document objects.
    • LDOM_XmlWriter: Converts an LDOM_Document into an XML character stream for file storage.

    Limitations of LDOM:

    • Uses only ASCII strings (no native Unicode support; use TCollection_ExtendedString via LDOM_String).
    • No XML Entity resolution.
    • No DTD validation.
    • No Namespace support (uses prefixes instead of qualified names).
    • Limited node types: LDOM_Element, LDOM_Attr, LDOM_Text, LDOM_Comment, and LDOM_CDATASection.
  6. Overview of Data Exchange Wrapper (DE_Wrapper)

    master

    The Data Exchange Wrapper (DE Wrapper) module enables reading and writing supported CAD formats to Open CASCADE Technology (OCCT) shape objects or XDE documents. It manages the transfer process for various CAD files and allows for the addition of new formats by prototyping existing tools.

    Key components include:

    • Provider class: Loads/writes CAD files and translates contents to/from OCCT shapes or XDE documents.
    • Configuration class: Holds transfer parameters like units, tolerance, and internal reader/writer settings.
    • Wrapper class: Manages loaded configuration objects, handles format detection via file extensions, and saves/loads configuration settings.
  7. Overview of Open CASCADE Technology (OCCT) modules

    master

    Open CASCADE Technology (OCCT) is a modular C++ library for 3D surface and solid modeling, CAD data exchange, and visualization. The library is organized into seven main modules:

    • Foundation Classes: Core data structures, Unicode strings, collections, numerical algorithms, and memory management (smart pointers).
    • Modeling Data: Implements Boundary Representation (BRep) using geometry (mathematical curves/surfaces) and topology (structural relationships).
    • Modeling Algorithms: Contains geometric and topological algorithms, including primitive construction (boxes, cylinders, etc.), kinematic modeling (sweeps, revolutions, lofting), and Boolean operations (Common, Fuse, Cut).
    • Mesh: Provides tools for working with tessellated triangular facet representations of BRep objects.
    • Visualization: Handles graphical representation of shapes and meshes, separating CAD data from its presentation. It includes an interactive selection mechanism.
    • Data Exchange: Enables interoperability with neutral formats like IGES and STEP.
    • Application Framework (OCAF): Provides solutions for application-specific data, undo/redo, copy/paste, and tracking modifications.
  8. Overview of Boolean Operations Operators

    master

    Open CASCADE Technology provides several operators for performing boolean operations on groups of TopoDS_Shape objects. These operators are categorized into four main types:

    1. Boolean Operator (BOA): Performs operations between two groups: Objects and Tools.

      • FUSE: Union of the two groups.
      • COMMON: Intersection of the two groups.
      • CUT: Difference between the two groups (the Objects group minus the Tools group).
      • Cut21: An extension for a forward Cut operation, equivalent to Cut(Tools, Objects).
    2. General Fuse Operator (GFA): A base algorithm that can be applied to an arbitrary number of TopoDS_Shape arguments. The results of BOA can be derived from GFA.

    3. Splitter Operator (SPA): Applied to two groups (Objects and Tools). The result contains all parts that belong to the Objects group but do not belong to the Tools group.

    4. Section Operator (SA): Applied to an arbitrary number of arguments. The result contains vertices and edges resulting from the interferences between the arguments.

  9. Overview of Shape Healing toolkit

    master

    The Shape Healing toolkit provides tools to analyze, fix, and upgrade the geometry and topology of Open CASCADE Technology (OCCT) shapes. It is designed to make shapes more appropriate for use within OCCT algorithms by addressing common geometric and topological issues.

    Key functional domains include:

    • analysis: Exploring shape properties and detecting violations of OCCT requirements without modifying the shape.
    • fixing: Modifying, removing, or constructing sub-shapes to meet OCCT requirements (e.g., fixing self-intersecting wires or missing seam edges).
    • upgrade: Replacing a shape with a new one that is geometrically identical but has improved characteristics (e.g., upgrading C0 continuity to C1).
    • customization: Modifying the representation of a shape to fit specific needs without changing the shape itself.
    • processing: Managing shape modifications via user-editable resource files.
  10. Introduction to Extended Data Exchange (XDE)

    master

    The Extended Data Exchange (XDE) module extends the scope of geometric BREP data exchange by translating additional attached data, improving interoperability with external software. It supports data types such as colors, layers, assembly descriptions, and validation properties (e.g., center of gravity). This data is stored alongside shapes in an XCAF document. XDE also provides reader and writer tools for IGES and STEP files.

    Requirement: The XDE component requires the Shape Healing toolkit to operate.

  11. Overview of the TKHelix Toolkit

    master
    The TKHelix toolkit provides functionality for creating, approximating, and manipulating helix curves in Open CASCADE Technology (OCCT). It is designed for constructing complex helix geometries used in mechanical engineering, such as springs, threads, and architectural elements. The toolkit supports cylindrical, tapered, spiral, and multi-part helixes.
  12. Understand the OCCT Real-Time PBR Metallic-Roughness Model

    master
    OCCT 3D Viewer implements a real-time Physically-Based Rendering (PBR) model based on the Cook-Torrance specular BRDF. This model is designed for performance on real-time graphics hardware using a metallic-roughness workflow. It approximates physical light propagation, absorption, and reflection using a microfacet model where the surface is treated as a collection of micro-faces.