Mathematica Asked by DrBubbles on January 27, 2021
Following the reply by @user21 to this post on exporting a region to a step file, I tried to do the same for a Discretized ImplicitRegion, but OpenCascadeShape didn’t appear to work. Is there a switch or a constraint I need to apply to Discretized regions to allow OpenCascadeShape to handle them?
imReg = ImplicitRegion[x^2 + y^2 - z < 0, {x, y, z}];
discReg = DiscretizeRegion[imReg, {{-2, 2}, {-2, 2}, {0, 5}}]
Needs["OpenCascadeLink`"]
shape = OpenCascadeShape[discReg]
OpenCascadeShapeExport["~/shape.step", shape]
Try using ToBoundaryMesh
like so:
Needs["NDSolve`FEM`"];
Needs["OpenCascadeLink`"]
imReg = ImplicitRegion[x^2 + y^2 - z < 0, {{x, -2, 2}, {y, -2, 2}, {z, 0, 5}}];
bmesh = ToBoundaryMesh[imReg];
bmesh["Wireframe"]
shape = OpenCascadeShape[bmesh]
OpenCascadeShapeExport["~/shape.stp", shape]
The shape can now be read in by external packages such as SolidWorks.
Correct answer by Tim Laska on January 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP