SP
Sanjeev Prabhakar
Mon, Jan 24, 2022 4:56 PM
Sure will check that once I have some time
You can replace the sphere with a cube and check as well.
Cube should be made of points , 4 points 2 layers and perpendicular to the
direction of u shape
On Mon, 24 Jan 2022, 07:16 Adrian Mariano, avm4@cornell.edu wrote:
With a prism connecting to a plane, we expect your method to produce a
smooth fillet. But you need to confirm that it actually is working as
expected.
It seems like if you know the surface is a prism you should be able to
crawl across the prism from adjacent facet to adjacent facet, checking
the intersection of each, until you find one that intersects. That
shouldn't be terribly slow. If you're trying to connect to a sphere,
or arbitrary shape, it becomes more difficult to do something like
that. You can build a data structure that encodes adjacency in the
polyhedron and then traverse it. If you do the brute force approach,
you can filter out lots of the cases by testing if their coordinates
are near the line---that is, you don't have to do the full
intersection calculation. Determining that a point is inside a
polygon adds a further computational burden, so it's definitely a
concern.
My thinking is that you should try easier cases. Once you are certain
that it works to connect a prism to a plane, then try prism to
cylinder. You know the formula for a cylinder so the intersection can
be computed exactly, and using the inner diameter of the cylinder
ensures that the fillet doesn't set above the approximate cylinder
anywhere. Same thing for sphere---you know it's formula so you can
compute intersections exactly.
On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
Thank you
On a plane surface the fillet will be smooth.
will think about how to find all the nearby parallelograms.
One way is to find all the intersections and choose the suitable one,
but that would be too slow (presumably).
I think the prisms are both defined by polygons, so determining
adjacency doesn't require working so hard. You can probably check if
the intersection point lies in the quadrilateral, and if not,
construct the next quadrilateral from the prism's polygon, and then
continue. Of course, the case of intersection with cylinder or sphere
can presumably be done directly. But I still think that step 1 is to
make sure that everything actually works with a planar base, before
worrying about ways to optimize.
On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera revarbat@gmail.com
On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <
There may be some way to know all the points in the prism near the
half circle with radius r,
If this could be done the processing time can be reduced
BOSL2 has a couple functions that may be useful:
smooth fillet on plane surface
On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> Sure will check that once I have some time
> You can replace the sphere with a cube and check as well.
> Cube should be made of points , 4 points 2 layers and perpendicular to the
> direction of u shape
>
> On Mon, 24 Jan 2022, 07:16 Adrian Mariano, <avm4@cornell.edu> wrote:
>
>> With a prism connecting to a plane, we expect your method to produce a
>> smooth fillet. But you need to confirm that it actually is working as
>> expected.
>>
>> It seems like if you know the surface is a prism you should be able to
>> crawl across the prism from adjacent facet to adjacent facet, checking
>> the intersection of each, until you find one that intersects. That
>> shouldn't be terribly slow. If you're trying to connect to a sphere,
>> or arbitrary shape, it becomes more difficult to do something like
>> that. You can build a data structure that encodes adjacency in the
>> polyhedron and then traverse it. If you do the brute force approach,
>> you can filter out lots of the cases by testing if their coordinates
>> are near the line---that is, you don't have to do the full
>> intersection calculation. Determining that a point is inside a
>> polygon adds a further computational burden, so it's definitely a
>> concern.
>>
>> My thinking is that you should try easier cases. Once you are certain
>> that it works to connect a prism to a plane, then try prism to
>> cylinder. You know the formula for a cylinder so the intersection can
>> be computed exactly, and using the inner diameter of the cylinder
>> ensures that the fillet doesn't set above the approximate cylinder
>> anywhere. Same thing for sphere---you know it's formula so you can
>> compute intersections exactly.
>>
>> On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
>> <sprabhakar2006@gmail.com> wrote:
>> >
>> > Thank you
>> > On a plane surface the fillet will be smooth.
>> > will think about how to find all the nearby parallelograms.
>> > One way is to find all the intersections and choose the suitable one,
>> but that would be too slow (presumably).
>> >
>> >
>> > On Sun, 23 Jan 2022 at 23:41, Adrian Mariano <avm4@cornell.edu> wrote:
>> >>
>> >> I think the prisms are both defined by polygons, so determining
>> >> adjacency doesn't require working so hard. You can probably check if
>> >> the intersection point lies in the quadrilateral, and if not,
>> >> construct the next quadrilateral from the prism's polygon, and then
>> >> continue. Of course, the case of intersection with cylinder or sphere
>> >> can presumably be done directly. But I still think that step 1 is to
>> >> make sure that everything actually works with a planar base, before
>> >> worrying about ways to optimize.
>> >>
>> >> On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera <revarbat@gmail.com>
>> wrote:
>> >> >
>> >> >
>> >> > On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <
>> sprabhakar2006@gmail.com> wrote:
>> >> >
>> >> >
>> >> > There may be some way to know all the points in the prism near the
>> half circle with radius r,
>> >> > If this could be done the processing time can be reduced
>> >> >
>> >> >
>> >> > BOSL2 has a couple functions that may be useful:
>> >> >
>> >> >
>> https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
>> >> >
>> >> >
>> https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
>> >> >
>> >> > -Revar
>> >> > _______________________________________________
>> >> > OpenSCAD mailing list
>> >> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>> >> _______________________________________________
>> >> OpenSCAD mailing list
>> >> To unsubscribe send an email to discuss-leave@lists.openscad.org
>> >
>> > _______________________________________________
>> > OpenSCAD mailing list
>> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>
AM
Adrian Mariano
Mon, Jan 24, 2022 9:22 PM
Definitely looks smoother! You have however a couple faults I
noticed. One is that it seems it doesn't close back on itself
properly. There's some kind of funny gap or seam at one end. It also
fails render. I noticed also that the fillet seems like it might be
slightly undersized. That is, it is maybe leaving a tiny gap where it
meets the cube, and similarly where it meets the prism. It should
instead slightly overlap the cube and prism to ensure no problems
with unions.
The other thing I was pondering is the way the roundover looks. It
appears to my eye like the radius varies around the fillet. Is that
actually the case, or it's an illusion due to the changing fillet
width? Basically it seems like in this case, it would look better if
the joint between the fillet and cylinder were parallel to the cube.
Is that a reasonable expectation? (And generalizable?)
On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
smooth fillet on plane surface
On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:
Sure will check that once I have some time
You can replace the sphere with a cube and check as well.
Cube should be made of points , 4 points 2 layers and perpendicular to the direction of u shape
On Mon, 24 Jan 2022, 07:16 Adrian Mariano, avm4@cornell.edu wrote:
With a prism connecting to a plane, we expect your method to produce a
smooth fillet. But you need to confirm that it actually is working as
expected.
It seems like if you know the surface is a prism you should be able to
crawl across the prism from adjacent facet to adjacent facet, checking
the intersection of each, until you find one that intersects. That
shouldn't be terribly slow. If you're trying to connect to a sphere,
or arbitrary shape, it becomes more difficult to do something like
that. You can build a data structure that encodes adjacency in the
polyhedron and then traverse it. If you do the brute force approach,
you can filter out lots of the cases by testing if their coordinates
are near the line---that is, you don't have to do the full
intersection calculation. Determining that a point is inside a
polygon adds a further computational burden, so it's definitely a
concern.
My thinking is that you should try easier cases. Once you are certain
that it works to connect a prism to a plane, then try prism to
cylinder. You know the formula for a cylinder so the intersection can
be computed exactly, and using the inner diameter of the cylinder
ensures that the fillet doesn't set above the approximate cylinder
anywhere. Same thing for sphere---you know it's formula so you can
compute intersections exactly.
On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
Thank you
On a plane surface the fillet will be smooth.
will think about how to find all the nearby parallelograms.
One way is to find all the intersections and choose the suitable one, but that would be too slow (presumably).
On Sun, 23 Jan 2022 at 23:41, Adrian Mariano avm4@cornell.edu wrote:
I think the prisms are both defined by polygons, so determining
adjacency doesn't require working so hard. You can probably check if
the intersection point lies in the quadrilateral, and if not,
construct the next quadrilateral from the prism's polygon, and then
continue. Of course, the case of intersection with cylinder or sphere
can presumably be done directly. But I still think that step 1 is to
make sure that everything actually works with a planar base, before
worrying about ways to optimize.
On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera revarbat@gmail.com wrote:
On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:
There may be some way to know all the points in the prism near the half circle with radius r,
If this could be done the processing time can be reduced
BOSL2 has a couple functions that may be useful:
https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
-Revar
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Definitely looks smoother! You have however a couple faults I
noticed. One is that it seems it doesn't close back on itself
properly. There's some kind of funny gap or seam at one end. It also
fails render. I noticed also that the fillet seems like it might be
slightly undersized. That is, it is maybe leaving a tiny gap where it
meets the cube, and similarly where it meets the prism. It should
instead slightly *overlap* the cube and prism to ensure no problems
with unions.
The other thing I was pondering is the way the roundover looks. It
appears to my eye like the radius varies around the fillet. Is that
actually the case, or it's an illusion due to the changing fillet
width? Basically it seems like in this case, it would look better if
the joint between the fillet and cylinder were parallel to the cube.
Is that a reasonable expectation? (And generalizable?)
On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
<sprabhakar2006@gmail.com> wrote:
>
> smooth fillet on plane surface
>
> On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:
>>
>> Sure will check that once I have some time
>> You can replace the sphere with a cube and check as well.
>> Cube should be made of points , 4 points 2 layers and perpendicular to the direction of u shape
>>
>> On Mon, 24 Jan 2022, 07:16 Adrian Mariano, <avm4@cornell.edu> wrote:
>>>
>>> With a prism connecting to a plane, we expect your method to produce a
>>> smooth fillet. But you need to confirm that it actually is working as
>>> expected.
>>>
>>> It seems like if you know the surface is a prism you should be able to
>>> crawl across the prism from adjacent facet to adjacent facet, checking
>>> the intersection of each, until you find one that intersects. That
>>> shouldn't be terribly slow. If you're trying to connect to a sphere,
>>> or arbitrary shape, it becomes more difficult to do something like
>>> that. You can build a data structure that encodes adjacency in the
>>> polyhedron and then traverse it. If you do the brute force approach,
>>> you can filter out lots of the cases by testing if their coordinates
>>> are near the line---that is, you don't have to do the full
>>> intersection calculation. Determining that a point is inside a
>>> polygon adds a further computational burden, so it's definitely a
>>> concern.
>>>
>>> My thinking is that you should try easier cases. Once you are certain
>>> that it works to connect a prism to a plane, then try prism to
>>> cylinder. You know the formula for a cylinder so the intersection can
>>> be computed exactly, and using the inner diameter of the cylinder
>>> ensures that the fillet doesn't set above the approximate cylinder
>>> anywhere. Same thing for sphere---you know it's formula so you can
>>> compute intersections exactly.
>>>
>>> On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
>>> <sprabhakar2006@gmail.com> wrote:
>>> >
>>> > Thank you
>>> > On a plane surface the fillet will be smooth.
>>> > will think about how to find all the nearby parallelograms.
>>> > One way is to find all the intersections and choose the suitable one, but that would be too slow (presumably).
>>> >
>>> >
>>> > On Sun, 23 Jan 2022 at 23:41, Adrian Mariano <avm4@cornell.edu> wrote:
>>> >>
>>> >> I think the prisms are both defined by polygons, so determining
>>> >> adjacency doesn't require working so hard. You can probably check if
>>> >> the intersection point lies in the quadrilateral, and if not,
>>> >> construct the next quadrilateral from the prism's polygon, and then
>>> >> continue. Of course, the case of intersection with cylinder or sphere
>>> >> can presumably be done directly. But I still think that step 1 is to
>>> >> make sure that everything actually works with a planar base, before
>>> >> worrying about ways to optimize.
>>> >>
>>> >> On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera <revarbat@gmail.com> wrote:
>>> >> >
>>> >> >
>>> >> > On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:
>>> >> >
>>> >> >
>>> >> > There may be some way to know all the points in the prism near the half circle with radius r,
>>> >> > If this could be done the processing time can be reduced
>>> >> >
>>> >> >
>>> >> > BOSL2 has a couple functions that may be useful:
>>> >> >
>>> >> > https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
>>> >> >
>>> >> > https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
>>> >> >
>>> >> > -Revar
>>> >> > _______________________________________________
>>> >> > OpenSCAD mailing list
>>> >> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>>> >> _______________________________________________
>>> >> OpenSCAD mailing list
>>> >> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>> >
>>> > _______________________________________________
>>> > OpenSCAD mailing list
>>> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Mon, Jan 24, 2022 11:59 PM
In my computer there is no issue in rendering.
Also there is no gap at the end because the revised code takes care of that.
Atleast in my computer and version it is not visible.
Fillet is also the same all across, it may be an illusion.
However there is one issue here which needs some work.
fillet is only formed on intersecting surfaces e.g. in this case a square
is extruded from left to right to get the intersecting face.
On Tue, 25 Jan 2022 at 02:52, Adrian Mariano avm4@cornell.edu wrote:
Definitely looks smoother! You have however a couple faults I
noticed. One is that it seems it doesn't close back on itself
properly. There's some kind of funny gap or seam at one end. It also
fails render. I noticed also that the fillet seems like it might be
slightly undersized. That is, it is maybe leaving a tiny gap where it
meets the cube, and similarly where it meets the prism. It should
instead slightly overlap the cube and prism to ensure no problems
with unions.
The other thing I was pondering is the way the roundover looks. It
appears to my eye like the radius varies around the fillet. Is that
actually the case, or it's an illusion due to the changing fillet
width? Basically it seems like in this case, it would look better if
the joint between the fillet and cylinder were parallel to the cube.
Is that a reasonable expectation? (And generalizable?)
On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
smooth fillet on plane surface
On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar <
Sure will check that once I have some time
You can replace the sphere with a cube and check as well.
Cube should be made of points , 4 points 2 layers and perpendicular to
With a prism connecting to a plane, we expect your method to produce a
smooth fillet. But you need to confirm that it actually is working as
expected.
It seems like if you know the surface is a prism you should be able to
crawl across the prism from adjacent facet to adjacent facet, checking
the intersection of each, until you find one that intersects. That
shouldn't be terribly slow. If you're trying to connect to a sphere,
or arbitrary shape, it becomes more difficult to do something like
that. You can build a data structure that encodes adjacency in the
polyhedron and then traverse it. If you do the brute force approach,
you can filter out lots of the cases by testing if their coordinates
are near the line---that is, you don't have to do the full
intersection calculation. Determining that a point is inside a
polygon adds a further computational burden, so it's definitely a
concern.
My thinking is that you should try easier cases. Once you are certain
that it works to connect a prism to a plane, then try prism to
cylinder. You know the formula for a cylinder so the intersection can
be computed exactly, and using the inner diameter of the cylinder
ensures that the fillet doesn't set above the approximate cylinder
anywhere. Same thing for sphere---you know it's formula so you can
compute intersections exactly.
On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
Thank you
On a plane surface the fillet will be smooth.
will think about how to find all the nearby parallelograms.
One way is to find all the intersections and choose the suitable
one, but that would be too slow (presumably).
I think the prisms are both defined by polygons, so determining
adjacency doesn't require working so hard. You can probably check
the intersection point lies in the quadrilateral, and if not,
construct the next quadrilateral from the prism's polygon, and then
continue. Of course, the case of intersection with cylinder or
can presumably be done directly. But I still think that step 1 is
make sure that everything actually works with a planar base, before
worrying about ways to optimize.
On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera revarbat@gmail.com
On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <
There may be some way to know all the points in the prism near
the half circle with radius r,
If this could be done the processing time can be reduced
BOSL2 has a couple functions that may be useful:
In my computer there is no issue in rendering.
Also there is no gap at the end because the revised code takes care of that.
Atleast in my computer and version it is not visible.
Fillet is also the same all across, it may be an illusion.
However there is one issue here which needs some work.
fillet is only formed on intersecting surfaces e.g. in this case a square
is extruded from left to right to get the intersecting face.
On Tue, 25 Jan 2022 at 02:52, Adrian Mariano <avm4@cornell.edu> wrote:
> Definitely looks smoother! You have however a couple faults I
> noticed. One is that it seems it doesn't close back on itself
> properly. There's some kind of funny gap or seam at one end. It also
> fails render. I noticed also that the fillet seems like it might be
> slightly undersized. That is, it is maybe leaving a tiny gap where it
> meets the cube, and similarly where it meets the prism. It should
> instead slightly *overlap* the cube and prism to ensure no problems
> with unions.
>
> The other thing I was pondering is the way the roundover looks. It
> appears to my eye like the radius varies around the fillet. Is that
> actually the case, or it's an illusion due to the changing fillet
> width? Basically it seems like in this case, it would look better if
> the joint between the fillet and cylinder were parallel to the cube.
> Is that a reasonable expectation? (And generalizable?)
>
> On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
> <sprabhakar2006@gmail.com> wrote:
> >
> > smooth fillet on plane surface
> >
> > On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
> >>
> >> Sure will check that once I have some time
> >> You can replace the sphere with a cube and check as well.
> >> Cube should be made of points , 4 points 2 layers and perpendicular to
> the direction of u shape
> >>
> >> On Mon, 24 Jan 2022, 07:16 Adrian Mariano, <avm4@cornell.edu> wrote:
> >>>
> >>> With a prism connecting to a plane, we expect your method to produce a
> >>> smooth fillet. But you need to confirm that it actually is working as
> >>> expected.
> >>>
> >>> It seems like if you know the surface is a prism you should be able to
> >>> crawl across the prism from adjacent facet to adjacent facet, checking
> >>> the intersection of each, until you find one that intersects. That
> >>> shouldn't be terribly slow. If you're trying to connect to a sphere,
> >>> or arbitrary shape, it becomes more difficult to do something like
> >>> that. You can build a data structure that encodes adjacency in the
> >>> polyhedron and then traverse it. If you do the brute force approach,
> >>> you can filter out lots of the cases by testing if their coordinates
> >>> are near the line---that is, you don't have to do the full
> >>> intersection calculation. Determining that a point is inside a
> >>> polygon adds a further computational burden, so it's definitely a
> >>> concern.
> >>>
> >>> My thinking is that you should try easier cases. Once you are certain
> >>> that it works to connect a prism to a plane, then try prism to
> >>> cylinder. You know the formula for a cylinder so the intersection can
> >>> be computed exactly, and using the inner diameter of the cylinder
> >>> ensures that the fillet doesn't set above the approximate cylinder
> >>> anywhere. Same thing for sphere---you know it's formula so you can
> >>> compute intersections exactly.
> >>>
> >>> On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
> >>> <sprabhakar2006@gmail.com> wrote:
> >>> >
> >>> > Thank you
> >>> > On a plane surface the fillet will be smooth.
> >>> > will think about how to find all the nearby parallelograms.
> >>> > One way is to find all the intersections and choose the suitable
> one, but that would be too slow (presumably).
> >>> >
> >>> >
> >>> > On Sun, 23 Jan 2022 at 23:41, Adrian Mariano <avm4@cornell.edu>
> wrote:
> >>> >>
> >>> >> I think the prisms are both defined by polygons, so determining
> >>> >> adjacency doesn't require working so hard. You can probably check
> if
> >>> >> the intersection point lies in the quadrilateral, and if not,
> >>> >> construct the next quadrilateral from the prism's polygon, and then
> >>> >> continue. Of course, the case of intersection with cylinder or
> sphere
> >>> >> can presumably be done directly. But I still think that step 1 is
> to
> >>> >> make sure that everything actually works with a planar base, before
> >>> >> worrying about ways to optimize.
> >>> >>
> >>> >> On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera <revarbat@gmail.com>
> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
> >>> >> >
> >>> >> >
> >>> >> > There may be some way to know all the points in the prism near
> the half circle with radius r,
> >>> >> > If this could be done the processing time can be reduced
> >>> >> >
> >>> >> >
> >>> >> > BOSL2 has a couple functions that may be useful:
> >>> >> >
> >>> >> >
> https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
> >>> >> >
> >>> >> >
> https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
> >>> >> >
> >>> >> > -Revar
> >>> >> > _______________________________________________
> >>> >> > OpenSCAD mailing list
> >>> >> > To unsubscribe send an email to discuss-leave@lists.openscad.org
> >>> >> _______________________________________________
> >>> >> OpenSCAD mailing list
> >>> >> To unsubscribe send an email to discuss-leave@lists.openscad.org
> >>> >
> >>> > _______________________________________________
> >>> > OpenSCAD mailing list
> >>> > To unsubscribe send an email to discuss-leave@lists.openscad.org
> >>> _______________________________________________
> >>> OpenSCAD mailing list
> >>> To unsubscribe send an email to discuss-leave@lists.openscad.org
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
AM
Adrian Mariano
Tue, Jan 25, 2022 12:04 AM
I broke down and took a stab at my own version, of just the problem of
prism meeting plane with a constant radius roundover. I think the
result looks similar to your result, which makes me wonder if constant
radius is the wrong thing to do. Maybe I should instead implement a
constant height (parallel) roundover? I don't know. Anyways, your
approach seems like it's pretty straight forward to implement, if the
infrastructure is present. Here's the BOSL2 code for it and an
example:
include<BOSL2/std.scad>
// Arguments:
// r = radius of rounding
// polygon = 2d list of points giving prism cross section
// angle = angle of prism away from z axis
// scale = scale factor for top of prism
// height = height of prism (measured at (0,0) in polygon coordinate system)
// N = number of points on roundover
// base = height of base for safe unions
function rprism(r, polygon, angle=0, scale=1, height, N=10, base=.1) =
let(
polygon = clockwise_polygon(polygon),
top = yrot(angle,path3d(scale(scale,polygon), height)),
bot = yrot(angle,path3d(polygon, 0)),
isect = [for (i=idx(top)) plane_line_intersection([0,0,1,0],
[top[i],bot[i]])],
base_normal = -path3d(path_normals(path2d(isect), closed=true)),
mesh = [for(i=idx(top))
let(
base_angle =
vector_angle(top[i],isect[i],isect[i]+base_normal[i]),
d = r/tan(base_angle/2),
prev = unit(top[i]-isect[i]),
next = base_normal[i],
center = r/sin(base_angle/2) * unit(prev+next) + isect[i]
)
[
top[i],
each arc(N, cp=center, points = [isect[i]+prevd, isect[i]+nextd]),
isect[i]+next*d+[0,0,-base]
]
]
)
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true);
poly = circle(r=10, $fn=36);
vnf_polyhedron(rprism(3, poly, angle=17, scale=.7, height=30,N=25));
cube([40,40,10],anchor=TOP);
On Mon, Jan 24, 2022 at 4:22 PM Adrian Mariano avm4@cornell.edu wrote:
Definitely looks smoother! You have however a couple faults I
noticed. One is that it seems it doesn't close back on itself
properly. There's some kind of funny gap or seam at one end. It also
fails render. I noticed also that the fillet seems like it might be
slightly undersized. That is, it is maybe leaving a tiny gap where it
meets the cube, and similarly where it meets the prism. It should
instead slightly overlap the cube and prism to ensure no problems
with unions.
The other thing I was pondering is the way the roundover looks. It
appears to my eye like the radius varies around the fillet. Is that
actually the case, or it's an illusion due to the changing fillet
width? Basically it seems like in this case, it would look better if
the joint between the fillet and cylinder were parallel to the cube.
Is that a reasonable expectation? (And generalizable?)
On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
Sure will check that once I have some time
You can replace the sphere with a cube and check as well.
Cube should be made of points , 4 points 2 layers and perpendicular to the direction of u shape
On Mon, 24 Jan 2022, 07:16 Adrian Mariano, avm4@cornell.edu wrote:
With a prism connecting to a plane, we expect your method to produce a
smooth fillet. But you need to confirm that it actually is working as
expected.
It seems like if you know the surface is a prism you should be able to
crawl across the prism from adjacent facet to adjacent facet, checking
the intersection of each, until you find one that intersects. That
shouldn't be terribly slow. If you're trying to connect to a sphere,
or arbitrary shape, it becomes more difficult to do something like
that. You can build a data structure that encodes adjacency in the
polyhedron and then traverse it. If you do the brute force approach,
you can filter out lots of the cases by testing if their coordinates
are near the line---that is, you don't have to do the full
intersection calculation. Determining that a point is inside a
polygon adds a further computational burden, so it's definitely a
concern.
My thinking is that you should try easier cases. Once you are certain
that it works to connect a prism to a plane, then try prism to
cylinder. You know the formula for a cylinder so the intersection can
be computed exactly, and using the inner diameter of the cylinder
ensures that the fillet doesn't set above the approximate cylinder
anywhere. Same thing for sphere---you know it's formula so you can
compute intersections exactly.
On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
Thank you
On a plane surface the fillet will be smooth.
will think about how to find all the nearby parallelograms.
One way is to find all the intersections and choose the suitable one, but that would be too slow (presumably).
On Sun, 23 Jan 2022 at 23:41, Adrian Mariano avm4@cornell.edu wrote:
I think the prisms are both defined by polygons, so determining
adjacency doesn't require working so hard. You can probably check if
the intersection point lies in the quadrilateral, and if not,
construct the next quadrilateral from the prism's polygon, and then
continue. Of course, the case of intersection with cylinder or sphere
can presumably be done directly. But I still think that step 1 is to
make sure that everything actually works with a planar base, before
worrying about ways to optimize.
On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera revarbat@gmail.com wrote:
I broke down and took a stab at my own version, of just the problem of
prism meeting plane with a constant radius roundover. I think the
result looks similar to your result, which makes me wonder if constant
radius is the wrong thing to do. Maybe I should instead implement a
constant height (parallel) roundover? I don't know. Anyways, your
approach seems like it's pretty straight forward to implement, if the
infrastructure is present. Here's the BOSL2 code for it and an
example:
include<BOSL2/std.scad>
// Arguments:
// r = radius of rounding
// polygon = 2d list of points giving prism cross section
// angle = angle of prism away from z axis
// scale = scale factor for top of prism
// height = height of prism (measured at (0,0) in polygon coordinate system)
// N = number of points on roundover
// base = height of base for safe unions
function rprism(r, polygon, angle=0, scale=1, height, N=10, base=.1) =
let(
polygon = clockwise_polygon(polygon),
top = yrot(angle,path3d(scale(scale,polygon), height)),
bot = yrot(angle,path3d(polygon, 0)),
isect = [for (i=idx(top)) plane_line_intersection([0,0,1,0],
[top[i],bot[i]])],
base_normal = -path3d(path_normals(path2d(isect), closed=true)),
mesh = [for(i=idx(top))
let(
base_angle =
vector_angle(top[i],isect[i],isect[i]+base_normal[i]),
d = r/tan(base_angle/2),
prev = unit(top[i]-isect[i]),
next = base_normal[i],
center = r/sin(base_angle/2) * unit(prev+next) + isect[i]
)
[
top[i],
each arc(N, cp=center, points = [isect[i]+prev*d, isect[i]+next*d]),
isect[i]+next*d+[0,0,-base]
]
]
)
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true);
poly = circle(r=10, $fn=36);
vnf_polyhedron(rprism(3, poly, angle=17, scale=.7, height=30,N=25));
cube([40,40,10],anchor=TOP);
On Mon, Jan 24, 2022 at 4:22 PM Adrian Mariano <avm4@cornell.edu> wrote:
>
> Definitely looks smoother! You have however a couple faults I
> noticed. One is that it seems it doesn't close back on itself
> properly. There's some kind of funny gap or seam at one end. It also
> fails render. I noticed also that the fillet seems like it might be
> slightly undersized. That is, it is maybe leaving a tiny gap where it
> meets the cube, and similarly where it meets the prism. It should
> instead slightly *overlap* the cube and prism to ensure no problems
> with unions.
>
> The other thing I was pondering is the way the roundover looks. It
> appears to my eye like the radius varies around the fillet. Is that
> actually the case, or it's an illusion due to the changing fillet
> width? Basically it seems like in this case, it would look better if
> the joint between the fillet and cylinder were parallel to the cube.
> Is that a reasonable expectation? (And generalizable?)
>
> On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
> <sprabhakar2006@gmail.com> wrote:
> >
> > smooth fillet on plane surface
> >
> > On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:
> >>
> >> Sure will check that once I have some time
> >> You can replace the sphere with a cube and check as well.
> >> Cube should be made of points , 4 points 2 layers and perpendicular to the direction of u shape
> >>
> >> On Mon, 24 Jan 2022, 07:16 Adrian Mariano, <avm4@cornell.edu> wrote:
> >>>
> >>> With a prism connecting to a plane, we expect your method to produce a
> >>> smooth fillet. But you need to confirm that it actually is working as
> >>> expected.
> >>>
> >>> It seems like if you know the surface is a prism you should be able to
> >>> crawl across the prism from adjacent facet to adjacent facet, checking
> >>> the intersection of each, until you find one that intersects. That
> >>> shouldn't be terribly slow. If you're trying to connect to a sphere,
> >>> or arbitrary shape, it becomes more difficult to do something like
> >>> that. You can build a data structure that encodes adjacency in the
> >>> polyhedron and then traverse it. If you do the brute force approach,
> >>> you can filter out lots of the cases by testing if their coordinates
> >>> are near the line---that is, you don't have to do the full
> >>> intersection calculation. Determining that a point is inside a
> >>> polygon adds a further computational burden, so it's definitely a
> >>> concern.
> >>>
> >>> My thinking is that you should try easier cases. Once you are certain
> >>> that it works to connect a prism to a plane, then try prism to
> >>> cylinder. You know the formula for a cylinder so the intersection can
> >>> be computed exactly, and using the inner diameter of the cylinder
> >>> ensures that the fillet doesn't set above the approximate cylinder
> >>> anywhere. Same thing for sphere---you know it's formula so you can
> >>> compute intersections exactly.
> >>>
> >>> On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
> >>> <sprabhakar2006@gmail.com> wrote:
> >>> >
> >>> > Thank you
> >>> > On a plane surface the fillet will be smooth.
> >>> > will think about how to find all the nearby parallelograms.
> >>> > One way is to find all the intersections and choose the suitable one, but that would be too slow (presumably).
> >>> >
> >>> >
> >>> > On Sun, 23 Jan 2022 at 23:41, Adrian Mariano <avm4@cornell.edu> wrote:
> >>> >>
> >>> >> I think the prisms are both defined by polygons, so determining
> >>> >> adjacency doesn't require working so hard. You can probably check if
> >>> >> the intersection point lies in the quadrilateral, and if not,
> >>> >> construct the next quadrilateral from the prism's polygon, and then
> >>> >> continue. Of course, the case of intersection with cylinder or sphere
> >>> >> can presumably be done directly. But I still think that step 1 is to
> >>> >> make sure that everything actually works with a planar base, before
> >>> >> worrying about ways to optimize.
> >>> >>
> >>> >> On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera <revarbat@gmail.com> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:
> >>> >> >
> >>> >> >
> >>> >> > There may be some way to know all the points in the prism near the half circle with radius r,
> >>> >> > If this could be done the processing time can be reduced
> >>> >> >
> >>> >> >
> >>> >> > BOSL2 has a couple functions that may be useful:
> >>> >> >
> >>> >> > https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
> >>> >> >
> >>> >> > https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
> >>> >> >
> >>> >> > -Revar
> >>> >> > _______________________________________________
> >>> >> > OpenSCAD mailing list
> >>> >> > To unsubscribe send an email to discuss-leave@lists.openscad.org
> >>> >> _______________________________________________
> >>> >> OpenSCAD mailing list
> >>> >> To unsubscribe send an email to discuss-leave@lists.openscad.org
> >>> >
> >>> > _______________________________________________
> >>> > OpenSCAD mailing list
> >>> > To unsubscribe send an email to discuss-leave@lists.openscad.org
> >>> _______________________________________________
> >>> OpenSCAD mailing list
> >>> To unsubscribe send an email to discuss-leave@lists.openscad.org
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to discuss-leave@lists.openscad.org
AM
Adrian Mariano
Tue, Jan 25, 2022 12:14 AM
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
In my computer there is no issue in rendering.
Also there is no gap at the end because the revised code takes care of that.
Atleast in my computer and version it is not visible.
Fillet is also the same all across, it may be an illusion.
However there is one issue here which needs some work.
fillet is only formed on intersecting surfaces e.g. in this case a square is extruded from left to right to get the intersecting face.
On Tue, 25 Jan 2022 at 02:52, Adrian Mariano avm4@cornell.edu wrote:
Definitely looks smoother! You have however a couple faults I
noticed. One is that it seems it doesn't close back on itself
properly. There's some kind of funny gap or seam at one end. It also
fails render. I noticed also that the fillet seems like it might be
slightly undersized. That is, it is maybe leaving a tiny gap where it
meets the cube, and similarly where it meets the prism. It should
instead slightly overlap the cube and prism to ensure no problems
with unions.
The other thing I was pondering is the way the roundover looks. It
appears to my eye like the radius varies around the fillet. Is that
actually the case, or it's an illusion due to the changing fillet
width? Basically it seems like in this case, it would look better if
the joint between the fillet and cylinder were parallel to the cube.
Is that a reasonable expectation? (And generalizable?)
On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
smooth fillet on plane surface
On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:
Sure will check that once I have some time
You can replace the sphere with a cube and check as well.
Cube should be made of points , 4 points 2 layers and perpendicular to the direction of u shape
On Mon, 24 Jan 2022, 07:16 Adrian Mariano, avm4@cornell.edu wrote:
With a prism connecting to a plane, we expect your method to produce a
smooth fillet. But you need to confirm that it actually is working as
expected.
It seems like if you know the surface is a prism you should be able to
crawl across the prism from adjacent facet to adjacent facet, checking
the intersection of each, until you find one that intersects. That
shouldn't be terribly slow. If you're trying to connect to a sphere,
or arbitrary shape, it becomes more difficult to do something like
that. You can build a data structure that encodes adjacency in the
polyhedron and then traverse it. If you do the brute force approach,
you can filter out lots of the cases by testing if their coordinates
are near the line---that is, you don't have to do the full
intersection calculation. Determining that a point is inside a
polygon adds a further computational burden, so it's definitely a
concern.
My thinking is that you should try easier cases. Once you are certain
that it works to connect a prism to a plane, then try prism to
cylinder. You know the formula for a cylinder so the intersection can
be computed exactly, and using the inner diameter of the cylinder
ensures that the fillet doesn't set above the approximate cylinder
anywhere. Same thing for sphere---you know it's formula so you can
compute intersections exactly.
On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:
Thank you
On a plane surface the fillet will be smooth.
will think about how to find all the nearby parallelograms.
One way is to find all the intersections and choose the suitable one, but that would be too slow (presumably).
On Sun, 23 Jan 2022 at 23:41, Adrian Mariano avm4@cornell.edu wrote:
I think the prisms are both defined by polygons, so determining
adjacency doesn't require working so hard. You can probably check if
the intersection point lies in the quadrilateral, and if not,
construct the next quadrilateral from the prism's polygon, and then
continue. Of course, the case of intersection with cylinder or sphere
can presumably be done directly. But I still think that step 1 is to
make sure that everything actually works with a planar base, before
worrying about ways to optimize.
On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera revarbat@gmail.com wrote:
On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:
There may be some way to know all the points in the prism near the half circle with radius r,
If this could be done the processing time can be reduced
BOSL2 has a couple functions that may be useful:
https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
-Revar
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
<sprabhakar2006@gmail.com> wrote:
>
> In my computer there is no issue in rendering.
> Also there is no gap at the end because the revised code takes care of that.
> Atleast in my computer and version it is not visible.
>
> Fillet is also the same all across, it may be an illusion.
>
> However there is one issue here which needs some work.
> fillet is only formed on intersecting surfaces e.g. in this case a square is extruded from left to right to get the intersecting face.
>
>
> On Tue, 25 Jan 2022 at 02:52, Adrian Mariano <avm4@cornell.edu> wrote:
>>
>> Definitely looks smoother! You have however a couple faults I
>> noticed. One is that it seems it doesn't close back on itself
>> properly. There's some kind of funny gap or seam at one end. It also
>> fails render. I noticed also that the fillet seems like it might be
>> slightly undersized. That is, it is maybe leaving a tiny gap where it
>> meets the cube, and similarly where it meets the prism. It should
>> instead slightly *overlap* the cube and prism to ensure no problems
>> with unions.
>>
>> The other thing I was pondering is the way the roundover looks. It
>> appears to my eye like the radius varies around the fillet. Is that
>> actually the case, or it's an illusion due to the changing fillet
>> width? Basically it seems like in this case, it would look better if
>> the joint between the fillet and cylinder were parallel to the cube.
>> Is that a reasonable expectation? (And generalizable?)
>>
>> On Mon, Jan 24, 2022 at 11:59 AM Sanjeev Prabhakar
>> <sprabhakar2006@gmail.com> wrote:
>> >
>> > smooth fillet on plane surface
>> >
>> > On Mon, 24 Jan 2022 at 08:06, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:
>> >>
>> >> Sure will check that once I have some time
>> >> You can replace the sphere with a cube and check as well.
>> >> Cube should be made of points , 4 points 2 layers and perpendicular to the direction of u shape
>> >>
>> >> On Mon, 24 Jan 2022, 07:16 Adrian Mariano, <avm4@cornell.edu> wrote:
>> >>>
>> >>> With a prism connecting to a plane, we expect your method to produce a
>> >>> smooth fillet. But you need to confirm that it actually is working as
>> >>> expected.
>> >>>
>> >>> It seems like if you know the surface is a prism you should be able to
>> >>> crawl across the prism from adjacent facet to adjacent facet, checking
>> >>> the intersection of each, until you find one that intersects. That
>> >>> shouldn't be terribly slow. If you're trying to connect to a sphere,
>> >>> or arbitrary shape, it becomes more difficult to do something like
>> >>> that. You can build a data structure that encodes adjacency in the
>> >>> polyhedron and then traverse it. If you do the brute force approach,
>> >>> you can filter out lots of the cases by testing if their coordinates
>> >>> are near the line---that is, you don't have to do the full
>> >>> intersection calculation. Determining that a point is inside a
>> >>> polygon adds a further computational burden, so it's definitely a
>> >>> concern.
>> >>>
>> >>> My thinking is that you should try easier cases. Once you are certain
>> >>> that it works to connect a prism to a plane, then try prism to
>> >>> cylinder. You know the formula for a cylinder so the intersection can
>> >>> be computed exactly, and using the inner diameter of the cylinder
>> >>> ensures that the fillet doesn't set above the approximate cylinder
>> >>> anywhere. Same thing for sphere---you know it's formula so you can
>> >>> compute intersections exactly.
>> >>>
>> >>> On Sun, Jan 23, 2022 at 8:34 PM Sanjeev Prabhakar
>> >>> <sprabhakar2006@gmail.com> wrote:
>> >>> >
>> >>> > Thank you
>> >>> > On a plane surface the fillet will be smooth.
>> >>> > will think about how to find all the nearby parallelograms.
>> >>> > One way is to find all the intersections and choose the suitable one, but that would be too slow (presumably).
>> >>> >
>> >>> >
>> >>> > On Sun, 23 Jan 2022 at 23:41, Adrian Mariano <avm4@cornell.edu> wrote:
>> >>> >>
>> >>> >> I think the prisms are both defined by polygons, so determining
>> >>> >> adjacency doesn't require working so hard. You can probably check if
>> >>> >> the intersection point lies in the quadrilateral, and if not,
>> >>> >> construct the next quadrilateral from the prism's polygon, and then
>> >>> >> continue. Of course, the case of intersection with cylinder or sphere
>> >>> >> can presumably be done directly. But I still think that step 1 is to
>> >>> >> make sure that everything actually works with a planar base, before
>> >>> >> worrying about ways to optimize.
>> >>> >>
>> >>> >> On Sun, Jan 23, 2022 at 12:58 PM Revar Desmera <revarbat@gmail.com> wrote:
>> >>> >> >
>> >>> >> >
>> >>> >> > On Jan 23, 2022, at 9:13 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote:
>> >>> >> >
>> >>> >> >
>> >>> >> > There may be some way to know all the points in the prism near the half circle with radius r,
>> >>> >> > If this could be done the processing time can be reduced
>> >>> >> >
>> >>> >> >
>> >>> >> > BOSL2 has a couple functions that may be useful:
>> >>> >> >
>> >>> >> > https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search
>> >>> >> >
>> >>> >> > https://github.com/revarbat/BOSL2/wiki/vectors.scad#function-vector_search_tree
>> >>> >> >
>> >>> >> > -Revar
>> >>> >> > _______________________________________________
>> >>> >> > OpenSCAD mailing list
>> >>> >> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>> >>> >> _______________________________________________
>> >>> >> OpenSCAD mailing list
>> >>> >> To unsubscribe send an email to discuss-leave@lists.openscad.org
>> >>> >
>> >>> > _______________________________________________
>> >>> > OpenSCAD mailing list
>> >>> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>> >>> _______________________________________________
>> >>> OpenSCAD mailing list
>> >>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>> >
>> > _______________________________________________
>> > OpenSCAD mailing list
>> > To unsubscribe send an email to discuss-leave@lists.openscad.org
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Tue, Jan 25, 2022 12:28 AM
Great to see your version
Fillet is the same all across meaning the radius is same all across.
The difference seems to be due to the angles , lines are making with x-y
plane.
Will also check the rendering issue, when i have some time
Thanks
On Tue, 25 Jan 2022 at 05:45, Adrian Mariano avm4@cornell.edu wrote:
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
Great to see your version
Fillet is the same all across meaning the radius is same all across.
The difference seems to be due to the angles , lines are making with x-y
plane.
Will also check the rendering issue, when i have some time
Thanks
On Tue, 25 Jan 2022 at 05:45, Adrian Mariano <avm4@cornell.edu> wrote:
> OpenSCAD is tricky, where things may seem OK but not be OK, and you
> don't encounter the problems until adding more model elements. It
> causes no end of confusion and a continuous stream of questions here.
> I didn't find problems rendering until I cut your model in half to
> see a cross section. View your model with "thrown together" and
> you'll see that the fillet is yellow but everything else purple.
> That's a problem. It means your faces are reversed on the prism and
> cube. Actually my model has a similar problem. The last line of
> rprism needs to be
>
>
> vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
>
> When you say "fillet is the same" there is the question of what "the
> same" means. It very clearly does not meet the prism at the same
> height from the cube. But I believe at this point that it has the
> same radius everywhere. The question then, is what is the right way
> to make fillets in a situation like this. Is constant radius the best
> option? I wonder about two other choices, constant distance away
> from the intersection point along either surface, and some form of
> constant height, so the join line with the fillet is parallel to the
> plane---but I don't know then how you select the radius or distance
> along the plane.
>
> On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
>
>
SP
Sanjeev Prabhakar
Tue, Jan 25, 2022 12:41 AM
I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
6.05.44 AM.png]
On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
Great to see your version
Fillet is the same all across meaning the radius is same all across.
The difference seems to be due to the angles , lines are making with x-y
plane.
Will also check the rendering issue, when i have some time
Thanks
On Tue, 25 Jan 2022 at 05:45, Adrian Mariano avm4@cornell.edu wrote:
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
6.05.44 AM.png]
On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> Great to see your version
> Fillet is the same all across meaning the radius is same all across.
> The difference seems to be due to the angles , lines are making with x-y
> plane.
> Will also check the rendering issue, when i have some time
> Thanks
>
>
> On Tue, 25 Jan 2022 at 05:45, Adrian Mariano <avm4@cornell.edu> wrote:
>
>> OpenSCAD is tricky, where things may seem OK but not be OK, and you
>> don't encounter the problems until adding more model elements. It
>> causes no end of confusion and a continuous stream of questions here.
>> I didn't find problems rendering until I cut your model in half to
>> see a cross section. View your model with "thrown together" and
>> you'll see that the fillet is yellow but everything else purple.
>> That's a problem. It means your faces are reversed on the prism and
>> cube. Actually my model has a similar problem. The last line of
>> rprism needs to be
>>
>>
>> vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
>>
>> When you say "fillet is the same" there is the question of what "the
>> same" means. It very clearly does not meet the prism at the same
>> height from the cube. But I believe at this point that it has the
>> same radius everywhere. The question then, is what is the right way
>> to make fillets in a situation like this. Is constant radius the best
>> option? I wonder about two other choices, constant distance away
>> from the intersection point along either surface, and some form of
>> constant height, so the join line with the fillet is parallel to the
>> plane---but I don't know then how you select the radius or distance
>> along the plane.
>>
>> On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
>>
>>
AM
Adrian Mariano
Tue, Jan 25, 2022 12:50 AM
Your picture looks like a preview, not a render.
I did this at the end of your code:
intersection(convexity=10){
union(){
swp(prism3);
swp(prism4);
swp(ipf(prism3,prism4,2,1,s=20));
}
cube([200,30,200],center=true);
}
and got
WARNING: Object may not be a valid 2-manifold and may need repair!
Also as I said, in the "thrown together" view I see purple, which means you
have a problem. Everything should be yellow.
On Mon, Jan 24, 2022 at 7:41 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
6.05.44 AM.png]
On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
Great to see your version
Fillet is the same all across meaning the radius is same all across.
The difference seems to be due to the angles , lines are making with x-y
plane.
Will also check the rendering issue, when i have some time
Thanks
On Tue, 25 Jan 2022 at 05:45, Adrian Mariano avm4@cornell.edu wrote:
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
Your picture looks like a preview, not a render.
I did this at the end of your code:
intersection(convexity=10){
union(){
swp(prism3);
swp(prism4);
swp(ipf(prism3,prism4,2,1,s=20));
}
cube([200,30,200],center=true);
}
and got
WARNING: Object may not be a valid 2-manifold and may need repair!
Also as I said, in the "thrown together" view I see purple, which means you
have a problem. Everything should be yellow.
On Mon, Jan 24, 2022 at 7:41 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com>
wrote:
> I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
> 6.05.44 AM.png]
>
> On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
> wrote:
>
>> Great to see your version
>> Fillet is the same all across meaning the radius is same all across.
>> The difference seems to be due to the angles , lines are making with x-y
>> plane.
>> Will also check the rendering issue, when i have some time
>> Thanks
>>
>>
>> On Tue, 25 Jan 2022 at 05:45, Adrian Mariano <avm4@cornell.edu> wrote:
>>
>>> OpenSCAD is tricky, where things may seem OK but not be OK, and you
>>> don't encounter the problems until adding more model elements. It
>>> causes no end of confusion and a continuous stream of questions here.
>>> I didn't find problems rendering until I cut your model in half to
>>> see a cross section. View your model with "thrown together" and
>>> you'll see that the fillet is yellow but everything else purple.
>>> That's a problem. It means your faces are reversed on the prism and
>>> cube. Actually my model has a similar problem. The last line of
>>> rprism needs to be
>>>
>>>
>>> vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
>>>
>>> When you say "fillet is the same" there is the question of what "the
>>> same" means. It very clearly does not meet the prism at the same
>>> height from the cube. But I believe at this point that it has the
>>> same radius everywhere. The question then, is what is the right way
>>> to make fillets in a situation like this. Is constant radius the best
>>> option? I wonder about two other choices, constant distance away
>>> from the intersection point along either surface, and some form of
>>> constant height, so the join line with the fillet is parallel to the
>>> plane---but I don't know then how you select the radius or distance
>>> along the plane.
>>>
>>> On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
>>>
>>> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
AM
Adrian Mariano
Tue, Jan 25, 2022 1:01 AM
I changed my code to make a roundover with a constant length and I like
this result better. Especially with a more oblique angled prism.
On Mon, Jan 24, 2022 at 7:50 PM Adrian Mariano avm4@cornell.edu wrote:
Your picture looks like a preview, not a render.
I did this at the end of your code:
intersection(convexity=10){
union(){
swp(prism3);
swp(prism4);
swp(ipf(prism3,prism4,2,1,s=20));
}
cube([200,30,200],center=true);
}
and got
WARNING: Object may not be a valid 2-manifold and may need repair!
Also as I said, in the "thrown together" view I see purple, which means
you have a problem. Everything should be yellow.
On Mon, Jan 24, 2022 at 7:41 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
6.05.44 AM.png]
On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
Great to see your version
Fillet is the same all across meaning the radius is same all across.
The difference seems to be due to the angles , lines are making with x-y
plane.
Will also check the rendering issue, when i have some time
Thanks
On Tue, 25 Jan 2022 at 05:45, Adrian Mariano avm4@cornell.edu wrote:
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
I changed my code to make a roundover with a constant length and I like
this result better. Especially with a more oblique angled prism.
On Mon, Jan 24, 2022 at 7:50 PM Adrian Mariano <avm4@cornell.edu> wrote:
> Your picture looks like a preview, not a render.
>
> I did this at the end of your code:
>
>
> intersection(convexity=10){
> union(){
> swp(prism3);
> swp(prism4);
> swp(ipf(prism3,prism4,2,1,s=20));
> }
> cube([200,30,200],center=true);
> }
>
> and got
>
> WARNING: Object may not be a valid 2-manifold and may need repair!
>
>
> Also as I said, in the "thrown together" view I see purple, which means
> you have a problem. Everything should be yellow.
>
>
>
>
>
> On Mon, Jan 24, 2022 at 7:41 PM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
>> 6.05.44 AM.png]
>>
>> On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
>> wrote:
>>
>>> Great to see your version
>>> Fillet is the same all across meaning the radius is same all across.
>>> The difference seems to be due to the angles , lines are making with x-y
>>> plane.
>>> Will also check the rendering issue, when i have some time
>>> Thanks
>>>
>>>
>>> On Tue, 25 Jan 2022 at 05:45, Adrian Mariano <avm4@cornell.edu> wrote:
>>>
>>>> OpenSCAD is tricky, where things may seem OK but not be OK, and you
>>>> don't encounter the problems until adding more model elements. It
>>>> causes no end of confusion and a continuous stream of questions here.
>>>> I didn't find problems rendering until I cut your model in half to
>>>> see a cross section. View your model with "thrown together" and
>>>> you'll see that the fillet is yellow but everything else purple.
>>>> That's a problem. It means your faces are reversed on the prism and
>>>> cube. Actually my model has a similar problem. The last line of
>>>> rprism needs to be
>>>>
>>>>
>>>> vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
>>>>
>>>> When you say "fillet is the same" there is the question of what "the
>>>> same" means. It very clearly does not meet the prism at the same
>>>> height from the cube. But I believe at this point that it has the
>>>> same radius everywhere. The question then, is what is the right way
>>>> to make fillets in a situation like this. Is constant radius the best
>>>> option? I wonder about two other choices, constant distance away
>>>> from the intersection point along either surface, and some form of
>>>> constant height, so the join line with the fillet is parallel to the
>>>> plane---but I don't know then how you select the radius or distance
>>>> along the plane.
>>>>
>>>> On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
>>>>
>>>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>
SP
Sanjeev Prabhakar
Tue, Jan 25, 2022 1:51 AM
Ok
I checked with difference instead of intersection
On Tue, 25 Jan 2022, 06:21 Adrian Mariano, avm4@cornell.edu wrote:
Your picture looks like a preview, not a render.
I did this at the end of your code:
intersection(convexity=10){
union(){
swp(prism3);
swp(prism4);
swp(ipf(prism3,prism4,2,1,s=20));
}
cube([200,30,200],center=true);
}
and got
WARNING: Object may not be a valid 2-manifold and may need repair!
Also as I said, in the "thrown together" view I see purple, which means
you have a problem. Everything should be yellow.
On Mon, Jan 24, 2022 at 7:41 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
6.05.44 AM.png]
On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:
Great to see your version
Fillet is the same all across meaning the radius is same all across.
The difference seems to be due to the angles , lines are making with x-y
plane.
Will also check the rendering issue, when i have some time
Thanks
On Tue, 25 Jan 2022 at 05:45, Adrian Mariano avm4@cornell.edu wrote:
OpenSCAD is tricky, where things may seem OK but not be OK, and you
don't encounter the problems until adding more model elements. It
causes no end of confusion and a continuous stream of questions here.
I didn't find problems rendering until I cut your model in half to
see a cross section. View your model with "thrown together" and
you'll see that the fillet is yellow but everything else purple.
That's a problem. It means your faces are reversed on the prism and
cube. Actually my model has a similar problem. The last line of
rprism needs to be
vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
When you say "fillet is the same" there is the question of what "the
same" means. It very clearly does not meet the prism at the same
height from the cube. But I believe at this point that it has the
same radius everywhere. The question then, is what is the right way
to make fillets in a situation like this. Is constant radius the best
option? I wonder about two other choices, constant distance away
from the intersection point along either surface, and some form of
constant height, so the join line with the fillet is parallel to the
plane---but I don't know then how you select the radius or distance
along the plane.
On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
Ok
I checked with difference instead of intersection
On Tue, 25 Jan 2022, 06:21 Adrian Mariano, <avm4@cornell.edu> wrote:
> Your picture looks like a preview, not a render.
>
> I did this at the end of your code:
>
>
> intersection(convexity=10){
> union(){
> swp(prism3);
> swp(prism4);
> swp(ipf(prism3,prism4,2,1,s=20));
> }
> cube([200,30,200],center=true);
> }
>
> and got
>
> WARNING: Object may not be a valid 2-manifold and may need repair!
>
>
> Also as I said, in the "thrown together" view I see purple, which means
> you have a problem. Everything should be yellow.
>
>
>
>
>
> On Mon, Jan 24, 2022 at 7:41 PM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> I checked there is no issue in rendering[image: Screenshot 2022-01-25 at
>> 6.05.44 AM.png]
>>
>> On Tue, 25 Jan 2022 at 05:58, Sanjeev Prabhakar <sprabhakar2006@gmail.com>
>> wrote:
>>
>>> Great to see your version
>>> Fillet is the same all across meaning the radius is same all across.
>>> The difference seems to be due to the angles , lines are making with x-y
>>> plane.
>>> Will also check the rendering issue, when i have some time
>>> Thanks
>>>
>>>
>>> On Tue, 25 Jan 2022 at 05:45, Adrian Mariano <avm4@cornell.edu> wrote:
>>>
>>>> OpenSCAD is tricky, where things may seem OK but not be OK, and you
>>>> don't encounter the problems until adding more model elements. It
>>>> causes no end of confusion and a continuous stream of questions here.
>>>> I didn't find problems rendering until I cut your model in half to
>>>> see a cross section. View your model with "thrown together" and
>>>> you'll see that the fillet is yellow but everything else purple.
>>>> That's a problem. It means your faces are reversed on the prism and
>>>> cube. Actually my model has a similar problem. The last line of
>>>> rprism needs to be
>>>>
>>>>
>>>> vnf_vertex_array(transpose(mesh),col_wrap=true,caps=true,reverse=true);
>>>>
>>>> When you say "fillet is the same" there is the question of what "the
>>>> same" means. It very clearly does not meet the prism at the same
>>>> height from the cube. But I believe at this point that it has the
>>>> same radius everywhere. The question then, is what is the right way
>>>> to make fillets in a situation like this. Is constant radius the best
>>>> option? I wonder about two other choices, constant distance away
>>>> from the intersection point along either surface, and some form of
>>>> constant height, so the join line with the fillet is parallel to the
>>>> plane---but I don't know then how you select the radius or distance
>>>> along the plane.
>>>>
>>>> On Mon, Jan 24, 2022 at 6:59 PM Sanjeev Prabhakar
>>>>
>>>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>