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.
Will it ever be possible to contribute sketch features?
dave_cowden
Member, Developers Posts: 475 ✭✭✭
It doesnt appear possible now. is it planned?
0
Best Answers
-
kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565AFAIK, not in the near future.
It was an early decision that using a sketch tool in Onshape should result in a set of low-level entities and constraints, and nothing more. This gives users the flexibility to delete individual entities or constraints, and utilize the remaining degrees of freedom to interactively redefine geometry. This also means that entities defined with a high-level tool aren't tied to that original definition, so to a user, a sketch is nothing more than the entities and constraints they see in front of them. Like other CAD systems, this allows a huge amount of flexibility: you can create circular references in your constraints without problem, and the whole 2D system is solved simultaneously.
This is in all contrast to a features, where users maintain a history of created features in a feature list. Modifying an upstream feature propagates changes to all downstream features.
So features and sketch tools are very different beasts. With an Onshape feature, you can define a function and know that the result of that function will always determine the geometry created. With a sketch tool, all you have is a (reasonably complex) interface for generating FeatureScript code. Once that code is generated, the logic that defined it is lost.
This is not to say that what you're saying is physically impossible, but some way or another it would have to involve exposing code generation itself. We don't think that's prudent, and to be frank, I have a hard time imagining it being maintainable for any party involved if we did.
5 -
ilya_baran Onshape Employees, Developers, HDM Posts: 1,211Kevin is correct, but I am a little more optimistic on the possibility (though not anytime soon): one can imagine sketch features that act and feel like current ones but are stored as features until they need to "shatter" into constituent components, say because an entity or a constraint is deleted. Ensuring behavior consistency would be a challenge, but not an insurmountable one I think. But again, unfortunately not anytime soon.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
It was an early decision that using a sketch tool in Onshape should result in a set of low-level entities and constraints, and nothing more. This gives users the flexibility to delete individual entities or constraints, and utilize the remaining degrees of freedom to interactively redefine geometry. This also means that entities defined with a high-level tool aren't tied to that original definition, so to a user, a sketch is nothing more than the entities and constraints they see in front of them. Like other CAD systems, this allows a huge amount of flexibility: you can create circular references in your constraints without problem, and the whole 2D system is solved simultaneously.
This is in all contrast to a features, where users maintain a history of created features in a feature list. Modifying an upstream feature propagates changes to all downstream features.
So features and sketch tools are very different beasts. With an Onshape feature, you can define a function and know that the result of that function will always determine the geometry created. With a sketch tool, all you have is a (reasonably complex) interface for generating FeatureScript code. Once that code is generated, the logic that defined it is lost.
This is not to say that what you're saying is physically impossible, but some way or another it would have to involve exposing code generation itself. We don't think that's prudent, and to be frank, I have a hard time imagining it being maintainable for any party involved if we did.