locksilikon.blogg.se

Openscad extrude along path
Openscad extrude along path





  1. OPENSCAD EXTRUDE ALONG PATH HOW TO
  2. OPENSCAD EXTRUDE ALONG PATH CODE

I hacked together something that basically works for this, but it could use some more work.

OPENSCAD EXTRUDE ALONG PATH CODE

The only thing we would need native code for is to handle self-intersecting geometry, for example to allow rotate_extrude() circle() to generate a sphere. With that, you have all the vertices of your mesh and all you need to do is to triangulate the sides and possibly the end caps and feed everything to a single polyhedron() call. The path for the extrusion is quite easy to define as a parametric affine or projective 3d transformation (allowing an arbitrary composition of rotation, scaling, translation, shearing, etc).

openscad extrude along path

From that, you can easily define any morphing/blending function. Point associativity between two shapes of equal length would just be based on position in the array. The (experimental) concat() function is highly recommended though.īasically, you define a 2D shape as an array of points (2d or 3d). On the other hand, what you want to accomplish is already kind of easy to do in client code as long as your resulting extrusion has no self-intersections. Even if they have the same number, n, of vertices (which in itself is hard to guarantee in the general case), just finding which of the n different solutions to associate vertices with is not obvious.

OPENSCAD EXTRUDE ALONG PATH HOW TO

Then, once you have a way to algorithmically/parametrically express general paths in space, you could load a 2d representation of your desired perpenicular section and extrude it along that given I agree that morphing/connecting different shapes like that could be useful, but given how shapes (2d polygons) are represented in OpenSCAD, I have no idea how to automatically handle linking of the two shapes. t would be a value ranging from 0 to 1 determining the point along the path where the folding operation would happen and v would be a vector indicating the direction of the folding axis and the intensity of the folding in terms of degrees, just like the parameter used in the rotate() operator. fold(t, v) - to fold the path at a certain point the same way you would phisically fold a metal wire at a given point. union() - to join two path representations arc(r, start, end) which draws an arc with radius=r starting at angle=start and ending at angle=end line(p1, p2) where p1 and p2 are points in space (x,y,z) The construction primitives we have in openscad deal with 2d shapes in a plane (the 2D subsystem) and 3D primitives (cubes, cylinders, etc.) What we would need is a set of: Without the help of the OpenSCAD user group I wouldn't have been able to solve it there as well.One thing we should consider is an API for modeling arbitrary paths in 3dimensional-space. There are other models with the same problematic surface. Also, I want to model it in SolveSpace is just for training purpose and out of curiosity if it is possible. I have 3d printed "my style" of a hirth joint before and have very good results. I don't really know if this is just done for practical reasons (easier to manufacture) or if there are also advantages with this approach (a user in the FreeCAD forum is convinced that the original version is better: f=3&t=28038&start=10).įor me it doesn't matter. The original hirth joint looks different: It has straight (non twisted) side walls that shift downwards from the outside to the center of the circle (see here: ). As a conic section is always concave or convex, this is probably not possible.Īctually, I don't even think it is possible to make such a joint with "traditional" industrial methods.

openscad extrude along path

I think a conic section won't do (if I understand that correctly) as a second rotated tooth should fit on the twisted side wall without any gap or overlap.







Openscad extrude along path