Freesteel Blog » More barmesh slicing

More barmesh slicing

Friday, December 12th, 2014 at 9:02 pm Written by:

The fact is that this is probably what most visitors to this blog are going to be most interested in.

I’ve another session hacking the barmesh slicing code, which is now creating these interesting subdivisions:
closeslicesubdiv

It can even generate 17 slices of a part without crashing, though it takes a few minutes:
impslices7

It’s still only testing against the points, and not the edges and faces (hence the arcs), but that will only make it crash less as the shapes will be smoother.

It’s a little unclear what to do next. Maybe I should tidy the code further and clear up all these special cases I’ve been hitting and had to hack in to make it work. When a subdividing line crosses the r=0.5 threshold and I calculate it’s location, I’m setting it back to exactly 0.5. I don’t think this is the most reliable way to make it work.

The crucial functions are:

DistP(triangleset, p)

returning the distance and closest point of approach of p to any triangle, and

Cutpos(triangleset, p, v, r) --> lambda

where

DistP(triangleset, p + v * lambda) == r

assuming that

DistP(triangleset, p) < r < DistP(triangleset, p + v)

I should also include a function:

MidClose(triangleset, p, v, r) --> lambda or None

where

DistP(triangleset, p + v * lambda) < r

assuming that

DistP(triangleset, p), DistP(triangleset, p + v) > r 

At least this is the current plan, as opposed to the full on original system where you took a long line p0, p1 and found all the lo-hi points of intersection with the r-offset of the triangleset.

We're assuming that v is small, so the tests are fairly globular and local and may be able to be implemented on a GPU effectively. That's where I'm aiming to take this eventually. I don't have any experience, so there could be a blocker. You won't know unless you try.

Meanwhile, I've been down south to attend the first unlock democracy election leaflet hackday, which then caused an awful lot of javascript hacking to implement my annotation idea:

annotel

Then I went to Cambridge for a few days, caught the lurgi, and am now back home in bed in Liverpool trying to avoid being hauled off to a dark, dank caving hut when I'm not well enough. Grumble.

1 Comment

  • 1. Guilherme Araujo replies at 5th June 2015, 1:34 pm :

    Hi, i read in your website about Python package and scripts for linux 32bit and i want to know how can i proceed to download this package?

    regards,

    -Guilherme Araujo

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>