/GetInfillPoints.py Secret
Created
June 9, 2024 12:57
Heart Infill for Slic3r-based Slicers - Python Code for Blender to write output point based on vertices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
#This script will go through all the vertices in an object and write | |
#C++ code to be used in Slic3r based settings. | |
#Replace Heart with the name of your object | |
obj = bpy.data.objects['Heart'] | |
verts = bpy.data.objects['Heart'].data.vertices | |
verts_co =[] | |
for k in range(len(verts)): | |
adjustedCoord = obj.matrix_world @ verts[k].co; | |
print('output.add_point({startingx + ', verts[k].co.x, ', startingy + ', verts[k].co.y ,'});') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment