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.

Help needed: opMove doesn't behave as I expect

Hi all, 
I am experiencing an issue with the `opMoveFace`. The issue is relatively simple. I create a sketch (e.g. a circle) on a plane (let's say the `top` plane). Then, in a feature script, I apply the following operation on the created face (hereafter named `myFace`):
opMoveFace(context, id + "moveFace1", {
"moveFaces" : definition.face,
"transform" : transform(vector(definition.x, definition.y, definition.z))});
The code gives the expected result only if the `vector(x,y,z)` doesn't lie on the plane of the sketch. Otherwise (i.e. if the vector is outside the plane), no movement at all is applied. Is this a normal behaviour? Can anyone explains to me what's going on? 
Thanks,
Francesco

Answers

  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    The goal is to just move a given face anywhere in space by XYZ coordinates? I haven't tested and am not certain, but opPattern might be a better tool for it. You should be able to feed it the same inputs. Assuming the feature would only move one face, you could just throw any string into an array for instanceNames like ["myInstanceName"]. 
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    The way to test it is to see if you can perform those operations manually with the UI. I’m not sure that will work. opTransform or opPattern would be better. 
    Senior Director, Technical Services, EMEAI
  • francesco_norifrancesco_nori Member Posts: 4
    Thanks for the replies!

    @evan, yes this is about moving a face in XYZ and after that I need to rotate as well. @neil, it's indeed the case that I can't do this operation with the UI.

    I went along a different path so I won't be able to test the proposed operations (opTransform or opPattern) as an alternative. Still I think that from a user perspective it's quite misleading to have an operation (in this case opMoveFace) that works in a way that is misleading.
Sign In or Register to comment.