-
Notifications
You must be signed in to change notification settings - Fork 17
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
Non normal extrusion #83
Conversation
…gy/paramak into non_normal_extrusion
Codecov Report
@@ Coverage Diff @@
## develop #83 +/- ##
========================================
Coverage 97.90% 97.91%
========================================
Files 75 75
Lines 4871 4886 +15
========================================
+ Hits 4769 4784 +15
Misses 102 102
Continue to review full report at Codecov.
|
Looks like the RTD failed due to "Command killed due to excessive memory consumption" which can happen when several are building at the same time. I've relaunched the build |
Thanks @RemDelaporteMathurin ! I'll take a look, but from a first skim, it's not obvious whether or not the 2-D shape is formed on a plane normal to the extrusion vector, or if it is formed on the workplane and extruded in a direction that is not parallel to that normal? |
I'm going to tag @connoramoreno to take a look, as well |
The 2D shape is formed on the workplane, and then extruded in the given direction (which is not necessarily normal to the workplane). |
Without actually testing it myself, it sounds like it's not quite what we were thinking. What we had in mind is to have the 2D shape normal to the extrusion vector (essentially a rotation of of the shape from the workplane normal to the extrusion vector). This can be done via a rotation axis and azimuthal placement angle now, but is somewhat cumbersome and requires some math to be done by the user. Although, this seems like a useful feature as well. |
Yes I think I understand now what you were looking for. Instead, it is more straightforward to create a workplane that is correctly oriented and then extrude the 2D shape in the normal direction. I implemented this in PR #84. This is not merged yet because of some compatibility issues with jupyter-cadquery. However, using the branch workplane_accepts_cq_plane should do the trick. |
What do you think, is this PR still needed now that #84 has been merged |
@shimwell I think this can be closed since I don't see yet how this feature could be useful. It isn't too complicated to re-implement should we ever need it in the future |
Proposed changes
This PR fixes #81. Thanks @gonuke for suggesting this feature!
Users can now provide an extrusion direction (via a vector) for all the Extrude shapes (
ExtrudeMixedShape
,ExtrudeStraightShape
,ExtrudeCircleShape
,ExtrudeSplineShape
).The norm of the vector will be ignored since its normalised internally.
Usage
Produces:
![image](https://user-images.githubusercontent.com/40028739/133065264-805881df-6850-46ef-8a47-a07a39959aba.png)
Default behaviour:
![image](https://user-images.githubusercontent.com/40028739/133065427-45c1863b-024d-442a-b2ee-946f0e0707e9.png)
Types of changes
What types of changes does your code introduce to the Paramak?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.