<nomike>
I'm trying to model a new case for a massager. The old one is broken and I want to reprint it. For asking my question I create a simpler example.
<nomike>
This is my code: https://pastebin.com/9w4CMXPS. It generates a hollow shape. What I want is for the transitions between the sections to not be so sharp but smooth. I've tried to illustrate this with a pen. https://ibb.co/BjsZ5B2 It currently looks like 1 and should look like 2.
<nomike>
Is there an easy trick to achieve this, or is this something more complicated?
<nomike>
I'm not sure how to call this, so I don't really know what to google for.
<kintel>
Traditionally, the easiest way is to draw half the outline in SVG and rotate_extrude() it in OpenSCAD
<kintel>
you can also do interesting tricks using offset(), but again, that needs to be done in 2D space
<kintel>
..or finally, minkowski() {your_model(); sphere();} is often a decent trick
<kintel>
Btw., are you nomike from Vienna/Metalab?
<nomike>
Oh. Wow. Ye, I am. Long time no see. I wouldn't have recognized this. LOL
<nomike>
s/Ye/Yes/
<kintel>
heh, your IP address said Austria - how many of you can there be ;)
<JordanBrown>
InPhase just got my msys2 home set up where I think I want it, inside OneDrive (MS's cloud-mirrored sharing/backup scheme). Did what might be a routine build for me. 4m32s (not including cmake).
<JordanBrown>
So slower than on a basic local directory, but not awful.
<JordanBrown>
I may try to figure out how to put the build directory somewhere else; I don't need that mirrored to the cloud.
<kintel>
JordanBrown I haven't tried, but you could probably build from /tmp (or the equivalent under Windows)
<JordanBrown>
The theory would be to keep the source in the cloud-mirrored directory, and build the objects into some completely different directory.
<JordanBrown>
It remains to be seen whether this is really a viable scheme, since an OpenSCAD source+build directory is ~20k files and 500MB.
<JordanBrown>
I don't immediately remember whether an OpenSCAD build assumes that the build directory is inside the source directory (that is, a sibling to "src"). I've always set it up that way, but maybe it's easy to put the build directory somewhere else entirely.
<JordanBrown>
src+build is ~22k files and ~730M.
<JordanBrown>
But I have a T of cloud space...
<JordanBrown>
anyhow, bedtime
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drkow has quit [Read error: Connection reset by peer]
snaked has joined #openscad
drfff has joined #openscad
guso78k has joined #openscad
mmu_man has joined #openscad
<J24k19>
nomike if you use ±∓offset() you can round 2D shapes or polygons
<J24k19>
like this: $fa=1;$fs=.2;offset(+1)offset(-1)offset(-1)offset(+1){square(10,true);square([5,20],true);}
mmu_man has quit [Ping timeout: 256 seconds]
<J24k19>
hmm we have parent_module(idx) why does that doesn't exist in the other direction for children to get the name of children modules ?
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
lastrodamo has joined #openscad
GNUmoon2 has quit [Ping timeout: 240 seconds]
GNUmoon has joined #openscad
GNUmoon has quit [Remote host closed the connection]
SamantazFox_ is now known as SamantazFox
GNUmoon has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
arebil has joined #openscad
Guest72 has joined #openscad
Guest72 has quit [Client Quit]
mmu_man has joined #openscad
ferdna has quit [Ping timeout: 256 seconds]
<J24k19>
guso78 do you think the meassurment tool could give you the length of an edge if you double click it .. at the moment it says "distance=0" which is not much use
<J24k19>
also the measurement point markers will not vanish
little_blossom has quit [Ping timeout: 260 seconds]
<invultri>
Hiya, is there anything 'smart' I can do to insert into a sorted list? The best I can can up with is basically [each for (x:arr) if (x<=X) x, X, each for(x:arr) if (x>X) x]
<invultri>
but not sure if I can do something to make openscad 'reuse' the left and right part.
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<J24k19>
invultri you can't change an existing array so you always create a new one
<invultri>
I know, but is there a more smart way of doing it, is concat more optimal for instance.
<J24k19>
each was introduced in 2019 version i doubt it makes a big difference.
<J24k19>
insert = function (v,x,i) [for(j=[0:1:i-1]) v[j], x, for(j=[i:1:len(v)-1]) v[j]];
<invultri>
yup, the list construction is as everywhere else.
<invultri>
almost seems to make it worth to implement a binary tree since that allows the reuse of subtrees if I wanted to go that far.
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
DrGameRetired has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
fling has quit [Remote host closed the connection]
fling has joined #openscad
<DrGameRetired>
I apologize if this has been asked before. I have not been able to find the answer, likely because I am not using the correct vocabulary. Is there a size relationship between the parameters used in the code (cube(10);) and millimeters? I need to do a subtraction with a cylinder 1/8" in diameter and I want the parent object to be a certain set of
<DrGameRetired>
dimensions.
<InPhase>
DrGameRetired: OpenSCAD does not declare or utilize any units. What OpenSCAD does is use the value 10 and output the value 10 in all its output formats. Where units come into it is when you go to slice an object for printing.
<InPhase>
DrGameRetired: That said, interpreting the base unit as millimeters is an almost universal standard by this point.
<InPhase>
DrGameRetired: Sometimes people choose a different unit if they, for example, are modeling an apartment instead of a printable object.
<invultri>
I use cm actually... but I am not doing it for a 3d object to be printed atm. But basically the unit is whatever you think it is.
<InPhase>
If you are going to 3D print, then you would be foolish not to use mm as your unit definition, especially if you intend to share the result.
<DrGameRetired>
I was afraid of that. Scaling in Cura scales the hole left from the cylinder. Thanks for your advice.
<buZz>
the whole world uses 1 unit for 1 mm in 3D files
<InPhase>
DrGameRetired: Here's my helper code for making imperial units easy to work with in OpenSCAD: https://bpa.st/DMWQ
<DrGameRetired>
That gives me another idea to solve this problem. Thanks, Buzz
<InPhase>
DrGameRetired: Then you can still use mm as your unit, but you can write: in(1, 8)
<InPhase>
DrGameRetired: Or, in(1/8) both will work
<InPhase>
Oops. Sorry, in(1/8) only. I forgot how I wrote that interface.
<InPhase>
The second parameter is so you can write: in(2, 3/4) for 2 and 3/4 inches.
<DrGameRetired>
I was not concerned with converting " to mm, I can do that, but I was concerned in how to set the parameters for the parent object. But I have more information than I did earlier. What a great group!
<buZz>
:)
<InPhase>
And that ImpStr is for a proper human-readable imperial dimension output of mm outputs.
<InPhase>
s/mm outputs/mm inputs/
<DrGameRetired>
Thank you for such a thorough support response, InPhase!
<InPhase>
:)
GNUmoon has quit [Ping timeout: 240 seconds]
<InPhase>
invultri: On "reuse" there's an interesting and probably undocumented optimization when you use each during recursive construction of lists. It will actually build the list like a tree internally using embedded vectors, and then flatten it into a list only upon the first read. So if you construct a list recursively without inspecting it, it's O(N) instead of O(N^2) with a bunch of copies.
DrGameRetired has left #openscad [#openscad]
GNUmoon has joined #openscad
<invultri>
InPhase: thanks for the info
GNUmoon has quit [Ping timeout: 240 seconds]
<J24k19>
maybe mention that the export in SVG or 3MF will always be mm - only STL has no units defined
<J24k19>
Oh and SCAD crashes if you make a 2D form and render without preview
<buZz>
really?
<buZz>
doesnt crash here
<buZz>
just 'square(10);' , directly press F6
<J24k19>
i tested it 5 times .. and now after doing something else it doesn't
<buZz>
on '2021.01'
<J24k19>
was 2024
<buZz>
sounds like a bugreport :)
<InPhase>
invultri: I remember peepsalot wrote this, but I was trying to remember specifically why. But it happened during Covid lockdowns, so this was work from a parallel cognitive universe.
ferdna_ has quit [Quit: Leaving]
<J24k19>
i would but now i couldn't replicate this .. i hate those errors there is something outside SCAD that influences scad .. probably windows related
kintel has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
<teepee>
kintel: added my bank for the netcup seerver for now, hopefully they find some replacement for the virtual cards
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<teepee>
those payment processors rellay need some regulation for their shitty behavior :(
<teepee>
not that I believe it will ever happen
<cbmuser>
teepee: FOSDEM?
<teepee>
not good, spending most spare time learning sveltekit and tailwind, well, not even started on the latter
<cbmuser>
we haven't been since 2019(?) ;-(
mmu_man has joined #openscad
<cbmuser>
twice11 would be joining us
<teepee>
so we just skipped one year ;-)
<teepee>
motivation is mostly there, but it's always been a not so ideal time in the year
<teepee>
and with this years horrible start it's even worse
<cbmuser>
OK, I'll try to figure something out with twice11 alone then.
<cbmuser>
teepee: our standard hotel is still free ;-)
<cbmuser>
you should reconsider; we could go early Friday and return on Monday morning
<teepee>
I can check again, but it's not likely to work out, it's in 2 weeks, right?
<teepee>
ah, 3 weeks
<teepee>
lets call that minimal chance :)
mmu_man has quit [Ping timeout: 256 seconds]
mmu_man has joined #openscad
<cbmuser>
February 3rd and 4th
<cbmuser>
mach mal ;-)
kintel has joined #openscad
<kintel>
teepee Yeah, the card stuff is annoying. Everyone wants a legal entity backing everything these days.
<kintel>
Someone should start a foundation maintaining OSS project legal entities at scale
<teepee>
I thought open collective is some sort of legal entity
<teepee>
the annoying part is that brings the risk of more bounty source scam cases, specifically with bitcoin and such
<kintel>
yeah, they are, but someone the credit card companies only wants to issue cards to "employees" I think.
<teepee>
so the effect is probably exactly the opposite as they push the actually legal use cases into gray areas
<kintel>
It feels like a "cover your ass" policy
<teepee>
like I said, they need to be regulated to death, they behave like kings with bullshit rules they can impose while maintaining a very tight monopol, well 4-opol or so
<kintel>
yeah, problem right now is that the people regulating them is much more concerned about people with the wrong last name shopping online rather than dealing with de-facto monopolies : (
<invultri>
people regulating are most concerned with the people regulating imo
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<InPhase>
Meaning it needs to be an "OpenSCAD employee" to make purchases?
<teepee>
probably open-collective employee as they have (had?) the contract with stripe for the cards
<InPhase>
That would be very limiting.
<InPhase>
I was going to suggest the classic $1/year loophole.
<JordanBrown>
Does the $1/year loophole work if you don't want to have to do employee paperwork (e.g., in the US, W-4, W-2, employer payroll tax reports, et cetera)?
<InPhase>
Jurisdiction dependent.
<JordanBrown>
Presumably. But in the jurisdictions that we're most interested in? (Germany, Canada, US)
<InPhase>
Looks like the W-2 has a $600 threshold.
<JordanBrown>
I knew 1099 did. Didn't know W-2 did.
<JordanBrown>
For anybody who cares... continuing my MSYS2 vs OneDrive experimentation, putting the source on OneDrive and the build directory on a conventional local directory yielded exactly the same build performance as putting both on OneDrive.
<JordanBrown>
I have a friend who is familiar with creating and managing small California non-profits. I could ask her about costs and paperwork.
<JordanBrown>
I could probably get similar information for several other states through other contacts. Probably Canada, though that would be through second-level contacts. Don't think I have any tendrils that would lead to Germany.
<InPhase>
JordanBrown: I think OneDrive does one of those local cached copy approaches like DropBox, right?
<JordanBrown>
Haven't used DropBox.
<InPhase>
JordanBrown: I did use OneDrive a couple times, but a long time ago.
<JordanBrown>
But I assume it's similar.
<JordanBrown>
You create (or update) a file locally, it notices and asynchronously uploads.
<InPhase>
I've heard those systems sometimes have issues with git repositories though, if you go checking out old versions.
<JordanBrown>
Something is created elsewhere and uploaded, your local notices and shows a placeholder.
<InPhase>
So maybe do some testing of that before relying on it for exploration of checkouts and such.
<JordanBrown>
If you try to open the placeholder, it synchronously downloads the file.
<JordanBrown>
Yeah, it's clear that build environments are not their target market.
<InPhase>
I saw this cautionary note while looking for systems to synchronize all my data between systems.
<InPhase>
I'd like to be able to have two computers with all my files synchronized, but defining the correct latest copy of things can be nuanced.
<JordanBrown>
Theoretically that and backup are OneDrive's target. However, I bet that they are expecting Word docs, photos, and videos, not things where you frequently create or delete tens of thousands of files.
<InPhase>
Yeah.
<JordanBrown>
Indeed, asynchronous sync schemes introduce the possibility of conflicts.
<JordanBrown>
One hopes that they detect and report conflicts and let you resolve them.
<InPhase>
I'd also like an open source solution that I can privately host. I looked those up as a reference point though.
<InPhase>
I considered writing one, but I ALSO couldn't quite sort out how to define the correct latest copy of things even for my own purposes.
<JordanBrown>
I know how to do that part. But you probably need file system integration, and certainly do if you want download-on-demand.
<InPhase>
The best I came up with was some sort of sequentiality hash log, but some edge cases become unclear if a system goes offline.
<JordanBrown>
(One of my hobby projects for the last twenty years or so has been a convention registration system that uses N independent stations with asynchronous replication.)
fling has quit [Remote host closed the connection]
<JordanBrown>
Next experiment: source on OneDrive, build on either, is 4m19s. Everything local, 3m38s.
<JordanBrown>
git or Mercurial will do the right thing, but have the additional complexity (and storage cost) of maintaining old versions.
fling has joined #openscad
<InPhase>
A counter modality usually works if things stay online, but would have missing data if system A has 1 modification and system B has 2 before they had a chance to sync.
invultri has quit [Quit: leaving]
fling has quit [Remote host closed the connection]
fling has joined #openscad
fling has quit [Remote host closed the connection]
snaked has quit [Ping timeout: 260 seconds]
<JordanBrown>
InPhase right, which is exactly why version vectors... they let you detect that case.
<JordanBrown>
git and Mercurial are similar; they use a unique ID for each change and compare the list of changes, which is sort of like version vectors with a new replica for each change.
<JordanBrown>
Ah, and as it happens (probably not at all a coincidence) the first reference on that Wikipedia page is the people that I learned about them from.
fling has joined #openscad
epony has quit [Remote host closed the connection]
<InPhase>
JordanBrown: I missed the part about additional information being carried along to compare content. (It was phrased very subtly on that page.) But then you have the workflow problem also of what to do with a conflict.
<InPhase>
I suppose you could have some hybrid solution like take the latest for binary files, and store an ordered differential for text files. That would handle at least the majority of cases properly.
lastrodamo has quit [Quit: Leaving]
guso78k has quit [Ping timeout: 250 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
fling has quit [Remote host closed the connection]
fling has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
<JordanBrown>
A straight VV solution doesn't care what the content is, because the tracking is all in the VV. If there's a conflict, then that's your problem to resolve.
<JordanBrown>
that is, it's the user's problem to resolve.
<JordanBrown>
Presumably one would have an array of application-specific diff/merge tools, starting with "print both of them out, look at the printouts, and edit one of them until you like it.".
<JordanBrown>
You do need to tell the VV system when you resolve a conflict, because it needs to merge the two VVs and then bump the result.
<JordanBrown>
Much like the way that a git or Mercurial merge changeset works.
<JordanBrown>
If you retain history, then you can do 3-way diffs and it can be easier on the human (and more amenable to automation), but then ... you have to retain history.
<JordanBrown>
That's all *relatively* easy with file system integration, since you can have the file system bump the VV any time you make a change. Absent file system integration... harder.
<JordanBrown>
(Though: the obvious file system integration will not do well with editors that write a new file and then rename the new one into place, removing the original, because that looks like a remove and an add rather than an update.
<JordanBrown>
Two of those would be a remove-vs-remove conflict, and I suppose an add-vs-add conflict. The remove-vs-remove conflict isn't very resolvable, but I suppose the add-add conflict is.
<JordanBrown>
In my registration system each record has a unique identifier, so I never have add-add conflicts.