From 3a60c090355998ce91e886974d9fa33263af9e3a Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Sat, 16 Feb 2019 22:48:20 +0100 Subject: [PATCH 01/25] Update readme --- README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5289163d..076a3c73 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,69 @@ +# CadQuery - add logo + [![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) [![codecov](https://codecov.io/gh/CadQuery/cadquery/branch/master/graph/badge.svg)](https://codecov.io/gh/CadQuery/cadquery) +## What is CadQuery -This is an experimental CadQuery fork that uses PythonOCC instead of FreeCAD. It also has preliminary Jupyter notebook integration. +CadQuery is an intuitive, easy-to-use python module for building parametric 3D CAD models. 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. -You can try it out on linux-64, osx-64 and win-64 using conda: +PLACEHOLDER (something about OPENCASCADE and its capabilities and why is it so much better than OpenSCAD / CGAL). +### Features +* Build 3d 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 (loss-less) CAD formats like STEP in addition to STL and AMF +* Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser +* PLACEHOLDER - something about advanced modeling capbilities: fillets, extrudes, lofts + +### Why this fork + +PLACEHOLDER + +## Getting started + +It is currently possible to use CadQuery for your own projects in 4 different ways: +* using CQ editor GUI +* from a Jupyter notebook +* using a Docker image [is this still supported?] +* as a standalone library + +The easiest way to install CadQuery and its dependancies is using conda: ``` -conda install -c pythonocc -c oce -c conda-forge -c dlr-sc -c CadQuery cadquery-occ +conda install -c conda-forge -c cadquery cadquery ``` + +PLACEHOLDER - maybe mention the conda-packages repo for interested readers. + +### GUI + +PLACEHOLDER - link, install instruction, screenshot + +### Jupyter + +PLACEHOLDER - mention that CQ supports rendering in a jupyter notebook out of the box + +### Docker + +PLACEHOLDER - + +### Standalone + +PLACEHOLDER + +## Getting help + +PLACEHOLDER: link to docs and google group + +## Projects using cadquery + +I'd keep this shorter + +## License + +Apache 2.0 blabla + +## Contributing + +We need your help... From 6f6ee3f3be1d3e41a48b05fc729450b36e0dee00 Mon Sep 17 00:00:00 2001 From: Jeremy Mack Wright Date: Sun, 26 May 2019 08:13:39 -0400 Subject: [PATCH 02/25] Initial draft of new readme. --- README.md | 118 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 91 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 076a3c73..95f074b1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# CadQuery - add logo +![CadQuery logo](http://dcowden.github.io/cadquery/_static/cadquery_logo_dark.svg) +# CadQuery [![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) @@ -6,64 +7,127 @@ ## What is CadQuery -CadQuery is an intuitive, easy-to-use python module for building parametric 3D CAD models. 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. +CadQuery is an intuitive, easy-to-use Python module for building parametric 3D CAD models. 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. -PLACEHOLDER (something about OPENCASCADE and its capabilities and why is it so much better than OpenSCAD / CGAL). +CadQuery is often compared to [OpenSCAD](http://www.openscad.org/). Like OpenSCAD, CadQuery is an open-source, script based, parametric model generator. However, CadQuery stands out in many ways and has several key advantages: + + 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. CadQuery's 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 and the ability to begin with a STEP model, created in a CAD package, and then add parametric features. This is possible in OpenSCAD using STL, but STL is a lossy format. + 4. 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. CadQuery scripts can build STL, STEP, and AMF faster than OpenSCAD. ### Features -* Build 3d 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 (loss-less) CAD formats like STEP in addition to STL and AMF -* Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser -* PLACEHOLDER - something about advanced modeling capbilities: fillets, extrudes, lofts +* Build 3D models with scripts that are as close as possible to how you would describe the object to a human. +* Create parametric models that can be very easily customized by end users. +* Output high quality (loss-less) CAD formats like STEP in addition to STL and AMF. +* Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser. +* Allows creation of advanced modeling capabilities such as fillets, extrudes with taper, and lofts. ### Why this fork -PLACEHOLDER +The original version of CadQuery was built on the FreeCAD API. This was great because it allowed for fast development and easy cross-platform capability. However, we eventually started reaching the limits of the API for some advanced operations and selectors. This 2.0 version of CadQuery is based on Python-OCC, which is a Python wrapper around the OpenCASCADE kernel. This gives us a great deal more control and flexibility, at the expense of some simplicity and having to handle the cross-platform aspects of deployment ourselves. We believe this is a worthwhile trade-off to allow CadQuery to continue to grow and expand in the future. ## Getting started -It is currently possible to use CadQuery for your own projects in 4 different ways: -* using CQ editor GUI -* from a Jupyter notebook -* using a Docker image [is this still supported?] -* as a standalone library +It is currently possible to use CadQuery for your own projects in 3 different ways: +* Using the [CQ-editor GUI](https://github.com/CadQuery/CQ-editor) +* From a [Jupyter notebook](https://github.com/bernhard-42/jupyter-cadquery) +* As a standalone library -The easiest way to install CadQuery and its dependancies is using conda: +The easiest way to install CadQuery and its dependencies is using conda: ``` conda install -c conda-forge -c cadquery cadquery ``` -PLACEHOLDER - maybe mention the conda-packages repo for interested readers. +For thos who are interested, the [conda-packages repository](https://github.com/CadQuery/conda-packages) contains build information, packages and modifications for CadQuery's conda channel. -### GUI +### CQ-editor GUI -PLACEHOLDER - link, install instruction, screenshot +CQ-editor is an IDE that allows users to edit CadQuery model scripts in a GUI environment. It includes features such as: + +* A graphical debugger that allows you to step through your scripts. +* A CadQuery stack inspector. +* Export to various formats, including STEP and STL, directly from the menu. + +The installation instructions for CQ-editor can be found [here](https://github.com/CadQuery/CQ-editor#installation). + +CQ editor screenshot ### Jupyter -PLACEHOLDER - mention that CQ supports rendering in a jupyter notebook out of the box +CadQuery supports Jupyter notebook out of the box using the extension created by @bernhard-42 -### Docker +* [Installation](https://github.com/bernhard-42/jupyter-cadquery#installation) +* [Usage](https://github.com/bernhard-42/jupyter-cadquery#jupyter-cadquery) -PLACEHOLDER - +CadQuery Jupyter extension screenshot ### Standalone -PLACEHOLDER +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 +``` ## Getting help -PLACEHOLDER: link to docs and google group +You can find the full CadQuery documentation at [https://cadquery.github.io/cadquery](https://cadquery.github.io/cadquery>). -## Projects using cadquery +We also have a [Google Group](https://groups.google.com/forum/#!forum/cadquery) to make it easy to get help from other CadQuery users. We want you to feel welcome and encourage you to join the group and introduce yourself. We would also love to hear what you are doing with CadQuery. -I'd keep this shorter +## Projects using CadQuery + +Here are just a few examples of how CadQuery is being used. + +### Resin Mold for Cable Repair + +Thanks to @hyOzd ( Altu Technology ) for this example. + +![Resin mold example](https://camo.githubusercontent.com/3dcbe1b644b4b831d88e323ab5414a392d7feef0/687474703a2f2f64636f7764656e2e6769746875622e696f2f63616471756572792f5f7374617469632f68794f7a642d6361626c656669782e706e67) ![Resin mold being machined](http://dcowden.github.io/cadquery/_static/hyOzd-finished_thumb.jpg) + +### Generation of KiCAD Component Files + +Thanks to @easyw for this example from the [kicad-3d-models-in-freecad project](https://github.com/easyw/kicad-3d-models-in-freecad). + +Circuit board generated in KiCAD + +### 3D Printer Replacement Parts + +Thanks to @adam-urbanczyk for this example of a Prusa i3 extruder support. + +Prusa i3 extruder support ## License -Apache 2.0 blabla +CadQuery is licensed under the terms of the [Apache Public License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). ## Contributing -We need your help... +Contributions from the community are welcome and appreciated. + +You do not need to be a software developer to have a big impact on this project. Contributions can take many forms including, but not limited to, the following: + +* Writing and improving documentation +* Triaging bugs +* Submitting bugs and feature requests +* Creating tutorial videos and blog posts +* Helping other users get started and solve problems +* Telling others about this project +* Helping with translations and internationalization +* Helping with accessibility +* Contributing bug fixes and new features + +It is asked that all contributions to this project be made in a respectful and considerate way. Please use the [Python Community Code of Conduct's](https://www.python.org/psf/codeofconduct/) guidelines as a reference. + +### How to Report a Bug +When filing an bug report [issue](https://github.com/CadQuery/cadquery/issues), please be sure to answer these questions: + +1. What version of the software are you running? +2. What operating system are you running the software on? +3. What are the steps to reproduce the bug? + +### How to Suggest a Feature or Enhancement + +If you find yourself wishing for a feature that does not exist, you are probably not alone. There are bound to be others out there with similar needs. Open a [issue](https://github.com/CadQuery/cadquery/issues) which describes the feature you would like to see, why you need it, and how it should work. From 1d9a56edd4b417b5ab0edbc02f1d6c1c7ded8d49 Mon Sep 17 00:00:00 2001 From: Michael Greminger Date: Thu, 30 May 2019 15:33:42 -0500 Subject: [PATCH 03/25] Update cutThruAll to remove unused positive arugument Removed positive argument and clarified doc string to indicuation that cut is in both directions normal to the workplane --- cadquery/cq.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cadquery/cq.py b/cadquery/cq.py index ea1dec03..0c8a7868 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -2507,15 +2507,14 @@ class Workplane(CQ): return self.newObject([s]) - def cutThruAll(self, positive=False, clean=True, taper=0): + def cutThruAll(self, clean=True, taper=0): """ Use all un-extruded wires in the parent chain to create a prismatic cut from existing solid. + Cuts through all material in both normal directions of workplane. Similar to extrude, except that a solid in the parent chain is required to remove material from. cutThruAll always removes material from a part. - :param boolean positive: True to cut in the positive direction, false to cut in the - negative direction :param boolean clean: call :py:meth:`clean` afterwards to have a clean shape :raises: ValueError if there is no solid to subtract from in the chain :return: a CQ object with the resulting object selected From 3989643044cf9598b36e5dd639d9163d704309b1 Mon Sep 17 00:00:00 2001 From: Michael Greminger Date: Tue, 4 Jun 2019 23:18:21 -0500 Subject: [PATCH 04/25] Increase HASH_CODE_MAX Increase HASH_CODE_MAX to 2147483647 (C MAX_INT) to prevent hash collisions that result in occasional faces missing from face selector calls. Addresses issue #139. --- cadquery/occ_impl/shapes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cadquery/occ_impl/shapes.py b/cadquery/occ_impl/shapes.py index 349eef4d..c21e090a 100644 --- a/cadquery/occ_impl/shapes.py +++ b/cadquery/occ_impl/shapes.py @@ -114,7 +114,7 @@ from functools import reduce TOLERANCE = 1e-6 DEG2RAD = 2 * pi / 360. -HASH_CODE_MAX = int(1e+6) # required by OCC.Core.HashCode +HASH_CODE_MAX = 2147483647 # MAX_INT, required by OCC.Core.HashCode shape_LUT = \ {ta.TopAbs_VERTEX: 'Vertex', From 87c5ea9bd8b3e7fd5c9fbaf73df6d8c85ea45fd6 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 5 Jun 2019 19:26:19 +0200 Subject: [PATCH 05/25] StringSyntaxSelector: make -X different from +X --- cadquery/selectors.py | 4 +--- tests/TestCQSelectors.py | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cadquery/selectors.py b/cadquery/selectors.py index 1065eb6b..8ead7737 100644 --- a/cadquery/selectors.py +++ b/cadquery/selectors.py @@ -526,13 +526,11 @@ class _SimpleStringSyntaxSelector(Selector): self.operatorMinMax = { '>': True, '<': False, - '+': True, - '-': False } self.operator = { '+': DirectionSelector, - '-': DirectionSelector, + '-': lambda v: DirectionSelector(-v), '#': PerpendicularDirSelector, '|': ParallelDirSelector} diff --git a/tests/TestCQSelectors.py b/tests/TestCQSelectors.py index 48b1e3a1..d557375e 100644 --- a/tests/TestCQSelectors.py +++ b/tests/TestCQSelectors.py @@ -122,6 +122,8 @@ class TestCQSelectors(BaseTest): self.assertEqual(1, c.faces("+Y").size()) self.assertEqual(1, c.faces("-Y").size()) self.assertEqual(0, c.faces("XY").size()) + self.assertEqual(c.faces("+X").val().Center(), c.faces("X").val().Center()) + self.assertNotEqual(c.faces("+X").val().Center(), c.faces("-X").val().Center()) def testParallelPlaneFaceFilter(self): c = CQ(makeUnitCube()) From b126e51b007c8fe8b1df53507184a25512c0dc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Wed, 5 Jun 2019 19:34:14 +0200 Subject: [PATCH 06/25] Another pass on README * Changed some pictures * Minor formatting and text changes --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 95f074b1..89a0acb9 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,18 @@ CadQuery is an intuitive, easy-to-use Python module for building parametric 3D C CadQuery is often compared to [OpenSCAD](http://www.openscad.org/). Like OpenSCAD, CadQuery is an open-source, script based, parametric model generator. However, CadQuery stands out in many ways and has several key advantages: - 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. CadQuery's 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 and the ability to begin with a STEP model, created in a CAD package, and then add parametric features. This is possible in OpenSCAD using STL, but STL is a lossy format. - 4. 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. CadQuery scripts can build STL, STEP, and AMF faster than 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. CadQuery's 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 and the ability to begin with a STEP model, created in a CAD package, and then add parametric features. This is possible in OpenSCAD using STL, but STL is a lossy format. +4. 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. CadQuery scripts can build STL, STEP, and AMF faster than OpenSCAD. -### Features +### Key features * Build 3D models with scripts that are as close as possible to how you would describe the object to a human. * Create parametric models that can be very easily customized by end users. * Output high quality (loss-less) CAD formats like STEP in addition to STL and AMF. * Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser. -* Allows creation of advanced modeling capabilities such as fillets, extrudes with taper, and lofts. +* Offer advanced modeling capabilities such as fillets, curvelinear extrudes, parametric curves and lofts. ### Why this fork @@ -52,7 +52,7 @@ CQ-editor is an IDE that allows users to edit CadQuery model scripts in a GUI en The installation instructions for CQ-editor can be found [here](https://github.com/CadQuery/CQ-editor#installation). -CQ editor screenshot +CQ editor screenshot ### Jupyter @@ -93,11 +93,11 @@ Thanks to @easyw for this example from the [kicad-3d-models-in-freecad project]( Circuit board generated in KiCAD -### 3D Printer Replacement Parts +### 3D Printed Resin Mold -Thanks to @adam-urbanczyk for this example of a Prusa i3 extruder support. +Thanks to @eddieliberato for this example. -Prusa i3 extruder support +3D printed resin mold 3D printed resin mold ## License From 9aae9866ab0491a9d4bad5c57650b5a72dcd649c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Wed, 5 Jun 2019 20:22:45 +0200 Subject: [PATCH 07/25] Update documentation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89a0acb9..263b279c 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ conda install -c conda-forge -c cadquery cadquery ## Getting help -You can find the full CadQuery documentation at [https://cadquery.github.io/cadquery](https://cadquery.github.io/cadquery>). +You can find the full CadQuery documentation at [cadquery.readthedocs.io](https://cadquery.readthedocs.io/). We also have a [Google Group](https://groups.google.com/forum/#!forum/cadquery) to make it easy to get help from other CadQuery users. We want you to feel welcome and encourage you to join the group and introduce yourself. We would also love to hear what you are doing with CadQuery. From 287e60c2201f220a447162ae3a507636de82e052 Mon Sep 17 00:00:00 2001 From: Michael Greminger Date: Wed, 5 Jun 2019 14:11:17 -0500 Subject: [PATCH 08/25] Updated HASH_CODE_MAX comment Updated comment to indicate that we're basing the max hash on a 32bit signed int. --- cadquery/occ_impl/shapes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cadquery/occ_impl/shapes.py b/cadquery/occ_impl/shapes.py index c21e090a..edaf07e9 100644 --- a/cadquery/occ_impl/shapes.py +++ b/cadquery/occ_impl/shapes.py @@ -114,7 +114,7 @@ from functools import reduce TOLERANCE = 1e-6 DEG2RAD = 2 * pi / 360. -HASH_CODE_MAX = 2147483647 # MAX_INT, required by OCC.Core.HashCode +HASH_CODE_MAX = 2147483647 # max 32bit signed int, required by OCC.Core.HashCode shape_LUT = \ {ta.TopAbs_VERTEX: 'Vertex', From 6498ef9d317c56384d808d13a4c4bb53ac473177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Wed, 5 Jun 2019 21:43:54 +0200 Subject: [PATCH 09/25] Added readthedocs badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 263b279c..2676da66 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![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) [![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) ## What is CadQuery From e4c84c99e0496474c38e8933469b8ee524905eba Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Sat, 8 Jun 2019 17:21:23 +0200 Subject: [PATCH 10/25] Remove the combine arg for bool ops and get rid of side-effects --- cadquery/cq.py | 33 +++++++++------------------------ tests/TestCadQuery.py | 23 +++++++++++------------ 2 files changed, 20 insertions(+), 36 deletions(-) diff --git a/cadquery/cq.py b/cadquery/cq.py index 5cf27ed5..8e2e9233 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -2378,13 +2378,11 @@ class Workplane(CQ): return self.newObject([s]) - def union(self, toUnion=None, combine=True, clean=True): + def union(self, toUnion=None, clean=True): """ Unions all of the items on the stack of toUnion with the current solid. If there is no current solid, the items in toUnion are unioned together. - if combine=True, the result and the original are updated to point to the new object - if combine=False, the result will be on the stack, but the original is unmodified - + :param toUnion: :type toUnion: a solid object, or a CQ object having a solid, :param boolean clean: call :py:meth:`clean` afterwards to have a clean shape @@ -2409,9 +2407,8 @@ class Workplane(CQ): # now combine with existing solid, if there is one # look for parents to cut from solidRef = self.findSolid(searchStack=True, searchParents=True) - if combine and solidRef is not None: + if solidRef is not None: r = solidRef.fuse(newS) - solidRef.wrapped = newS.wrapped else: r = newS @@ -2420,13 +2417,10 @@ class Workplane(CQ): return self.newObject([r]) - def cut(self, toCut, combine=True, clean=True): + def cut(self, toCut, clean=True): """ Cuts the provided solid from the current solid, IE, perform a solid subtraction - - if combine=True, the result and the original are updated to point to the new object - if combine=False, the result will be on the stack, but the original is unmodified - + :param toCut: object to cut :type toCut: a solid object, or a CQ object having a solid, :param boolean clean: call :py:meth:`clean` afterwards to have a clean shape @@ -2451,19 +2445,13 @@ class Workplane(CQ): if clean: newS = newS.clean() - - if combine: - solidRef.wrapped = newS.wrapped - + return self.newObject([newS]) - def intersect(self, toIntersect, combine=True, clean=True): + def intersect(self, toIntersect, clean=True): """ Intersects the provided solid from the current solid. - - if combine=True, the result and the original are updated to point to the new object - if combine=False, the result will be on the stack, but the original is unmodified - + :param toIntersect: object to intersect :type toIntersect: a solid object, or a CQ object having a solid, :param boolean clean: call :py:meth:`clean` afterwards to have a clean shape @@ -2488,10 +2476,7 @@ class Workplane(CQ): newS = solidRef.intersect(solidToIntersect) if clean: newS = newS.clean() - - if combine: - solidRef.wrapped = newS.wrapped - + return self.newObject([newS]) def cutBlind(self, distanceToCut, clean=True, taper=None): diff --git a/tests/TestCadQuery.py b/tests/TestCadQuery.py index 45ddbd6b..0e70ee9c 100644 --- a/tests/TestCadQuery.py +++ b/tests/TestCadQuery.py @@ -771,9 +771,9 @@ class TestCadQuery(BaseTest): currentS = s.rect(2.0, 2.0).extrude(0.5) toCut = s.rect(1.0, 1.0).extrude(0.5) - currentS.cut(toCut.val()) + resS = currentS.cut(toCut.val()) - self.assertEqual(10, currentS.faces().size()) + self.assertEqual(10, resS.faces().size()) def testIntersect(self): """ @@ -783,15 +783,15 @@ class TestCadQuery(BaseTest): currentS = s.rect(2.0, 2.0).extrude(0.5) toIntersect = s.rect(1.0, 1.0).extrude(1) - currentS.intersect(toIntersect.val()) + resS = currentS.intersect(toIntersect.val()) - self.assertEqual(6, currentS.faces().size()) - self.assertAlmostEqual(currentS.val().Volume(),0.5) + self.assertEqual(6, resS.faces().size()) + self.assertAlmostEqual(resS.val().Volume(),0.5) - currentS.intersect(toIntersect) + resS = currentS.intersect(toIntersect) - self.assertEqual(6, currentS.faces().size()) - self.assertAlmostEqual(currentS.val().Volume(),0.5) + self.assertEqual(6, resS.faces().size()) + self.assertAlmostEqual(resS.val().Volume(),0.5) def testBoundingBox(self): """ @@ -1414,10 +1414,9 @@ class TestCadQuery(BaseTest): currentS = s.rect(2.0, 2.0).extrude(0.5) toUnion = s.rect(1.0, 1.0).extrude(1.0) - currentS.union(toUnion.val(), combine=False) - - # TODO: When unioning and combining is figured out, uncomment the following assert - # self.assertEqual(10,currentS.faces().size()) + resS = currentS.union(toUnion) + + self.assertEqual(11,resS.faces().size()) def testCombine(self): s = Workplane(Plane.XY()) From 38288b895213af0fcf900f8dfa557861dff5f38f Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Sun, 9 Jun 2019 16:41:27 +0200 Subject: [PATCH 11/25] Removed side effects in loft and split --- cadquery/cq.py | 3 --- tests/TestCadQuery.py | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cadquery/cq.py b/cadquery/cq.py index 8e2e9233..a7c7cde5 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -147,10 +147,8 @@ class CQ(object): # Put the one we are keeping on the stack, and also update the # context solidto the one we kept. if keepTop: - solid.wrapped = top.wrapped return self.newObject([top]) else: - solid.wrapped = bottom.wrapped return self.newObject([bottom]) def combineSolids(self, otherCQToCombine=None): @@ -2568,7 +2566,6 @@ class Workplane(CQ): parentSolid = self.findSolid(searchStack=False, searchParents=True) if parentSolid is not None: r = parentSolid.fuse(r) - parentSolid.wrapped = r.wrapped return self.newObject([r]) diff --git a/tests/TestCadQuery.py b/tests/TestCadQuery.py index 0e70ee9c..ed00ed79 100644 --- a/tests/TestCadQuery.py +++ b/tests/TestCadQuery.py @@ -1227,9 +1227,9 @@ class TestCadQuery(BaseTest): self.assertEqual(7, c.faces().size()) # now cut it in half sideways - c.faces(">Y").workplane(-0.5).split(keepTop=True) - self.saveModel(c) - self.assertEqual(8, c.faces().size()) + result = c.faces(">Y").workplane(-0.5).split(keepTop=True) + self.saveModel(result) + self.assertEqual(8, result.faces().size()) def testSplitKeepingBoth(self): """ From 69a0deb88428811f85e902c75a9703c39b231dfd Mon Sep 17 00:00:00 2001 From: Wes Turner <50891+westurner@users.noreply.github.com> Date: Sun, 9 Jun 2019 11:08:59 -0400 Subject: [PATCH 12/25] DOC: README.md: typos, jupyter-cadquery --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2676da66..44b7ac2f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The easiest way to install CadQuery and its dependencies is using conda: conda install -c conda-forge -c cadquery cadquery ``` -For thos 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. ### CQ-editor GUI @@ -57,7 +57,7 @@ The installation instructions for CQ-editor can be found [here](https://github.c ### Jupyter -CadQuery supports Jupyter notebook out of the box using the extension created by @bernhard-42 +CadQuery supports Jupyter notebook out of the box using the jupyter-cadquery extension created by @bernhard-42: * [Installation](https://github.com/bernhard-42/jupyter-cadquery#installation) * [Usage](https://github.com/bernhard-42/jupyter-cadquery#jupyter-cadquery) @@ -123,7 +123,7 @@ You do not need to be a software developer to have a big impact on this project. It is asked that all contributions to this project be made in a respectful and considerate way. Please use the [Python Community Code of Conduct's](https://www.python.org/psf/codeofconduct/) guidelines as a reference. ### How to Report a Bug -When filing an bug report [issue](https://github.com/CadQuery/cadquery/issues), please be sure to answer these questions: +When filing a bug report [issue](https://github.com/CadQuery/cadquery/issues), please be sure to answer these questions: 1. What version of the software are you running? 2. What operating system are you running the software on? @@ -131,4 +131,4 @@ When filing an bug report [issue](https://github.com/CadQuery/cadquery/issues), ### How to Suggest a Feature or Enhancement -If you find yourself wishing for a feature that does not exist, you are probably not alone. There are bound to be others out there with similar needs. Open a [issue](https://github.com/CadQuery/cadquery/issues) which describes the feature you would like to see, why you need it, and how it should work. +If you find yourself wishing for a feature that does not exist, you are probably not alone. There are bound to be others out there with similar needs. Open an [issue](https://github.com/CadQuery/cadquery/issues) which describes the feature you would like to see, why you need it, and how it should work. From 064e3691f2c1fc7ecb218bd4f45dc2ba3ba468c4 Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Mon, 10 Jun 2019 00:18:38 +0200 Subject: [PATCH 13/25] Initial configuration of the azure pipeline --- azure-pipelines.yml | 33 +++++++++++++++++++++++++++++++++ conda/meta.yaml | 8 ++++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..4830a8bf --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,33 @@ +trigger: + branches: + include: + - master + - refs/tags/* + +resources: + repositories: + - repository: templates + type: github + name: CadQuery/conda-packages + +jobs: +- template: conda-build.yml@templates + parameters: + name: Linux + vmImage: 'ubuntu-16.04' + py_maj: 3 + py_min: 6 + +- template: conda-build.yml@templates + parameters: + name: macOS + vmImage: 'macOS-10.13' + py_maj: 3 + py_min: 6 + +- template: conda-build.yml@templates + parameters: + name: Windows + vmImage: 'vs2017-win2016' + py_maj: 3 + py_min: 6 \ No newline at end of file diff --git a/conda/meta.yaml b/conda/meta.yaml index 93091895..36aebc5b 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,20 +1,20 @@ package: name: cadquery-occ - version: {{ environ.get('TRAVIS_TAG') }} + version: {{ environ.get('PACKAGE_VERSION') }} source: path: .. build: - string: {{ 'py'+environ.get('TRAVIS_PYTHON_VERSION')+environ.get('TRAVIS_COMMIT')[:8] }} + string: {{ 'py'+environ.get('PYTHON_VERSION')}} script: python setup.py install --single-version-externally-managed --record=record.txt requirements: build: - - python {{ environ.get('TRAVIS_PYTHON_VERSION') }} + - python {{ environ.get('PYTHON_VERSION') }} - setuptools run: - - python {{ environ.get('TRAVIS_PYTHON_VERSION') }} + - python {{ environ.get('PYTHON_VERSION') }} - oce 0.18 - pythonocc-core 0.18.2 - pyparsing 2.* From d5f8c5371e74c50164cc71469bca0f06f1c94daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Mon, 10 Jun 2019 16:48:13 +0200 Subject: [PATCH 14/25] Fix endpoint in azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4830a8bf..beb2c508 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,6 +9,7 @@ resources: - repository: templates type: github name: CadQuery/conda-packages + endpoint: CadQuery jobs: - template: conda-build.yml@templates From 03f50b5366e9db57a04c5f24094cfbe85dc28d81 Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Mon, 10 Jun 2019 17:20:16 +0200 Subject: [PATCH 15/25] Name update in the conda recipe --- conda/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 36aebc5b..f940b52a 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,5 +1,5 @@ package: - name: cadquery-occ + name: cadquery version: {{ environ.get('PACKAGE_VERSION') }} source: @@ -20,4 +20,4 @@ requirements: - pyparsing 2.* about: - summary: Experimental CadQuery fork based on PythonOCC \ No newline at end of file + summary: CadQuery fork based on PythonOCC \ No newline at end of file From 7edc7b413f7e8b4fc6e017d9b3362522479ba4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Mon, 10 Jun 2019 17:30:44 +0200 Subject: [PATCH 16/25] Do not run azure on PRs --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index beb2c508..15e25649 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,6 +4,8 @@ trigger: - master - refs/tags/* +pr: none + resources: repositories: - repository: templates From 6d3612f744bfb4d2cf8fac6fd54bb8ec735b0600 Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Mon, 10 Jun 2019 18:21:50 +0200 Subject: [PATCH 17/25] Improved the conda recipe --- conda/meta.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index f940b52a..e0acb7b4 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -15,9 +15,16 @@ requirements: - setuptools run: - python {{ environ.get('PYTHON_VERSION') }} - - oce 0.18 - - pythonocc-core 0.18.2 + - oce 0.18.* + - pythonocc-core 0.18.2* - pyparsing 2.* + +test: + source_files: + - runtests.py + - tests/ + commands: + - python runtests.py about: summary: CadQuery fork based on PythonOCC \ No newline at end of file From 99cfb9ef59c086100effad12f5c03c5d52f7b0c8 Mon Sep 17 00:00:00 2001 From: adam-urbanczyk Date: Mon, 10 Jun 2019 18:51:15 +0200 Subject: [PATCH 18/25] Fixed examples --- examples/Ex003_Pillow_Block_With_Counterbored_Holes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/Ex003_Pillow_Block_With_Counterbored_Holes.py b/examples/Ex003_Pillow_Block_With_Counterbored_Holes.py index 8abbc166..1b2be255 100644 --- a/examples/Ex003_Pillow_Block_With_Counterbored_Holes.py +++ b/examples/Ex003_Pillow_Block_With_Counterbored_Holes.py @@ -3,6 +3,7 @@ import cadquery as cq # These can be modified rather than hardcoding values for each dimension. length = 80.0 # Length of the block width = 60.0 # Width of the block +height = 100.0 # Height of the block thickness = 10.0 # Thickness of the block center_hole_dia = 22.0 # Diameter of center hole in block cbore_hole_diameter = 2.4 # Bolt shank/threads clearance hole diameter From a4cb82d1487c4f09418d473fb83b4fadaca37c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Mon, 10 Jun 2019 20:35:23 +0200 Subject: [PATCH 19/25] Use a different font for testing This is a dummy PR to investigate build issues on azure --- tests/TestCadQuery.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestCadQuery.py b/tests/TestCadQuery.py index 45ddbd6b..b5633fbf 100644 --- a/tests/TestCadQuery.py +++ b/tests/TestCadQuery.py @@ -1836,13 +1836,13 @@ class TestCadQuery(BaseTest): box = Workplane("XY" ).box(4, 4, 0.5) obj1 = box.faces('>Z').workplane()\ - .text('CQ 2.0',0.5,-.05,cut=True,halign='left',valign='bottom') + .text('CQ 2.0',0.5,-.05,cut=True,halign='left',valign='bottom', font='Sans') #combined object should have smaller volume self.assertGreater(box.val().Volume(),obj1.val().Volume()) obj2 = box.faces('>Z').workplane()\ - .text('CQ 2.0',0.5,.05,cut=False,combine=True) + .text('CQ 2.0',0.5,.05,cut=False,combine=True, font='Sans') #combined object should have bigger volume self.assertLess(box.val().Volume(),obj2.val().Volume()) @@ -1851,7 +1851,7 @@ class TestCadQuery(BaseTest): self.assertEqual(len(obj2.faces('>Z').vals()),5) obj3 = box.faces('>Z').workplane()\ - .text('CQ 2.0',0.5,.05,cut=False,combine=False,halign='right',valign='top') + .text('CQ 2.0',0.5,.05,cut=False,combine=False,halign='right',valign='top', font='Sans') #verify that the number of solids is correct self.assertEqual(len(obj3.solids().vals()),5) From d560dff39ae15dd52232c3170531fecd21dd34b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Sat, 15 Jun 2019 11:16:24 +0200 Subject: [PATCH 20/25] Update installation instructions --- doc/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installation.rst b/doc/installation.rst index 942296bf..5cc8fadc 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -16,7 +16,7 @@ Command Line Installation 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 ------------------------ From 5b5a72623e47223a88c6941af3786de64a3b7985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Sat, 15 Jun 2019 11:17:59 +0200 Subject: [PATCH 21/25] Delete README.txt --- README.txt | 125 ----------------------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 README.txt diff --git a/README.txt b/README.txt deleted file mode 100644 index a356b5b5..00000000 --- a/README.txt +++ /dev/null @@ -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 `_ ), 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. - From f719d4cdfdd91c950b8dba462af87126d1e74727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Sat, 15 Jun 2019 11:22:35 +0200 Subject: [PATCH 22/25] Updated README installation instructions --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 44b7ac2f..a9cb3f86 100644 --- a/README.md +++ b/README.md @@ -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) [![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) [![Documentation Status](https://readthedocs.org/projects/cadquery/badge/?version=latest)](https://cadquery.readthedocs.io/en/latest/?badge=latest) @@ -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. ``` -conda install -c conda-forge -c cadquery cadquery +conda install -c conda-forge -c cadquery cadquery=2 ``` ## Getting help From 71803e21325876d481a020e54c8e1fcefe558024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Sat, 15 Jun 2019 11:24:04 +0200 Subject: [PATCH 23/25] Update README again --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9cb3f86..e78e5203 100644 --- a/README.md +++ b/README.md @@ -39,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: ``` -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. From 62f2ae7e80e9ebd6176194885ce3e5e4569e5be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Sat, 15 Jun 2019 16:50:54 +0200 Subject: [PATCH 24/25] Updated API reference --- doc/apireference.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/apireference.rst b/doc/apireference.rst index 59b04c63..e83e7b93 100644 --- a/doc/apireference.rst +++ b/doc/apireference.rst @@ -50,7 +50,10 @@ All 2-d operations require a **Workplane** object to be created. Workplane.moveTo Workplane.move Workplane.spline + Workplane.parametricCurve Workplane.threePointArc + Workplane.sagittaArc + Workplane.radiusArc Workplane.rotateAndCopy Workplane.mirrorY Workplane.mirrorX @@ -60,6 +63,7 @@ All 2-d operations require a **Workplane** object to be created. Workplane.polyline Workplane.close Workplane.rarray + Workplane.polarArray .. _3doperations: @@ -79,18 +83,28 @@ Some 3-d operations also require an active 2-d workplane, but some do not. Workplane.cutBlind Workplane.cutThruAll Workplane.box + Workplane.sphere Workplane.union 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: .. autosummary:: CQ.shell CQ.fillet + CQ.chamfer CQ.split CQ.rotate CQ.rotateAboutCenter CQ.translate + CQ.mirror File Management and Export --------------------------------- From f8dc7798bf826ab9bd25dc6a54e4b8a4ec1478d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Urba=C5=84czyk?= Date: Sat, 15 Jun 2019 17:00:01 +0200 Subject: [PATCH 25/25] Removed implemented items from the roadmap --- doc/roadmap.rst | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/doc/roadmap.rst b/doc/roadmap.rst index 569e9dbf..0a07524a 100644 --- a/doc/roadmap.rst +++ b/doc/roadmap.rst @@ -83,13 +83,6 @@ construction lines mirror around centerline 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 select midpoints of lines, arcs @@ -106,9 +99,6 @@ feature snap polyline edges allow polyline to be combined with other edges/curves -create text - ideally, in various fonts. - 3-d operations --------------------- @@ -118,7 +108,6 @@ rotation/transform that return a copy primitive creation Need primitive creation for: * cone - * sphere * cylinder * torus * wedge @@ -126,21 +115,6 @@ primitive creation extrude/cut up to surface 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 ---------------------