question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Volume Integral of extruded Surface

See original GitHub issue

I am trying to compute the volume of a extruded surface within a minimal example to validate for future computation.

Therfore I export a pyramid-like mesh.ply file from Rhino3D and import with PyVista and extrude the PolySurfac in Y-Direction.

pyramid

pyramid2

Unfortunatly the mesh.volume dose not give the right volume.

Its supposed to be: 2mm x 2mm x 1mm = 4mm³ (the tip of the pyramd has the same volume as the cut-out) and Rhino3D validates that.


To Reproduce

import pyvista as pv
import numpy as np


path = 'Path/To/File'

mesh = pv.read(path + "/pyramid.ply")

ext = mesh.extrude([0, 1, 0], capping=True)
print("Volume = ", ext.volume)

strangely enough, the volume is dependet in the position of the polySurface in space, its orientation. and the direction of the extrusion (mesh.extrude([0, 1, 0] vs. mesh.extrude([0, -1, 0] )

Also: like in the examples, the computation of primitieves worke just fine.

Dose anybody know if the is some Known issue, with the volume of extruded surfaces from PolyData, or probably more easy, somthing fundamental, which I’m doing wrong?

pyramid.zip

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
meverson86commented, Jul 15, 2022

@banesullivan @akaszynski @tkoyama010 I did some poking around in PolyDataFilters.extrude and it looks like switching to vtkLinearCellExtrusionFilter and using that interface fixes the issue, but I am not familiar enough with how this would impact the use of extrude downstream. Any thoughts?

0reactions
akaszynskicommented, Jul 18, 2022

I did some poking around in PolyDataFilters.extrude and it looks like switching to vtkLinearCellExtrusionFilter and using that interface fixes the issue, but I am not familiar enough with how this would impact the use of extrude downstream. Any thoughts?

Would you mind submitting a basic PR with these changes? Don’t worry about testing or quality, but if you get it at least in a draft I can take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a relationship between the curved surface area of an ...
If I have a closed, simply connected region in the z-plane, and I 'extrude' this region vertically by a height h, what is...
Read more >
Integrals in Three Dimensions - FlexPDE
In three-dimensional problems, volume integrals may be computed over volume compartments selected by region and layer. ... Computes the integral of the integrand ......
Read more >
(PDF) Generation of Volume Meshes by Extrusion from ...
An algorithm to generate volume meshes by extrusion from surface meshes of arbitrary topology is presented. The algorithm.
Read more >
Volume integral - Wikipedia
In mathematics (particularly multivariable calculus), a volume integral (∭) refers to an integral over a 3-dimensional domain; that is, it is a special ......
Read more >
Volume using calculus | Integral Calculus (2017 edition)
Integrals can be used to find 2D measures (area) and 1D measures (lengths). But it can also be used to find 3D measures...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found