Sender | Message | Time |
---|---|---|
19 Jun 2023 | ||
I assume he meant doing different booleans op | 11:10:51 | |
Depending on the final application, there's also the option of not booleaning for the render | 11:58:10 | |
And only booleaning for the final product | 11:58:25 | |
12:25:31 | ||
20 Jun 2023 | ||
00:54:14 | ||
00:54:16 | ||
Is there a nice way to dump the entire occ brep to a python dictionary and convert it back to an occ shape later? | 00:54:45 | |
Are you looking for the equivalent to a BREP export in an internal dictionary or just the Shapes in a dictionary? | 01:10:18 | |
So, actually I just need a type that I can convert to numpy/tensor types (a python native representation). I am doing analysis work rather than creation. Basically if I could convert it into a python dictionary, i'd be able to do it from there. Fighting up against being a newbie on the occ kernel / brep. Realized I don't know all the gotchas when I tried to do this and ended up with a bunch of brep check errors. Probs just need to grind on it a bit longer. | 01:13:07 | |
I'll need the whole brep graph. | 01:14:20 | |
* I'll need the whole brep graph - since i'll be doing some batched analysis. | 01:15:09 | |
But I don't need the rest of the kernel. | 01:15:33 | |
What kind of analysis are you looking to do? | 01:16:01 | |
I am trying to make a differentiable brep for differentiable rendering. | 01:16:19 | |
And want it compatible with occ's brep | 01:16:46 | |
I can do the math side of it, just struggling against the particulars of the occ kernel. | 01:17:20 | |
But, definately havn't spent enough time on it, figured i'd ask here, incase I can short cut it. | 01:17:39 | |
With build123d one can do: print(Box(1, 1, 1).show_topology()) which results in:
It wouldn't be difficult to hack the code to create a dictionary. | 01:19:15 | |
How much trouble would the inverse operation be for build123d? | 01:19:39 | |
Like dict -> toposhape | 01:19:48 | |
It's work for sure but it can be done. | 01:20:12 | |
That's really helpful regardless, i'll read through it. | 01:20:13 | |
It'll be an open source project, so it'd plug right into build123 which will be cool. | 01:20:40 | |
https://build123d.readthedocs.io/en/latest/direct_api_reference.html#topology.Shape.show_topology There's a link to the source there. | 01:20:45 | |
Thanks a lot | 01:20:56 | |
What is a differentiable brep ? I'm having an hard time understanding what data you need and what you want to do with it | 05:45:42 | |
differentiable brep would mean you compute a gradient on changes to do gradient based optimisation. The data I need would be most analogous to dumping the occ (geometric and toplogical info) brep to json (a python dict). I've start making pretty good progress thanks to rogers suggestion. Should have it by the end of the day, just fixing some wires issues on the reconstruction. The data model will look something like this once I am done, with python primitives.
Its just a serialisation layer so I can pop it into gpu accelerated math functions. | 05:53:28 | |
* differentiable brep would mean you can compute a gradient on changes to do gradient based optimisation. The data I need would be most analogous to dumping the occ (geometric and toplogical info) brep to json (a python dict). I've start making pretty good progress thanks to rogers suggestion. Should have it by the end of the day, just fixing some wires issues on the reconstruction. The data model will look something like this once I am done, with python primitives.
Its just a serialisation layer so I can pop it into gpu accelerated math functions. | 05:53:49 | |
Ie geom surface would just be primitives. class GeomCylindricalSurface(GeomSurface): location: Tuple[float, float, float] normal: Tuple[float, float, float] radius: float I'll turn this into a pytorch/numpy type once I can make sure the brep->datamodel->brep works. | 05:57:36 | |
What abot brep surfaces ? It's not as simple as cylindrical surface | 06:06:35 |