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.
Export the geometry of a drawing
fredrik_tärnell
Member Posts: 29 ✭✭
Hi,
Found a few thread discussing wireframe and on in particular that created a FS to do that
https://forum.onshape.com/discussion/5437/wires-from-edges-suggestions
It does not seem to work for more complex parts/objects.
What I really want it to "produce and object" like what gets during a drawing creation. But as an object I can export. Would that be possible? But I guess I would need access to the actual geometry rather than the exported faces, right?
Found a few thread discussing wireframe and on in particular that created a FS to do that
https://forum.onshape.com/discussion/5437/wires-from-edges-suggestions
It does not seem to work for more complex parts/objects.
What I really want it to "produce and object" like what gets during a drawing creation. But as an object I can export. Would that be possible? But I guess I would need access to the actual geometry rather than the exported faces, right?
0
Answers
annotation { "Feature Type Name" : "Wireframe Edges" } export const wireframe = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "Parts", "Filter" : EntityType.BODY } definition.parts is Query; annotation { "Name" : "Delete parts" } definition.delete is boolean; } { var edges = qOwnedByBody(definition.parts, EntityType.EDGE); for (var i = 0; i < size(evaluateQuery(context, edges)); i += 1) { opExtractWires(context, id + ("opExtractWires" ~ i), { "edges" : qNthElement(edges, i) }); } if (definition.delete) { opDeleteBodies(context, id + "deleteBodies", { "entities" : definition.parts }); } });