Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

How to model a lens shade for 3d filament printing...

max_rockbinmax_rockbin Member Posts: 7
edited September 2015 in Community Support
I'm new to CAD and have been trying to figure out how to model a microscope lenshade with the following approximate specs:
Bottom profile is a circle approx 19mm diameter
Above it about 20mm, the opening profile is a rectangle approx 1.5x2.5mm
(this is for a microscope lens, so the subject end is narrower than the back end)
So it's sort of a cone with a cut off squared pointy end.

That's a straightforward loft with the surface thickened (to 2mm).  The tricky part is that the inside has to have grooves about 1mm deep concentric to the axis.  The grooves would be separated by 0.3mm and span about 2mm.
They would be rectangular grooves perpendicular to the central axis (lofting path of the hood).
Ideally, the grooves would be trapezoidal, so the deepest part would actually be at a 45 degree angle at the bottom, giving support to the upper wall of the groove as it is being 3d printed (about 1/2mm of the wall depth would still be cantilevered).

Here's a rough drawing.  In the real hood there would be many more grooves and the angles and proportions are a little different.   The idea is that the front business end of the hood ideally will match the shape of the field of view (DSLR sensor proportions) and the part that mates with the lens naturally has to have the round shape of the front of the lens.  The idea is to limit light rays from outside of the field of view from striking the front of the lens.  The slots (baffles) reduce reflections that would be visible to the lens from stray light striking the side of the hood.

If it is not practical to do this, I can just do a revolve of the profile around the axis and have a more typical conical lens hood.  But a nice thing about 3d printing is no additional cost for printing eccentric shapes.



Best Answers

  • matthew_menardmatthew_menard Member Posts: 96 ✭✭✭
    Answer ✓
    Sorry, I should have named the features to give a better idea of what I did.

    I started with a loft that was arbitrarily offset 3mm from the dimensions in your sketch to make the outer body.  Then made a remove loft that was to the diameter of the lens and aperture in the sketch.  After that, I offset a plane 2mm off the base and used that to cut the body along that plane.  Next was a sketch on that plane.  In that sketch, I selected the edges of the cut bodies and converted them into the sketch.  The converted geometry was then offset by 1mm.  I then extrude added it to .3mm and merged the whole thing back together.  That process was repeated again with a new plane offset by 2mm.

    Hope that makes it a little clearer, it's late though so I make no warranty on how clear my description is.
  • russ_taberruss_taber Member Posts: 11 ✭✭
    edited September 2015 Answer ✓
    This should be dimensionally accurate. Basically I modeled the negative space then subtracted it from a larger solid. 


    Doing this from my iPad Mini so hopefully this link is accurate or search for 'lens hood'. Delete the last element to remove the cut-away. Fun challenge.
    https://cad.onshape.com/document-redirect.html?d=/documents/2ac5ee76fc3b4716966f9212/w/dcbfab62d24b474786f9c4b5

Answers

  • shashank_aaryashashank_aarya Member Posts: 265 ✭✭✭
    I could understand your requirement partially. Description is nicely illustrated but it would be nice if you also show some of the dimensions in the rough sketch you have given. We will see how it can be designed with best practices.
    Thanks
  • max_rockbinmax_rockbin Member Posts: 7
    edited September 2015
    Thank You.  Good suggestion.  Here are the dimensions.  This is kind of a prototype.  I'd like to be able to use the same general technique using different dimensions for different objectives:

  • erick_smitherick_smith Member Posts: 3
    Hmm. I can't figure out how to revolve this shape with a circle at one end, and rectangle at the other. Not sure of the process, or if this is possible. Hopefully someone can figure this out for you. 
  • max_rockbinmax_rockbin Member Posts: 7
    My best guess was to loft the basic shape between the circle and the rectangle and thicken the walls to 2mm.
    Then create a series of planes that intersect the "cone" perpendicular to its axis where the grooves are desired and derive circles where the planes intersect the cone (on the inside).  Then use those circles as sweep paths for a shape that would cut the grooves (sweep with subtract selected).  But I haven't managed to do this successfully.   I don't know how to isolate the circles (actually circle rectangle hybrids) where the plane intersect the lofted cone so they can be used as sweep paths and haven't managed to get the sweeped shape positioned correctly to cut the groove.
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    @max_rockbin
     My first thought would be to mass-produce a stack of sweep paths in virtual space, a bit like a stack of flight paths over an airport.

    You can do this by lofting a single surface, between a circle and a round cornered rectangle (see note 1)

    Then create a stack of planes, one for each groove

    Now you can produce a generic sketch of a round-cornered rectangle with minimal constraints, and paste it into each sketch. (see note 2) then constrain the entities to the surface mentioned above.

    Note 1: the circle will need to be split into as many arcs as the total number of segments in the other profile, presumably 8
    Note 2: this palaver is necessary (or some other workaround - I expect another user will have a better one) because Onshape does not yet provide "intersection curve" facility, unless it snuck in while I was asleep.
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    It would be tricky working out just what sizes to make the end profiles for the surface loft I recommend above: if it was me, I would just take a stab and then adjust. Parametric CAD encourages this sort of lazy substitute for clear-headed analytical geometry.
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
     I think this is what you are looking for it's not dimensional correct but you can get the idea.
    See link

    https://cad.onshape.com/documents/e8eb4bc908ba4bf1a490bc07/w/217f4cf449564267b54d0f99/e/45afa940ec3742d6a9137a06


  • max_rockbinmax_rockbin Member Posts: 7
    Maybe I'm not understanding, but wouldn't I just use my 19mm circle and 2.5mm x 1.5mm square as the end profiles of the loft?  (Then thicken the walls to 2mm on the outside).    That still would leave the issue of the grooves, which I think would be the hard part.    In the method you're suggesting, maybe I'm not familiar with the procedure.

    When you say "take a stab and adjust," are you suggesting making a profile and revolving it to create a cone and adjusting that somehow to square of the top?  If so, how does one do that in OnShape? 

    I've been taking a few stabs at this hood  with no luck on my own so far.  I can fall back to a simpler form, but OnShape seems so powerful, I just figured there must be a way...
  • matthew_menardmatthew_menard Member Posts: 96 ✭✭✭
    Well, I didn't make it very parametric but here is a stab at what it seems like you were looking for.  My go to tricks from Solidworks, like linking dimensions aren't in OnShape yet, but I'm sure one could come up with a way to make the planes linked.  Maybe endpoints in a master sketch setting the position of each of the planes?

    I tried to do one more level, but it doesn't seem to like the geometry that was getting made when I offset the profile in. 

    https://cad.onshape.com/documents/4d3a3befc86f475c86e135ad/w/ea2bd8a23ebc4bdcbf2079cf/e/3d0e620d29614a22a6cf132d

    Hope this helps.

  • max_rockbinmax_rockbin Member Posts: 7
    DaVicki - That's great!   I would love to know how you did it.     There are still some things I'd have to figure out (if you revolve the model so you're looking through it from the point of view of the lens, you can see the circular groove edges (baffles) are obscuring part of the rectangular opening - so that would cover part of the subject.

    In an ideal world all of those circular disk cut outs on the interior would follow the same progression from circular to rectangular as the main shell.  Maybe I could do that by replicating a smaller version of the main shape and subtracting it from the interior.

    But how did you make all those interior grooves?  I can see you used disks (which I think you generated with a revolve?)

    Thanks!
  • max_rockbinmax_rockbin Member Posts: 7
    matthew_menard,
    I think you nailed it!   That's great.    Can you explain something of the steps involved? 
    I'm not following the steps very well just from the document.
  • matthew_menardmatthew_menard Member Posts: 96 ✭✭✭
    Answer ✓
    Sorry, I should have named the features to give a better idea of what I did.

    I started with a loft that was arbitrarily offset 3mm from the dimensions in your sketch to make the outer body.  Then made a remove loft that was to the diameter of the lens and aperture in the sketch.  After that, I offset a plane 2mm off the base and used that to cut the body along that plane.  Next was a sketch on that plane.  In that sketch, I selected the edges of the cut bodies and converted them into the sketch.  The converted geometry was then offset by 1mm.  I then extrude added it to .3mm and merged the whole thing back together.  That process was repeated again with a new plane offset by 2mm.

    Hope that makes it a little clearer, it's late though so I make no warranty on how clear my description is.
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited September 2015
    Maybe I'm not understanding, but wouldn't I just use my 19mm circle and 2.5mm x 1.5mm square as the end profiles of the loft?  (Then thicken the walls to 2mm on the outside).    That still would leave the issue of the grooves, which I think would be the hard part.    In the method you're suggesting, maybe I'm not familiar with the procedure.

    When you say "take a stab and adjust," are you suggesting making a profile and revolving it to create a cone and adjusting that somehow to square of the top?  If so, how does one do that in OnShape? 

    I've been taking a few stabs at this hood  with no luck on my own so far.  I can fall back to a simpler form, but OnShape seems so powerful, I just figured there must be a way...
    @max_rockbin
    My suggestion was in response to your proposal to produce "sweep paths for a shape that would cut the grooves (sweep with subtract selected)."
    It was not a method for creating a solid hood, simply for adding grooves to an existing model.
    It was aimed at mass-producing a stack of paths with the desired characteristics.
    The "adjust" I had in mind was a simple variation of the dimensions of the two end profiles, using the parametric capabilities to maintain their essential character, to bring the grooves to the 
    correct depths.

  • russ_taberruss_taber Member Posts: 11 ✭✭
    edited September 2015 Answer ✓
    This should be dimensionally accurate. Basically I modeled the negative space then subtracted it from a larger solid. 


    Doing this from my iPad Mini so hopefully this link is accurate or search for 'lens hood'. Delete the last element to remove the cut-away. Fun challenge.
    https://cad.onshape.com/document-redirect.html?d=/documents/2ac5ee76fc3b4716966f9212/w/dcbfab62d24b474786f9c4b5
  • max_rockbinmax_rockbin Member Posts: 7
    edited September 2015
    russ_taber - Thank You.  I thought it was a fun puzzle to figure out how to make this.  I only wish I had solved it myself!

    I just copied it to my own workspace and went through every step and edited each step so It would display the part at that point in the history and what settings were used.   Everything is perfectly clear.   A very clever solution and it shows what you can do with a good tool in good hands.  Thanks Again!
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    That's a seriously nice piece of modelling, thoughtfully planned and executed, and beautifully documented.

    Muchos kudos to you, @russ_taber !

Sign In or Register to comment.