Top Banner
1 BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 group Gabriele Camellini 20/10/2009 BREPS solids construction by surfaces of extrusion & revolution Gabriele Camellini CERN – PH-SFT – Geant4 team 20 October 2009 14th Geant4 Users and Collaboration Workshop, Catania, Italy, 15-22 October, 2009
16

BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

Mar 28, 2015

Download

Documents

Keyon Jesse
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

1

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

BREPS solids constructionby surfaces of extrusion & revolution

BREPS solids constructionby surfaces of extrusion & revolution

Gabriele CamelliniCERN – PH-SFT – Geant4 team

20 October 2009

14th Geant4 Users and Collaboration Workshop,

Catania, Italy, 15-22 October, 2009

Page 2: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

2

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

OUTLINEOUTLINE

Introduction B-Rep solids in Geant4 Surface of revolution Surface of linear extrusion Example Conclusions and extensions

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

2

Page 3: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

3

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

B-Rep solidsB-Rep solids

Boundary REPresentation

Geometric entities: point, curve, surface

Topological entities: vertex, edge, face (boundaried surface), edge_loop

Elementary surfaces (plane, cylindrical s., …) Advanced surfaces (swept s., …)

Constructive model (CSG) Boundary model (B-Rep)

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

3

Page 4: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

4

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Swept SurfacesSwept Surfaces(Generalized Cylinder)(Generalized Cylinder)

Swept surfaces are generated by moving a 2D curve along a trajectory in 3D space.

Curve can also change its shape and orentation during sweeping.

Generalized cylinder is the shape generated when a 2D contour is swept along a 3D trajectory.

Contour define the cross-section of the object.

Trajectory is the axis of the object.

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

4

Page 5: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

5

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Surfaces of revolution & linear extrusionSurfaces of revolution & linear extrusion

In the geometrical modelling, like Computer-Aided Desing, are commonly used only two kinds of generalised cylinders.

These solids are obtained by extrusion or revolution of 2D contour.

For define these solids it’s necessary use the corresponding surfaces.

Definition of swpet surface by generic curves can generate a surfaces with inifinite extension.

In this case, for generate a solids, is necessary trimming the surface along the swept direction and also should be limited the 2D curve by definition of the bounds.

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

5

Page 6: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

6

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

BREP in Geant4BREP in Geant4

Boundaries

Bounding box

Intersection with a ray

Point to surface distance

Normal vector to surface

G4Surface

G4BREPSolid is defined by a collections of boundaried surfaces

3D point & parameter value

Bounds

Bounding box

Intersection 2D curve with a ray

Tangent

(curve-curve intersection)

G4Curve

Plane , cylindrical, conical,toroidal, bspline, bezier

Conics, line, Bspline, composite

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

6

Page 7: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

7

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Surface of linear extrusionSurface of linear extrusion

vVuvu )(),( parametrization of the swept curve

extrusion direction

parametrization range

In current implementation

2D swept curve is defined on a ortogonal plane to extrusion axis and need be closed

z axis rapresents extrusion direction

)(uV

v

G4SurfaceOfLinearExtrusion (const &G4Curve curve, G4double length)

It’s generated by a 2D contour swept along a segment of line.

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

7

Page 8: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

8

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Surface of linear extrusionSurface of linear extrusion

Bounding box

- the BB of the boundaried swept curve must be included- the bounding box of the surface is extendend by including also the BB translated along the extrusion axis

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

8

Page 9: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

9

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Surface of linear extrusionSurface of linear extrusion

Ray intersection

- 3D ray in local coordinate- t > 0, |d| = 1- the ray is projected on the plane where is definend the base curve- 2D ray – curve intersection is determined- the 2D intersection distance is mapped easly to a 3D intersection distance, given the direction and the source point of the ray

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

9

DtStr )(

Page 10: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

10

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Surface of revolutionSurface of revolution

It’s generated by a 2D contour swept along a circular trajectory

Equivalently the solid can be generated by rotation of the 2D contour around an axis.

If the base curve isn’t closed (usual case), it’s alway possibile generate a solid by adding two circular planar surface for the bottom and the top of the solid.

IntroductionSwept surfacesBREP Geant4

Linear extrusionRevolutionConclusion

10

Page 11: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

11

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Solid of revolutionSolid of revolution

Bounding box

- is computed by extend the bounding box of the base curve with its replications on each semi-axis (x pos/neg, y pos/neg)

Page 12: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

12

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

Surface of revolutionSurface of revolution

Ray intersection

Boundary Cylindrical Shell

This allow to limit z interval

The ray is “cylindrical proiected” on the plane that is swepted (cylindrical coordinate system x2+y2=r2)

The image of the ray is not a ray but is a hyperbola

The first intersection of the two curves is computed: (r0,z0)

With z0 and ray equation we can obtain the 3D intersection point and the distance

Page 13: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

13

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

G4BREP solidsG4BREP solids

G4BREPSolidOfLinearExtrusion

G4BREPSolidOfRevolution

Inside operation

generates a ray from the point and check if it intersects one of the surfaces

Page 14: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

14

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

ExampleExample

Page 15: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

15

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

ConclusionsConclusions

Actual implementation

Linear extrusion for base curves

Surfaces of revolution (not complete for bspline curves)

Incoming

Tangent computation for BSpline

Alternative technique for compute ray - revolution surfaces intersection by binary subdivision of bo

Future work Diagonal extrusion Conical extrusion Extrusion along an arbitrary curve Revolution suface limitated by phy section

Page 16: BREPS solids construction by surfaces of extrusion & revolution CERN – Geant4 groupGabriele Camellini20/10/2009 1 BREPS solids construction by surfaces.

16

BREPS solids constructionby surfaces of extrusion & revolution

CERN – Geant4 group Gabriele Camellini 20/10/2009

BREPS solids constructionby surfaces of extrusion & revolution

BREPS solids constructionby surfaces of extrusion & revolution

END

Thanks