Make a CAD model from data point

5 views (last 30 days)
Junghyuk Ko Ko
Junghyuk Ko Ko on 1 Aug 2014
Hi Guys,
I'm trying to make a cylindrical CAD solid model following the curve but it was difficult to make cylindrical solid model using center points in Solidworks because it has a error to connect the center points with spline. Thus, I'm looking for a way to make fiber surface following the center and then export it to solidworks. The fiber diameter is 20um. If you know how to do it or there is another way, please email me: jko@me.uvic.ca. The below is my code. Thank you for your attention. Bye.
Best,
Junghyuk
clear all close all clc
r=.6; %circle radius t_end=10; t=0:0.001:t_end; w=120.7; %[rad/s] angular velocity v=8.5;% [mm/s] translational velocity theta=w.*t; %Find angle from angular velocity dx=v.*t; %Find angle from translational velocity p=0.07; % time for 1 revolution d=8; %drum diameter th=0.042; %thickness of 1 layer [mm]
%electrospinning on a flat surface x1=r.*cos(theta); y1=r.*sin(theta); z1=th*(1-cos(theta));
%electrospinning on a drum W=1.04; %rad/s drum velocity alpha=W.*t; i_end=1; i_end_2=1;i_end_3=1;i_end_4=1;
for i=1:length(t) if t(i)<=10 X1(i)=x1(i)+dx(i); Y1(i)=d*cos(alpha(i))+y1(i).*sin(alpha(i)); Z1(i)=d*sin(alpha(i))+z1(i).*cos(alpha(i)); i_end=i;
elseif t(i)>10 && t(i)<=20
X1(i)=X1(i_end)+x1(i)-dx(i-i_end);
Y1(i)=(d+th)*cos(alpha(i))+y1(i-i_end).*sin(alpha(i));
Z1(i)=(d+th)*sin(alpha(i))+z1(i-i_end).*cos(alpha(i));
i_end_2=i;
elseif t(i)>20 && t(i)<=30
X1(i)=X1(i_end_2)+x1(i)+dx(i-i_end_2);
Y1(i)=(d+2*th)*cos(alpha(i))+y1(i-i_end_2).*sin(alpha(i));
Z1(i)=(d+2*th)*sin(alpha(i))+z1(i-i_end_2).*cos(alpha(i));
i_end_3=i;
elseif t(i)>30 && t(i)<=40
X1(i)=X1(i_end_3)+x1(i)-dx(i-i_end_3);
Y1(i)=(d+3*th)*cos(alpha(i))+y1(i-i_end_3).*sin(alpha(i));
Z1(i)=(d+3*th)*sin(alpha(i))+z1(i-i_end_3).*cos(alpha(i));
i_end_4=i;
end
end
plot3(X1,Y1,Z1); title('on a drum 180degree') axis equal

Answers (0)

Categories

Find more on Model Import in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!