I’m trying to make an interface between a package called OpenCASCADE (opencascade.org)
and the geometry classes in root. This to be able to import for example STEP or IGES files from
cad-programs. I’ve gotten somewhere but not quite to where I would like to come!!!
First of all, it is clear that I’m working on something that for navigation, ray-tracing etc will be quite slow
so it should only be used for complicated shapes where the coding of the shape takes a lot of time compered
to whatever one would like to do with it (VMC etc)
In short, I got the motheds TGeoOpenCascade::Contains,DistFromInside,DistFromOutside working,
except that Saftey is not yet functional. I’m trying to get the ComputeNormal to work, but I’m not sure
what it should do? Should it compute the normal of the point on my shape where the line made by the
arguments point+dir*t intersects my shape? And if so, how do I define the direction of normal? MY guess is
I’m doing something wrong, see included raytrace of a TGeoTube and a enginepiston read in using my class.
I also include the humble beginning of the interface-class
As a follow-up? Which methods should I implement if I want to be able to view the imported cad-shapes
occ.tar.gz (29 KB)