Bojian Wu

ustcbjwu [AT] gmail.com
Chinese Academy of Sciences (CAS)

Google Summer of Code(GSOC 2016) Blog

Daily and Weekly Update

Bonding Period

Week 1

Week 2

Week 3

Week 4

Week 5

Week 6

Week 7

Week 8

Week 9/10/11

Week 12

Week 13

Week 14

Week 8

Why does *gaq* give different result regarding to the same plane?

I finally figure out the reason. Actually, there are several different types for plate mode BoT, like 'plate', 'plate nocos' etc. For 'plate', when doing raytracing, it need to consider the oblique angle, but in 'plate nocos', the hit distance and points is calculated just by offsetting the origin hit points along ray direction.

For more details, please refer to Week 7.

Analysis of gqa? Is it accurate?

Actually, I am not so sure if gqa can provide an accurate result when computing volume of models. Cause I find that, it is highly related to ray tracing result. Even though the raytracing is accurate(using *rtshot* to check hit point, normal, distance etc.), gqa can not give correct result(with some errors). Maybe this is caused by the internal implementation of gqa, it use rays from three directions aligned with axis to trace the model and then calculate volume, it is related with ray grid sampling and others etc, so the result may not be consistent with mathematical calculations.

Besides, as I mentioned above, it is also related with type of plate, like 'plate' or 'plate-nocos', according to my assumption and inference, I think the volume is related to the distance between in/out hit points pair, so under different type, the raytracer may give various distance depending on whether considering the oblique angle. So the result differs.

Memory leak in obj-g

As I said before, the oblique angle may influence the result of computing volume, so I want to generate plate mode models without oblique. Again, I choose obj-g, this tool is handful. But, when I use '-o n' argument, it gives me prompts about memory leak this time(I remrmber it gave me errors before, but I solved it, for more details, please refer to the patch submitted to sourceforge).

I will paste the patch here later, just one line code...

Examples by using *gqa* to compute the volume? (continued)

  • Sphere

  • Math: Volume = -
    Surface Type Model Normal Mode Plate mode
    (thickness = 1)
    BoT
    B-rep

  • Sphere with holes(for BoT, it is a hole, but for B-rep, it can be considered as trimmed)

  • Math: -
    Surface Type Model Normal Mode Plate Mode
    (thickness = 1)
    BoT
    B-rep