Plane Axis orientation

prajwal_shankar
prajwal_shankar Member, Developers Posts: 11 ✭
@ilya_baran

Lets say you have created a plane "Plane 2" as shown below. now as you see the plane created in in the same axis orientation of the Global X and Y axis even tough I have used the edge of the extrude to define the rotating axis. I want the plane to be oriented in such a way that the axis system of "Plane 2" should have its x-axis in the direction of the edge selected and y-axis perpendicular to it. Can this be done????

If so can this be done using FS and how?????!!!!!

Because achieving this in FS is my final goal.

Comments

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,278 image
    The orientation of construction planes can not be controlled (from FS or the UI).  However, if you need the plane for a sketch with a certain coordinate system (this is very common), using newSketchOnPlane (instead of newSketch) will let you do that without a construction plane at all -- it takes a Plane value and preserves the Plane's x axis.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • prajwal_shankar
    prajwal_shankar Member, Developers Posts: 11 ✭
    @ilya_baran

    I understand that you are talking about this option

    newSketchOnPlane(context, id, {
                         "sketchPlane" : plane(vector(0, 0, 0) * inch, vector(0, 0, 1))
                 });

    I understand that the first vector dictates the origin of the plane, but i have an issue with understanding the definition of the second vector. I also know it is something to do with angle with respect to the xy plane. Can you please explain me on how it works with an example or something because I am really struggling with it. For example how do you make a plane in the above case if the edge of the extrude is at 'say' 85 degrees with the front plane???


    Is it possible to do the sketch i intended to as above with this option????

    Thanks 
  • Dylan_Stewart
    Dylan_Stewart Member, Developers Posts: 107 PRO
    @prajwal_shankar  I am messing around with this right now, and what I am finding is that the first vector is for X,Y,Z and the second one is for the plane in which to create the sketch (FRONT, RIGHT, TOP)

    I think.... 
    Digital Engineering
  • mahir
    mahir Member, Developers Posts: 1,324 ✭✭✭✭✭
    The first vector is the origin, and the second is the normal vector. If you add a third vector, that will be the x direction. 
  • prajwal_shankar
    prajwal_shankar Member, Developers Posts: 11 ✭
    @mahir

    Thanks for the reply, but just to confirm the last two vectors should have angles(in degrees or radiance) as their values !


  • mahir
    mahir Member, Developers Posts: 1,324 ✭✭✭✭✭
    The first vector needs to have length units. The last two indicate directions (not angles), so they should be unitless.