← Back to team overview

yade-users team mailing list archive

Re: [Question #226967]: Create ChainedFacetCylinder

 

Question #226967 on Yade changed:
https://answers.launchpad.net/yade/+question/226967

    Status: Open => Solved

Eugen Kubowsky confirmed that the question is solved:
ok, I'm sorry for asking. One click at "Source" on the reference page of
yade.geom.facetBunker helps a lot ;)

here's the relevant code:

   ret=[]
   if ((hPipe>0) or (wallMask&2)):
      centerPipe = Vector3(0,0,hPipe/2.0)
      ret+=facetCylinder(center=centerPipe,radius=dOutput/2.0,height=hPipe,segmentsNumber=segmentsNumber,wallMask=wallMask&6,angleRange=angleRange,closeGap=closeGap,**kw)
   
   centerOutput = Vector3(0.0,0.0,hPipe+hOutput/2.0)
   ret+=facetCone(center=centerOutput,radiusTop=dBunker/2.0,radiusBottom=dOutput/2.0,height=hOutput,segmentsNumber=segmentsNumber,wallMask=wallMask&4,angleRange=angleRange,closeGap=closeGap,**kw)
   
   if (hBunker>0):
      centerBunker = Vector3(0.0,0.0,hPipe+hOutput+hBunker/2.0)
      ret+=facetCylinder(center=centerBunker,radius=dBunker/2.0,height=hBunker,segmentsNumber=segmentsNumber,wallMask=wallMask&5,angleRange=angleRange,closeGap=closeGap,**kw)
   
   for i in ret:
      i.state.pos=orientation*(i.state.pos)+Vector3(center)
      i.state.ori=orientation
   
   return ret

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.