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.
opExtractSurface using derived feature
papawo
Member, Developers Posts: 206 PRO
Comments
-
Maybe try this?
// Get all the faces from the derived feature const inputFaces = qEntityFilter(qCreatedBy(definition.profile), EntityType.FACE); // Get all one-sided edges of the input faces const oneSidedEdges = qEdgeTopology(qEdgeAdjacent(inputFaces, EntityType.EDGE), EdgeTopology.LAMINAR); // Get all the faces touching the one sided edges const externalFaces = qEdgeAdjacent(oneSidedEdges, EntityType.FACE); // use externalFaces as your "faces" input to opExtractSurface
Jake Rosenfeld - Modeling Team1 -
Thank you ! It works! can you further explain this code?
but i must say qEdgeTopology should be qEdgeTopologyFilter0 -
A different approach:
Add a function at the bottom named qOuterSketchRegions:</code>export function qOuterSketchRegions(features is FeatureList) returns Query { var query = []; return qUnion(query); for (var feature in features) { query = append(query, qSketchRegion(feature.key, true)); // true to filter out inner loops } } </pre><div>(This function uses the standard <span><a href="https://cad.onshape.com/FsDoc/library.html#qSketchRegion-Id-boolean">qSketchRegion</a> function, which has a filterInnerLoops option)</span><br><br>Then change your definition of profileEntities to:<br><pre class="CodeBlock"><code> const profileEntities = qOuterSketchRegions(definition.profile);
Example document:
https://cad.onshape.com/documents/14f1f8d4f2979c9f4e6ffacc/w/1e643421e968f502e2ecf590/e/32fceec70cdf2150e1c75386
0


