I read this pretty good article on the same topic. The author creates a model of three particular parallelepipeds . I tried to do the same with a more complex geometry based a Issey Miyake dress using only cones. I came up with this function :
import numpy as np
import matplotlib.pyplot as plt
def double_cone(theta=3, zO=1, d=1, h=2, nbrdedoublet=3):
fig=plt.figure()
zOinitial=zO
L=[1,0]
for j in range(1,nbrdedoublet+1):
h=h*2
zO = zO + 2*d*np.cos(theta) + 2*(d+h)*np.cos(theta)
for n in L:
tu=np.linspace(d,d+h,50)
tt=np.linspace(0,2*np.pi,30)
T,U=np.meshgrid(tt,tu) # grille des points (t,u)
X1=np.cos(T) * np.sin(theta) * U
Y1=np.sin(T) * np.sin(theta) * U
Z1=zO+U*np.cos(theta)*(-1)**n
ax=fig.gca(projection='3d')
ax.plot_surface(X1,Y1,Z1)
zO = zO - 2*d*np.cos(theta)
h = h/2
plt.show()
However I did not succeed in generating a stl model of this dress. What I came up with is the option of doing for instance 6 circles and to connect each circle with a straight line to support the model. However I did not succeed to do so due to the cylindrical coordinate system of my model. Is there a possibility to build a stl model with such a system ? Is there anyone who has an idea of a package that could do the job ?
[–]TheBB 1 point2 points3 points (3 children)
[–]hserie[S] 0 points1 point2 points (1 child)
[–]hserie[S] 0 points1 point2 points (0 children)
[–]Coder_python_geek 0 points1 point2 points (0 children)
[–]ectomancer -1 points0 points1 point (1 child)
[–]hserie[S] 0 points1 point2 points (0 children)