From 0959d4bbaa0c57c2e1029d3bfe3f76f767d4a315 Mon Sep 17 00:00:00 2001 From: Dave Cowden Date: Tue, 1 Dec 2015 22:54:36 -0500 Subject: [PATCH] fixed documentation --- .travis.yml | 1 + cadquery/__init__.py | 4 ++-- cadquery/freecad_impl/exporters.py | 21 --------------------- cadquery/freecad_impl/importers.py | 20 -------------------- doc/apireference.rst | 16 +++++++++++----- doc/classreference.rst | 27 ++++----------------------- doc/conf.py | 2 +- doc/index.rst | 22 ++++++++++++---------- doc/installation.rst | 4 ++++ requirements-dev.txt | 3 +++ 10 files changed, 38 insertions(+), 82 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.travis.yml b/.travis.yml index e2326af..7211e51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ install: - python ./setup.py install - pip install coverage - pip install coveralls + - pip install Sphinx=1.3.2 - pip install travis-sphinx script: diff --git a/cadquery/__init__.py b/cadquery/__init__.py index fff0af0..fb0bea0 100644 --- a/cadquery/__init__.py +++ b/cadquery/__init__.py @@ -7,8 +7,8 @@ from .freecad_impl import importers #these items are the common implementation #the order of these matter -from .selectors import NearestToPointSelector,ParallelDirSelector,DirectionSelector,PerpendicularDirSelector,TypeSelector,DirectionMinMaxSelector,StringSyntaxSelector,Selector -from .CQ import CQ,CQContext,Workplane +from .selectors import * +from .CQ import * __all__ = [ diff --git a/cadquery/freecad_impl/exporters.py b/cadquery/freecad_impl/exporters.py index 8ba681b..c4b097a 100644 --- a/cadquery/freecad_impl/exporters.py +++ b/cadquery/freecad_impl/exporters.py @@ -1,24 +1,3 @@ -""" - Copyright (C) 2011-2015 Parametric Products Intellectual Holdings, LLC - - This file is part of CadQuery. - - CadQuery is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - CadQuery is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; If not, see - - An exporter should provide functionality to accept a shape, and return - a string containing the model content. -""" import cadquery import FreeCAD diff --git a/cadquery/freecad_impl/importers.py b/cadquery/freecad_impl/importers.py index 80458be..6f29ce8 100644 --- a/cadquery/freecad_impl/importers.py +++ b/cadquery/freecad_impl/importers.py @@ -1,24 +1,4 @@ -""" - Copyright (C) 2011-2015 Parametric Products Intellectual Holdings, LLC - This file is part of CadQuery. - - CadQuery is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - CadQuery is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; If not, see - - An exporter should provide functionality to accept a shape, and return - a string containing the model content. -""" import cadquery from .shapes import Shape diff --git a/doc/apireference.rst b/doc/apireference.rst index cb58f3b..55aea7d 100644 --- a/doc/apireference.rst +++ b/doc/apireference.rst @@ -16,12 +16,11 @@ This page lists methods of these objects grouped by **functional area** This page lists api methods grouped by functional area. Use :ref:`classreference` to see methods alphabetically by class. -.. module:: cadquery Initialization ---------------- -.. currentmodule:: cadquery.CQ +.. currentmodule:: cadquery Creating new workplanes and object chains @@ -39,8 +38,10 @@ Creating 2-d constructs that can be used to create 3 d features. All 2-d operations require a **Workplane** object to be created. +.. currentmodule:: cadquery + .. autosummary:: - Workplane.center + Workplane.center Workplane.lineTo Workplane.line Workplane.vLine @@ -99,6 +100,11 @@ File Management and Export CQ.exportSvg +.. autosummary:: + importers.importStep + exporters.exportShape + + Iteration Methods ------------------ @@ -142,7 +148,7 @@ Selectors Objects that filter and select CAD objects. Selectors are used to select existing geometry as a basis for futher operations. -.. currentmodule:: cadquery.selectors +.. currentmodule:: cadquery .. autosummary:: @@ -159,4 +165,4 @@ as a basis for futher operations. SumSelector SubtractSelector InverseSelector - StringSyntaxSelector \ No newline at end of file + StringSyntaxSelector diff --git a/doc/classreference.rst b/doc/classreference.rst index 423af35..bd7c882 100644 --- a/doc/classreference.rst +++ b/doc/classreference.rst @@ -15,18 +15,14 @@ This page documents all of the methods and functions of the CadQuery classes, or Core Classes --------------------- -.. currentmodule:: cadquery.CQ .. autosummary:: - - CQ - Workplane + CQ + Workplane Topological Classes ---------------------- -.. currentmodule:: cadquery.freecad_impl.shapes .. autosummary:: - Shape Vertex Edge @@ -39,9 +35,7 @@ Topological Classes Geometry Classes ------------------ -.. currentmodule:: cadquery.freecad_impl.geom .. autosummary:: - Vector Matrix Plane @@ -49,7 +43,7 @@ Geometry Classes Selector Classes --------------------- -.. currentmodule:: cadquery.selectors + .. autosummary:: Selector @@ -68,22 +62,9 @@ Selector Classes InverseSelector StringSyntaxSelector -.. currentmodule:: cadquery Class Details --------------- -.. autoclass:: cadquery.CQ.CQ - :members: - -.. autoclass:: cadquery.CQ.Workplane - :members: - -.. automodule:: cadquery.selectors - :members: - -.. automodule:: cadquery.freecad_impl.geom - :members: - -.. automodule:: cadquery.freecad_impl.shapes +.. automodule:: cadquery :members: diff --git a/doc/conf.py b/doc/conf.py index da7610a..2937aed 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -81,7 +81,7 @@ exclude_patterns = ['_build'] # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. diff --git a/doc/index.rst b/doc/index.rst index f7c1a00..57b3a7a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,7 +1,4 @@ -.. CadQuery documentation master file, created by - sphinx-quickstart on Sat Aug 25 21:10:53 2012. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. + CadQuery Documentation =================================== @@ -17,14 +14,18 @@ CadQuery is an intuitive, easy-to-use python library for building parametric 3D * Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser +See CadQuery in Action +------------------------- + +This `Getting Started Video `_ will show you what CadQuery can do. + + Quick Links -------------------- +------------------ -For the impatient, here's where you probably want to get started - - ==================== ============================ ========================================================== ==================== - :ref:`quickstart` :ref:`installation` `CadQuery CheatSheet <_static/cadquery_cheatsheet.html>`_ :ref:`apireference` - ==================== ============================ ========================================================== ==================== + * :ref:`quickstart` + * `CadQuery CheatSheet <_static/cadquery_cheatsheet.html>`_ + * :ref:`apireference` Table Of Contents ------------------- @@ -46,6 +47,7 @@ Table Of Contents roadmap.rst + Indices and tables ------------------- diff --git a/doc/installation.rst b/doc/installation.rst index c19c2e4..b623756 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -18,12 +18,16 @@ On Ubuntu, you can type:: sudo apt-get install -y freecad freecad-doc pip install cadquery +This `Unix Installation Video `_ will walk you through the installation + + Installation: Other Platforms ------------------------------------------ 1. Install FreeCAD using the appropriate installer for your platform, on `www.freecadweb.org `_ 2. pip install cadquery +This `Windows Installation video `_ will walk you through the installation on Windows Test Your Installation ------------------------ diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..872a66d --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,3 @@ +sphinx-rtd-theme==0.1.9 +travis-sphinx==1.1.0 +Sphinx==1.3.1