pythonOCC

Wraps the OpenCASCADE CAD Kernel
Download

pythonOCC Ranking & Summary

Advertisement

  • Rating:
  • License:
  • CeCILL
  • Price:
  • FREE
  • Publisher Name:
  • Thomas Paviot
  • Publisher web site:
  • http://www.minerva-plm.org/pythonOCC/

pythonOCC Tags


pythonOCC Description

Wraps the OpenCASCADE CAD Kernel pythonOCC is an 100% free and open source Python binding for OpenCascade.OpenCascade is a 3D modeling & numerical simulation library. pythonOCC may be distributed under the terms the CeCILL Licence.Getting StartedpythonOCC is in a very early development stage. Only a few of OpenCascade objects are currently wrapped. If you work in a Windows environment, you just have to download the pre-built binary file for you Python distribution and download the OpenCascade 6.2.0 required dlls (from OpenCascade website). Be sure to add the folder path to these dlls in your PATH variable environment.To check that pythonOCC installation is successfull, just tyry to import OCC from a Python prompt:>>> import OCC>>>You should not get any error. Then you can list the available modules:>>> dir(OCC)>>> >>>Simple example 1: make a line between 2 points>>> from OCC import *>>> P1 = gp.gp_Pnt2d(1,2)>>> P2 = gp.gp_Pnt2d(3,-5.1)>>> makeline = GCE2d.GCE2d_MakeLine(P1,P2)>>> makeline.IsDone()1>>> makeline.Status()OCC.GCE2d.GCE2d.gce_ErrorType.gce_Done>>>Simple example 2: vectors computation>>> from OCC import *>>> vec1 = gp.gp_Vec(1,2,3)>>> vec2 = gp.gp_Vec(-1,-2,-3)>>> vec1.Magnitude()3.7416573867739413>>> vec2.Magnitude()3.7416573867739413>>> vec1.IsOpposite(vec2,AngularTolerance=Precision.Precision().Angular())1 Requirements: · Python What's New in This Release: · 23 new OCC modules are now covered by the wrapper, many improvements have been made to the Display3D viewer (selection of faces and vertices, background image, textured shapes, etc.), and a new interactive viewer embeds a Python console for debugging.


pythonOCC Related Software