Welcome Bojian! > I am so interested in Plate Mode NURBS raytracing and want to get involved in > this project.
Outstanding as this is a hot topic of interest. > 1. it seems to check the enclosure of surface at the beginning of raytracing > for BoTs, for example, if I want to add plate mode for NURBS, do I need to > check if the NURBS surface is closed first? Mirroring what BoT does works, or you can deviate where it makes sense. For BoT, whether something is treated as plate-mode or some other mode is handled by a simple flag set on the geometry (instead of, for example, marching over and making a determination). That is, it’s not currently reflective, it’s just a setting. For NURBS, it could either reflect the actual state or (e.g., calling IsSolid during prep) but better will probably be to rely on a setting similar to BoT. This will allow us to forcibly treat solid NURBS as plate-mode and vice versa, which is desirable under some circumstances. > 2. besides, I find that, for BoTs, the *thickness* for each triangle is the > same(self-defined by me cause I use obj-g to generate BRL-CAD database), then > I want to know do we need an adaptive method the define the *thickness* with > a given threshold, for example, considering different surface area with > different curvature, maybe we need to handle it differently? Per-triangle thickness merely exists for compatibility with another geometry system that supported that flexibility. It may be desirable to allow per-surface thicknesses, but a single thickness per object would be fine. The existing plate-mode BoTs do not correctly handle / support neighboring triangles with different thicknesses and what to do about them. I wouldn’t worry about it. > I also have tried 'extreme_ssi_test.g', this database consists two non-closed > NURBS surfaces, I try to use rtshot to do raytracing, but it does not hit > anything. I am a little bit confused, why can't we even get one hit point? Simply because we have a very long history of only supporting what is physically realistic, i.e., solid ray tracing. One hit point has no thickness, no length, no mass/volume, etc. It doesn’t report a hit because the surface is non-solid. Understand that our ray tracer is used by many analysis codes that interpret hits with physical meaning. That said, there is support to return a hit at the point of intersection; it’s just #ifdef’d out I believe. The general idea would be to store a plate mode definition somewhere with the model and use that to turn a hit point into a proper inhit+outhit pairing with the specified thickness. > Another example is 'brep_cobb', it consists six discreted NURBS surfaces but > contains a volume, I also do the same thing, but now I can get the hit > points(both in and out point). So from this, I mean, the closure of NURBS > surface is so important for raytracing scheme? That’s the point of plate-mode NURBS. With it, we can properly report hits on non-solid NURBS surfaces by giving them an implicit thickness. > With @starseeker's suggestion and my own understanding, we have two methods > so far for NURBS plate mode raytracing. The first one is, after finishing the > first hit, along the ray direction and forwarding *thickness* distance to get > the second(out) hit point(Maybe it is similar to the operation of BoTs). Indeed, it can be identical. Notice, however — and BoT suffers from this — that simply adding a thickness to the hit point (whether before, centered, or after) will be technically incorrect along edges and corners. > And I am so interested in NURBS plate mode, so could you please give me some > suggestions? Or where can I start now? I know brep.cpp is a collection of > NURBS operations, maybe it is a good start.. Besides, could you give me some > hints on how to proceed and something that I need to pay attentions to? You’ll want to work on a code demonstration that shows you are able to follow this code proficiently. NURBS data structures are a bit hairy. Cheers! Sean ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel