-
Notifications
You must be signed in to change notification settings - Fork 10
/
README
100 lines (66 loc) · 2.76 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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.