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.
Why are sketch entities so different from world entities?
brooks_talley
Member Posts: 27 ✭
Probably not the right forum, but I'm encountering this while working on Featurescript.
I'm sure there's a good underlying reason for it, but I'm baffled by why entities that seem to be the same are really very different if they're in the context of a 2D sketch or the 3D world. For instance, you can extrude a straight line in a sketch into a planar surface, but you cannot extrude a 3D line.
I get that I can write Featurescript to enable this kind of thing, but I keep finding the pattern of writing if-then to take different actions on sketch objects that are geometrically the same thing as world objects (I think).
Probably I'm missing something and there is either 1) a general purpose solution where Featurescript can operate on geometry in the abstract without worrying about how it was created, or 2) some fundamental reason why this isn't possible, which is at the root of why the UI's Extrude supports sketch-lines but not world-lines.
Can one of you enlighten me?
I'm sure there's a good underlying reason for it, but I'm baffled by why entities that seem to be the same are really very different if they're in the context of a 2D sketch or the 3D world. For instance, you can extrude a straight line in a sketch into a planar surface, but you cannot extrude a 3D line.
I get that I can write Featurescript to enable this kind of thing, but I keep finding the pattern of writing if-then to take different actions on sketch objects that are geometrically the same thing as world objects (I think).
Probably I'm missing something and there is either 1) a general purpose solution where Featurescript can operate on geometry in the abstract without worrying about how it was created, or 2) some fundamental reason why this isn't possible, which is at the root of why the UI's Extrude supports sketch-lines but not world-lines.
Can one of you enlighten me?
0
Comments
The other recent example was getting the normal vector from a 2D curve; I ended up using evOwnerSketchPlane if it's a sketch object, and creating a plane() based on the start, end, and middle vertices of the if not. That may have been the really hard way to do it as well; hence the overall question.