Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
What's wrong with this opTransform input?
joshua_babcock
Member Posts: 4 ✭✭
I can't figure out the specific problem that
https://cad.onshape.com/documents/af3829af826d4b2b5019e0ea/v/fa5b7fd177f800d8437170b6/e/c91a3b497a2ed9010b56e311
@opTransform: INVALID_INPUT refers to. I have checked the input, and don't see anything wrong with it. Is there a problem with the query I am passing? It's just a bunch of faces from an annotation. I tried a few others, and I keep getting this error. I tried a few different transforms as well ... |
Tagged:
0
Best Answers
-
konstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭you can only tansform bodies - "Filter" : EntityType.BODY for input field.also code inside this if (false && verbose || false) will never be executed because it will always be false condition
5 -
ilya_baran Onshape Employees, Developers, HDM Posts: 1,210The problem is that you're passing a query for faces, but opTransform expects entire bodies. (See https://cad.onshape.com/FsDoc/modeling.html) You can pass for instance qOwnerBody(faces) instead of faces, depending on what you want to do. If you do want to transform individual faces instead, you'll have to use a different operation, like opMoveFace.
P.S. This is exactly the right way to ask an FS question on the forum -- by providing a link to a version of a public document, I (and others) can immediately see what's wrong without having to guess.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
P.S. This is exactly the right way to ask an FS question on the forum -- by providing a link to a version of a public document, I (and others) can immediately see what's wrong without having to guess.
This might mean that I am on the wrong track conceptually here though. Ultimately I'm not trying to do anything to the bodies. I want to extract some information about edges, check that they form a specific form of developable surface, and then reconstruct them on a plane. I was doing this because the next step is to see which side of the plane has the majority of the data and make a sane guess that that is the data that will get mirrored later on, but since it's already aligned with one of the axis I can just count up the signs of the x components of all the points, then discard everything on the wrong side.
I wanted to make it work for an arbitrary centerline reflection plane, but that is looking like a problem for another day so I will just skip the transforms for now and just concentrate on extracting the data into a datastructure I can produce a sketch from.
Konstantin, that false && was just a quick hack to remove that from getting triggered when I set my verbose debugging variable. I don't like to use /* */ comments because I always get in trouble by accidentally nesting them. Thanks for the heads up though.
Thank's for the very fast answers!
P.S. I am trying to automate unfolding a ship hull for a paper model. If I approximate the surface using only lines in one direction and only lines or arcs in the other, it will at least work out to several developable beam-wise strips, and at best one big palm shaped object. The key is to make all the waterlines polylines, and change the inflections of the sections where they cross those waterlines. This shouldn't be a big restriction because actual shipbuilders have to solve this problem too, though they get to stretch the steel a bit more than I can stretch paper and use lots more plates so they can have gentle curves for waterlines. My plan is to just iterate over the faces and suck the edge data out into my own datastructure and then let skSolve figure out all the angles. I know that there is a featurescript that can do this but I don't want to reconstruct all these faces as cylinders and cones, just check that they can be. That way in the future I only have to make sure that I approximate the sections with lines and arcs with all the corresponding points lining up between sections.