Fixed some CSS issues and added more information on selectors.

This commit is contained in:
Jeremy Wright 2014-07-23 00:33:34 -04:00
parent f83e62635d
commit 0abb33c6eb

View File

@ -27,10 +27,10 @@
</style> </style>
</head> </head>
<body> <body>
<div class="column"> <div class="column" style="width:475px;">
<div class="section"> <div class="section">
<h2>Documentation</h2> <h2>Documentation</h2>
<ul> <ul style="background-color:#ffffff;margin-bottom:0px;margin-top:0px;">
<li><a href="http://parametricparts.com/docs/#">ParametricParts Documentation</a></li> <li><a href="http://parametricparts.com/docs/#">ParametricParts Documentation</a></li>
<li><a href="https://github.com/dcowden/cadquery/blob/master/README.md">CadQuery Readme</a></li> <li><a href="https://github.com/dcowden/cadquery/blob/master/README.md">CadQuery Readme</a></li>
<li><a href="http://parametricparts.com/docs/examples.html#examples">CadQuery Examples</a></li> <li><a href="http://parametricparts.com/docs/examples.html#examples">CadQuery Examples</a></li>
@ -39,48 +39,46 @@
</div> </div>
<div class="section"> <div class="section">
<h2>BREP Terminology</h2><br /> <h2>BREP Terminology</h2><br />
<table> <table style="width:100%;">
<tr> <tr>
<td style="width:20px;"><strong>vertex</strong></td> <td style="width:10%;"><strong>vertex</strong></td>
<td style="width:455px;">A single point in space</td> <td style="width:90%;">A single point in space</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;"><strong>edge</strong></td> <td><strong>edge</strong></td>
<td style="width:455px;">A connection between two or more vertices along a particular path (called a curve)</td> <td>A connection between two or more vertices along a particular path (called a curve)</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;"><strong>wire</strong></td> <td><strong>wire</strong></td>
<td style="width:455px;">A collection of edges that are connected together</td> <td>A collection of edges that are connected together</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;"><strong>face</strong></td> <td><strong>face</strong></td>
<td style="width:455px;">A set of edges or wires that enclose a surface</td> <td>A set of edges or wires that enclose a surface</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;"><strong>shell</strong></td> <td><strong>shell</strong></td>
<td style="width:455px;">A collection of faces that are connected together along some of their edges</td> <td>A collection of faces that are connected together along some of their edges</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;"><strong>solid</strong></td> <td><strong>solid</strong></td>
<td style="width:455px;">A shell that has a closed interior</td> <td>A shell that has a closed interior</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;"><strong>compound</strong></td> <td><strong>compound</strong></td>
<td style="width:455px;">A collection of solids</td> <td>A collection of solids</td>
</tr> </tr>
</table> </table>
</div> </div>
<div class="section"> <div class="section">
<h2>Named Planes</h2><br /> <h2>Named Planes</h2><br />
Available named planes are as follows.<br /> Available named planes are as follows. Direction references refer to the global directions.
Direction references refer to the global<br /> <table style="width:100%;">
directions.
<table>
<tr> <tr>
<th>Name</th> <th style="width:25%;">Name</th>
<th>xDir</th> <th style="width:25%;">xDir</th>
<th>yDir</th> <th style="width:25%;">yDir</th>
<th>zDir</th> <th style="width:25%;">zDir</th>
</tr> </tr>
<tr> <tr>
<td>XY</td> <td>XY</td>
@ -139,43 +137,207 @@
</table> </table>
</div> </div>
</div> </div>
<div class="column" style="width:475px;"> <div class="column" style="width:600px;">
<div class="section">
<h2>Selector Methods</h2><br />
CadQuery selector strings allow filtering various types of object lists.
Most commonly, Edges, Faces, and Vertices are used, but all objects types can be filtered.<br />
<table style="width:100%;">
<tr>
<th style="width:40%;">Selector Method</th>
<th style="width:60%;">Description</th>
</tr>
<tr>
<td><a href="http://parametricparts.com/docs/classreference.html#cadfile.cadutils.cadquery.CQ.faces">CQ.faces(selector=None)</a></td>
<td>Select the faces of objects on the stack, optionally filtering the selection.</td>
<tr>
<td><a href="http://parametricparts.com/docs/classreference.html#cadfile.cadutils.cadquery.CQ.edges">CQ.edges(selector=None)</a></td>
<td>Select the edges of objects on the stack, optionally filtering the selection.</td>
</tr>
<tr>
<td><a href="http://parametricparts.com/docs/classreference.html#cadfile.cadutils.cadquery.CQ.vertices">CQ.vertices(selector=None)</a></td>
<td>Select the vertices of objects on the stack, optionally filtering the selection.</td>
</tr>
<tr>
<td><a href="http://parametricparts.com/docs/classreference.html#cadfile.cadutils.cadquery.CQ.solids">CQ.solids(selector=None)</a></td>
<td>Select the solids of objects on the stack, optionally filtering the selection.</td>
</tr>
<tr>
<td><a href="http://parametricparts.com/docs/classreference.html#cadfile.cadutils.cadquery.CQ.shells">CQ.shells(selector=None)</a></td>
<td>Select the shells of objects on the stack, optionally filtering the selection.</td>
</tr>
</table>
</div>
<div class="section"> <div class="section">
<h2>Selector String Modifiers</h2><br /> <h2>Selector String Modifiers</h2><br />
Selectors are a complex topic: see <a href="http://parametricparts.com/docs/selectors.html">CadQuery String Selectors</a> for more information.<br /> Selectors are a complex topic: see <a href="http://parametricparts.com/docs/selectors.html">CadQuery String Selectors</a> for more information.<br />
Axis Strings are: X, Y, Z, XY, YZ, XZ Axis Strings are: X, Y, Z, XY, YZ, XZ
<table> <table style="width:100%;">
<tr> <tr>
<th>Modifier</th> <th style="width:10%;">Modifier</th>
<th>Description</th> <th style="width:90%;">Description</th>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&#124;</td> <td>&#124;</td>
<td style="width:455px;">Parallel to (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=paralleldirselector#cadfile.cadutils.cadquery.ParallelDirSelector">ParallelDirSelector</a>). Can return multiple objects.</td> <td>Parallel to (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=paralleldirselector#cadfile.cadutils.cadquery.ParallelDirSelector">ParallelDirSelector</a>). Can return multiple objects.</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&#35;</td> <td>&#35;</td>
<td style="width:455px;">Perpendicular to (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=perpendiculardirselector#cadfile.cadutils.cadquery.PerpendicularDirSelector">PerpendicularDirSelector</a>)</td> <td>Perpendicular to (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=perpendiculardirselector#cadfile.cadutils.cadquery.PerpendicularDirSelector">PerpendicularDirSelector</a>)</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&#43;</td> <td>&#43;</td>
<td style="width:455px;">Positive direction (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionselector#cadfile.cadutils.cadquery.DirectionSelector">DirectionSelector</a>)</td> <td>Positive direction (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionselector#cadfile.cadutils.cadquery.DirectionSelector">DirectionSelector</a>)</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&#45;</td> <td>&#45;</td>
<td style="width:455px;">Negative direction (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionselector#cadfile.cadutils.cadquery.DirectionSelector">DirectionSelector</a>)</td> <td>Negative direction (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionselector#cadfile.cadutils.cadquery.DirectionSelector">DirectionSelector</a>)</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&gt;</td> <td>&gt;</td>
<td style="width:455px;">Maximize (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionminmaxselector#cadfile.cadutils.cadquery.DirectionMinMaxSelector">DirectionMinMaxSelector</a> with directionMax=True)</td> <td>Maximize (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionminmaxselector#cadfile.cadutils.cadquery.DirectionMinMaxSelector">DirectionMinMaxSelector</a> with directionMax=True)</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&lt;</td> <td>&lt;</td>
<td style="width:455px;">Minimize (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionminmaxselector#cadfile.cadutils.cadquery.DirectionMinMaxSelector">DirectionMinMaxSelector</a> with directionMax=False)</td> <td>Minimize (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=directionminmaxselector#cadfile.cadutils.cadquery.DirectionMinMaxSelector">DirectionMinMaxSelector</a> with directionMax=False)</td>
</tr> </tr>
<tr> <tr>
<td style="width:20px;">&#37;</td> <td>&#37;</td>
<td style="width:455px;">Curve/surface type (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=typeselector#cadfile.cadutils.cadquery.TypeSelector">TypeSelector</a>)</td> <td>Curve/surface type (same as <a href="http://parametricparts.com/docs/classreference.html?highlight=typeselector#cadfile.cadutils.cadquery.TypeSelector">TypeSelector</a>)</td>
</tr>
</table>
</div>
<div class="section">
<h2>Examples of Filtering Faces</h2><br />
All types of filters work on faces. In most cases, the selector refers to the direction of the normal vector of the face.
If a face is not planar, selectors are evaluated at the center of mass of the face. This can lead to results that are quite unexpected.
<table style="width:100%;">
<tr>
<th style="width:10%;">Selector</th>
<th style="width:40%;">Selector Class</th>
<th style="width:40%;">Selects</th>
<th style="width:10%;"># Objects Returned</th>
</tr>
<tr>
<td>&#43;Z</td>
<td>DirectionSelector</td>
<td>Faces with normal in +z direction</td>
<td>0 or 1</td>
</tr>
<tr>
<td>&#124;Z</td>
<td>ParallelDirSelector</td>
<td>Faces parallel to xy plane</td>
<td>0..many</td>
</tr>
<tr>
<td>&#45;X</td>
<td>DirectionSelector</td>
<td>Faces with normal in neg x direction</td>
<td>0..many</td>
</tr>
<tr>
<td>&#35;Z</td>
<td>PerpendicularDirSelector</td>
<td>Faces perpendicular to z direction</td>
<td>0..many</td>
</tr>
<tr>
<td>&#37;Plane</td>
<td>TypeSelector</td>
<td>Faces of type plane</td>
<td>0..many</td>
</tr>
<tr>
<td>&gt;Y</td>
<td>DirectionMinMaxSelector</td>
<td>Face farthest in the positive y dir</td>
<td>0 or 1</td>
</tr>
<tr>
<td>&lt;Y</td>
<td>DirectionMinMaxSelector</td>
<td>Face farthest in the negative y dir</td>
<td>0 or 1</td>
</tr>
</table>
</div>
<div class="section">
<h2>Examples of Filtering Edges</h2><br />
Some filter types are not supported for edges. The selector usually refers to the direction of the edge.
Non-linear edges are not selected for any selectors except type (%). Non-linear edges are never returned when these filters are applied.
<table style="width:100%;">
<tr>
<th style="width:10%;">Selector</th>
<th style="width:40%;">Selector Class</th>
<th style="width:40%;">Selects</th>
<th style="width:10%;"># Objects Returned</th>
</tr>
<tr>
<td>&#43;Z</td>
<td>DirectionSelector</td>
<td>Edges aligned in the Z direction</td>
<td>0..many</td>
</tr>
<tr>
<td>&#124;Z</td>
<td>ParallelDirSelector</td>
<td>Edges parallel to z direction</td>
<td>0..many</td>
</tr>
<tr>
<td>&#45;X</td>
<td>DirectionSelector</td>
<td>Edges aligned in neg x direction</td>
<td>0..many</td>
</tr>
<tr>
<td>&#35;Z</td>
<td>PerpendicularDirSelector</td>
<td>Edges perpendicular to z direction</td>
<td>0..many</td>
</tr>
<tr>
<td>&#37;Plane</td>
<td>TypeSelector</td>
<td>Edges type line</td>
<td>0..many</td>
</tr>
<tr>
<td>&gt;Y</td>
<td>DirectionMinMaxSelector</td>
<td>Edges farthest in the positive y dir</td>
<td>0 or 1</td>
</tr>
<tr>
<td>&lt;Y</td>
<td>DirectionMinMaxSelector</td>
<td>Edges farthest in the negative y dir</td>
<td>0 or 1</td>
</tr>
</table>
</div>
<div class="section">
<h2>Examples of Filtering Vertices</h2><br />
Only a few of the filter types apply to vertices. The location of the vertex is the subject of the filter.
<table style="width:100%;">
<tr>
<th style="width:10%;">Selector</th>
<th style="width:40%;">Selector Class</th>
<th style="width:40%;">Selects</th>
<th style="width:10%;"># Objects Returned</th>
</tr>
<tr>
<td>&gt;Y</td>
<td>DirectionMinMaxSelector</td>
<td>Vertices farthest in the positive y dir</td>
<td>0 or 1</td>
</tr>
<tr>
<td>&lt;Y</td>
<td>DirectionMinMaxSelector</td>
<td>Vertices farthest in the negative y dir</td>
<td>0 or 1</td>
</tr> </tr>
</table> </table>
</div> </div>