Files
cadquery/doc/apireference.rst

188 lines
3.5 KiB
ReStructuredText
Raw Normal View History

2013-04-15 21:22:54 -04:00
.. _apireference:
***********************
CadQuery API Reference
***********************
2020-06-22 08:42:16 +02:00
The CadQuery API is made up of 2 main objects:
2015-11-28 21:05:20 -05:00
2020-06-22 08:42:16 +02:00
* **Workplane** -- Wraps a topological entity and provides a 2-D modelling context.
2015-11-28 21:05:20 -05:00
* **Selector** -- Filter and select things
2013-04-23 20:33:39 -04:00
2015-11-28 21:05:20 -05:00
This page lists methods of these objects grouped by **functional area**
2013-04-15 21:22:54 -04:00
.. seealso::
This page lists api methods grouped by functional area.
Use :ref:`classreference` to see methods alphabetically by class.
Initialization
----------------
2015-12-01 22:54:36 -05:00
.. currentmodule:: cadquery
2013-04-23 20:33:39 -04:00
2013-04-15 21:22:54 -04:00
Creating new workplanes and object chains
.. autosummary::
Workplane
.. _2dOperations:
2-d Operations
-----------------
2015-11-28 21:05:20 -05:00
Creating 2-d constructs that can be used to create 3 d features.
All 2-d operations require a **Workplane** object to be created.
2013-04-15 21:22:54 -04:00
2015-12-01 22:54:36 -05:00
.. currentmodule:: cadquery
2013-04-15 21:22:54 -04:00
.. autosummary::
2015-12-01 22:54:36 -05:00
Workplane.center
2013-04-15 21:22:54 -04:00
Workplane.lineTo
Workplane.line
Workplane.vLine
Workplane.vLineTo
Workplane.hLine
Workplane.moveTo
Workplane.move
Workplane.spline
2019-06-15 16:50:54 +02:00
Workplane.parametricCurve
2013-04-15 21:22:54 -04:00
Workplane.threePointArc
2019-06-15 16:50:54 +02:00
Workplane.sagittaArc
Workplane.radiusArc
2020-06-22 08:42:16 +02:00
Workplane.tangentArcPoint
2013-04-15 21:22:54 -04:00
Workplane.rotateAndCopy
Workplane.mirrorY
Workplane.mirrorX
Workplane.wire
Workplane.rect
Workplane.circle
2020-07-12 11:50:37 +02:00
Workplane.ellipse
Workplane.ellipseArc
2013-04-15 21:22:54 -04:00
Workplane.polyline
Workplane.close
Workplane.rarray
2019-06-15 16:50:54 +02:00
Workplane.polarArray
2020-07-12 11:50:37 +02:00
Workplane.slot2D
Workplane.offset2D
2013-04-15 21:22:54 -04:00
.. _3doperations:
3-d Operations
-----------------
2015-11-28 21:05:20 -05:00
Some 3-d operations also require an active 2-d workplane, but some do not.
3-d operations that require a 2-d workplane to be active:
2013-04-15 21:22:54 -04:00
.. autosummary::
Workplane.cboreHole
Workplane.cskHole
Workplane.hole
Workplane.extrude
Workplane.cut
Workplane.cutBlind
Workplane.cutThruAll
Workplane.box
2019-06-15 16:50:54 +02:00
Workplane.sphere
2013-04-15 21:22:54 -04:00
Workplane.union
Workplane.combine
2019-06-15 16:50:54 +02:00
Workplane.intersect
Workplane.loft
Workplane.sweep
Workplane.twistExtrude
Workplane.revolve
Workplane.text
2015-11-28 21:05:20 -05:00
3-d operations that do NOT require a 2-d workplane to be active:
.. autosummary::
2020-06-22 08:42:16 +02:00
Workplane.shell
Workplane.fillet
Workplane.chamfer
Workplane.split
Workplane.rotate
Workplane.rotateAboutCenter
Workplane.translate
Workplane.mirror
2013-04-15 21:22:54 -04:00
2015-11-28 21:05:20 -05:00
File Management and Export
---------------------------------
.. autosummary::
2020-06-22 08:42:16 +02:00
Workplane.toSvg
Workplane.exportSvg
2015-11-28 21:05:20 -05:00
2013-04-15 21:22:54 -04:00
2015-12-01 22:54:36 -05:00
.. autosummary::
importers.importStep
2020-07-12 11:50:37 +02:00
importers.importDXF
2020-07-29 08:52:04 +02:00
exporters.export
2015-12-01 22:54:36 -05:00
2013-04-15 21:22:54 -04:00
Iteration Methods
------------------
Methods that allow iteration over the stack or objects
.. autosummary::
Workplane.each
Workplane.eachpoint
.. _stackMethods:
2015-11-28 21:05:20 -05:00
Stack and Selector Methods
------------------------------
2013-04-15 21:22:54 -04:00
CadQuery methods that operate on the stack
.. autosummary::
2020-06-22 08:42:16 +02:00
Workplane.all
Workplane.size
Workplane.vals
Workplane.add
Workplane.val
Workplane.first
Workplane.item
Workplane.last
Workplane.end
Workplane.vertices
Workplane.faces
Workplane.edges
Workplane.wires
Workplane.solids
Workplane.shells
Workplane.compounds
2013-04-15 21:22:54 -04:00
.. _selectors:
Selectors
------------------------
2015-11-28 21:05:20 -05:00
Objects that filter and select CAD objects. Selectors are used to select existing geometry
as a basis for futher operations.
2013-04-15 21:22:54 -04:00
2015-12-01 22:54:36 -05:00
.. currentmodule:: cadquery
2013-04-23 20:33:39 -04:00
2013-04-15 21:22:54 -04:00
.. autosummary::
2015-11-28 21:05:20 -05:00
NearestToPointSelector
BoxSelector
BaseDirSelector
ParallelDirSelector
DirectionSelector
2017-04-22 00:40:24 +02:00
DirectionNthSelector
2015-11-28 21:05:20 -05:00
PerpendicularDirSelector
TypeSelector
DirectionMinMaxSelector
BinarySelector
AndSelector
SumSelector
SubtractSelector
InverseSelector
2015-12-01 22:54:36 -05:00
StringSyntaxSelector