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.

Shadow from point source?

Owen_MurphyOwen_Murphy Member Posts: 4
edited August 29 in FeatureScript

Hey! Does anyone know if there are featurescripts out there that generate a shadow of a part from a point source? I've tried all of the related featurescripts (Shadow, Outline, Project Body), but they all seem to project the edges of a part from a planar light source as opposed to a point source. I can certainly do this manually for each part, but it seems like it could be possible to make a featurescript that could do this for any arbitrary geometry. Any help would be much appreciated.

image.png

Comments

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 194 PRO

    Feels like a variation on the Solid Sweep problem, except you've got it in loft flavor instead. I've got some whitepapers that handle the swept case waiting for a rainy day to implement but this doesn't seem too far from that.

  • martin_kopplowmartin_kopplow Member Posts: 883 PRO

    Wans't there a ray trace FS published recently? I remember it being discused here on the forum.

  • Caden_ArmstrongCaden_Armstrong Member Posts: 307 PRO

    There is a feature that projects the shadow onto the surface.
    But the shadow is for an infinite far light source, so its not quite what you're trying to do.

    https://forum.onshape.com/discussion/comment/61460

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • S1monS1mon Member Posts: 3,498 PRO

    From @EvanReese

    https://cad.onshape.com/documents/de8cbd559bd2dcc347c38ff3/w/3603b1286161ccca20f2e841/e/b1db47e3a33d6461f8e732c1

    Simon Gatrall | Staff Mechanical Engineer | Carbon, Inc.

  • EvanReeseEvanReese Member, Mentor Posts: 2,521 PRO

    Optics won't be much help in casting shadows from a point source and I'm not aware of a feature that will. This kind of problem seems related to isoclines, but not perfectly so. One idea to force FeatureScript to do something like projection from a point is to scale the input body from the point till it is fully through the plane you're casting onto, then lofting between them somehow (face-by-face, splitting as needed?), which means I agree with @Derek_Van_Allen_BD that it's kind of like a Body Loft operation. For simpler things like your example, you can do this manually the same way, like this. For curvy shapes, i'm not sure yet.

    https://cad.onshape.com/documents/3ca15967b4931ac0ef7acfe1/w/c5cf855c1a9eb71dbe13c59f/e/428f838a03d7331e574e518a

    Aug-31-2025 05-58-29.gif Aug-31-2025 06-01-03.gif
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
Sign In or Register to comment.