Message: Boolean Solids Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Boolean Solids 

Forum: Geometry
Date: 16 Aug, 2011
From: Victor <Victor>

--20cf307cffa82bf9c504aaa2842a
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I'm trying to construct a plate with holes inside.
I use Boolean Solid operations for that.

But I have faced a problem :
I have a plate with dimensions : 30cm x 30cm x 1cm. Hole's dimensions : 25um
x 25um x 1cm. between each hole 50um
I need a lot of holes. And I have only 2GB RAM, so it's not enough memory in
case
I don't deallocate memory by hands.

So, I have a piece of code :

solid = new G4SubtractionSolid("Subtraction", solidFinal, solid2, RotM,
TranVector)
*solidFinal = *solid
delete solid

Since I use operator = to copy the contents of solid into solidFinal before
deallocating solid pointer, this should work.
But I get a segmentation fault for that.

I understand that the problem might be very easy, I just don't see it. And
I'm pretty sure that it's the place of the error in my program.
Could you please help??? What am I doing wrong in here???

--20cf307cffa82bf9c504aaa2842a
Content-Type: text/html; charset=ISO-8859-1

Hi,<br>
<br>
I&#39;m trying to construct a plate with holes inside.<br>
I use Boolean Solid operations for that.<br>
<br>
But I have faced a problem :<br>
I have a plate with dimensions : 30cm x 30cm x 1cm. Hole&#39;s dimensions : 25um x 25um x 1cm. between each hole 50um<br>
I need a lot of holes. And I have only 2GB RAM, so it&#39;s not enough memory in case <br>
I don&#39;t deallocate memory by hands.<br>
<br>
So, I have a piece of code :<br>
<br>
solid = new G4SubtractionSolid(&quot;Subtraction&quot;, solidFinal, solid2, RotM, TranVector)<br>
*solidFinal = *solid<br>
delete solid<br>
<br>
Since I use operator = to copy the contents of solid into solidFinal before deallocating solid pointer, this should work.<br>
But I get a segmentation fault for that.<br>
<br>
I understand that the problem might be very easy, I just don&#39;t see it. 
And I&#39;m pretty sure that it&#39;s the place of the error in my program.<br>
Could you please help??? What am I doing wrong in here??? 

--20cf307cffa82bf9c504aaa2842a--

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Boolean Solids   (Tom Roberts - 16 Aug, 2011)
(_ None: Re: Boolean Solids   (John Allison - 17 Aug, 2011)
 Add Message Add Message
to: "Boolean Solids"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]