Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/solids/Boolean/src/G4UnionSolid.cc

    r1228 r1315  
    2525//
    2626//
    27 // $Id: G4UnionSolid.cc,v 1.35 2007/10/23 14:42:31 grichine Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     27// $Id: G4UnionSolid.cc,v 1.37 2010/05/11 15:03:45 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030// Implementation of methods for the class G4IntersectionSolid
     
    4949#include "G4VGraphicsScene.hh"
    5050#include "G4Polyhedron.hh"
     51#include "HepPolyhedronProcessor.h"
    5152#include "G4NURBS.hh"
    5253// #include "G4NURBSbox.hh"
     
    454455G4UnionSolid::CreatePolyhedron () const
    455456{
    456   G4Polyhedron* pA = fPtrSolidA->GetPolyhedron();
    457   G4Polyhedron* pB = fPtrSolidB->GetPolyhedron();
    458   if (pA && pB) {
    459     G4Polyhedron* resultant = new G4Polyhedron (pA->add(*pB));
    460     return resultant;
    461   } else {
    462     std::ostringstream oss;
    463     oss << GetName() <<
    464       ": one of the Boolean components has no corresponding polyhedron.";
    465     G4Exception("G4UnionSolid::CreatePolyhedron",
    466                 "", JustWarning, oss.str().c_str());
    467     return 0;
    468   }
     457  HepPolyhedronProcessor processor;
     458  // Stack components and components of components recursively
     459  // See G4BooleanSolid::StackPolyhedron
     460  G4Polyhedron* top = StackPolyhedron(processor, this);
     461  G4Polyhedron* result = new G4Polyhedron(*top);
     462  if (processor.execute(*result)) { return result; }
     463  else { return 0; }
    469464}
    470465
Note: See TracChangeset for help on using the changeset viewer.