BasicTools.ImplicitGeometry.ImplicitGeometryObjects module

BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CheckIntegrity(GUI=False)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometryAnalytical(ops)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometryByETag(ops)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometryByETagII(ops)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometryExternalSurface(ops)[source]

ImplicitGeometry of the external surface of a mesh (support) support : Grid to compute the surface

<All id=”x” [support=””| ls=””] >

BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometryPlane(ops)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometrySphereFromNTag(ops)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.CreateImplicitGeometryStl(ops)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometry60D(lx=1.0, w=0.1)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry using walls at 60 degrees in the (x,y) plane lx : scale w : wall thickness

GetDistanceToPoint(pos)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryAnalytical[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a function f(x,y,z) or f(pos) expr : function expression

GetDistanceToPoint(pos)[source]
SetExpression(string)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryAxisAlignBox(origin=None, size=None)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based ona Axis Alinged Box origin : origin in the mox (Xmin Ymin Zmin) size : size of the box (Xl, Yl Zl)

GetBoundingMax()[source]
GetBoundingMin()[source]
GetDistanceToPoint(_pos)[source]
SetSupport(support)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryByETag[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based in a eTags from a mesh (support) or levelset support : mesh from where to extract the eTags ls : levelset from where to extract the support to extract the eTags etags : list of etags offset : offset from the eTag (negative will grow the zone )

Note: For the moment works only for volume and surface eTag (no lines) the implementation compute the distance on the the skin of the etag

ApplyVector(support, cellCenter=False)[source]
GetDistanceToPoint(_pos)[source]
SetSupportAndZones(support, etags)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryByETagII[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based in a eTags from a mesh (support) or levelset support : mesh from where to extract the eTags ls : levelset from where to extract the support to extract the eTags etags : list of etags offset : offset from the eTag (negative will grow the zone )

Note: for surface and line the resulting fields is possitive (no inside) the implementation puts zeros in the interface beetwen the elements in the etag and the other elements (1 outside, 0 in the interface, -1 inside) Some special treatement is done for elements with all the nodes with zero values (presence of values -0.5 and 0.5 in the resulting field)

ApplyVector(support, cellCenter=False)[source]
GetDistanceToPoint(_pos)[source]
SetSupportAndZones(support, etags, dim=None)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryCylinder(center1=None, center2=None, radius=1.0, wcups=True)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a cylinder center1 : first point on the axis (X Y Z) center2 : second point on the axis (X Y Z) radius : radius of the cylinder (r) wcups : if we compute the distance to the cups of the cylinder

GetBoundingMax()[source]
GetBoundingMin()[source]
GetDistanceToPoint(_pos)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryExternalSurface(support=None)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry of the external surface of a mesh (support) support : mesh to compute the surface

GetDistanceToPoint(pos)[source]
SetSupport(support)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryGyroid(scale=1.0, offset=[0.0, 0.0, 0.0])[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a gyroid scale : scale of the gyroid (1. defaul) offset : offset of the gyroid (X Y Z) type : [0-1] version of gyroid (0 default) wall : [True-False] wall or body (false default) wallThickness : parameter to control the wall thickness

GetDistanceToPoint(pos)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryHoles[source]

Bases: ImplicitGeometryBase

ImplicitGeometry to create holes n : number of hole in each direction (3 3 3) r : radius of holes (0.5) offset : offset (0 0 0 ) support : (grid) to compute the bounding box to generate the holes

GetBoundingMax()[source]
GetBoundingMin()[source]
GetDistanceToPoint(pos)[source]
SetNumberOfHoles(data)[source]
SetSupport(support)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryHoneycomb(lx=1.0, w=0.1)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry Honycomb (in the xy plane) lx : scale (1) w : wall thickness (0.1) translate : offset of (0 0 0)

GetDistanceToPoint(pos)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryPlane(point=None, normal=None, offset=0.0)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a plane point : point on the plane (X Y Z) normal : normale of the plane (X Y Z) offset : offset to the plane (r)

GetDistanceToPoint(pos)[source]
SetNormal(invec)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometrySphere(radius=1.0, center=None)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a sphere center : center of the sphere (X Y Z) radius : radius of the sphere (r)

GetBoundingMax()[source]
GetBoundingMin()[source]
GetDistanceToPoint(_pos)[source]
SetCenter(center)[source]
SetRadius(val)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometrySphereFromNTag(radius=1.0)[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a ntags ls : levelset to extrat ntag nTag : name of the nTag to retrieve the centers radius : radius of the sphere (r)

GetDistanceToPoint(_pos)[source]
SetLs(ls)[source]
SetRadius(val)[source]
SetSupport(support)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryStl[source]

Bases: ImplicitGeometryBase

ImplicitGeometry based on a external stlfile filename : stl filename to be loaded option ‘asVolume’ is on as default this means the surface represent a close volume. The algorithm will try to generate a close representation of the levelset. if asVolume is False the a positive levelset is generated around the surface. Please use an offset to add ‘volume to the surface’

GetBoundingMax()[source]
GetBoundingMin()[source]
GetDistanceToPoint(pos)[source]
LoadFromFile(filenameSTL)[source]
SetFileName(filenameSTL)[source]
SetMesh(mesh)[source]
SetSurface(mesh, asVolume=None)[source]
class BasicTools.ImplicitGeometry.ImplicitGeometryObjects.ImplicitGeometryWrapped(field=None)[source]

Bases: ImplicitGeometryBase

Wrapper to add the ImplicitGeometry API arround a numpy array field : numpy array

ApplyVector(support, cellCenter=False)[source]
GetDistanceToPoint(_pos)[source]
BasicTools.ImplicitGeometry.ImplicitGeometryObjects.InitHoles(ls, nx, ny, nz, r)[source]