Package SMESH_fixation


Functions

def MakeFace

Variables

int longueurPlq = 686
 longueurPlq = 0.686 largeurPlq = 0.573 epaisseurPlq = 0.150 hauteurFlanc = 0.380 epaisseurFlanc = 0.112 rayonConge = 0.150 - epaisseurFlanc epaisseurFond = 0.162 rayonTrou = 0.075 posAxeTrou = hauteurFlanc -(0.180 + rayonTrou) marge = 0.01 tol3d = 1.e-5
int largeurPlq = 573
int epaisseurPlq = 150
int hauteurFlanc = 380
int epaisseurFlanc = 112
int rayonConge = 150
int epaisseurFond = 162
int rayonTrou = 75
tuple posAxeTrou = hauteurFlanc-(180 + rayonTrou)
int marge = 10
int tol3d = 1
tuple p0 = geompy.MakeVertex(0., 0., 0.)
tuple vx = geompy.MakeVectorDXDYDZ(100., 0., 0.)
tuple vy = geompy.MakeVectorDXDYDZ(0., 100., 0.)
tuple vz = geompy.MakeVectorDXDYDZ(0., 0., 100.)
int he = 2
float re = 0.5
 sine = re/he
tuple cose = math.sqrt(1. - sine*sine)
tuple ve = geompy.MakeVectorDXDYDZ(sine, 0., cose)
tuple cyl0 = geompy.MakeCylinder(p0, ve, re, 2*he)
tuple cyl1 = geompy.MakeRotation(cyl0, ve, 0.5)
tuple cyle = geompy.MakeTranslation(cyl1, -marge*sine, 0., -marge*cose)
tuple pbe = geompy.MakeVertex(3*he, -2*re, 3*he)
tuple boxe = geompy.MakeBoxTwoPnt(p0, pbe)
tuple cylcoup = geompy.MakeBoolean(cyle, boxe, 2)
list aretes = []
tuple aretes = geompy.SubShapeAllSorted(cylcoup, geompy.ShapeType["EDGE"])
tuple shape = geompy.MakeCopy(aretes[0])
tuple aShape = geompy.MakeTranslation(shape, 0., rayonConge + re, epaisseurPlq + 2*rayonConge)
int x0 = 0
 x0h = rayonConge
 x1 = rayonConge+epaisseurFlanc
int xc = 2
 x2 = longueurPlq-rayonConge-epaisseurFlanc
 x3h = longueurPlq-rayonConge
 x3 = longueurPlq
int y0 = 0
 y0h = rayonConge
 y1 = largeurPlq-epaisseurFond
int y1m = 1
 y2 = largeurPlq
 y2p = largeurPlq+marge
int z0 = 0
 z1m = epaisseurPlq-marge
 z1 = epaisseurPlq
 z2 = epaisseurPlq+rayonConge
int z3 = 2
 z4 = epaisseurPlq+hauteurFlanc
 z4p = epaisseurPlq+hauteurFlanc+marge
 zc = epaisseurPlq+posAxeTrou
tuple zc2 = epaisseurPlq+(posAxeTrou - rayonTrou)
int zc3 = 2
tuple p11 = geompy.MakeVertex(x1, y1m, z1)
tuple p12 = geompy.MakeVertex(x1, y1m, z2)
tuple p13 = geompy.MakeVertex(x1, y1m, z3)
tuple p14 = geompy.MakeVertex(x1, y1m, z4)
tuple pc1 = geompy.MakeVertex(xc, y1m, z1)
tuple pc2 = geompy.MakeVertex(xc, y1m, zc2)
tuple pc3 = geompy.MakeVertex(xc, y1m, zc3)
tuple pcc = geompy.MakeVertex(xc, y1m, zc)
tuple pc4 = geompy.MakeVertex(xc, y1m, z4)
tuple p21 = geompy.MakeVertex(x2, y1m, z1)
tuple p22 = geompy.MakeVertex(x2, y1m, z2)
tuple p23 = geompy.MakeVertex(x2, y1m, z3)
tuple p24 = geompy.MakeVertex(x2, y1m, z4)
tuple pcf = geompy.MakeVertex(xc, y2p, zc)
tuple arc2 = geompy.MakeArc(p12,pc2,p22)
tuple arc3 = geompy.MakeArc(p13,pc3,p23)
tuple segz1 = geompy.MakeVector(p11,p21)
tuple segz41 = geompy.MakeVector(p14,pc4)
tuple segz42 = geompy.MakeVector(pc4,p24)
tuple segx11 = geompy.MakeVector(p11,p12)
tuple segx12 = geompy.MakeVector(p12,p13)
tuple segx13 = geompy.MakeVector(p13,p14)
tuple segxc2 = geompy.MakeVector(pc1,pc2)
tuple segxc3 = geompy.MakeVector(pc2,pc3)
tuple segxc4 = geompy.MakeVector(pcc,pc4)
tuple segx21 = geompy.MakeVector(p21,p22)
tuple segx22 = geompy.MakeVector(p22,p23)
tuple segx23 = geompy.MakeVector(p23,p24)
tuple segx1c1 = geompy.MakeVector(p13,pcc)
tuple segx1c2 = geompy.MakeVector(p14,pcc)
tuple segx2c1 = geompy.MakeVector(p23,pcc)
tuple segx2c2 = geompy.MakeVector(p24,pcc)
list facef = []
tuple vcccf = geompy.MakeVector(pcc, pcf)
int hcccf = 2
list decf = []
tuple pc = geompy.MakeVertex(xc, 0., zc)
tuple py2 = geompy.MakeVertex(xc, y2, zc)
tuple axeCyl = geompy.MakeVector(pc, py2)
tuple cylFond = geompy.MakeCylinder(pc, vy, rayonTrou, 1.1*largeurPlq)
tuple cylFond2 = geompy.MakeRotation(cylFond, axeCyl, math.pi)
list fondec = []
tuple p_xcy2pz4p = geompy.MakeVertex(xc,y2p,z4p)
tuple p_x3y2pz4p = geompy.MakeVertex(x3,y2p,z4p)
tuple pxc = geompy.MakeVertex(xc,y0,z0)
tuple bcut1 = geompy.MakeBoxTwoPnt(p0, p_xcy2pz4p)
tuple bcut2 = geompy.MakeBoxTwoPnt(pxc, p_x3y2pz4p)
list fondec2 = []
tuple bcong1 = geompy.MakeBox(x0,y0,z1, x1,y1,z2)
tuple bcong2 = geompy.MakeBox(x0,y1,z1, x1,y2,z2)
tuple bcong3 = geompy.MakeBox(x2,y0,z1, x3,y1,z2)
tuple bcong4 = geompy.MakeBox(x2,y1,z1, x3,y2,z2)
tuple pcylx0 = geompy.MakeVertex(0., -marge, z2)
tuple pcylx3 = geompy.MakeVertex(longueurPlq, -marge, z2)
tuple pcyly0 = geompy.MakeVertex(-marge, 0., z2)
tuple cylcongx0 = geompy.MakeCylinder(pcylx0, vy, rayonConge, largeurPlq + 2*marge)
tuple cylcongx3 = geompy.MakeCylinder(pcylx3, vy, rayonConge, largeurPlq + 2*marge)
tuple cylcongy0 = geompy.MakeCylinder(pcyly0, vx, rayonConge, longueurPlq + 2*marge)
tuple bcong1 = geompy.MakeBoolean(bcong1,cylcongx0,2)
tuple bcong2 = geompy.MakeBoolean(bcong2,cylcongx0,2)
tuple bcong1 = geompy.MakeBoolean(bcong1,cylcongy0,2)
tuple bcong3 = geompy.MakeBoolean(bcong3,cylcongy0,2)
tuple bcong3 = geompy.MakeBoolean(bcong3,cylcongx3,2)
tuple bcong4 = geompy.MakeBoolean(bcong4,cylcongx3,2)
tuple pf1 = geompy.MakeVertex(0., y0h, z3)
tuple pf2 = geompy.MakeVertex(0., y1, z3)
tuple pf3 = geompy.MakeVertex(0., y1, z4)
tuple pf4 = geompy.MakeVertex(0., 0.5*(largeurPlq - epaisseurFond) , z4)
tuple vf1 = geompy.MakeEdge(pf1, pf2)
tuple vf2 = geompy.MakeEdge(pf2, pf3)
tuple vf3 = geompy.MakeEdge(pf3, pf4)
tuple faceFlanc = MakeFace([vf1,vf2,vf3,aShape])
tuple flanc1 = geompy.MakePrismVecH(faceFlanc, vx, epaisseurFlanc)
tuple flanc2 = geompy.MakeCopy(flanc1)
tuple flanc1 = geompy.MakeTranslation(flanc1, rayonConge, 0., 0.)
tuple flanc2 = geompy.MakeTranslation(flanc2, longueurPlq - rayonConge - epaisseurFlanc, 0., 0.)
tuple boxfond2 = geompy.MakeBox(x0, y1, z0, x3, y2, z4p)
list blocs = []
tuple compbloc = geompy.MakeCompound(blocs)
tuple idcomp = geompy.addToStudy(compbloc, "compbloc")
tuple compshell = geompy.MakeGlueFaces(compbloc,tol3d)
tuple idcomp = geompy.addToStudy(compshell, "compshell")


Function Documentation

def SMESH_fixation.MakeFace   lstEdges  ) 
 

Creates a planar face from 4 edges


Variable Documentation

int SMESH_fixation.longueurPlq = 686 [static]
 

int SMESH_fixation.largeurPlq = 573 [static]
 

int SMESH_fixation.epaisseurPlq = 150 [static]
 

int SMESH_fixation.hauteurFlanc = 380 [static]
 

int SMESH_fixation.epaisseurFlanc = 112 [static]
 

int SMESH_fixation.rayonConge = 150 [static]
 

int SMESH_fixation.epaisseurFond = 162 [static]
 

int SMESH_fixation.rayonTrou = 75 [static]
 

tuple SMESH_fixation.posAxeTrou = hauteurFlanc-(180 + rayonTrou) [static]
 

int SMESH_fixation.marge = 10 [static]
 

int SMESH_fixation.tol3d = 1 [static]
 

tuple SMESH_fixation.p0 = geompy.MakeVertex(0., 0., 0.) [static]
 

tuple SMESH_fixation.vx = geompy.MakeVectorDXDYDZ(100., 0., 0.) [static]
 

tuple SMESH_fixation.vy = geompy.MakeVectorDXDYDZ(0., 100., 0.) [static]
 

tuple SMESH_fixation.vz = geompy.MakeVectorDXDYDZ(0., 0., 100.) [static]
 

int SMESH_fixation.he = 2 [static]
 

float SMESH_fixation.re = 0.5 [static]
 

SMESH_fixation.sine = re/he [static]
 

tuple SMESH_fixation.cose = math.sqrt(1. - sine*sine) [static]
 

tuple SMESH_fixation.ve = geompy.MakeVectorDXDYDZ(sine, 0., cose) [static]
 

tuple SMESH_fixation.cyl0 = geompy.MakeCylinder(p0, ve, re, 2*he) [static]
 

tuple SMESH_fixation.cyl1 = geompy.MakeRotation(cyl0, ve, 0.5) [static]
 

tuple SMESH_fixation.cyle = geompy.MakeTranslation(cyl1, -marge*sine, 0., -marge*cose) [static]
 

tuple SMESH_fixation.pbe = geompy.MakeVertex(3*he, -2*re, 3*he) [static]
 

tuple SMESH_fixation.boxe = geompy.MakeBoxTwoPnt(p0, pbe) [static]
 

tuple SMESH_fixation.cylcoup = geompy.MakeBoolean(cyle, boxe, 2) [static]
 

list SMESH_fixation.aretes = [] [static]
 

tuple SMESH_fixation.aretes = geompy.SubShapeAllSorted(cylcoup, geompy.ShapeType["EDGE"]) [static]
 

tuple SMESH_fixation.shape = geompy.MakeCopy(aretes[0]) [static]
 

tuple SMESH_fixation.aShape = geompy.MakeTranslation(shape, 0., rayonConge + re, epaisseurPlq + 2*rayonConge) [static]
 

int SMESH_fixation.x0 = 0 [static]
 

SMESH_fixation.x0h = rayonConge [static]
 

SMESH_fixation.x1 = rayonConge+epaisseurFlanc [static]
 

int SMESH_fixation.xc = 2 [static]
 

SMESH_fixation.x2 = longueurPlq-rayonConge-epaisseurFlanc [static]
 

SMESH_fixation.x3h = longueurPlq-rayonConge [static]
 

SMESH_fixation.x3 = longueurPlq [static]
 

int SMESH_fixation.y0 = 0 [static]
 

SMESH_fixation.y0h = rayonConge [static]
 

SMESH_fixation.y1 = largeurPlq-epaisseurFond [static]
 

int SMESH_fixation.y1m = 1 [static]
 

SMESH_fixation.y2 = largeurPlq [static]
 

SMESH_fixation.y2p = largeurPlq+marge [static]
 

int SMESH_fixation.z0 = 0 [static]
 

SMESH_fixation.z1m = epaisseurPlq-marge [static]
 

SMESH_fixation.z1 = epaisseurPlq [static]
 

SMESH_fixation.z2 = epaisseurPlq+rayonConge [static]
 

int SMESH_fixation.z3 = 2 [static]
 

SMESH_fixation.z4 = epaisseurPlq+hauteurFlanc [static]
 

SMESH_fixation.z4p = epaisseurPlq+hauteurFlanc+marge [static]
 

SMESH_fixation.zc = epaisseurPlq+posAxeTrou [static]
 

tuple SMESH_fixation.zc2 = epaisseurPlq+(posAxeTrou - rayonTrou) [static]
 

int SMESH_fixation.zc3 = 2 [static]
 

tuple SMESH_fixation.p11 = geompy.MakeVertex(x1, y1m, z1) [static]
 

tuple SMESH_fixation.p12 = geompy.MakeVertex(x1, y1m, z2) [static]
 

tuple SMESH_fixation.p13 = geompy.MakeVertex(x1, y1m, z3) [static]
 

tuple SMESH_fixation.p14 = geompy.MakeVertex(x1, y1m, z4) [static]
 

tuple SMESH_fixation.pc1 = geompy.MakeVertex(xc, y1m, z1) [static]
 

tuple SMESH_fixation.pc2 = geompy.MakeVertex(xc, y1m, zc2) [static]
 

tuple SMESH_fixation.pc3 = geompy.MakeVertex(xc, y1m, zc3) [static]
 

tuple SMESH_fixation.pcc = geompy.MakeVertex(xc, y1m, zc) [static]
 

tuple SMESH_fixation.pc4 = geompy.MakeVertex(xc, y1m, z4) [static]
 

tuple SMESH_fixation.p21 = geompy.MakeVertex(x2, y1m, z1) [static]
 

tuple SMESH_fixation.p22 = geompy.MakeVertex(x2, y1m, z2) [static]
 

tuple SMESH_fixation.p23 = geompy.MakeVertex(x2, y1m, z3) [static]
 

tuple SMESH_fixation.p24 = geompy.MakeVertex(x2, y1m, z4) [static]
 

tuple SMESH_fixation.pcf = geompy.MakeVertex(xc, y2p, zc) [static]
 

tuple SMESH_fixation.arc2 = geompy.MakeArc(p12,pc2,p22) [static]
 

tuple SMESH_fixation.arc3 = geompy.MakeArc(p13,pc3,p23) [static]
 

tuple SMESH_fixation.segz1 = geompy.MakeVector(p11,p21) [static]
 

tuple SMESH_fixation.segz41 = geompy.MakeVector(p14,pc4) [static]
 

tuple SMESH_fixation.segz42 = geompy.MakeVector(pc4,p24) [static]
 

tuple SMESH_fixation.segx11 = geompy.MakeVector(p11,p12) [static]
 

tuple SMESH_fixation.segx12 = geompy.MakeVector(p12,p13) [static]
 

tuple SMESH_fixation.segx13 = geompy.MakeVector(p13,p14) [static]
 

tuple SMESH_fixation.segxc2 = geompy.MakeVector(pc1,pc2) [static]
 

tuple SMESH_fixation.segxc3 = geompy.MakeVector(pc2,pc3) [static]
 

tuple SMESH_fixation.segxc4 = geompy.MakeVector(pcc,pc4) [static]