GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dblanding/OCAF-python: Translate OCAF Documentation from C++ to Python

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
LICENSE
LICENSE
 
 
lesson10_load_doc.py
lesson10_load_doc.py
 
 
lesson10_save_doc.py
lesson10_save_doc.py
 
 
load_doc.py
load_doc.py
 
 
ocaf_data_framework.py
ocaf_data_framework.py
 
 
ocaf_std_doc_srvcs.py
ocaf_std_doc_srvcs.py
 
 
readme.md
readme.md
 
 
save_doc.py
save_doc.py
 
 

Repository files navigation

Translating OCAF (Open Cascade Application Framework) code from C++ to Python

  • Open CasCade Technology (OCCT) is is a C++ library with pretty good documentation showing you how to use it.
  • pythonOCC provides a python wrapper for the OpenCASCADE C++ technology, extending the OCCT audience (mostly C++ developers) to the Python community.
  • If you are going to use OpenCascade (either C++ or Python) to make your own application, you will very likely need to get familiar with OCAF.
    • Unfortunately, there isn't a lot of online documentation showing the details of how to use OCAF in C++.
    • In PythonOCC the available resources are even scarcer.
    • Hence, the impetus for this repository
    • As an example, consider using the TDF_ChildIterator in C++ vs. Python:

C++ code:

TDF_ChildIterator itchild;
for (itchild.Initialize(Box2Label,Standard_True); itchild.More();itchild.Next()) {
    aChild = itchild.Value();
    // Do something with aChild
  }

Python code:

itchild = TDF_ChildIterator()
while itchild.More():
    a_child = itchild.Value()
    # Do something with a_child
    itchild.Next()

This repository is a collection of various PythonOCC code snipets that I have come across relating to the use of OCAF.

The OCAF section of the official OpenCascade documentation does a nice job of explaining how OCAF works and shows several useful C++ code snippets.

  • Here I have gone through the C++ code examples and converted them to Python

About

Translate OCAF Documentation from C++ to Python

Topics

ocafpythonocc

Resources

Readme
GPL-3.0 license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.