Muscat.ImplicitGeometry.ImplicitGeometryObjects module

CheckIntegrity(GUI: bool = False)[source]
CreateImplicitGeometryAnalytical(ops)[source]
CreateImplicitGeometryByETag(ops)[source]
CreateImplicitGeometryByETagII(ops)[source]
CreateImplicitGeometryExternalSurface(ops)[source]

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

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

CreateImplicitGeometryPlane(ops)[source]
CreateImplicitGeometrySphereFromNTag(ops)[source]
CreateImplicitGeometryStl(ops)[source]
class 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 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 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 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 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 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 ImplicitGeometryEllipse(radius=[1.0, 1.0, 1.0], center=None)[source]

Bases: ImplicitGeometrySphere

ImplicitGeometry based on a Ellipse You can set one of the radius to be infinite so as to have an infinite ellipse on one dimension

  • center : center of the ellipse (X Y Z)

  • radius : radius of the ellipse (a b c)

GetDistanceToPoint(_pos)[source]
class 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 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 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 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 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 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 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 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 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]
InitHoles(ls, nx, ny, nz, r)[source]