Nabble has removed Mailing-list integration.
Posts created here DO NOT GET SENT TO THE MAILING LIST.
Mailing-list emails DO NOT GET POSTED TO THE FORUM.
So basically the Forum is now out of date, we are looking into migrating the history.
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
If it's going to be a sharp bend, I'd use some logic to cut it apart along
the green lines (make two objects which covers the bits to bend, then do an intersection to get the bendy bits, and a difference to get the rest). Then, just use rotate and union to put it together again, with bends in place. I don't think there's an easier way, there is not "bend along this line" command. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
CONTENTS DELETED
The author has deleted this message.
|
Are you willing to share the dxf?
-- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by Buk
I played with your project a little bit and came up with the picture below.
I traced over your picture in AutoCad and created three separate DXF files, one for the main section and one for each "TAB". Then it is just a matter of bringing them into OpenSCAD, extruding them and then rotating and translating the TABs so they fit together. Not a nice smooth bend, but that could be done. <http://forum.openscad.org/file/t1309/bend.jpg> -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
I think we all agree that openscad current lacks an expressive API for this kind of work. I would love to be able to "bend sheets of metal" on openscad as well, preferably using a piece of code that makes it obvious what's going on rather than nasty hacks. 2018-05-08 10:57 GMT+00:00 cbernhardt <[hidden email]>: I played with your project a little bit and came up with the picture below. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
Felipe Sanches wrote
> I think we all agree that openscad current lacks an expressive API for > this > kind of work. I would love to be able to "bend sheets of metal" on > openscad > as well, preferably using a piece of code that makes it obvious what's > going on rather than nasty hacks. I think you would need to work with actual "sheets" (2D geometry) and have the bend command turn it into a bent 3D shape, where you would provide the sheet thickness, bending line, bending angle, bending radius and (if you really want to do it professionally) the distance to the neutral axis (which is approximately at half the sheet thickness from the inside, but not exactly. My career as a draftsman started with a CAD program called CADAM, which had this feature, but produced the results as a 2D view, as it was a "2.5D" program. Even so, you would probably have to cut the 2D shape up into pieces if you want it to have more than one bend or if you want some parts along the bending line to remain straight. You can the "union" these pieces together after bending. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
I've implemented bending in Curv as a non-affine coordinate transformation. It isn't restricted to sheets.bending a cylinder along its length is impossible without adding triangles. which could be called by OpenSCAD. Maybe OpenCascade supports bends? If OpenSCAD allowed you to query the triangle mesh of a shape, from within the language, then a bend operator could be written in OpenSCAD itself. On 8 May 2018 at 08:13, MathLover <[hidden email]> wrote: Felipe Sanches wrote _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
On 08. mai 2018 18:35, doug moen wrote:
> Maybe OpenCascade supports bends? It does not, it is a b-rep CAD model. > If OpenSCAD allowed you to query the triangle mesh of a shape, from > within the language, then a bend operator could be written in OpenSCAD itself. Yes, but to do it, a couple of things in addition are required 1) a sufficiently dense triangle mesh. By default programs like OpenSCAD will not create meshes that are immediately suitable for such bending because there are usually too few triangles/vertices in the bend area. You often have to re-mesh the model to make it sufficiently dense. 2) ability to transform the existing coordinates of a model. As you cannot query or modify a model if is out of the question to do it from within OpenSCAD. However, I have played with similar ideas in my AngelCAD software, code example at https://gist.github.com/arnholm/fadb3e6c7e38983643377569ca94d0b9 In this case the starting point is a straight pipe that could have been made by OpenSCAD. The model is then re-meshed in another program to create a much denser mesh. Finally the dense mesh pipe is imported and "bent" 90 degrees by transforming the polyhedron coordinates in the bend area. Of course this particular model could have been created in OpenSCAD using conventional methods, but it illustrates the general principle of "bending" as was asked by the original poster. Carsten Arnholm _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
Facing problems like this, we always end up in more or less the same feature
request. If there was a built-in import() *function*, we could write mypolygon = import( "TA5[1-layer].dxf" ); and get a list of list of 2D-points in the case of a dxf. Then everything can be handled in OpenSCAD more or less straight forward. Remeshing, mapping into 3D, and bending extruding. In a more general approach we can write our libs for discriminating positive and negative volumes, applying non-affine transformations and much more. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
On 05/08/2018 11:31 PM, Parkinbot wrote:
> Facing problems like this, we always end up in more or less > the same feature request. > Indeed. But always it's also completely ignored that there is also an option to implement things in the OpenSCAD application. ciao, Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
|
What do you mean? Define the thing in OpenSCAD firsthand? Reinventing the
wheel is not always an option. tp3 wrote > Indeed. But always it's also completely ignored that there is > also an option to implement things in the OpenSCAD application. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
On 05/09/2018 12:36 PM, Parkinbot wrote:
> What do you mean? Define the thing in OpenSCAD firsthand > Reinventing the wheel is not always an option. > Hm? I'm not sure I understand the question and what wheel we are talking about. What I mean is, that for example Doug said it would work if there was support for non-affine transformations. Right now CGAL does not seem to support the full range of possible transformation matrices but it still might be possible to implement this in OpenSCAD for the generic multmatrix() module. So while that not solves the "I want access to the vertex data" it would still allow the original problem to be solved. And there's probably a lot of similar topics too, like re-meshing / subdivision, linear_extrude with offset... ciao, Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
|
In reply to this post by Parkinbot
On 08/05/18 22:31, Parkinbot wrote:
mypolygon = import( "TA5[1-layer].dxf" ); and get a list of list of 2D-points in the case of a dxf. I love OpenSCAD but it's a bit "black and white" in that either you can do it easily with built ins or you have to use point/polygon/polyhedron data, matrix/splines/etc transforms, and fire pretty much finished geometry into the "backend". If doing the latter, there are better packages around, and TBH adding all the required bending, smoothing and filleting to OpenSCAD is a larger job than I can ever see happening. I can foresee a time when I create all geometry in (probably) Python and use OpenSCAD for binary ops (slicing for printing) which would be a shame. No criticism of the devs, who've created something wonderful that I use daily, but it's hard to see an easy way to get OpenSCAD to the "next level".
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by tp3
I don't see built-in non-affine transformations ever coming up in OpenSCAD -
just like there will be never a build-in sweep(). The implications for this kind of operations are too large. Every second transformed object will throw a CGAL exception, because people who don't know what they do will use it and complain. For me this is typical library stuff. In contrast it would be so much easier to implement vertex access for import, see what people will (and can) do with it, and then decide what of this extra functionality can be brought into the App. -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by Gadgetmind
@Gadgetmind said: it's hard to see an easy way to get OpenSCAD to the "next level". The single "easy" thing we could do that would add the most value is to add the ability to query a shape and get back information like the bounding box, the triangle mesh. Then users could implement their own geometric operators, without the dev team and knowledge of C++ being the bottle neck for new geometric primitives. Then there are also "hard" things we could do. A few years ago, there was discussion on the mailing list about extending OpenSCAD to support implicit functions and signed distance fields, which is a different representation than triangle meshes, and which is much more powerful for certain applications. For example, you can implement operations like bending, smoothing and filleting in not very much code. There was an OpenSCAD clone called ImplicitCAD from 2011 that people were referencing, which uses implicit functions to represent geometry. So I started to investigate this. Originally my idea was to extend OpenSCAD with this new geometry representation. Eventually, I realized that creating a hybrid geometry engine that supports both triangle meshes and implicit functions was going to be too much work, so I scaled back to just focus on signed distance fields. So anyway, the technology works. I'm using Curv for my own 3D printing projects now. I use the bending, smoothing and filleting a lot. It's not backward compatible with OpenSCAD though, because again, I investigated that, and it was going to be way too much work. One reason is that you end up using a different programming style than OpenSCAD. You defined models using an exact mathematical representation. You can apply transformations like twist and bend, and the output is still an exact mathematical representation, you don't need to worry about where do the triangles go when you bend a cylinder. You just need to know math, like how to map from cartesian to polar coordinates (for a bend). That's what makes this representation easier to program with than triangle meshes. Triangles don't appear until the last step, when you export the model as an STL file. At that point, complicated algorithms written by experts must be used to fit triangles to your shape. But this complicated code is quite localized: knowledge about how to construct triangle meshes doesn't leak into every new primitive that you add to the library. So that's my personal answer to the question of how do you implement fancy geometric operations like twist, bend, fillet and smooth. So can this technology be added to OpenSCAD? It should be possible. Somebody could design a hybrid geometry engine that supports both triangle meshes and signed distance fields, and that converts between the two representations as necessary. I know of one other modelling tool that does this called IceSL, however it is not open source, so you can't look at the code to see how they did it. At this point, I use Curv to create models (I'm more focussed on things like generative design and fractals, than on CAD). I use Curv to create the initial mesh, then I use tools like MeshLab and OpenSCAD to process the mesh for 3D printing. Curv has boolean operations, but it does not perform exact boolean operations on meshes: that's where OpenSCAD really shines. On 9 May 2018 at 13:33, Gadgetmind <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by Gadgetmind
On 05/09/2018 07:33 PM, Gadgetmind wrote:
> No criticism of the devs, who've created something wonderful > that I use daily, but it's hard to see an easy way to get > OpenSCAD to the "next level". > I can see lots of opportunities, like there is an still incomplete pull request for linear_extrude() with offset. Now let's just image we can give that offset parameter a function as value. I believe that could open quite some possibilities even if it's not quite a general extrusion along an arbitrary 3d path. ciao, Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
|
Just print it flat, heat it in an oven, and bend it as desired. Makes for a much stronger part, too.2018-05-09 21:22 GMT+02:00 Torsten Paul <[hidden email]>: On 05/09/2018 07:33 PM, Gadgetmind wrote: _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by Buk
I worked up a very simple hack for this --- basically cut the object up using
intersections and add a cylinder at the bend point to simulate the material stretch: https://community.carbide3d.com/t/design-into-3d-boxes-coopered-boxes/20154/45 (in a future iteration I'll add an offset intersection to test for interference) William -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by Parkinbot
from feature
mypolygon = import( "TA5[1-layer].dxf" ); mypolyhedron= import( "TA5[1-model].stl" ); logic features follows: mypolygon = importResultOf( "stuff.scad" ); mypolyhedron= importResultOf( "stuff.scad" ); mypolygon = importResultOf( "stuff.scad::thatModule()" ); mypolyhedron= importResultOf( "stuff.scad::thatModule()"" ); mypolygon = importResultOf( "thisFileItSelf.scad::thatModule()" ); mypolyhedron= importResultOf( "thisFileItSelf::thatModule()"" ); -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
Free forum by Nabble | Edit this page |