I am trying to get my beam mesh elements ~ 2.5x2.5x2.5 mm in size
valu Etyp he20r
# Length of the beam in meters, converted from mm
valu L / 1065 1000
valu divL 426 # <<<<<<< reality is different, I miss something again
# Width of the beam in meters, converted from mm
valu B / 5 1000
valu divB 2
# first partial height in meters, converted from mm
valu H1 / 38.2 1000
valu divH1 16
# Second partial height in meters, converted from mm
valu H2 / 9.8 1000
valu divH2 4
# Pressure in Pa (N/m2), coverted from MPa (N/mm2)
valu P * 127.5 1e6
seto beam
pnt p0 0 0 0
pnt p1 0 L 0
line l0 p0 p1 divL
seta se0 l l0
swep se0 se1 tra B 0 0 divB
seta ses0 A001
swep ses0 ses1 tra 0 0 H1 divH1
seta rear A005
seta front A006
comp rear e
rep rear
comp rear f
rep rear
comp front e
rep front
comp front f
rep front
seta extend A002
swep extend extended tra 0 0 H2 divH2
setc beam
elty beam Etyp
mesh beam
send beam abq
seta a n 475
# seta b n 590
# seta c n 1662
send a abq spc 123
# send b abq spc 3
# send c abq spc 13
send rear abq surf
send front abq surf
send rear abq pres P
send front abq pres P
plot f rear g
plus f front r
Hint: use plot ld all to see the actual line divisions.
I suspect there is a bug in cgx. (I’m using 2.21.)
Values of divL up to and including 96 work. Above that, things get weird.
A value of 100 produces 4 divisions on my system.
A value of 128 produces 28 divisions on my system.
It’s a feature. The last two digits are the division. The leading digits are the bias. So 128 means a bias of 1 (senseless) and a div of 28. 100 mins bias 1 and senseless div of 0. So cgx takes the default of 4
More infos in the manual.
I’ve grep-ed the manual, but I can’t seem to find it?
The documentation for plot ld all touches on it.
And then there is the description in the qdiv command.
But at least to me that only now starts to make sense now that you’ve mentioned it.
I humbly suggest this deserves a more prominent mention, for example in the documentation for line and swep.
Is there any way around this feature apart from breaking large lines up?
(I suspect using extra spaces like in qdiv wouldn’t work?)
This feature is a legacy of the ‘fam’ program. I wanted to read the models which I had created with that program. I think it applies only to the ‘line’ command and only if you do not specify the bias on that command line as well. So with ‘line’ and ‘div’ as with ‘qdiv’ you can assign divisions using more than two digits.
But thanks for the hint on improving the doc.
It just came to my mind to suggest to use ‘plot lc set’ instead of ‘ld’ since it shows also the potential node spacing (to see the bias). And ‘swep’ uses all digits just as the division.
valu Etyp he20r
# Length of the beam in meters, converted from mm
valu L / 1065 1000
valu divL 213 ?????????????? must be even
# Width of the beam in meters, converted from mm
valu B / 5 1000
valu divB 4
# first partial height in meters, converted from mm
valu H1 / 38.2 1000
valu divH1 8
# Second partial height in meters, converted from mm
valu H2 / 9.8 1000
# H2 is now devided in 8 instead of 4
valu divH2 8
# Pressure in Pa (N/m2), coverted from MPa (N/mm2)
valu P * 127.5 1e6
seto beam
pnt p0 0 0 0
# pnt p1 0 L 0
# line l0 p0 p1 divL
# seta se0 l l0
seta sp0 p p0
swep sp0 sp1 tra 0 L 0 divL # <<<<<<<<<<<<< line I use swep
seta se0 l all
swep se0 se1 tra B 0 0 divB
seta ses0 A001
swep ses0 ses1 tra 0 0 H1 divH1
seta rear A005
seta front A006
comp rear e
rep rear
comp rear f
rep rear
comp front e
rep front
comp front f
rep front
seta extend A002
swep extend extended tra 0 0 H2 divH2
setc beam
elty beam Etyp
mesh beam
send beam abq
# seta a n 1683
# seta b n 590
# seta c n 1662
# send a abq spc 123
# send b abq spc 3
# send c abq spc 13
send rear abq surf
send front abq surf
send rear abq pres P
send front abq pres P
plot f rear g
plus f front r
Ends up with
WARNING: bad divisions in body:B001
WARNING: bad divisions in body:B002
valu Etyp he20r
# Length of the beam in meters, converted from mm
valu L / 1065 1000
valu divL 266
# Width of the beam in meters, converted from mm
valu B / 5 1000
valu divB 4
# first partial height in meters, converted from mm
valu H1 / 38.2 1000
valu divH1 20
# Second partial height in meters, converted from mm
valu H2 / 9.8 1000
# H2 is now devided in 8 instead of 4
valu divH2 8
# Pressure in Pa (N/m2), coverted from MPa (N/mm2)
valu P * 127.5 1e6
seto beam
pnt p0 0 0 0
# pnt p1 0 L 0
# line l0 p0 p1 divL
# seta se0 l l0
seta sp0 p p0
swep sp0 sp1 tra 0 L 0 divL # <<<<<<<<<<<<< line I use swep
seta se0 l all
swep se0 se1 tra B 0 0 divB
seta ses0 A001
swep ses0 ses1 tra 0 0 H1 divH1
seta rear A005
seta front A006
comp rear e
rep rear
comp rear f
rep rear
comp front e
rep front
comp front f
rep front
seta extend A002
swep extend extended tra 0 0 H2 divH2
setc beam
elty beam Etyp
mesh beam
send beam abq
# seta a n 1683
# seta b n 590
# seta c n 1662
# send a abq spc 123
# send b abq spc 3
# send c abq spc 13
send rear abq surf
send front abq surf
send rear abq pres P
send front abq pres P
plot f rear g
plus f front r