<<

Solid Modelling in neBEM

SINP, Kolkata group Applied Nuclear Physics Division Saha Institute of Nuclear Physics Bidhannagar, Kolkata, WB, India

10th RD51 Collaboration meeting Stony Brook University from 30 September 2012 to 05 October 2012 Outline

● A solid modeller ● Earlier status ● Various attempts ● Proposed approach ● Present status ● Future plans

October 4, 2012 10th RD51 Collaboration Meeting 2 Solid modelling (wikipedia) ● (or modelling) is a consistent set of principles for mathematical and computer modeling of three- dimensional solids. ● Solid modeling is distinguished from related areas of and by its emphasis on physical fidelity. ● The principles of geometric and solid modeling form the foundation of computer-aided design and in general support the creation, exchange, , animation, interrogation, and annotation of digital models of physical objects. ● Solid modeling research and development has effectively addressed many of these issues, and continues to be a central focus of computer-aided engineering. October 4, 2012 10th RD51 Collaboration Meeting 3 Solid Modelling

● Constructive solid geometry (CSG), sometimes referred to as combinatorial solid geometry, is one of the two major types of Solid modelling. In a CSG system, complex objects are built by combining simpler objects, with primitive solids as the basic building blocks. The combinations make use of boolean operations, and the resulting objects are stored as trees. ● Representation (BREP) is the other of the two major types of solid modelling. BREP objects are built by describing the entire enclosing surface of an object. This will typically involve a variety of surface types including, for example, planar, cylindrical, NURB, and spherical surfaces. While objects in a BREP system may be built using Boolean operations, the resulting object is typically stored as a set of enclosing surfaces.

October 4, 2012 10th RD51 Collaboration Meeting 4 Solid Modelling – few examples

October 4, 2012 10th RD51 Collaboration Meeting 5 Solid Modelling and MPGDs

● Even the ideal MPGD is complex because – Intricate geometry with large number of micro- structures of different length scales – Combination of different materials

● The real MPGD, with artifacts related to manufacturing limitations – Loss of symmetry – Micro-structure of even smaller dimensions that are nevertheless important in determining the detector characteristics

October 4, 2012 10th RD51 Collaboration Meeting 6 Solid Modelling and MPGDs

October 4, 2012 10th RD51 Collaboration Meeting 7 Earlier Status

● Boundary Element Methods need only the interfaces / outer surfaces of solids ● The necessary information is passed to neBEM as a list of surface primitives that can either be rectangles or right triangles, or line primitive that are thin wires ● Any solid, including all the MPGDs, can be described by the above set of primitives. ● For a given structure, the primitives can be obtained manually, but of course no one would venture doing so for a structure as complicated as MPGDs. ● This difficult task of translating MPGDs to neBEM primitives was being taken care of by Garfield (FORTRAN version)

October 4, 2012 10th RD51 Collaboration Meeting 8 Earlier status - problems

● In Garfield++, no geometry support is provided ● While Garfield (FORTRAN) did its job very well, there were cases for which solids were not available. Rob did add few new solids on user request, but since the FORTRAN version was not planned to be promoted any more, this approach was untenable. ● In any case, it has always been felt that neBEM should have its own solid modelling support so that it can be used for solving problems related to MPGDs and problems belonging to entirely different domains.

October 4, 2012 10th RD51 Collaboration Meeting 9 Various attempts

● ROOT geometry builder

● Geant4 geometry builder

● Garfield (FORTRAN) routines

● CGAL library

October 4, 2012 10th RD51 Collaboration Meeting 10 Various attempts - problems

● ROOT and Geant4 – Good for visualization, but not for getting accurate surfaces representing complex structures ● Garfield – Good for getting accurate surfaces but difficult to translate from FORTRAN to C ● CGAL – Excellent library but almost entirely based on the BREP approach

October 4, 2012 10th RD51 Collaboration Meeting 11 Present approach - BRL-CAD

● BRL-CAD is a powerful cross-platform Open Source combinatorial Constructive Solid Geometry (CSG) solid modeling system that includes interactive 3D solid geometry editing, high-performance ray- tracing support for rendering and geometric analysis, network- distributed framebuffer support, image and signal-processing tools, path-tracing and photon mapping support for realistic image synthesis, a system performance analysis benchmark suite, an embedded scripting interface, and libraries for robust high-performance geometric representation and analysis.

October 4, 2012 10th RD51 Collaboration Meeting 12 BRL-CAD

● For more than 20 years, BRL-CAD has been the primary tri-service solid modeling CAD system used by the U.S. military to model weapons systems for vulnerability and lethality analyses. The solid modeling system is frequently used in a wide range of military, academic, and industrial applications including in the design and analysis of vehicles, mechanical parts, and architecture. ● The package has also been used in radiation dose planning, medical visualization, computer graphics education, CSG concepts and modeling education, and system performance benchmark testing among other purposes.

October 4, 2012 10th RD51 Collaboration Meeting 13 BRL-CAD

● BRL-CAD supports a great variety of geometric representations including an extensive set of traditional CSG primitive implicit solids such as boxes, ellipsoids, cones, and tori ● It also supports explicit solids made from closed collections of Uniform B-Spline Surfaces, Non-Uniform Rational B-Spline (NURBS) surfaces, n-Manifold Geometry (NMG), and purely faceted mesh geometry. ● All geometric objects may be combined using boolean set-theoretic CSG operations including union, intersection, and subtraction.

October 4, 2012 10th RD51 Collaboration Meeting 14 BRL-CAD

● BRL-CAD is a collection of more than 400 tools, utilities, and applications comprising more than a million lines of source code. ● The package is intentionally designed to be extensively cross-platform and is actively developed on and maintained for many common environments including for BSD, Linux, Solaris, Mac OS X, and Windows among others. ● BRL-CAD is distributed in binary and source code form as free open source software (FOSS), provided under Open Source Initiative (OSI) approved license terms.

October 4, 2012 10th RD51 Collaboration Meeting 15 CSG in BRL-CAD

October 4, 2012 10th RD51 Collaboration Meeting 16 Shaders in BRL-CAD

October 4, 2012 10th RD51 Collaboration Meeting 17 BRL-CAD - Gallery

October 4, 2012 10th RD51 Collaboration Meeting 18 Present status - GEM in BRL-CAD

October 4, 2012 10th RD51 Collaboration Meeting 19 GEM in BRL-CAD

October 4, 2012 10th RD51 Collaboration Meeting 20 BRL-CAD to X3D (viewer meshlab)

October 4, 2012 10th RD51 Collaboration Meeting 21 X3D to neBEM

October 4, 2012 10th RD51 Collaboration Meeting 22 X3D to neBEM

● Lot of post-processing yet to be done ● From the polygons, we need to get rectangles and right triangles ● The different shapes / regions are made of different materials. This information will be necessary to determine the type of interface for each primitive ● Overlapping primitives will need to be taken care of ● And so on ...

● But it seems to be well within reach!

October 4, 2012 10th RD51 Collaboration Meeting 23 Future plans

● Lot of work to be done before BRL-CAD can be said to be interfaced to neBEM as a solid modeller ● Complications are very likely to arise and we hope to resolve them ● Once the interface between neBEM and BRL-CAD is implemented, it should be possible to use neBEM through Garfield++ ● ROOT and Geant4 geometry builders can now be used to build neBEM geometries, provided we are able translate their calls to equivalent BRL-CAD ones. ● Use BRL-CAD to expand the horizon of neBEM

October 4, 2012 10th RD51 Collaboration Meeting 24