Comments (11)
That would be a bug, not a feature.
from bosl.
Actually, scalar cp in negative directional halves is arguably correct. It actually matches what the documentation states. But yes, the multiple translates are silly. I can remove two translates in each half function.
from bosl.
I know it matches the documentation. But it does not make intuitive sense to me. It took me a while to realize that the documentation described this unexpected behavior. So why do it like that?
from bosl.
It’s moving the cut plane in the vector direction of the halving.
from bosl.
All the *_half()
modules share the same code with only a difference of the vector direction for the cut mask. Thus the scalar cp
is defined in terms of that vector. If your getting the bottom_half()
, the scalar cp
is moving the cut plane away from the origin towards the bottom. It seemed fully consistent to me.
from bosl.
Another way to think of it is that a positive scalar cp
always masks away more of the part being halved.
from bosl.
I could see an argument for inverting that, to make positive scalar cp
make the part larger.
To be honest, having the scalar cp
as just a shortcut for the coordinate cp
didn’t even occur to me, as the scalar implied distance instead of position, and therefore the direction would be implied by the orientation of the cut.
from bosl.
I completely understand what you have done. I just find it unnatural, and unexpected (as indicated by the length of time I took me to figure it out...even after consulting the documentation, which is not unclear). I guess I just don't feel like there is an implied direction. I don't imagine this as a translation operation but as cutting at a designated position. To me it seems like
union() { top_half(cp=A) thing(); bottom_half(cp=A) thing() }
should be the whole thing(). I don't really understand the utility of the cp=[dummy1,dummy2,z] notation. I guess if you wanted to make a cube corner or something it would be handy, but mostly it seems like extra clutter. I think I probably would have done it as top_half(z=cut_location), right_half(x=location), left_half(x=location), etc.
from bosl.
I guess it's because, in my head, it's all generalized from the half_of()
module, where cp
is an arbitrary point on the not-necessarily axis oriented cut plane. I can see merit in the x, y, or z notation, though.
from bosl.
Added x
, y
, and z
args to *_half()
modules in BOSLv1 master branch commit 8c0f979
from bosl.
Implemented in BOSL2 master branch commit a6a2ed520bbd834a02005f7a803f74e3eda636a8
from bosl.
Related Issues (20)
- [BUG] Possible version incompatibility / document compatibility HOT 2
- [BUG] Cuboid fillet is not applied evenly on all edges. HOT 4
- pitch_radius for beveled gears HOT 1
- Internal gears HOT 1
- "constants.h" ? HOT 2
- [BUG] Many warnings when using shapes.scad HOT 7
- [BUG] HOT 1
- [BUG] - involute_gears are unusable HOT 10
- [BUG] Unexpected cuboids at the ends of trapezoidal threaded rod HOT 2
- [BUG] Joiners are buggy in OpenScad 2019.05 (stable) as well as 2021.01 (AppImage) HOT 4
- Default alignment of tube - vertically not centered HOT 1
- [BUG] Documentation - Threading.scad - Inconsistent description for default value of slop HOT 1
- [BUG] Documentation - Threading.scad - not mentioning slop only becomes effective if internal=true HOT 1
- [BUG] tube - inner diameters are not perfect if id1 does not equal id2 HOT 1
- [BUG] shapes.scad doesn't build because of syntax error in StaggeredSphere HOT 5
- [BUG] cannot find trace_polyline HOT 1
- [BUG] spread(n, spacing=10) should be equivalent to spread(n, spacing=[10, 0, 0]) HOT 1
- [BUG] ydistribute is offset
- get_metric_bolt_head_height() does not take headtype into account yet
- Number do not show
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bosl.