Skip to content

charles-sharman/ccad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description
===========

ccad is a text-based mechanical CAD (computer aided design) tool.  It
is a python module you import within a python file or from the python
prompt.  Once imported, you can create and view mechanical objects.

ccad is a python wrapper of pythonocc.  No knowledge of pythonocc is
necessary to operate ccad.

To Install (Linux)
==================

Make sure you have working copies of pythonocc and python-qt4.  Then::

  Download and unzip the .zip file from github

  cd ccad-master

  python setup.py install --prefix=/usr/local (as root)

Change the prefix argument to install in a different directory.

To Install (Windows)
====================

Make sure you have working copies of pythonocc and python-qt4.  Then::

  Download the .zip file from github

  From a file explorer window, right-click on the downloaded zip file
  and select "extract here"

  Navigate to the folder just created

  Shift-right-click in the file explorer window and select "open
  command window here"

  Type the following command:
  python setup.py install

For interactive mode, use ipython or run python from a command window.
ccad does *not* work under Idle.

To Install (Mac)
================

While ccad should work for Mac, we haven't heard of anyone trying it.
If you install it, let us know, and we'll update the README.

To Operate
==========

Start python from the command line.  Then::

  >>> import ccad.model as cm
  >>> import ccad.display as cd
  >>> s1 = cm.sphere(1.0)
  >>> v1 = cd.view()
  >>> v1.display(s1)

You should see a sphere displayed in a window.

Consult the documentation at prefix/share/doc/ccad/html/contents.html
for ccad's full capabilities.

To Build (only for developers)
==============================

Update components with modifications to MANIFEST.in and setup.py.
Then,

  python setup.py sdist

**Make sure you verify changes with unittest/test_all.py before
committing.**

To Build the Documentation (only for developers)
================================================

Some files are captured with xwd (window dump).  They're commented in
MANIFEST.in.  The remaining are generated with generate_images.py.

  cd ccad-ver/doc
  python generate_images.py
  sphinx-build . html

Then, direct your browser to ccad-ver/doc/html/contents.html

Philosophy (only for developers)
================================

1. Edges are continuous lines in 3D space.  There should be no reason
   to distinguish between them and OCC curves.  Wires are collections
   of edge connections.  Faces are continuous surfaces in 3D space.
   There should be no reason to distinguish between them and OCC
   surfaces.  Shells are collections of face connections.

2. The end-user should not ever have to call pythonOCC directly.  ccad
   should handle all things someone might want to do in CAD.

About

pythonocc wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages