Skip to main content

# Questions tagged [opencascade]

The tag has no usage guidance.

37 questions
Filter by
Sorted by
Tagged with
6 votes
3 answers
1k views

### How to rotate a triangle to get this picture?

Based on this answer, I am trying to draw the picture b). I tried ...
• 3,921
5 votes
1 answer
236 views

### Combining 3D-text (extruded 2D-font) and a simple solid: RegionProduct produces invalid BoundaryMeshRegion

Below is a code fragment demonstrating a problem that has been vexing me for days. The history is in my question #298513 (thanks again to @cvgmt and @user21), but knowledge of that question or its ...
• 827
4 votes
2 answers
282 views

### Making geometries with Mathematica for use in Ansys

I am trying to model deformations caused by identical, solid half-ball bearings on a thin, solid cylindrical plate in Ansys. But drawing the geometries is much easier in Mathematica, especially if I ...
5 votes
1 answer
159 views

...
• 56k
4 votes
2 answers
216 views

### Fill ParametricPlot3D into 3D solid shape

i have data point and transform it with matrix and plot with ParametricPlot3D and look like this my goals is to fill this and get the centroid with ...
• 157
4 votes
1 answer
109 views

### ToElementMesh with OpenCascadeShape returns incomplete region

I am solving a PDE using the NDSolve over a cylinder (length L=0.03 m and radius r=0.0025 m). I define the cylinder using OpeCascadeLink and the mesh as shown below. The problem is, the output of the ...
2 votes
1 answer
183 views

### Meshing problem using OpenCascadeLink

I have encountered a meshing problem and I am a bit stuck with it. I tried to replicate the problem while removing most of the original code to be more concise. I am using OpenCascadeLink to perform ...
• 45
3 votes
3 answers
217 views

### How to discretize space polygon with hole?

When we using Polygon[{p1, p2, ..., pn} -> {q1, q2, ..., qn}] to draw a space polygon with hole, it seems that ...
• 1,222
0 votes
1 answer
139 views

### How to generate a random point inside this region/discretize it?

Consider the following region: ...
• 5,887
3 votes
2 answers
251 views

### BoundaryMeshRegion Error: Boundary surface is not closed

I am trying to create a BoundaryMeshRegion comprised of many cubes with random locations, in a relatively small region. I have had success implementing my technique for a smaller number of cubes (say,...
• 373
4 votes
1 answer
107 views

### Package AceFEM error: cannot be automatically installed

I have a problem to perform the package AceFEM in Mathematica 12.0.0.0 for Mac (software: macOS Monterey Version 12.4 | processor: 1,8 GHz Dual-Core Intel Core i5). I downloaded the newest AceGen and ...
5 votes
1 answer
166 views

### 3D Mesh refinement near sphere boundary and on surface revolutions

I am trying to solve an advection-diffusion problem inside surface of revolutions. I have high velocity gradients near the boundary of the bounding surface. Is there a way to refine the mesh near the ...
• 85
8 votes
3 answers
510 views

### STL generation for Ball-in-a-maze puzzle

As a minimal example, consider: ...
• 56k
10 votes
2 answers
920 views

### How can I generate a Swiss-Cheese type region and render it transparent?

I am trying to visualize a percolation model that is equivalent to a swiss-cheese where the holes are conducting. At some point, the size of the holes gets large enough for them to touch and a ...
• 101
7 votes
5 answers
614 views

### How to graph a solid common to multiple functions

I want to be able to graph the solid that is contained by two functions. I am graphing x^2+z^2=400 and y^2+z^2=400 and this the code I used and the graph I got: ...
• 115
9 votes
2 answers
260 views

### How to do boolean operations between a large amount of regions

I want to do boolean operations between a large amount of regions. For convenience, I consider a simplified problem. The problem is as follows, digging out a large number of small hemispheres on the ...
• 275
6 votes
2 answers
253 views

### How to create cylinder pie using ParametricRegion?

I'm wondering that this simple definition of a cylinder pie doesn't work ...
8 votes
1 answer
321 views

### How to union 3D region to calculate volume?

I have a Teapot likes: region = RepairMesh[ExampleData[{"Geometry3D", "UtahTeapot"}, "MeshRegion"]] I want to calculate the volume ...
• 26.9k
3 votes
1 answer
205 views

### What does "TetGenTetrahedralize: Tetrahedralize returned an error, 2. mean? Also error number 1,2,3...?

regioncalc5 = ToElementMesh[regioncalc4, MeshRefinementFunction -> ff] TetGenTetrahedralize: Tetrahedralize returned an error, 2.
• 31
2 votes
1 answer
155 views

### Is there a way to SurfaceArea of each face of 3D shape separately?

Consider the following 3D shape as an example: ClearAll[cylinder]; cylinder[r_,z_]:=Cylinder[{{r,r,0},{r,r,z}},r]; It is a cylinder whose entire ...
• 9,523
4 votes
3 answers
429 views

### How to make a high resolution mesh from RegionIntersection in 3D

I want to make a high-resolution 3d model of the Reuleaux tetrahedron by using Mathematica The Reuleaux tetrahedron is the intersection of four balls of radius s centered at the vertices of a ...
• 8,988
5 votes
3 answers
276 views

### How to convert cuboid to mesh efficiently

cuboids = Table[Cuboid @@ (pts = RandomReal[100, {2, 3}]), {i, 10000}]; Method1: ...
• 8,619
4 votes
1 answer
243 views

### Export Discretized ImplicitRegion as step using OpenCascade

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 ...
• 1,391
5 votes
1 answer
158 views

### RegionIntersection not work, only outputs BooleanRegion Object

This is an example to make Pi in 3D dimension Thanks @xzczd for providing the fast version. Link Smoothing the Region？ ...
• 6,836
14 votes
5 answers
2k views

### 3D FEM Vector Potential

I am trying to reproduce an FEM result in a paper. Due to possible copyright I cannot show the result directly but fortunately there is a free link An Incomplete Gauge for 3D Nodal Finite Element ...
• 381
5 votes
2 answers
273 views

### How to discretize the boundary of two regions?

Problem How to discretize a surface constructed with multiple components? Unsuccessful attempts include combining the objects top and ...
• 1,092
2 votes
1 answer
158 views

### Why FEM not giving output at the boundary

I am trying to solve simple 3D Poisson's equation of thermal conduction due to heat generation (q) in a spherical composite, where from 0 to a (inner radius) conductivity is k1 and from a to b (outer ...
• 55
6 votes
3 answers
342 views

### Balanced flux in FEA using NeumanValue

I'm using NeumannValue boundary conditions for a 3d FEA using NDSolveValue. In one area I have positive flux and in another area i have negative flux. In theory these should balance out (I set the ...
• 389
7 votes
2 answers
1k views

### Cylindrical coordinates in FEM

I am trying to solve the Stokes equation for fluid flow in a 3d cylinder. All boundaries are no-slip, apart from the top boundary, which enforces flow in the x-direction. My problem is that I can't ...
• 1,241
8 votes
3 answers
397 views

### Raytracing using Regions & NSolve

I want to use geometric shapes in Mathematica to build complex shapes and use my raytracing algorithm on it. I have a working example where we can get the intersections from a combination of a ...
• 4,558
2 votes
1 answer
133 views

### why on some MaxCellMeasure values, FEM gives internal 1/0 error?

V 12.1 on windows 10 When I was answering NDSolveValue taking too long I noticed the following When I use some value for MaxCellMeasure, then FEM gives 1/0. Why ...
• 147k
9 votes
1 answer
294 views

### Define a region of revolution

My goal is to use "RegionCentroid" on a solid of revolution. This works great for 2d regions: ...
• 802
3 votes
2 answers
387 views

### What can we expect from boolean region operations?

In my recent efforts to design some 3D printable objects, I have been tempted to use relatively recent additions to the Wolfram Language such as RegionDifference ...
• 19.7k
23 votes
7 answers
836 views

### How to make the boundary of a 3D region smooth?

I want to draw this region,but the surface is rough.I tried to find options to improve the surface but failed. ...
• 10.1k
1 vote
2 answers
447 views

### RegionDifference not working properly for a region from a printable STL file

Some time ago I created a printable STL-file with a certain software of my own and now I want to modify it with Mathematica programmatically, mainly by subtracting certain geometric objects (e.g. ...
• 179
8 votes
3 answers
278 views

### Discretisation of region intersection in 3D

If I try to discretise the intersection (BoundaryDiscretizeRegion), of a shell in a cuboid, some of the regions (that are found with RegionIntersection) are lost in the discretising process. I tried ...
• 121
104 votes
17 answers
6k views

### Future enhancements for the finite element method

How should the finite element method (FEM) framework in the language be extended to be more useful? With the release of version 12.0 all fundamental FEM solvers (linear, nonlinear, stationary, ...
• 40.1k