slab() is broken
See original GitHub issueTo reproduce:
from sdf import *
f = slab()
Output:
File "example.py", line 3, in <module>
f = slab()
File "C:\Users\Brandon\Documents\GitHub\sdf\sdf\d3.py", line 49, in wrapper
return SDF3(f(*args, **kwargs))
File "C:\Users\Brandon\Documents\GitHub\sdf\sdf\d3.py", line 133, in slab
return intersection(*fs, k=k)
File "C:\Users\Brandon\Documents\GitHub\sdf\sdf\d3.py", line 54, in wrapper
return SDF3(f(*args, **kwargs))
TypeError: intersection() missing 1 required positional argument: 'a'```
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Slab Over a Damaged Slab
A.: If built on a very rough base of broken concrete, the new concrete slab would undoubtedly crack. We suggest you don't break...
Read more >Can You Repair a Damaged Concrete Slab?
Do you need to seek concrete slab repair services or would like to fix a broken slab yourself? Learn more in our handy...
Read more >Where to use Broken Slab Resident Evil Village - YouTube
Where to use Broken Slab Resident Evil Village video. Where to use Broken Slab gameplay is related to the Resident Evil Village game....
Read more >Resident Evil 8 Village How To Get Beneviento's ... - YouTube
Location of the broken slab and solution to Beneviento's treasure in RE8 Village.Get The Game Here & Support The Channel: ...
Read more >How to Replace a Broken Sidewalk Slab
Separate the section of broken slab by cutting each of the control-joint lines at the adjacent sections of the sidewalk with a jackhammer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In fact, maybe it shouldn’t be defined like a primitive at all. And instead be like an “operator” that functions on another SDF:
sphere(1).cut(z0=-0.2, z1=0.2)
There are a couple primitives that act like that (Plane and non-capped Cylinder). I’ve been differentiating them by referring to them as “non-meshable” in the comments: https://github.com/pomeroyb/sdf/blob/main/sdf/d3.py#L119
But hiding the pseudo-primitives behind a function will probably be easier for new users to understand. Something like
sphere(1).hole(radius=0.25)
for a cylinder andsphere(1).section((1,1,0)
for a plane.