Skip to content

Commit

Permalink
Merge pull request #3 from drlukeparry/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
drlukeparry authored Feb 22, 2021
2 parents 9a25e86 + 6893d7a commit 53d72e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions examples/example_exporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
The following example demonstrate the overall structure required for creating the border of a square region.
"""
import numpy as np

import pyslm
import numpy as np
import pyslm.visualise
import pyslm.analysis

"""
The structures necessary for creating a machine build file should be imported from the geometry submodule.
Expand Down Expand Up @@ -41,7 +43,7 @@
contourBuildStyle.laserSpeed = 500.0 # mm/s - Note this is used on some systems but should be set
contourBuildStyle.laserFocus = 0.0 # mm - (Optional) Some new systems can modify the focus position real-time.
contourBuildStyle.laserId = 1 # Set for multi-laser systems
contourBuildStyle.laserMode = slm.LaserMode.PULSE # (Pulsed) mode is the default but can be cahnged on some systems.
contourBuildStyle.laserMode = slm.LaserMode.Pulse # (Pulsed) mode is the default but can be changed on some systems.

# The point exposure parameters are specified for some systems (typically Q-Switch Pulse Lasers)
# Note: the laser speed v = pointDistance / pointExposureTime
Expand Down
6 changes: 4 additions & 2 deletions examples/example_exporting_multilayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"""

import pyslm
import pyslm.analysis
import pyslm.visualise
from pyslm import hatching as hatching
import numpy as np

Expand Down Expand Up @@ -126,7 +128,7 @@
mttReader.setFilePath("build.mtt")
mttReader.parse()

layers = mttReader.layers
readLayers = mttReader.layers
modelRead = mttReader.models

"""
Expand All @@ -137,7 +139,7 @@ def plotLaserId(models, hatchGeom):
return np.tile(buildStyle.laserId, [int(len(hatchGeom.coords)/2),1])


(fig, ax) = pyslm.visualise.plot(layers[0], plot3D=False, plotOrderLine=True, plotArrows=False,
(fig, ax) = pyslm.visualise.plot(readLayers[0], plot3D=False, plotOrderLine=True, plotArrows=False,
index=lambda hatchGeom :plotLaserId([model], hatchGeom) )


Expand Down
2 changes: 1 addition & 1 deletion pyslm/geometry/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LaserMode:
CW = 0
""" Continious Wave """

PULSE = 1
Pulse = 1
""" Pulsed mode (Default option) """


Expand Down

0 comments on commit 53d72e6

Please sign in to comment.