English
Forum

someone Fit in maths?

 

ByteAttack
Hello!
Perhaps there whom a or others the Fit in maths is.
I need time a Formelsammlung and of course circa XYZ-data in YBC (speak LRA) umzuwandeln. have of course for MatLab one PlugIn found, I will but unfortunately not schlau draus. want the gladly under XProfan to charge.

Greeting Marc-Gordon

Plugin:
CompileMarkSeparation
%XYZ2YBC convert form XYZ coordinate to YBC format (LRA)
%   XYZ2YBC(X,Y,Z) convert the X,Y,Z values to Y,B,C values. assuming the bend
%   radius is zero. the size of X,Y and Z must be the same.
%
%   XYZ2YBC(X,Y,Z,R) where R is the bend radius. convert the X,Y,Z values to
%   Y,B,C values, taking in to account the bend radius R.
%
%   XYZ2YBC(X,Y,Z,R) where R is the bend radius matrix for each bend. convert
%   the X,Y,Z values to Y,B,C values, taking in to account the bend radius R
%   for each bend.  size of R must be less than the number of XYZ points by 2.
%
%   returns Y length between bends, B rotation between bends in radius,+ for
%   clockwise and - for anticlockwise, C angle of bend in radius.
%
% File: xyz2ybc
% Author: Ammar Mousali
% Date:   29/04/2004
% Griffith University
% V1.1
%
% changes from V1.0
%   changed the output from degrees to radius.
%
function [Y,B,C] = xyz2ybc(Xc,Yc,Zc,R)
if( (length(Xc) ~= length(Yc)) | (length(Xc) ~= length(Zc)) )
error('X,Y,Z are not the same size');
end
if(nargin == 3)
% set the bend radius to zero for all bends.
R = zeros(1,length(Xc)-2);
elseif(length(R) == 1)
% set the bend radius to R for all bends.
R = ones(1,length(Xc)-2).*R;
elseif(length(R) ~= length(Xc)-2)
error('R size doesnt match the number of bends');
end
% number of bends is less than the number of XYZ points by 2.
for i = 1:length(Xc)-2
% calculate the 2 vectors BA and BC, representing an angle ABC.
V1 = [Xc(i)-Xc(i+1) ; Yc(i)-Yc(i+1) ; Zc(i)-Zc(i+1)];
V2 = [Xc(i+2)-Xc(i+1) ; Yc(i+2)-Yc(i+1) ; Zc(i+2)-Zc(i+1)];
% calculate the length of vectors BA and BC.
V1l = Vlength(V1);
V2l = Vlength(V2);
% calculate the angle between the 2 vectors BA and BC.
C(i) = pi - acos(dot(V1,V2) / (V1l*V2l));
% calculate the vector perpendicular to the plan ABC.
planeV(i,:) = cross(V1,V2)';
if(i>1)
% calculate the length of the straight by subtracting the tangent of
% the bend angle.
Y(i) = Y(i) - R(i)*tan(C(i)/2);
Y(i+1) = V2l - R(i)*tan(C(i)/2);
% calculate the length of vectors perpendicular to the plan ABC and
% the plan of the bend before it.
PV1l = Vlength(planeV(i-1,:));
PV2l = Vlength(planeV(i,:));
% calculate the rotation direction.  negative if counter clockwise.
s=sign(V1 .* cross(planeV(i-1,:),planeV(i,:))');
% calculate the rotation angle and multiply by the rotation direction.
B(i) = acos(dot(planeV(i-1,:),planeV(i,:))/(PV1l*PV2l))*s(1);

else

% calculate the length of the straight by subtracting the tangent of
% the bend angle.
Y(i) = V1l - R(i)*tan(C(i)/2);
Y(i+1) = V2l - R(i)*tan(C(i)/2);
% rotation of the first bend is always zero.
B(i) = 0;
end
end
% calculate the length of a 3D vector.
function l=Vlength(V)
l = sqrt(V(1)^2 + V(2)^2 + V(3on class=s2>)^2);
 
02/17/13  
 




ByteAttack
none the Perhaps Matlab has?
 
02/21/13  
 



means me überforderts,

intelleleluell and timewise so I there even not fix mere and think can.

Perhaps. can You time write what You make want, then ists vlt. plainer.
 
02/21/13  
 




ByteAttack


OK! I have a technical drawing, the me any Biegekoordinaten in XYZ angibt. and of course whom Rohranfang (Meißt X=0,Y=0,Z=0) and then always exactly the Mittelpunkt the bend, as well as the Rohrende! (rotes + see Image)
the I white are hold The Coordinates, as well as the Biegeradius.
These should now umgerechnet go in length, turn, Biegewinkel.



have there an example found: (Biegeradius 30)

X Y Z
0 |0 |0 ' beginning cane
100 | 0 |0 ' first bow
150 | 40 |0 ' Zweiter bow
50 | 100 | 80 'Ende Rohn

yields

L R A (length, turn, bend)
89,477 0° 38,66°
13,197 -36,20° 106,69°
 
02/22/13  
 



Hm and if you simply one gerades cane buy?
 
02/22/13  
 




ByteAttack
Gerades cane have I Yes - wants it hold Krum make
 
02/22/13  
 



Hm means normal is not.

I attempt me strain intelleuel into cane into To displace,
stone has faith already time worked.

If I the right understand then have You means 3 XYZ Coordinates and want
of XYZ[1..3] to XYZ[1..2] & LRA[1] calculate, where naturally only LRA auszurechnen
would because XYZ[1..2] as 3D-vector already famous is?

means first The turn calculate The necessary is circa of vector XYZ[1-2] on
The Koordinate XYZ[3] To come and the length should then Perhaps from the
bend take down or differently around or. goes one thereby a linearen
Biegeverbiegung from?

I faith the The Formel there supra yet some More power quasi as industry-
Formel and one tappt im dunkeln for exakte Results very translate should, I but
not can, I not white How I the Code interpret have.
 
02/22/13  
 




ByteAttack
very this is my trouble. I look with the the Matlab net...
 
02/22/13  
 



see You it too so, that the L(ength) "nur" The distance zweier XYZ-Coordinates
is wonach L = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1)) would?

A(ngle) herausbekommen place I me yet so to, that one The 3D-Coordinates
in a 2D-Räpresentation umwandelt could and so simply the Winkel between
both Points errechnet go should z.B. with angleByLine ( [...]  ) .
 
02/22/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.896 Views

Untitledvor 0 min.
Kutsche10/22/24
ByteAttack08/09/22
Member 145180311/18/20
Michael W.12/23/16
More...

Themeninformationen

this Topic has 2 subscriber:

ByteAttack (5x)
iF (4x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie