Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

jstults

😀
View GitHub Profile
View custom_funfort_1.scad
//CUSTOMIZER VARIABLES
// Overall radius of the sphere
sphereRadius = 30;
// Radius of each hole at the surface of the sphere
holeTopRadius = 5.5;
// Radius of each hole at the bottom of the hole
holeBottomRadius = 5;
@jstults
jstults / topopt2CSG.py
Created Jan 24, 2019
python script to run InverseCSG on an example part from OpenLSTO based on the run_tests script that ships with InverseCSG
View topopt2CSG.py
import os
import sys
# Usage: python3 topopt2CSG.py <build_dir> <test_name>
# Example:
# python3 topopt2CSG.py ../build openlsto
#
if len(sys.argv) < 3:
print('Error: please specify the test case name.')
@jstults
jstults / ransac.conf
Created Jan 24, 2019
configuration file for InverseCSG RANSAC algorithm
View ransac.conf
target_sample_num: 50000
cluster_epsilon: 0.1
epsilon: 0.1
min_points: 500
normal_threshold: 0.8
probability: 0.5
max_iter: 100
max_diam: 0.1
gc_max_iter: 10
base: 5.0
@jstults
jstults / solution_30.stl
Created Jan 24, 2019
inverse csg of openlsto example 3d cantilever
View solution_30.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View mystlfile-openscad-import.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jstults
jstults / pure-bending.tpd
Last active Dec 16, 2017
Pure bending ToPy problem definition
View pure-bending.tpd
[ToPy Problem Definition File v2007]
# Author: Josh Stults
# pure bending topology optimization on a 640x720 domain
PROB_TYPE : comp
PROB_NAME : pure-bend
ETA : exp
DOF_PN : 2
VOL_FRAC : 0.3
@jstults
jstults / brkt.dxf
Last active Aug 29, 2015
3-in Tack Strip Bracket TopOpt
View brkt.dxf
0
SECTION
2
HEADER
9
$ACADVER
1
AC1014
9
$HANDSEED
@jstults
jstults / solidvoid.py
Created Dec 7, 2013
script to process 1-bit pngs that define solid and void regions for ToPy topology optimization problems
View solidvoid.py
# read in black & white pngs and create PASV_ELEM and ACTV_ELEM lists
# for topy input decks
#
# void.png: black pixels indicate regions that should be void
# solid.png: black pixels indicate regions that should be solid
#
from PIL import Image
solidim = Image.open("solid.png")
voidim = Image.open("void.png")
@jstults
jstults / framev.tpd
Created Dec 7, 2013
ToPy Problem Definition (tpd) for topology optimization of a Prusa Mendel frame vertex Based on this one: http://www.thingiverse.com/thing:5094/
View framev.tpd
[ToPy Problem Definition File v2007]
#
# Author: Joshua Stults
# a 2d cross-section for a Prusa Mendal RepRap frame vertex
#
PROB_TYPE : comp
PROB_NAME : framev
ETA : 0.5 # reciprocal approx.
DOF_PN : 2
@jstults
jstults / octet_truss.py
Created Jun 25, 2013
octet truss cubes with two levels of hierarchical organization to improve the speed of the union operation
View octet_truss.py
import scipy as sp
import itertools as it
class rcc_shape():
def __init__(self, name, origin, height, radius):
self.name = name
self.origin = origin
self.height = height
self.radius = radius
def mged_string(self):
You can’t perform that action at this time.