summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-18 23:23:53 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-18 23:23:53 -0500
commit4db7302485e65937463c2efe3b3c2945549ca588 (patch)
tree1d64e366bcba041b2eeb47b94159f89903a487e0
parent5966d7830bda7f37ed5ddcc1bfccb93e7f780eaa (diff)
downloadgerbonara-4db7302485e65937463c2efe3b3c2945549ca588.tar.gz
gerbonara-4db7302485e65937463c2efe3b3c2945549ca588.tar.bz2
gerbonara-4db7302485e65937463c2efe3b3c2945549ca588.zip
Doc update
-rw-r--r--doc/source/documentation/index.rst2
-rw-r--r--doc/source/documentation/operations.rst24
-rw-r--r--doc/source/features.rst6
-rw-r--r--gerber/operations.py20
4 files changed, 38 insertions, 14 deletions
diff --git a/doc/source/documentation/index.rst b/doc/source/documentation/index.rst
index 28ecb99..dec83f9 100644
--- a/doc/source/documentation/index.rst
+++ b/doc/source/documentation/index.rst
@@ -6,5 +6,5 @@ PCB Tools Reference
Gerber (RS-274X) Files <rs274x>
Excellon Files <excellon>
+ Operations <operations>
Rendering <render>
- \ No newline at end of file
diff --git a/doc/source/documentation/operations.rst b/doc/source/documentation/operations.rst
new file mode 100644
index 0000000..6551236
--- /dev/null
+++ b/doc/source/documentation/operations.rst
@@ -0,0 +1,24 @@
+:mod:`operations` --- Cam File operations
+=========================================
+
+.. module:: operations
+ :synopsis: Functions for modifying CAM files
+.. sectionauthor:: Hamilton Kibbe <ham@hamiltonkib.be>
+
+
+The :mod:`operations` module provides functions which modify
+:class:`gerber.cam.CamFile` objects. All of the functions in this module
+return a modified copy of the supplied file.
+
+.. _operations-contents:
+
+Functions
+---------
+The :mod:`operations` module defines the following functions:
+
+.. autofunction:: gerber.operations.to_inch
+.. autofunction:: gerber.operations.to_metric
+.. autofunction:: gerber.operations.offset
+
+
+
diff --git a/doc/source/features.rst b/doc/source/features.rst
index 120fdcd..67d9e2a 100644
--- a/doc/source/features.rst
+++ b/doc/source/features.rst
@@ -3,11 +3,11 @@ Feature Suppport
Currently supported features are as follows:
-============ ======== =========== ================ ====== ======= =======
+============ ======== =========== ================ ====== ======= =======
File Format Parsing Rendering Unit Conversion Scale Offset Rotate
============ ======== =========== ================ ====== ======= =======
-RS274-X Yes Yes Yes No No No
-Excellon Yes Yes Yes No No No
+RS274-X Yes Yes Yes No Yes No
+Excellon Yes Yes Yes No Yes No
ODB++ No No No No No No
============ ======== =========== ================ ====== ======= =======
diff --git a/gerber/operations.py b/gerber/operations.py
index 50df738..4eb10e5 100644
--- a/gerber/operations.py
+++ b/gerber/operations.py
@@ -27,12 +27,12 @@ def to_inch(cam_file):
Parameters
----------
- cam_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
Gerber or Excellon file to convert
Returns
-------
- gerber_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
A deep copy of the source file with units converted to imperial.
"""
cam_file = copy.deepcopy(cam_file)
@@ -44,12 +44,12 @@ def to_metric(cam_file):
Parameters
----------
- cam_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
Gerber or Excellon file to convert
Returns
-------
- gerber_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
A deep copy of the source file with units converted to metric.
"""
cam_file = copy.deepcopy(cam_file)
@@ -61,7 +61,7 @@ def offset(cam_file, x_offset, y_offset):
Parameters
----------
- cam_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
Gerber or Excellon file to offset
x_offset : float
@@ -72,7 +72,7 @@ def offset(cam_file, x_offset, y_offset):
Returns
-------
- gerber_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
An offset deep copy of the source file.
"""
cam_file = copy.deepcopy(cam_file)
@@ -84,7 +84,7 @@ def scale(cam_file, x_scale, y_scale):
Parameters
----------
- cam_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
Gerber or Excellon file to scale
x_scale : float
@@ -95,7 +95,7 @@ def scale(cam_file, x_scale, y_scale):
Returns
-------
- gerber_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
An scaled deep copy of the source file.
"""
# TODO
@@ -106,7 +106,7 @@ def rotate(cam_file, angle):
Parameters
----------
- cam_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
Gerber or Excellon file to rotate
angle : float
@@ -114,7 +114,7 @@ def rotate(cam_file, angle):
Returns
-------
- gerber_file : `gerber.cam.CamFile` subclass
+ cam_file : :class:`gerber.cam.CamFile` subclass
An rotated deep copy of the source file.
"""
# TODO