Coder Social home page Coder Social logo

Comments (2)

Idclip avatar Idclip commented on June 17, 2024

Hi @PerspectivesLab,

The topology of PointDataGrid's is slightly more locked down than that of other grid types as the idea is that the active states of PDG voxels represent whether that voxel contains any points or not (you can manipulate this yourself but a lot of tools work on that assumption) - so I wouldn't be suprised if the dilate/erode methods do nothing for PDGs. We can add a static_assert to this method so that it doesn't compile for PDGs if that's the case

i tried clip, clipGrid, ( to slow ), is there a fast way to slice/cut voxel volumes in a grid with an overlap/padding between voxels ? ( ex 0.3 )

I'm not 100% clear on what you're trying to do here - dialteActiveValues only works on the topology of the provided grid, so even if it was allowed to change the active states of PDG voxels, it wouldn't move the points or change their positions. Can you elaborate on what you're trying to do?

from openvdb.

PerspectivesLab avatar PerspectivesLab commented on June 17, 2024

Hi @Idclip, thank's for the clarification,

what i am trying to do at the moment, is serializing each voxels ( size 2 ) points to file,
i would need to include points from adjacent voxels but only in the limit of a bounding box, let say 2.6 ( main voxel: 2 + 0.6 on each axis to gather neighboor points ).

i know i can iterate adjacent voxels from a voxel and gather the points as
for (int n = 0; n < 26; n++) { Coord neigh = util::COORD_OFFSETS[n]; } => check if inside the main Bbox, append points..
but it seems i cant get the point indexes inside some of the adjacent voxels ( they contain points ), but voxel is flagged as off...

but i would like to avoid if/statements in order to be fast.

the main idea i had, was looking for a function to scale the voxel grid (all voxels from their center, only their bounds, not the data) so they overlap ( 0.3 ),
in that way i could just iterate once each voxel's and serialize the points faster, ( such the idea of dilate grid i had ), let me know if this is more clear, or any faster solution ? thx

from openvdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.