Shown below is a swept blend with 11 cross sections that are each positioned by relations. The relations dictate the length of the trajectory curve, the angle the cross sections form relative to perpendicular to the traj curve, and the rotation ("twist") of the sections about the traj curve.*
The big problem that I have spentforever trying to resolve with no progress, is that half the time I change any of these parameters the sweep goes crazy. See below for example. Specically, the cross section planes seem to always want to flip 180°, and even more strangely 90deg sometimes.I'm also pasting the entire set of relations for the sweep below. You can see that Iinitially,the first time it happened,attempted to fudge corrections for the flips by simply doing things like adding 180, -90, etc. to the dimensions that determine the rotation of these sections, but these corrections have turned out to be useless because they'll go crazy again the next time I change a parameter value.
I know this is long but Id really appreciate it if someone could look at this and see if you have any ideas.
I understand the relations have a lot of variables that you wouldn't know by name, but any of those wouldn't be connected to this crazy being rotated ("twist") about the trajectory by 90,180, etc degrees. The problems lie with the section commented by: " /* twist "
View attachment 4055
crazy:
View attachment 4056
/*----------------------------------------
/*----------------------------------------
/* Distance between joint centers (length of trajectory curve)
Zdist=231
/* Width of tipside joint
maxwtipside=60
/* Height of tipside joint
maxhtipside=51
/* Width of palmside joint
maxwpalmside=65.5
/* Height of palmside joint
maxhpalmside=52
/* Width center of segment
minw=35
/* Height center of segment
minh=34
/*Twist
twist=37.38
delx=50
dely=20
/*----------------------------------------
/*----------------------------------------
jointoffset=1*(17-5)
/*twistadjustx=(maxhpalmside/2)*sin(twist)
/*twistadjusty=(maxhpalmside/2)*(1-cos(twist))
q=twist
halfmaxh=maxhpalmside/2
sqrtterm=abs(sqrt((halfmaxh*tan(q))^2)-(halfmaxh^2))
s=sqrtterm-halfmaxh
L=sqrt((halfmaxh^2)+(halfmaxh+s)^2)
twistadjustx=L-(s*L/(halfmaxh+s))
/*twistadjustx=(
twistadjusty=halfmaxh*(sqrtterm-halfmaxh)/sqrtterm
thetax=atan((delx-twistadjustx)/(Zdist))
thetay=abs(atan((dely+twistadjusty)/(Zdist)))
hypotenusex=((Zdist^2)+((delx+twistadjustx)^2))^(1/2)
hypotenusey=((Zdist^2)+((dely-twistadjusty)^2))^(1/2)
abslength=Zdist+(hypotenusex-Zdist)+(hypotenusey-Zdist)
psi=1
psiadjusted=psi
Curvaturey=seglength/(2*sin((psiadjusted)/2))
d601=Curvaturey
d670=seglength
d734=d670
/* twist
$d747=-(twist+90)
$d767=-(90+twist)
$d784=-(.87*twist+90)
$d793=-(.58*twist+90)
$d802=90-.54*twist
$d812=-90-.5*twist
$d820=90-.46*twist
$d827=90-.42*twist
$d837=-90-.13*twist
/* section datum plane rotations about X
angle1=(psiadjusted/2-thetay/2)
angle9=(psiadjusted/2-thetay/2)
angle2=angle1-(.08*angle1)
angle3=-(angle1-(.15*angle1))
angle4=-(angle1-(.95*angle1))
angle45=0
angle5=0
angle55=0
angle6=angle9-.90*angle9
angle7=-(angle9-.15*angle9)
angle8=angle9
$d646=angle1
$d659=angle2
$d669=angle3
$d649=angle4
$d650=angle45
$d651=angle5
$d848=angle55
$d795=angle6
$d785=angle7
$d667=angle8
$d658=angle9
/* section datum plane z-positions
zsec1=0
zsec9=seglength
zsec2=.04*zsec9
zsec3=.15*zsec9
zsec4=.42*zsec9
zsec45=.46*zsec9
zsec5=.5*zsec9
zsec55=.54*zsec9
zsec6=.58*zsec9
zsec7=.85*zsec9
zsec8=.96*zsec9
d332=zsec2
d336=zsec3
d339=zsec4
d342=zsec45
d345=zsec5
d348=zsec55
d351=zsec6
d354=zsec7
d357=zsec8
d360=zsec9
/* section sketch y-offset from trajectory curve
hdt=maxhtipside-minh
hdp=maxhpalmside-minh
ysec1=0
ysec2=0
ysec3=.06*hdt
ysec4=.12*hdt
ysec45=ysec4
ysec5=ysec45
ysec55=ysec5
ysec6=.12*hdp
ysec7=.06*hdp
ysec8=0
ysec9=0
d665=ysec1
d375=ysec2
d874=ysec3
d879=ysec4
d825=ysec45
d889=ysec5
d854=ysec55
d916=ysec6
d790=ysec7
d894=ysec8
d759=ysec9
/* sketch width
wsec1=maxwtipside
wsec2=wsec1
wsec3=wsec1-.2*(maxwtipside-minw)
wsec4=minw
wsec45=minw
wsec5=minw
wsec55=minw
wsec6=minw
wsec7=maxwpalmside-.2*(maxwpalmside-minw)
wsec8=maxwpalmside
wsec9=wsec8
d365=wsec1
d373=wsec2
d871=wsec3
d876=wsec4
d822=wsec45
d886=wsec5
d851=wsec55
d915=wsec6
d786=wsec7
d890=wsec8
d755=wsec9
/* sketch height
hsec1=maxhtipside
hsec2=hsec1
hsec3=hsec1-.2*(maxhtipside-minh)
hsec4=minh
hsec45=minh
hsec5=minh
hsec55=minh
hsec6=minh
hsec7=maxhpalmside-.2*(maxhpalmside-minh)
hsec8=maxhpalmside
hsec9=hsec8
d366=hsec1
d374=hsec2
d872=hsec3
d877=hsec4
d823=hsec45
d887=hsec5
d852=hsec55
d916=hsec6
d787=hsec7
d891=hsec8
d756=hsec9
/* tendon indent outward shift
d368=0
d372=0
d873=0
d878=2.4
d824=2.4
d888=2.4
d853=2.4
d917=2.4
d789=0
d893=0
d758=0
*There are also a bunch of relations for the width and height of each sketch on each cross section plane, the spacing of them, etc but these are not causing problems -- the ones related to the sweep itself (the ones listed in previous paragraph) are the ones causing problems.
Edited by: 2ms1
The big problem that I have spentforever trying to resolve with no progress, is that half the time I change any of these parameters the sweep goes crazy. See below for example. Specically, the cross section planes seem to always want to flip 180°, and even more strangely 90deg sometimes.I'm also pasting the entire set of relations for the sweep below. You can see that Iinitially,the first time it happened,attempted to fudge corrections for the flips by simply doing things like adding 180, -90, etc. to the dimensions that determine the rotation of these sections, but these corrections have turned out to be useless because they'll go crazy again the next time I change a parameter value.
I know this is long but Id really appreciate it if someone could look at this and see if you have any ideas.
I understand the relations have a lot of variables that you wouldn't know by name, but any of those wouldn't be connected to this crazy being rotated ("twist") about the trajectory by 90,180, etc degrees. The problems lie with the section commented by: " /* twist "
View attachment 4055
crazy:
View attachment 4056
/*----------------------------------------
/*----------------------------------------
/* Distance between joint centers (length of trajectory curve)
Zdist=231
/* Width of tipside joint
maxwtipside=60
/* Height of tipside joint
maxhtipside=51
/* Width of palmside joint
maxwpalmside=65.5
/* Height of palmside joint
maxhpalmside=52
/* Width center of segment
minw=35
/* Height center of segment
minh=34
/*Twist
twist=37.38
delx=50
dely=20
/*----------------------------------------
/*----------------------------------------
jointoffset=1*(17-5)
/*twistadjustx=(maxhpalmside/2)*sin(twist)
/*twistadjusty=(maxhpalmside/2)*(1-cos(twist))
q=twist
halfmaxh=maxhpalmside/2
sqrtterm=abs(sqrt((halfmaxh*tan(q))^2)-(halfmaxh^2))
s=sqrtterm-halfmaxh
L=sqrt((halfmaxh^2)+(halfmaxh+s)^2)
twistadjustx=L-(s*L/(halfmaxh+s))
/*twistadjustx=(
twistadjusty=halfmaxh*(sqrtterm-halfmaxh)/sqrtterm
thetax=atan((delx-twistadjustx)/(Zdist))
thetay=abs(atan((dely+twistadjusty)/(Zdist)))
hypotenusex=((Zdist^2)+((delx+twistadjustx)^2))^(1/2)
hypotenusey=((Zdist^2)+((dely-twistadjusty)^2))^(1/2)
abslength=Zdist+(hypotenusex-Zdist)+(hypotenusey-Zdist)
psi=1
psiadjusted=psi
Curvaturey=seglength/(2*sin((psiadjusted)/2))
d601=Curvaturey
d670=seglength
d734=d670
/* twist
$d747=-(twist+90)
$d767=-(90+twist)
$d784=-(.87*twist+90)
$d793=-(.58*twist+90)
$d802=90-.54*twist
$d812=-90-.5*twist
$d820=90-.46*twist
$d827=90-.42*twist
$d837=-90-.13*twist
/* section datum plane rotations about X
angle1=(psiadjusted/2-thetay/2)
angle9=(psiadjusted/2-thetay/2)
angle2=angle1-(.08*angle1)
angle3=-(angle1-(.15*angle1))
angle4=-(angle1-(.95*angle1))
angle45=0
angle5=0
angle55=0
angle6=angle9-.90*angle9
angle7=-(angle9-.15*angle9)
angle8=angle9
$d646=angle1
$d659=angle2
$d669=angle3
$d649=angle4
$d650=angle45
$d651=angle5
$d848=angle55
$d795=angle6
$d785=angle7
$d667=angle8
$d658=angle9
/* section datum plane z-positions
zsec1=0
zsec9=seglength
zsec2=.04*zsec9
zsec3=.15*zsec9
zsec4=.42*zsec9
zsec45=.46*zsec9
zsec5=.5*zsec9
zsec55=.54*zsec9
zsec6=.58*zsec9
zsec7=.85*zsec9
zsec8=.96*zsec9
d332=zsec2
d336=zsec3
d339=zsec4
d342=zsec45
d345=zsec5
d348=zsec55
d351=zsec6
d354=zsec7
d357=zsec8
d360=zsec9
/* section sketch y-offset from trajectory curve
hdt=maxhtipside-minh
hdp=maxhpalmside-minh
ysec1=0
ysec2=0
ysec3=.06*hdt
ysec4=.12*hdt
ysec45=ysec4
ysec5=ysec45
ysec55=ysec5
ysec6=.12*hdp
ysec7=.06*hdp
ysec8=0
ysec9=0
d665=ysec1
d375=ysec2
d874=ysec3
d879=ysec4
d825=ysec45
d889=ysec5
d854=ysec55
d916=ysec6
d790=ysec7
d894=ysec8
d759=ysec9
/* sketch width
wsec1=maxwtipside
wsec2=wsec1
wsec3=wsec1-.2*(maxwtipside-minw)
wsec4=minw
wsec45=minw
wsec5=minw
wsec55=minw
wsec6=minw
wsec7=maxwpalmside-.2*(maxwpalmside-minw)
wsec8=maxwpalmside
wsec9=wsec8
d365=wsec1
d373=wsec2
d871=wsec3
d876=wsec4
d822=wsec45
d886=wsec5
d851=wsec55
d915=wsec6
d786=wsec7
d890=wsec8
d755=wsec9
/* sketch height
hsec1=maxhtipside
hsec2=hsec1
hsec3=hsec1-.2*(maxhtipside-minh)
hsec4=minh
hsec45=minh
hsec5=minh
hsec55=minh
hsec6=minh
hsec7=maxhpalmside-.2*(maxhpalmside-minh)
hsec8=maxhpalmside
hsec9=hsec8
d366=hsec1
d374=hsec2
d872=hsec3
d877=hsec4
d823=hsec45
d887=hsec5
d852=hsec55
d916=hsec6
d787=hsec7
d891=hsec8
d756=hsec9
/* tendon indent outward shift
d368=0
d372=0
d873=0
d878=2.4
d824=2.4
d888=2.4
d853=2.4
d917=2.4
d789=0
d893=0
d758=0
*There are also a bunch of relations for the width and height of each sketch on each cross section plane, the spacing of them, etc but these are not causing problems -- the ones related to the sweep itself (the ones listed in previous paragraph) are the ones causing problems.
Edited by: 2ms1