Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Updating documentation regarding extended selector syntax #181

Merged
merged 4 commits into from
Apr 23, 2017

Conversation

adam-urbanczyk
Copy link
Contributor

Related to #179. Do not merge yet.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.585% when pulling 4460e39 on adam-urbanczyk:master into 152da20 on dcowden:master.

@adam-urbanczyk
Copy link
Contributor Author

@dcowden @jmwright I am done for now. I added some examples to the selectors section, cleaned it and removed the finished items from the roadmap section.

Could you check if it looks good and makes sense?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.585% when pulling a1a533b on adam-urbanczyk:master into 152da20 on dcowden:master.

! or not to invert logic, such as "!(>Z)" to select faces _other_ than the most z facing

closest to point
support faces, points, or edges closest to a provided point
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a NearestToPoint selector already. Does the current one not fit our needs? https://dcowden.github.io/cadquery/classreference.html?highlight=nearest#cadquery.NearestToPointSelector

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was the rationale for removing it from the roadmap (i.e. AFAIK it is there already).

%Plane Faces of type plane :py:class:`cadquery.TypeSelector` 0..many
>Y Face farthest in the positive y dir :py:class:`cadquery.DirectionMinMaxSelector` 0..many
<Y Face farthest in the negative y dir :py:class:`cadquery.DirectionMinMaxSelector` 0..many
>Y[-2] 2nd Face farthest in the positive y dir :py:class:`cadquery.DirectionMinMaxSelector` 0..many
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index on this would be -2 instead of 2? I had assumed that since you're selecting the farthest in the direction, the index would always be positive unless you're wrapping around to the beginning of the collection.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is how I implemented it. So: >Y[-1] is equivalent to >Y

My mental picture was >Y is equivalent to sorting, and then the highest element is last.


box = cadquery.Workplane("XY").box(10,10,10)
.. cq_plot::
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cq_plot is probably something that @dcowden added during the documentation refactor, but I'm not sure what it is. It shows up in the rendered documentation for me as cq_plot still.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cadquery.cq_directive embeds an image of the rendered cq code in the final doc. This is how it renders for me

cq_directive

@jmwright
Copy link
Collaborator

@adam-urbanczyk I tried adding inline comments for the first time, hopefully that works out ok. Thanks for doing this. I think the changes look great, I just had a few questions.

@jmwright
Copy link
Collaborator

Thanks @adam-urbanczyk

I think this looks good and is ready to merge. Thanks for doing this documentation.

@jmwright jmwright merged commit 526d2dd into dcowden:master Apr 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants