discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Surface interpolation and BREP-style design with OpenSCAD

MH
Martin Herdieckerhoff
Sat, Mar 4, 2023 8:23 AM

Am 03.03.2023 um 04:50 schrieb Adrian Mariano:

I don't think that Martin's method "draws an arc" like you are
thinking.  We both implemented methods that worked that way, but it
seems that Martin's method somehow creates the surface between the
normals.  I am curious to see how it works in practice, because at the
moment there remains much uncertainty in how it actually does this. 
As Martin said, it operates using just the point-normal set and
produces the shapes he showed in his earlier post.  There is no "base"
point set.

My method defaults to arcs - when this is possible. In most cases it is
not possible. I use what I call generalized arcs. These can contain a
single inflection. I attach an image with a quite unusual placement of
the fillet to demonstrate that the curves - although often very similar
to arcs - are in general not arcs due to the given boundary conditions.
As I have learned one could also use biquartic Beziers to smoothly align
quad patches. However, these have lots of degrees of freedom (5*5
control points)
and I would not know how to best compute those 25 control points for a
patch from a tuple of 4 PN pairs (point-normal pairs). Besides that you
never get a perfect arc from a Bezier.

On Thu, Mar 2, 2023 at 10:41 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

 How would you get the center to draw the arc otherwise.
 Probably that is the reason normals are drawn by Martin for each
 vertices, so as to get the direction on the curve.
 In complex surfaces I am not sure you can get the center with that
 method. Maybe yes, but not tried

 On Fri, 3 Mar, 2023, 7:42 am Adrian Mariano, <avm4@cornell.edu> wrote:

     Why do you need the intersection of the solid at original
     dimensions?  I don't think you need that.  Just the other two,
     at least if you're doing thing's Martin's way.   You'll then
     need the two solids with a hole cut in them to join onto the
     fillet shape.

     On Thu, Mar 2, 2023 at 8:57 PM Sanjeev Prabhakar
     <sprabhakar2006@gmail.com> wrote:

         My point here is that you need to find 3 sets of
         intersection points between the 2 solids for making fillet.

         1st with both the solids at their original dimensions

         2nd with 1 solid offset by approximately the amount of
         fillet radius required

         3rd with 2nd solid offset

         Self intersecting segments are definitely an issue which
         needs solution.

@ Sanjeev: You are seeking for a general method. And such a method would
have to find and use a path along the intersection. As I think I pointed
out before, many approaches are possible. In my image of a fillet, the
line of intersection is not used at all. In the case of the object (a
pan?) that you are trying to make, I think that the wanted path should
be constructed (as you seem to do in Python) and that it can be
constructed also within OpenSCAD. The prerequisite would be two functions:

f1(t) would produce a point on the path that generates the large part of
the object. The angle of rotation can be applied outside of that function.
f2(u,v) would generate a point on the smaller object which seems to be
mainly a linear extrusion of a path with some scaling along the way.

If you can provide those two functions than I could assist in creating a
function which finds the path along the intersection of both. Since we
can pass functions as arguments in OpenSCAD, such an
intersection-finding function might be quite helpful for other users who
want to create fillets.

Martin

Am 03.03.2023 um 04:50 schrieb Adrian Mariano: > I don't think that Martin's method "draws an arc" like you are > thinking.  We both implemented methods that worked that way, but it > seems that Martin's method somehow creates the surface between the > normals.  I am curious to see how it works in practice, because at the > moment there remains much uncertainty in how it actually does this.  > As Martin said, it operates using *just* the point-normal set and > produces the shapes he showed in his earlier post.  There is no "base" > point set. My method defaults to arcs - when this is possible. In most cases it is not possible. I use what I call generalized arcs. These can contain a single inflection. I attach an image with a quite unusual placement of the fillet to demonstrate that the curves - although often very similar to arcs - are in general not arcs due to the given boundary conditions. As I have learned one could also use biquartic Beziers to smoothly align quad patches. However, these have lots of degrees of freedom (5*5 control points) and I would not know how to best compute those 25 control points for a patch from a tuple of 4 PN pairs (point-normal pairs). Besides that you never get a perfect arc from a Bezier. > > > On Thu, Mar 2, 2023 at 10:41 PM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > How would you get the center to draw the arc otherwise. > Probably that is the reason normals are drawn by Martin for each > vertices, so as to get the direction on the curve. > In complex surfaces I am not sure you can get the center with that > method. Maybe yes, but not tried > > On Fri, 3 Mar, 2023, 7:42 am Adrian Mariano, <avm4@cornell.edu> wrote: > > Why do you need the intersection of the solid at original > dimensions?  I don't think you need that.  Just the other two, > at least if you're doing thing's Martin's way.   You'll then > need the two solids with a hole cut in them to join onto the > fillet shape. > > On Thu, Mar 2, 2023 at 8:57 PM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > My point here is that you need to find 3 sets of > intersection points between the 2 solids for making fillet. > > 1st with both the solids at their original dimensions > > 2nd with 1 solid offset by approximately the amount of > fillet radius required > > 3rd with 2nd solid offset > > Self intersecting segments are definitely an issue which > needs solution. > @ Sanjeev: You are seeking for a general method. And such a method would have to find and use a path along the intersection. As I think I pointed out before, many approaches are possible. In my image of a fillet, the line of intersection is not used at all. In the case of the object (a pan?) that you are trying to make, I think that the wanted path should be constructed (as you seem to do in Python) and that it can be constructed also within OpenSCAD. The prerequisite would be two functions: f1(t) would produce a point on the path that generates the large part of the object. The angle of rotation can be applied outside of that function. f2(u,v) would generate a point on the smaller object which seems to be mainly a linear extrusion of a path with some scaling along the way. If you can provide those two functions than I could assist in creating a function which finds the path along the intersection of both. Since we can pass functions as arguments in OpenSCAD, such an intersection-finding function might be quite helpful for other users who want to create fillets. Martin