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.
Parameter space vs World space when using evFaceTangentPlane
mahir
Member, Developers Posts: 1,307 ✭✭✭✭✭
I'd like to modify @jon_sorrells' Curve Pattern FS to accept a reference surface. The intention is to maintain the position of seed features/bodies/faces relative to the face normal at each incremental point along a curve. The problem is I don't see a way to generate a normal vector at any given point on a surface.
evFaceTangentPlane will let me generate a tangent plane, which in turn would contain the desired normal vector. However, evFaceTangentPlane requires the point definition in some face-specific parameter space. I'm guessing this would correspond to a point's position relative to U-V lines, but that doesn't help me. How do I convert a 3D vector from World csys to a face's parameter space?
Another option is evFaceNormalAtEdge, but that only works on edges. I'd have to split the surface with the curve before this would work, and I don't think that's an option, nor should it be that complicated.
If neither of the above functions will do the trick, how else can I get a face normal at an arbitrary point on the surface?
evFaceTangentPlane will let me generate a tangent plane, which in turn would contain the desired normal vector. However, evFaceTangentPlane requires the point definition in some face-specific parameter space. I'm guessing this would correspond to a point's position relative to U-V lines, but that doesn't help me. How do I convert a 3D vector from World csys to a face's parameter space?
Another option is evFaceNormalAtEdge, but that only works on edges. I'd have to split the surface with the curve before this would work, and I don't think that's an option, nor should it be that complicated.
If neither of the above functions will do the trick, how else can I get a face normal at an arbitrary point on the surface?
Tagged:
0
Comments
If I understand correctly what you're trying to do, you should be able to just replace this part of the code
by setting normalFaces to a query for the surface that you want. The code after that part will find the normal at the point closest to the curve
https://cad.onshape.com/documents/57ef018093832a1090983bfe/w/58bcbe4474554bfb72f7ecbe/e/147da62eb78afe2ead98587f
One way to get around this is to delete the faces from the hole, in between the hole feature and the curve pattern feature. That way, when the curve pattern happens, there won't be a hole in the surface, so the first instance should end up in the right place. I made a copy of your document and did that here: https://cad.onshape.com/documents/57ef1b8d93832a1090984d9f/w/1aa65960dbddcf3503587d2a/e/74b4e22402bc5136ec57fef2
If you're often going to run into situations like this, you could add an option to the custom feature to skip the first instance.