-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc/primer: added introspective example #821
Conversation
Codecov Report
@@ Coverage Diff @@
## master #821 +/- ##
==========================================
- Coverage 95.17% 95.15% -0.02%
==========================================
Files 32 32
Lines 7436 7489 +53
Branches 797 798 +1
==========================================
+ Hits 7077 7126 +49
- Misses 221 224 +3
- Partials 138 139 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @marcus7070 , thanks for writing it. It would be cool if we could somehow give users the ability to use the patched string representations you created to get more information on their chain and modelling context. Maybe even a way to print out the entire stack so they can trace what's happening. I know that CQ-editor already has this covered pretty well, but being able to print the results of each call in the way you have presented could very illuminating for people who are only using the core library.
Thanks @jmwright.
I'm actually a big fan of just cutting and pasting that bit of code into a user's CQ script. It's reliable and easy, even if it looks a bit ugly.
That's an interesting idea. It would be a better fit for the fluent api (rather than stopping at every step to call print, which was easier for an example in the docs but is horrible for a user). Sounds like it would be a good fit for the cadquery-plugins repo. |
@marcus7070 |
doc/primer.rst
Outdated
associating the string name given by the :meth:`~cadquery.Workplane.tag` method to the | ||
:class:`~cadquery.Workplane`. Methods such as :meth:`~cadquery.Workplane.workplaneFromTagged` and | ||
selection methods like :meth:`~cadquery.Workplane.edges` can operate on a tagged | ||
:class:`~cadquery.Workplane`. Note that the :meth:`~cadquery.Workplane.tag` method is unusual for a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the "Note", Maybe adding an example here would make it more clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marcus7070 from the questions that have been asked in the discord I feel that a lot of them would be resolved by the reading of this part of the docs !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3c43519 is aimed at making this more clear, does it help?
It's not limited to this PR, you can recreate the same dissapearing line with this example: https://cadquery.readthedocs.io/en/latest/examples.html#mirroring-from-faces I think it's just how VTK renders edges; if the two adjacent faces have the same brightness then the edge isn't visible. We don't explicitly ask VTK to render edges, so... not a bug, I guess? There might be something we can do about it though, VTK has a lot of options. |
Looks good @marcus7070 ! Is it ready for merging? |
Please read the Read The Docs preview before reading the text diff. The text diff is a bit difficult to read since I used a lot of Sphinx's roles to provide both automatic links to autodocs and formatting. I really like the role formatting since I find it confusing sometimes if text refers to the concept of a workplane or the class
Workplane
(same for solids, faces, edges, planes, objects/Workplane.objects
).