Skip to content

Commit

Permalink
sinus benchy as printed
Browse files Browse the repository at this point in the history
  • Loading branch information
Liech committed Nov 29, 2023
1 parent 5cb8914 commit eb96876
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
11 changes: 6 additions & 5 deletions Examples/NonPlanarWobbleSlicer/BuildZSliceField.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

boundary = modelBoundary({'Name':'Main'})
voxelizeMin=boundary['Min']
voxelizeMin[0] = voxelizeMin[0] - boundary['UniformSize'][0];
voxelizeMin[1] = voxelizeMin[1] - boundary['UniformSize'][1];
voxelizeMin[0] = voxelizeMin[0] - boundary['UniformSize'][0]/10;
voxelizeMin[1] = voxelizeMin[1] - boundary['UniformSize'][1]/10;

voxelizeMax=boundary['UniformMax']
voxelizeMax[0] = voxelizeMax[0] + boundary['UniformSize'][0];
voxelizeMax[1] = voxelizeMax[1] + boundary['UniformSize'][1];
voxelizeMax[0] = voxelizeMax[0] + boundary['UniformSize'][0]/10;
voxelizeMax[1] = voxelizeMax[1] + boundary['UniformSize'][1]/10;

print(" Generate Double Field...");
minZ = voxelizeMin[2]
Expand All @@ -42,7 +42,8 @@ def density(input):
data = input["Data"]
xWobble = data["WobbleFrequency"]
zWobble = data["WobbleAmplitude"]
distortion = (math.sin(coord[1]*(xWobble/data["SliceResolution"][0]))*zWobble + math.cos(coord[0]*(xWobble/data["SliceResolution"][0]))*zWobble);
#distortion = (math.sin(coord[1]*(xWobble/data["SliceResolution"][0]))*zWobble + math.cos(coord[0]*(xWobble/data["SliceResolution"][0]))*zWobble);
distortion = (math.sin(coord[0]*(xWobble/data["SliceResolution"][0]) + 3.14/2)*zWobble)*zWobble;
perc = (coord[2] / data["SliceResolution"][2])
distortionInfluence = 0
fromPercentage = data["WobbleFrom"]
Expand Down
2 changes: 1 addition & 1 deletion Examples/NonPlanarWobbleSlicer/SliceZ.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

Z = 0.2
counter = 0;
Z = 9
#Z = 9

setData({'Name':'ZCounter', 'Data' : 0});

Expand Down
8 changes: 4 additions & 4 deletions Examples/NonPlanarWobbleSlicer/createSlice.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

boundary = modelBoundary({'Name':'Main'})
voxelizeMin=boundary['Min']
voxelizeMin[0] = voxelizeMin[0] - boundary['UniformSize'][0];
voxelizeMin[1] = voxelizeMin[1] - boundary['UniformSize'][1];
voxelizeMin[0] = voxelizeMin[0] - boundary['UniformSize'][0]/10;
voxelizeMin[1] = voxelizeMin[1] - boundary['UniformSize'][1]/10;
voxelizeMin[2] = voxelizeMin[2];

voxelizeMax=boundary['UniformMax']
voxelizeMax[0] = voxelizeMax[0] + boundary['UniformSize'][0];
voxelizeMax[1] = voxelizeMax[1] + boundary['UniformSize'][1];
voxelizeMax[0] = voxelizeMax[0] + boundary['UniformSize'][0]/10;
voxelizeMax[1] = voxelizeMax[1] + boundary['UniformSize'][1]/10;
voxelizeMax[2] = voxelizeMax[2];

print(" Generate Double Field...");
Expand Down
10 changes: 5 additions & 5 deletions Examples/NonPlanarWobbleSlicer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
'BuildplateCenter' : [100,100,0],
'LayerHeight' : 0.2,
'WallAmount' : 2,
'NozzleDiameter' : 0.42,
'NozzleDiameter' : 0.40,
'VoxelResolution' :[512,512,512],
'SliceResolution' :[32,32,32],
'SliceResolution' :[64,64,64],
'WallThickness' : 0.4,
'PlanarSlicing' : False,
'LayerLimit' : -1, # -1 for unlimited
'Detail' : 0.3, #0.0-1.0
'IntermediateFiles' : True,
'WobbleAmplitude' : 1.0, # z height
'WobbleFrequency' : 4.14*10, #amount of waves in full volume
'WobbleFrequency' : 4.14*15, #amount of waves in full volume
'WobbleFrom' : 0.11, # percentage where wobble is full
'WobbleTo' : 0.31, #percentage where wobble stops being full
'rampTime' : 0.06 #percentage before and after full wobble where it fades out
'WobbleTo' : 0.51, #percentage where wobble stops being full
'rampTime' : 0.1 #percentage before and after full wobble where it fades out
};

#createPlane({
Expand Down

0 comments on commit eb96876

Please sign in to comment.