Package empro :: Package toolkit :: Package geometry
[frames] | no frames]

Package geometry

source code

Submodules

Functions
 
translate(iObject, iVector) source code
 
canonicalUnit(iObject, iUnitAbbrev='m') source code
 
deCanonicalUnit(iObject, iUnitAbbrev='m') source code
 
scale(iObject, iFactor) source code
Part
Wire(iFrom, iTo)
Returns a straight wire object.
source code
Model
Block(iFrom, iTo)
Returns a rectangular block defined by the two opposing points iFrom and iTo.
source code
Part
xCylinder(iInnerRadius, iOuterRadius, iBottomCenter, iHeight)
Returns a cylinder whose axis is X-directed.
source code
Part
yCylinder(iInnerRadius, iOuterRadius, iBottomCenter, iHeight)
Returns a cylinder whose axis is Y-directed.
source code
Part
zCylinder(iInnerRadius, iOuterRadius, iBottomCenter, iHeight)
Returns a cylinder whose axis is Z-directed.
source code
Part
xCylinderFaceted(iInnerRadius, iOuterRadius, iBottomCenter, iHeight, iDivisions=32)
Creates a regular polygonal prism with primary axis along the x-axis.
source code
Part
yCylinderFaceted(iInnerRadius, iOuterRadius, iBottomCenter, iHeight, iDivisions=32)
Creates a regular polygonal prism with primary axis along the y-axis.
source code
Part
zCylinderFaceted(iInnerRadius, iOuterRadius, iBottomCenter, iHeight, iDivisions=32)
Creates a regular polygonal prism with primary axis along the z-axis.
source code
Part
xRegularPolygonalPrism(iBottomCenter, iRadius, iHeight, iDivisions=32)
Creates a regular polygonal prism with primary axis along the X-axis.
source code
Part
yRegularPolygonalPrism(iBottomCenter, iRadius, iHeight, iDivisions=32)
Creates a regular polygonal prism with primary axis along the Y-axis.
source code
Part
zRegularPolygonalPrism(iBottomCenter, iRadius, iHeight, iDivisions=32)
Creates a regular polygonal prism with primary axis along the z-axis.
source code
Part
plateXY(iCenter, iDeltaX, iDeltaY)
plateXY(iCenter, iDeltaX, iDeltaY, iName) Returns a rectangular plate parallel to the XY-plane.
source code
Part
plateZX(iCenter, iDeltaZ, iDeltaX)
plateZX(iCenter, iDeltaZ, iDeltaX, iName) Returns a rectangular plate parallel to the ZX-plane.
source code
Part
plateYZ(iCenter, iDeltaY, iDeltaZ)
plateYZ(iCenter, iDeltaY, iDeltaZ, iName) Returns a rectangular plate parallel to the YZ-plane.
source code
Part
zCircle(iCenter, iRadius)
Returns a circle parallel to the XY-plane.
source code
Part
QuadPlate(iPoint1, iPoint2, iPoint3, iPoint4)
QuadPlate(iPoint1,iPoint2,iPoint3,iPoint4,iName) Returns a plate defined by four points.
source code
Part
PolyPlate(iPoint1=..., iPoint2=..., ...)
PolyPlate([iPoint1, iPoint2, ...], iName) Returns a plate defined by a polygon
source code
Sketch
PolySketch(iPoint1=..., iPoint2=..., ...)
PolySketch([iPoint1, iPoint2, ...], iName) Returns a sketch defined by a polygon
source code
 
sheetBody(iSketch, iName=None) source code
 
extrude(iSketch, iDistance) source code
 
base64SAT(iDObject) source code
 
base64faceSAT(iDObject, iFace) source code
 
materialsUsedBy(iObject, iFilter=None) source code
Part
sliceXY(iObject, zHeight)
Computes a slice of iObject at height zHeight.
source code
 
absoluteFacets(iObject)
absoluteFacets.
source code
list<Part>
assemblyFlatListInOrder(iAssembly)
Returns a flat list of all parts (excluding assemblies) in order as they appear in the project tree.
source code
None
removeThinShelling(iObject)
Removes all thin shelling on an object.
source code
None
shellThicknesses(iObject)
Removes all thin shelling on an object.
source code
Function Details

Wire(iFrom, iTo)

source code 

Returns a straight wire object.

Parameters:
  • iFrom (Vector3d) - start point of the wire
  • iTo (Vector3d) - end point of the wire
Returns: Part
the wire object as Part

Block(iFrom, iTo)

source code 

Returns a rectangular block defined by the two opposing points iFrom and iTo.

Parameters:
  • iFrom (Vector3d) - first corner of the rectangular block
  • iTo (Vector3d) - opposing point of the rectangular block
Returns: Model
the rectangular block

xCylinder(iInnerRadius, iOuterRadius, iBottomCenter, iHeight)

source code 

Returns a cylinder whose axis is X-directed.

Parameters:
  • iInnerRadius (float) - inner radius of the cylinder
  • iOuterRadius (float) - outer radius of the cylinder
  • iBottomCenter (Vector3d) - center of the bottom of the cylinder
  • iHeight (float) - height of the cylinder
Returns: Part
the cylinder as Part

yCylinder(iInnerRadius, iOuterRadius, iBottomCenter, iHeight)

source code 

Returns a cylinder whose axis is Y-directed.

Parameters:
  • iInnerRadius (float) - inner radius of the cylinder
  • iOuterRadius (float) - outer radius of the cylinder
  • iBottomCenter (Vector3d) - center of the bottom of the cylinder
  • iHeight (float) - height of the cylinder
Returns: Part
the cylinder as Part

zCylinder(iInnerRadius, iOuterRadius, iBottomCenter, iHeight)

source code 

Returns a cylinder whose axis is Z-directed.

Parameters:
  • iInnerRadius (float) - inner radius of the cylinder
  • iOuterRadius (float) - outer radius of the cylinder
  • iBottomCenter (Vector3d) - center of the bottom of the cylinder
  • iHeight (float) - height of the cylinder
Returns: Part
the cylinder as Part

xCylinderFaceted(iInnerRadius, iOuterRadius, iBottomCenter, iHeight, iDivisions=32)

source code 

Creates a regular polygonal prism with primary axis along the x-axis.

Parameters:
  • iInnerRadius (float) - inner radius of the cylinder
  • iOuterRadius (float) - outer radius of the cylinder
  • iBottomCenter (Vector3d) - center of the bottom of the cylinder
  • iHeight (float) - height of the cylinder
  • iDivisions (int) - the number of divisions to use for the cylinder
Returns: Part
the prism as Part

yCylinderFaceted(iInnerRadius, iOuterRadius, iBottomCenter, iHeight, iDivisions=32)

source code 

Creates a regular polygonal prism with primary axis along the y-axis.

Parameters:
  • iInnerRadius (float) - inner radius of the cylinder
  • iOuterRadius (float) - outer radius of the cylinder
  • iBottomCenter (Vector3d) - center of the bottom of the cylinder
  • iHeight (float) - height of the cylinder
  • iDivisions (int) - the number of divisions to use for the cylinder
Returns: Part
the prism as Part

zCylinderFaceted(iInnerRadius, iOuterRadius, iBottomCenter, iHeight, iDivisions=32)

source code 

Creates a regular polygonal prism with primary axis along the z-axis.

Parameters:
  • iInnerRadius (float) - inner radius of the cylinder
  • iOuterRadius (float) - outer radius of the cylinder
  • iBottomCenter (Vector3d) - center of the bottom of the cylinder
  • iHeight (float) - height of the cylinder
  • iDivisions (int) - the number of divisions to use for the cylinder
Returns: Part
the prism as Part

xRegularPolygonalPrism(iBottomCenter, iRadius, iHeight, iDivisions=32)

source code 

Creates a regular polygonal prism with primary axis along the X-axis.

Parameters:
  • iBottomCenter (Vector3d) - the center of the bottom of the prism
  • iRadius (float) - the radius where the vertices of the regular polygon are placed
  • iHeight (float) - the height of the prism
  • iDivisions (int) - the number of divisions to use for the prism
Returns: Part
the prism as Part

yRegularPolygonalPrism(iBottomCenter, iRadius, iHeight, iDivisions=32)

source code 

Creates a regular polygonal prism with primary axis along the Y-axis.

Parameters:
  • iBottomCenter (Vector3d) - the center of the bottom of the prism
  • iRadius (float) - the radius where the vertices of the regular polygon are placed
  • iHeight (float) - the height of the prism
  • iDivisions (int) - the number of divisions to use for the prism
Returns: Part
the prism as Part

zRegularPolygonalPrism(iBottomCenter, iRadius, iHeight, iDivisions=32)

source code 

Creates a regular polygonal prism with primary axis along the z-axis.

Parameters:
  • iBottomCenter (Vector3d) - the center of the bottom of the prism
  • iRadius (float) - the radius where the vertices of the regular polygon are placed
  • iHeight (float) - the height of the prism
  • iDivisions (int) - the number of divisions to use for the prism
Returns: Part
the prism as Part

plateXY(iCenter, iDeltaX, iDeltaY)

source code 

plateXY(iCenter, iDeltaX, iDeltaY, iName) Returns a rectangular plate parallel to the XY-plane.

Parameters:
  • iCenter (Vector3d) - the center of the plate
  • iDeltaX (float) - the width of the plate along the X-axis
  • iDeltaY (float) - the width of the plate along the Y-axis
  • iName (string) - the name of the plate (Default = "PlateXY")
Returns: Part
the plate as Part

plateZX(iCenter, iDeltaZ, iDeltaX)

source code 

plateZX(iCenter, iDeltaZ, iDeltaX, iName) Returns a rectangular plate parallel to the ZX-plane.

Parameters:
  • iCenter (Vector3d) - the center of the plate
  • iDeltaZ (float) - the width of the plate along the Z-axis
  • iDeltaX (float) - the width of the plate along the X-axis
  • iName (string) - the name of the plate (Default = "PlateZX")
Returns: Part
the plate as Part

plateYZ(iCenter, iDeltaY, iDeltaZ)

source code 

plateYZ(iCenter, iDeltaY, iDeltaZ, iName) Returns a rectangular plate parallel to the YZ-plane.

Parameters:
  • iCenter (Vector3d) - the center of the plate
  • iDeltaY (float) - the width of the plate along the Y-axis
  • iDeltaZ (float) - the width of the plate along the Z-axis
  • iName (string) - the name of the plate (Default = "PlateYZ")
Returns: Part
the plate as Part

zCircle(iCenter, iRadius)

source code 

Returns a circle parallel to the XY-plane.

Parameters:
  • iCenter (Vector3d) - the center of the circle
  • iRadius (float) - the radius of the circle
Returns: Part
the circle as Part

QuadPlate(iPoint1, iPoint2, iPoint3, iPoint4)

source code 

QuadPlate(iPoint1,iPoint2,iPoint3,iPoint4,iName) Returns a plate defined by four points.

Parameters:
  • iPoint1 (Vector3d) - the first point of the plate
  • iPoint2 (Vector3d) - the second point of the plate
  • iPoint3 (Vector3d) - the third point of the plate
  • iPoint4 (Vector3d) - the fourth point of the plate
  • iName (string) - the name of the plate (Default = "QuadPlate")
Returns: Part
the plate as Part

PolyPlate(iPoint1=..., iPoint2=..., ...)

source code 

PolyPlate([iPoint1, iPoint2, ...], iName) Returns a plate defined by a polygon

Parameters:
  • iPoints (list<Vector3d>) - a sequence of polygon vertices.
  • iName (string) - the name of the plate (Default = "PolyPlate")
Returns: Part
the plate as Part

PolySketch(iPoint1=..., iPoint2=..., ...)

source code 

PolySketch([iPoint1, iPoint2, ...], iName) Returns a sketch defined by a polygon

Parameters:
  • iPoints (list<Vector3d>) - a sequence of polygon vertices.
  • iName (string) - the name of the sketch (Default = "PolySketch")
Returns: Sketch
polygonal sketch

sliceXY(iObject, zHeight)

source code 

Computes a slice of iObject at height zHeight.

Parameters:
  • iObject (Part) - a part that can be an Assembly that needs to be sliced
  • zHeight (float) - the height at which the slice is to be taken
Returns: Part
the slice as Part

absoluteFacets(iObject)

source code 

absoluteFacets. Only for internal usage.

assemblyFlatListInOrder(iAssembly)

source code 

Returns a flat list of all parts (excluding assemblies) in order as they appear in the project tree.

Parameters:
  • iObject (Part) - a part that can be an Assembly that needs to be flat listed
Returns: list<Part>
the ordered list of Part's

removeThinShelling(iObject)

source code 

Removes all thin shelling on an object.

Parameters:
  • iObject (Part) - a part that needs to be handled
  • iThicknessThreshold (float) - all shells below this value will be removed
Returns: None
None

shellThicknesses(iObject)

source code 

Removes all thin shelling on an object.

Parameters:
  • iObject (Part) - a part that needs to be handled
  • iThicknessThreshold (float) - all shells below this value will be removed
Returns: None
None