Merge pull request #151 from CadQuery/adam-urbanczyk-update-docs

Update installation instructions
This commit is contained in:
Adam Urbańczyk
2019-06-15 22:23:11 +02:00
committed by GitHub
5 changed files with 18 additions and 154 deletions

View File

@ -3,6 +3,7 @@
[![Travis Build Status](https://travis-ci.org/CadQuery/cadquery.svg?branch=master)](https://travis-ci.org/CadQuery/cadquery.svg?branch=master) [![Travis Build Status](https://travis-ci.org/CadQuery/cadquery.svg?branch=master)](https://travis-ci.org/CadQuery/cadquery.svg?branch=master)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/cf4qg6kpyqmcje1h?svg=true)](https://ci.appveyor.com/api/projects/status/cf4qg6kpyqmcje1h?svg=true) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/cf4qg6kpyqmcje1h?svg=true)](https://ci.appveyor.com/api/projects/status/cf4qg6kpyqmcje1h?svg=true)
[![Build Status](https://dev.azure.com/cadquery/conda-packages/_apis/build/status/CadQuery.cadquery?branchName=master)](https://dev.azure.com/cadquery/conda-packages/_build/latest?definitionId=2&branchName=master)
[![codecov](https://codecov.io/gh/CadQuery/cadquery/branch/master/graph/badge.svg)](https://codecov.io/gh/CadQuery/cadquery) [![codecov](https://codecov.io/gh/CadQuery/cadquery/branch/master/graph/badge.svg)](https://codecov.io/gh/CadQuery/cadquery)
[![Documentation Status](https://readthedocs.org/projects/cadquery/badge/?version=latest)](https://cadquery.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/cadquery/badge/?version=latest)](https://cadquery.readthedocs.io/en/latest/?badge=latest)
@ -38,7 +39,7 @@ It is currently possible to use CadQuery for your own projects in 3 different wa
The easiest way to install CadQuery and its dependencies is using conda: The easiest way to install CadQuery and its dependencies is using conda:
``` ```
conda install -c conda-forge -c cadquery cadquery conda install -c conda-forge -c cadquery cadquery=2
``` ```
For those who are interested, the [conda-packages repository](https://github.com/CadQuery/conda-packages) contains build information, packages and modifications for CadQuery's conda channel. For those who are interested, the [conda-packages repository](https://github.com/CadQuery/conda-packages) contains build information, packages and modifications for CadQuery's conda channel.
@ -69,7 +70,7 @@ CadQuery supports Jupyter notebook out of the box using the jupyter-cadquery ext
CadQuery was built to be used as a Python library without any GUI. This makes it great for use cases such as integration into servers, or creating scientific and engineering scripts. Use Anaconda/Miniconda to install CadQuery, and then add `import cadquery` to the top of your Python scripts. CadQuery was built to be used as a Python library without any GUI. This makes it great for use cases such as integration into servers, or creating scientific and engineering scripts. Use Anaconda/Miniconda to install CadQuery, and then add `import cadquery` to the top of your Python scripts.
``` ```
conda install -c conda-forge -c cadquery cadquery conda install -c conda-forge -c cadquery cadquery=2
``` ```
## Getting help ## Getting help

View File

@ -1,125 +0,0 @@
What is a CadQuery?
========================================
CadQuery is an intuitive, easy-to-use python based language for building parametric 3D CAD models. CadQuery is for 3D CAD what jQuery is for javascript. Imagine selecting Faces of a 3d object the same way you select DOM objects with JQuery!
CadQuery has several goals:
* Build models with scripts that are as close as possible to how you'd describe the object to a human.
* Create parametric models that can be very easily customized by end users
* Output high quality CAD formats like STEP and AMF in addition to traditional STL
* Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser
Using CadQuery, you can write short, simple scripts that produce high quality CAD models. It is easy to make many different objects using a single script that can be customized.
Getting Started With CadQuery
========================================
The easiest way to get started with CadQuery is to Install FreeCAD ( version 14 recommended ) (http://www.freecadweb.org/) , and then to use our CadQuery-FreeCAD plugin here:
https://github.com/jmwright/cadquery-freecad-module
It includes the latest version of cadquery alreadby bundled, and has super-easy installation on Mac, Windows, and Unix.
It has tons of awesome features like integration with FreeCAD so you can see your objects, code-autocompletion, an examples bundle, and script saving/loading. Its definitely the best way to kick the tires!
Recently Added Features
========================================
* 12/5/14 -- New FreeCAD/CadQuery Module! https://github.com/jmwright/cadquery-freecad-module
* 10/25/14 -- Added Revolution Feature ( thanks Jeremy ! )
Why CadQuery instead of OpenSCAD?
========================================
CadQuery is based on OpenCasCade. CadQuery shares many features with OpenSCAD, another open source, script based, parametric model generator.
The primary advantage of OpenSCAD is the large number of already existing model libaries that exist already. So why not simply use OpenSCAD?
CadQuery scripts have several key advantages over OpenSCAD:
1. **The scripts use a standard programming language**, python, and thus can benefit from the associated infrastructure.
This includes many standard libraries and IDEs
2. **More powerful CAD kernel** OpenCascade is much more powerful than CGAL. Features supported natively
by OCC include NURBS, splines, surface sewing, STL repair, STEP import/export, and other complex operations,
in addition to the standard CSG operations supported by CGAL
3. **Ability to import/export STEP** We think the ability to begin with a STEP model, created in a CAD package,
and then add parametric features is key. This is possible in OpenSCAD using STL, but STL is a lossy format
4. **Less Code and easier scripting** CadQuery scripts require less code to create most objects, because it is possible to locate
features based on the position of other features, workplanes, vertices, etc.
5. **Better Performance** CadQuery scripts can build STL, STEP, and AMF faster than OpenSCAD.
License
========
CadQuery is licensed under the terms of the LGPLv3. http://www.gnu.org/copyleft/lesser.html
Where is the GUI?
==================
If you would like IDE support, you can use CadQuery inside of FreeCAD. There's an excellent plugin module here https://github.com/jmwright/cadquery-freecad-module
CadQuery also provides the backbone of http://parametricparts.com, so the easiest way to see it in action is to review the samples and objects there.
Installing -- FreeStanding Installation
========================================
Use these steps if you would like to write CadQuery scripts as a python API. In this case, FreeCAD is used only as a CAD kernel.
1. install FreeCAD, version 0.14 or greater for your platform. http://sourceforge.net/projects/free-cad/.
2. adjust your path if necessary. FreeCAD bundles a python interpreter, but you'll probably want to use your own,
preferably one that has virtualenv available. To use FreeCAD from any python interpreter, just append the FreeCAD
lib directory to your path. On (*Nix)::
import sys
sys.path.append('/usr/lib/freecad/lib')
or on Windows::
import sys
sys.path.append('/c/apps/FreeCAD/bin')
*NOTE* FreeCAD on Windows will not work with python 2.7-- you must use pthon 2.6.X!!!!
3. install cadquery::
pip install cadquery
3. test your installation::
from cadquery import *
box = Workplane("XY").box(1,2,3)
exporters.toString(box,'STL')
You're up and running!
Installing -- Using CadQuery from Inside FreeCAD
=================================================
Use the Excellent CadQuery-FreeCAD plugin here:
https://github.com/jmwright/cadquery-freecad-module
It includes a distribution of the latest version of cadquery.
Where does the name CadQuery come from?
========================================
CadQuery is inspired by ( `jQuery <http://www.jquery.com>`_ ), a popular framework that
revolutionized web development involving javascript.
If you are familiar with how jQuery, you will probably recognize several jQuery features that CadQuery uses:
* A fluent api to create clean, easy to read code
* Language features that make selection and iteration incredibly easy
*
* Ability to use the library along side other python libraries
* Clear and complete documentation, with plenty of samples.

View File

@ -50,7 +50,10 @@ All 2-d operations require a **Workplane** object to be created.
Workplane.moveTo Workplane.moveTo
Workplane.move Workplane.move
Workplane.spline Workplane.spline
Workplane.parametricCurve
Workplane.threePointArc Workplane.threePointArc
Workplane.sagittaArc
Workplane.radiusArc
Workplane.rotateAndCopy Workplane.rotateAndCopy
Workplane.mirrorY Workplane.mirrorY
Workplane.mirrorX Workplane.mirrorX
@ -60,6 +63,7 @@ All 2-d operations require a **Workplane** object to be created.
Workplane.polyline Workplane.polyline
Workplane.close Workplane.close
Workplane.rarray Workplane.rarray
Workplane.polarArray
.. _3doperations: .. _3doperations:
@ -79,18 +83,28 @@ Some 3-d operations also require an active 2-d workplane, but some do not.
Workplane.cutBlind Workplane.cutBlind
Workplane.cutThruAll Workplane.cutThruAll
Workplane.box Workplane.box
Workplane.sphere
Workplane.union Workplane.union
Workplane.combine Workplane.combine
Workplane.intersect
Workplane.loft
Workplane.sweep
Workplane.twistExtrude
Workplane.revolve
Workplane.text
3-d operations that do NOT require a 2-d workplane to be active: 3-d operations that do NOT require a 2-d workplane to be active:
.. autosummary:: .. autosummary::
CQ.shell CQ.shell
CQ.fillet CQ.fillet
CQ.chamfer
CQ.split CQ.split
CQ.rotate CQ.rotate
CQ.rotateAboutCenter CQ.rotateAboutCenter
CQ.translate CQ.translate
CQ.mirror
File Management and Export File Management and Export
--------------------------------- ---------------------------------

View File

@ -16,7 +16,7 @@ Command Line Installation
Once you have Anaconda or Miniconda installed, activate the environment you want to use and type:: Once you have Anaconda or Miniconda installed, activate the environment you want to use and type::
conda install -c pythonocc -c oce -c conda-forge -c dlr-sc -c CadQuery cadquery-occ conda install -c conda-forge -c cadquery cadquery=2
Test Your Installation Test Your Installation
------------------------ ------------------------

View File

@ -83,13 +83,6 @@ construction lines
mirror around centerline mirror around centerline
using centerline construction geometry using centerline construction geometry
rectangular array
automate creation of equally spread points
polar array
create equally spaced copies of a feature around a circle
perhaps based on a construction circle?
midpoint selection midpoint selection
select midpoints of lines, arcs select midpoints of lines, arcs
@ -106,9 +99,6 @@ feature snap
polyline edges polyline edges
allow polyline to be combined with other edges/curves allow polyline to be combined with other edges/curves
create text
ideally, in various fonts.
3-d operations 3-d operations
--------------------- ---------------------
@ -118,7 +108,6 @@ rotation/transform that return a copy
primitive creation primitive creation
Need primitive creation for: Need primitive creation for:
* cone * cone
* sphere
* cylinder * cylinder
* torus * torus
* wedge * wedge
@ -126,21 +115,6 @@ primitive creation
extrude/cut up to surface extrude/cut up to surface
allow a cut or extrude to terminate at another surface, rather than either through all or a fixed distance allow a cut or extrude to terminate at another surface, rather than either through all or a fixed distance
extrude along a path
rather than just normal to the plane. This would include
STEP import
allow embedding and importing step solids created in other tools, which
can then be further manipulated parametrically
Dome
very difficult to do otherwise
primitive boolean operations
* intersect
* union
* subtract
Algorithms Algorithms
--------------------- ---------------------