discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How to avoid discontinuities in generated surfaces

ML
Mathieu Lacage
Mon, May 30, 2022 11:21 AM

Hi,

I do not have any experience with solid modeling in general, or openscad
specfically, but I'd like to 3d-print swim goggles with a couple of
specific characteristics so, this got me started on modeling the attached
thingy (screenshot+code).

This version is structured as follows:

  1. it builds the main shell from the skin function applied to an ellipsis
    trajectory with a parameterized profile (line 143):

     trans = [for (i=[0:len(path2)-1]) transform(path2[i],
    

shell_profile(i/len(path2)))];
skin(trans);

  1. It builds the outer ring (which will be used to attach a silicone part,
    not yet designed) by building a trajectory manually over the bottom of the
    main shell, and then skinning a simple bar over this trajectory(lines
    137-141 ):

    ring_positions = [for (i=[0:len(path2)-1]) transform(path2[i],
    

[ring_position(i/len(path2))])[0]];
echo(ring_positions);
ring_transforms = construct_transform_path3(ring_positions);
ring_transformed_profiles = [for (i=[0:1:len(ring_transforms)-1])
transform(ring_transforms[i], thickify([[0,0], [5, 0]], thickness=1,
left=false))];
skin(ring_transformed_profiles);

A couple of notes about this code:

  1. I borrowed construct_transform_path3 from a thread on this forum, I
    cannot find which thread anymore, sorry.

  2. there is an more "natural" way to build the ring by integrating it in
    the main shell profile but this results in the "wrong.png" screenshot
    attached: what is wrong here is the angle at the bottom of the part between
    the main shell and the ring: I want an angle that is less extreme. This is
    why the ring part is built separately in this version: sweeping a bar along
    the trajectory results in a slightly different geometry with an angle more
    easily controlled.

Now, I have one remaining problem with this version: there are two
discontinuities that appear on the intersection with the x axis:

  1. on the left side, the shell surface appears to be discontinuous at the
    intersection with the axis/zaxis plane.
  2. on the right side, the end of my ring is not correctly jointed with the
    start of the ring

I have spent a good amount of time trying to understand why either of these
happen but at this point, I'd like to get input from other more
knowledgeable people: anyone could give me hints on what I have done wrong
here ?

best,
Mathieu

Hi, I do not have any experience with solid modeling in general, or openscad specfically, but I'd like to 3d-print swim goggles with a couple of specific characteristics so, this got me started on modeling the attached thingy (screenshot+code). This version is structured as follows: 1. it builds the main shell from the skin function applied to an ellipsis trajectory with a parameterized profile (line 143): trans = [for (i=[0:len(path2)-1]) transform(path2[i], shell_profile(i/len(path2)))]; skin(trans); 2. It builds the outer ring (which will be used to attach a silicone part, not yet designed) by building a trajectory manually over the bottom of the main shell, and then skinning a simple bar over this trajectory(lines 137-141 ): ring_positions = [for (i=[0:len(path2)-1]) transform(path2[i], [ring_position(i/len(path2))])[0]]; echo(ring_positions); ring_transforms = construct_transform_path3(ring_positions); ring_transformed_profiles = [for (i=[0:1:len(ring_transforms)-1]) transform(ring_transforms[i], thickify([[0,0], [5, 0]], thickness=1, left=false))]; skin(ring_transformed_profiles); A couple of notes about this code: 1. I borrowed construct_transform_path3 from a thread on this forum, I cannot find which thread anymore, sorry. 2. there is an more "natural" way to build the ring by integrating it in the main shell profile but this results in the "wrong.png" screenshot attached: what is wrong here is the angle at the bottom of the part between the main shell and the ring: I want an angle that is less extreme. This is why the ring part is built separately in this version: sweeping a bar along the trajectory results in a slightly different geometry with an angle more easily controlled. Now, I have one remaining problem with this version: there are two discontinuities that appear on the intersection with the x axis: 1. on the left side, the shell surface appears to be discontinuous at the intersection with the axis/zaxis plane. 2. on the right side, the end of my ring is not correctly jointed with the start of the ring I have spent a good amount of time trying to understand why either of these happen but at this point, I'd like to get input from other more knowledgeable people: anyone could give me hints on what I have done wrong here ? best, Mathieu