wolframresearch / opencascadelink Goto Github PK
View Code? Open in Web Editor NEWOpen source package for OpenCascadeLink, which is bundled with Wolfram Language products as of version 12.1
License: Other
Open source package for OpenCascadeLink, which is bundled with Wolfram Language products as of version 12.1
License: Other
This returns a wrong result:
Needs["OpenCascadeLink`"]
Needs["NDSolve`FEM`"]
shape = OpenCascadeShape[CapsuleShape[{{0, -2, 0}, {0, 0, 1}}, 1]];
r = ImplicitRegion[x^4 + y^4 + z^4 - 1 == 0, {x, y, z}];
bmesh = ToBoundaryMesh[r, {{-2, 2}, {-2, 2}, {-2, 2}}];
shape2 = OpenCascadeShape[bmesh];
union = OpenCascadeShapeUnion[shape2, shape];
OpenCascadeShapeSurfaceMeshToBoundaryMesh[union]["Wireframe"]
but these
r = ImplicitRegion[x^4 + y^4 + z^4 - 1 <= 0, {x, y, z}];
r = ImplicitRegion[x^4 + y^4 + z^4 - 1 < 0, {x, y, z}];
r = ImplicitRegion[x^4 + y^4 + z^4 - 1 > 0, {x, y, z}];
r = ImplicitRegion[x^4 + y^4 + z^4 - 1 >= 0, {x, y, z}];
return the correct result. For the broken case either use
r = ImplicitRegion[x^4 + y^4 + z^4 - 1 <= 0, {x, y, z}];
Or this workaround can be used:
mp = MeshPrimitives[DiscretizeRegion[r], 2];
shape2 = OpenCascadeShapeSewing[
OpenCascadeShape[Polygon[#]] & /@ (Reverse /@ mp[[All, 1]])];
It might be useful if the OpenCascadeLink would also offer ref pages of the package symbols; beyond what is described in the tutorial.
I'm interested in meshing a segment from an image and exporting this as a STEP file, for example:
Meshing the image is pretty straightforward as in:
ToBoundaryMesh@DiscretizeRegion@ImageMesh@image
or
DiscretizeRegion@ImageMesh@image
Does OpenCascadeLink
have a way of dealing with 2D shapes? I've been playing around with it a bit and haven't found any 2D shapes that OpenCascadeShape
seems to recognize.
The goal is to get segments in a format suitable for direct import into ANSYS (STEP or IGES and maybe one other format).
I would like to compile the OpenCascadeLink
to Mathematica 10.4
on the Windows X86-64 platform. However, I noticed that FindLibrary[]
cannot load the DLL.
libDir = NotebookDirectory[] <> "open_cascade_prebuilt\\lib"
preLoadLibs = FileNames["*.*", libDir]
LibraryLoad @ preLoadLibs[[1]]
LibraryLoad @ preLoadLibs[[2]]
(*
ibraryFunction::load: The library E:\Open-Cascade-Link\open_cascade_prebuilt/lib\TKBin.dll cannot be loaded.
*)
success = FreeQ[Union[LibraryLoad /@ preLoadLibs], $Failed]
LibraryLink`$LibraryError
(*
Library load error 126: cannot find the specified
*)
See issue #1. There are no options to control the normal directions (inward or outward pointing) of the shapes produced.
See issue #1. There appears to be no way to control accuracy of conversions.
While OpenCascadeLink is potentially a very useful tool, the current documentation is just a bunch of examples, and does not actually specify the arguments, options of each function.
For example, we are shown the call
bmesh1 = OpenCascadeShapeSurfaceMeshToBoundaryMesh[shape1]
but for serious real world use, we need to be able to specify accuracy / tolerance of the conversion process. How is that controlled?
(I am assuming that it can be controlled, which is of course essential).
A proper specification of each function is needed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.