[OpenSCAD] Rounded Polygon

Ronaldo Persiano rcmpersiano at gmail.com
Tue May 28 22:45:42 EDT 2019


adrianv <avm4 at cornell.edu> wrote:

> To use more precise language:  There exists a direction from which the
> highlight line on the model appears to have a corner (highlight has a
> discontinuity in its derivative).   This is visible in the photo I posted
> in
> my other message.


I understand it now. In fact, the images suggest something odd in the
border of the tripatch. See bellow.

I generated my patch like this:
>
> Q = cornerPatchCP([0,0,0],1.5, 0.3);
>
> using the cornerPatchCP that you previously posted.   I was comparing this
> patch to the patch you originally posted, so the length of d disagrees, I
> think.  I can change the patch, but for print test a larger curve is
> better.
>

The standard patch has a unitary "radius". To get a bigger roundover to
print, just scale it up.
The value 1.5 of the second argument in cornerPatchCP correspond to scale
up the standard patch by 1.5.
To match the form factor of the border curves of  cornerPatchCP([0,0,0],1,
0.3) you may use the following standard patch CPs:

[[0, 1, 1]]

[[0, 1, 0.76], [0, 0.76, 1]]

[[0, 1, 0.28], [0, 0.7, 0.7], [0, 0.28, 1]]

[[0.28, 1, 0], [0, 0.55, 0], [0, 0, 0.55], [0.28, 0, 1]]

[[0.76, 1, 0], [0.7, 0.7, 0], [0.55, 0, 0], [0.7, 0, 0.7], [0.76, 0, 1]]

[[1, 1, 0], [1, 0.76, 0], [1, 0.28, 0], [1, 0, 0.28], [1, 0, 0.76], [1, 0,
1]]


That patch may be somewhat bulged when compared with a sphere, for
instance.

The best approximation I got of a sphere surface with a G2 tripatch has the
following CPs:

[[0, 1, 0.904], [0, 0.904, 1]]

[[0, 1, 0.352], [0, 0.88, 0.88], [0, 0.352, 1]]

[[0.352, 1, 0], [0, 0.52, 0], [0, 0, 0.52], [0.352, 0, 1]]

[[0.904, 1, 0], [0.88, 0.88, 0], [0.52, 0, 0], [0.88, 0, 0.88], [0.904, 0,
1]]

[[1, 1, 0], [1, 0.904, 0], [1, 0.352, 0], [1, 0, 0.352], [1, 0, 0.904], [1,
0, 1]]


whose border curves should match the border curves of cornerPatchCP([0,0,0],1,
0.12).

The second form factor I mentioned before does not affect the patch border
but controls the bulge of the patch. When we decrease its value, but
keeping the border curves fixed, the patch curvature varies very fast,
although continuously, near the patch border which may appear as a
discontinuity. Which means that the 3rd derivative near the border is
higher. Perhaps, that is the cause of the highlight behavior we observe in
your images. The last patch above seems to be a reasonable compromise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190529/02fea40f/attachment.html>


More information about the Discuss mailing list