Constant plane via mate connector (FS)

ben_partouch
ben_partouch Member, csevp Posts: 168 PRO
Hello,

How do I establish a plane using a mate connector, in a way that no matter how I orient the part, the directions will remain the same.
The plane will be used for a sketch and then extrude the sketch normal to the sketch region.

Thank you

Comments

  • Jason_S
    Jason_S Moderator, Onshape Employees, Developers Posts: 225 image
    edited July 2024
    Either:
    1. Construct a mate connector from selections in the feature. You need a point for the origin and two directions orthogonal to each other.
    2. Place a mate connector on the part being derived. If you move it after it is derived, you'd need to construct a query to transform the mate connector and the part.

    Without explicit definition, you will be subjected to the right and left-handedness of edge direction (+Z direction) and implicit direction guesses when transformed in world space that will affect clocking (XY plane orientation about the Z).
    Support & QA
  • ben_partouch
    ben_partouch Member, csevp Posts: 168 PRO
    The feature is creating new geometry in this case, so I assume opt 1 is preferable. 
    I can't figure out how to make a plane that is parallel to the Z normal direction. Only xy planes.

    Thank you Jason.

  • jelte_steur_info
    jelte_steur_info Member Posts: 683 PRO
    would this work?

    plane(coordsystem.origin, coordsystem.xAxis, yAxis(coordsystem)); 

    //this would be normal to yaxis. swap the last two arguments to let the x axis be normal. either optionare parralel to Z.
  • NeilCooke
    NeilCooke Moderator, Onshape Employees Posts: 6,124 image
    It's not clear what you are trying to do? I don't follow Jason's comments either.

    If you just want to convert a MC to a plane, use evPlane
    Senior Director, Technical Services, EMEA
  • ben_partouch
    ben_partouch Member, csevp Posts: 168 PRO
    Thank you @jelte_steur814, I'll definitely try this. 

    @NeilCooke- Using evPlan with the MC only works in one orientation. As soon as the parts move the whole thing is messed up. 
    I want it constant and robust at all orientations. 

  • ben_partouch
    ben_partouch Member, csevp Posts: 168 PRO
    @jelte_steur814
    can't get it normal to Z. 
    Tried both ways.


  • ben_partouch
    ben_partouch Member, csevp Posts: 168 PRO
    @jelte_steur814
    I got it. zAxis... 
    Thank you!

    Let's see if the rest works well.
  • ben_partouch
    ben_partouch Member, csevp Posts: 168 PRO
    How do I set a vector for a transform operation that is following the new coor' system?
    So if I want to move 50mm only in the Y axis.

    Thank you

  • jelte_steur_info
    jelte_steur_info Member Posts: 683 PRO
    i think something like this?

    i didn't test any of this, but you get the gist I hope.

    const direction = evAxis(yAxis).direction;
    const translationVector = direction * (50 * millimeter);

  • ben_partouch
    ben_partouch Member, csevp Posts: 168 PRO
    It was close. Finally got it though. 
    Here's the solution:

    var yDirection = yAxis(location2);

     var line1 = line(location1, yDirection);
                debug(context, line1, DebugColor.MAGENTA);

                
                const translationVector = yDirection * secRowDis;
                // debug(context, direction, DebugColor.RED);

                opPattern(context, id + "patternC", {
                            "entities" : qCreatedBy(id + "boolean2", EntityType.FACE),
                            "transforms" : [transform(translationVector)],
                            "instanceNames" : ["secondraw"]
                        });

    Thanks so much @jelte_steur814