<Guest59>
Hi. Can linear_extrude be Used to create a Prisma with bottom and top face equal and parallel, but Offset in x/y ?
Guest59 has quit [Quit: Client closed]
misterfish has quit [Ping timeout: 272 seconds]
Guest59 has joined #openscad
Guest59 has quit [Client Quit]
snaked has quit [Quit: Leaving]
<InPhase>
Hard to answer when you disconnnect so fast, Guest.
L29Ah has joined #openscad
<guso78>
I Like the Challenge. Believe only Option Is to use polyhedron or to Code an extra linear_extrude Parameter
<InPhase>
guso78: multmatrix will do it. Also scale will do it with extrude if you translate appropriately first. linear_extrude(height=10, scale=0.3) translate([0,-5,0]) square(10);
<InPhase>
scale targets the z axis line, so you just put the z-axis line where you want it. :)
mmu_man has quit [Ping timeout: 245 seconds]
qeed has joined #openscad
mmu_man has joined #openscad
qeed_ has quit [Ping timeout: 272 seconds]
qeed_ has joined #openscad
qeed has quit [Ping timeout: 272 seconds]
ente has quit [Remote host closed the connection]
guso80 has joined #openscad
<guso80>
thanks InPhase, now i realize how multimatrix is useful. previsouly i just accepted that its there;)
<guso80>
however i dont believe in the scale solution as the top plate will probably have different dimensions with that
<InPhase>
guso78: I expanded the multmatrix section of the manual in 2020 to try to highlight better the range of things it is good for. In particular the skew operations are uniquely achievable by that. And also to emphasize its utility with compositions of transformations.
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
<InPhase>
guso78: And yeah, that will only work if that's what's really desired. Although you can cheat a little bit. e.g. translate([-1000,0,0]) linear_extrude(height=5, scale=0.995) translate([1000,0,0]) square(10, center=true);
<InPhase>
guso78: It is typically much better to use the multmatrix approaches though when you get to that point. The preview system can get a littly wonky with those large translation tricks.
mmu_man has quit [Ping timeout: 250 seconds]
<InPhase>
And full 3D skews, those are only multmatrix. $fa=1; $fs=0.4; multmatrix([[1,0,-0.9,0],[0,1,0,0],[0,0,1,0]]) sphere(10);
<guso80>
yes, my actual application looks like that:
<enthdegree>
i could just use linear_extrude but then id have a ton of tangents
<InPhase>
enthdegree: See the 2022 calendar link there, and look in the top middle.
<InPhase>
enthdegree: That's one solution to this problem.
<enthdegree>
thank you!
<InPhase>
enthdegree: Here if you scroll down to the photo you will see another solution to this problem, demonstrated with the curvy train track: https://github.com/rcolyer/closepoints
<InPhase>
That one is in the demo_roller_coaster files.
<InPhase>
Note CloseLoop vs ClosePoints to have a complete loop or a non-looping path.
misterfish has joined #openscad
guso80 has quit [Quit: Client closed]
TheCoffeMaker has quit [Ping timeout: 246 seconds]
<gimzmoe>
I'm trying to carve up an imported .stl and sometimes get "WARNING: No top level geometry to render " when I try to difference a shape ... any ideas what I'm doing wrong?
<guso78_21>
teepee, when changing to indexed openscad and if some tests output the triangles in another order, is it ok to update the expected file when the number is the same and visually(thowntogether) checking the result ?
<guso78_21>
gimzmoe, very likely the stl is not manifold. this is why cgal routines have problems with it.
<guso78_21>
generally: would it be hard to code a function, which checks manifoldness of stl(At least to some degree) ?
<InPhase>
gimzmoe: Perhaps you are differencing in a manner such that you are left with nothing.
<InPhase>
gimzmoe: Or, you are doing a difference on an imported stl that is not actually manifold to start with, and therefore it is impossible to calculate the difference and therefore it is removed due to the error!
<InPhase>
gimzmoe: One check that sometimes reveals this, is that you can sometimes just do a union of your imported stl with a cube(1); If that ALSO results in the imported stl disappearing, then you know it is not manifold. In that case you either need to repair the imported stl, select a different one, or abandon that approach and solve your problem a different way.
<InPhase>
gimzmoe: Non-manifold means that an stl does not obey standards for a set of triangles defining a closed volume, usually because it has self-intersections, or part of it is inside out, or other such problems, many of which can be invisible in a casual inspection.
<gimzmoe>
this manifold thing is probably it. can I fix it?
<InPhase>
gimzmoe: Maybe. Sometimes people get a successful repair with meshlab.
<gimzmoe>
it will render the stl without manipulation though...
<InPhase>
gimzmoe: Yes, because it is basically ignoring it and just passing it along as output.
<othx>
guso78_ linked to "Trefoil Knot by gigl" on thingiverse => 1 IRC mentions
<guso78_>
this was created with openscad*
<guso78_>
(use the stl)
misterfish has quit [Ping timeout: 272 seconds]
mmu_man has joined #openscad
<guso78_>
src/io/import_3fmf.cc is speciallyd coded for NOT API2 ? i have API2 by default. whats the story behind ?
guso62 has quit [Ping timeout: 246 seconds]
qeed__ has joined #openscad
qeed_ has quit [Ping timeout: 245 seconds]
<teepee>
guso78_: no story
kintel has joined #openscad
<kintel>
guso78 Did a quick review of your indexed polyset PR. I'm taking off again soon, so I'm unlikely to see this through until mid-August..
<teepee>
kintel: I'll have another look, but I tend to go merge the gsoc PR, should be easier for next steps
<kintel>
sounds good!
<teepee>
also if you come to europe, bring desert gear ;-)
<guso78_>
kintel, wish you nice journey!
<guso78_>
yep, to every other PR than indexed makes more sense at the moment :')
<teepee>
next I'd look at the python stuff :)
<kintel>
guso78_ Nevertheless, if you have time to think about PolySetBuilder vs. PolySet as separate components, I think that could be much nicer design
<kintel>
I think it's coming back to me know why I keep giving up on that refactoring :)
<guso78_>
yeahh, sounds great! I noticed the menu "revoke all python" permissions in the menu in the latest dev snapshot, but i could not evalate python file to find out, its not completely inside. strange ...
<guso78_>
@kintel, yeah, i will take another look in PolySetBuilder. I believe Builder is a very common concept in programming, but i am not very used to it. is there any information/tutorial in the internet ?
<kintel>
Heh, I don't know - there are probably too many tutorials.
<kintel>
Perhaps search for "
<kintel>
"builder design patterns
<guso78_>
@kitnel, i wil find any of them and try to apply the conecpt to PolySetVBuilder.
<guso78_>
yep ,message taken
<teepee>
I suppose the main idea is that the builder gets private access to the data so it can create objects that then are basically read-only
<guso78_>
yeahh, there are lots of hits
<kintel>
The main idea is to keep the unordered map used to track vertex->index in a temporary component which eventually emits a PolySet
<kintel>
-> that will keep the storage used in PolySet to only store the necessary data
<kintel>
Combined with C++ move semantics, it can be done very efficiently in modern C++
<guso78_>
ahh, you found my unordered_map! Its one of my basic building blocks!
<guso78_>
@teepee, i think i will not get many additional problems, when making most of the fields in PolySet ro. lets see
<guso78_>
right now polygons field in the main openscad branch is public, because all openscad "reserves" on it :')
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kintel has joined #openscad
<kintel>
guso78 Yeah, PolySet is one of the worst designed components in OpenSCAD : /
kintel has quit [Client Quit]
mmu_man has quit [Ping timeout: 246 seconds]
<enthdegree>
i have a list of lists. is tehre an easy way to concatenate them all?
<enthdegree>
oh, flatten i guess
<enthdegree>
only does one step of flattening
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
mmu_man has joined #openscad
<InPhase>
enthdegree: The roller coaster example I linked to you is the zero-burrs method.
<InPhase>
enthdegree: I wrote that module specifically to do these kinds of shapes with no defects or imperfections in the resulting model.
<enthdegree>
InPhase: thanks i didnt think deeply enough about your ClosePoints routine.
<enthdegree>
is it general enough to create any solid bound by a polyhedron? (I am not a geometer, not sure if theres a more precise definition here)
<enthdegree>
like, it's not obvious to me what the natural way to get a polyhedron is from a handful of loops... is each loop a face?
rawgreaze has quit [Ping timeout: 260 seconds]
<enthdegree>
i will try some examples
<enthdegree>
Excellent, I understand how to use ClosePoints now. Thank you for making this public