evFaceTangentPlane() on a degenerate point?

EvanReese
EvanReese Member, Mentor Posts: 3,105 PRO
I'm running into an issue creating a plane on a revolved face at the center of the revolve. I'd like to avoid just slightly scooting off the center to something like vector(0.00001, 0). I just need the origin and normal. I understand that it is indeterminate, since the same "location" on the face, could have more than one normal direction, for example at the tip of a cone. In my case, we can assume it's a tangent point, more like the pole of a sphere, which should still only have 1 normal. Does anybody have a way to get a tangent plane at that location, even if it's a bit of a workaround?
Evan Reese
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com

Answers

  • Jacob_Corder
    Jacob_Corder Member Posts: 141 PRO
    @Evan_Reese

    your going to have to show in a model what you are talking about. 

    Do you want the revolved faces axis? if so just call extractDirection which in this case will call evAxis

    if you need the tangent plane at a specific spot on the cone you would need to call evRaycast with the line origin on the axis of the revolved face then
     
    var rayResults = evRaycast(context, {
            "entities" : yourFace,
            "ray" : line(somePointOnYourAxis, someDirection),
            "closest" : false,
            "includeIntersectionsBehind":false
    });
    var tp =evFaceTangentPlane(context, {
            "face" : rayResults[0].entity,
            "parameter" : rayResults[0].parameter
    });
    if it is going to be a cone, you could also just calculate the point.

    if this is not what you are looking for, share the model and ill take a look.

  • _anton
    _anton Member, Onshape Employees Posts: 555 image
    Least-awkward solution that comes to mind is to either reference the revolve axis entity instead (if it exists) or store an attribute on the revolved geometry.