| Class | InfoCube1f |
| In: |
infocube.rb
|
| Parent: | CubeCommon |
| meshnum | [RW] | |
| xvec | [RW] | |
| yvec | [RW] | |
| zvec | [RW] |
# File infocube.rb, line 583 def initialize(reftype, csys, *args) print "\nInfoCube1f: " @changed = false $cubecount001 += 1 @selected = false @visible = false @reftype = reftype @csys = csys @ref = args[0] @row = args[1] @xvec = args[2] @yvec = args[3] @zvec = args[4] @meshnum = args[5] @info = [self, self, "c#{$cubecount001}"] @defaultprefix = "cube" @reforder = [ "xvec", "yvec", "zvec", "meshnum" ] @reflist = { "xvec" => @xvec, "yvec" => @yvec, "zvec" => @zvec, "meshnum" => @meshnum } @f0 = @ref @l0 = @f0.l0 @l1 = @f0.l1 @l2 = @f0.l2 @l3 = @f0.l3 @f1 = InfoFace.new("1l",@csys, @f0.firstline, self, "f1", @row, @xvec.to_f, @yvec.to_f, @zvec.to_f, @meshnum.to_i) @f1.uncount @p4 = @f1.p3 @p5 = @f1.p2 @l4 = @f1.l3 @l5 = @f1.l1 @l8 = @f1.l2 print ":f1 " @f3 = InfoFace.new("1l",@csys, @f0.thirdline, self, "f3", @row, @xvec.to_f, @yvec.to_f, @zvec.to_f, @meshnum.to_i) @f3.uncount @p6 = @f3.p3 @p7 = @f3.p2 @l6 = @f3.l3 @l7 = @f3.l1 @l10 = @f3.l2 print ":f3 " @f5 = InfoFace.new("2l",@csys, [@f1.l2, @f3.l2], self, "f5", @row, @ref.jmax ) @f5.uncount @l9 = @f5.l3 @l11 = @f5.l1 print ":f5 " # this is not so nice. The InfoFace4l doesn't work all time # the findStructure4l might be wrong # # temporarily disabled # # maybe give more references than necessary for 4l faces?, the last extra reference is not needed it seems @f2 = InfoFace.new("4l",@csys, [@f0.secondline, @f1.l1, @f5.l3, @f3.l3, @f3.l1 ], self, "f2", @row) @f2.uncount print ":f2 " @f4 = InfoFace.new("4l",@csys, [@f0.fourthline, @f1.l3, @f5.l1, @f3.l1, @f3.l3], self, "f4", @row) @f4.uncount print ":f4 " # set the right face names for cube. Points and lines have to be done later on. #@p0.info[0] = self #@p1.info[0] = self #@p2.info[0] = self #@p3.info[0] = self @p4.info[0] = self @p5.info[0] = self @p6.info[0] = self @p7.info[0] = self #@l0.info[0] = self #@l1.info[0] = self #@l2.info[0] = self #@l3.info[0] = self @l4.info[0] = self @l5.info[0] = self @l6.info[0] = self @l7.info[0] = self @l8.info[0] = self @l9.info[0] = self @l10.info[0] = self @l11.info[0] = self @p4.info[2] = "p4" @p5.info[2] = "p5" @p6.info[2] = "p6" @p7.info[2] = "p7" @l4.info[2] = "l4" @l5.info[2] = "l5" @l6.info[2] = "l6" @l7.info[2] = "l7" @l8.info[2] = "l8" @l9.info[2] = "l9" @l10.info[2] = "l10" @l11.info[2] = "l11" #@c0 = InfoCube6f.new("6f",@csys, [@f0, @f1, @f2, @f3, @f4, @f5]) #@c0.uncount print ":c0 " # after findStructure6f is done maybe points and lines could be given unique names #@if = findStructure6f([@f0, @f1, @f2, @f3, @f4, @f5]) #show @firstcreate = true print "OK\n" @oldcsyspos = @csys.getpos end
# File infocube.rb, line 750 def cellcount return ( @f0.l0.meshnum-1 ) * ( @f0.l1.meshnum - 1 ) * @meshnum end
# File infocube.rb, line 717 def checknewstatus ?? # check imesh on lines if @l4.imesh != @meshnum if @l4.imesh.class == Fixnum @meshnum = @l4.imesh end end @newstatus = { "xvec" => @xvec, "yvec" => @yvec, "zvec" => @zvec, "meshnum" => @meshnum } end
# File infocube.rb, line 690 def create ?? @f1.meshnum = @meshnum @f1.xvec , @f1.yvec, @f1.zvec = @xvec, @yvec, @zvec @f3.meshnum = @meshnum @f3.xvec , @f3.yvec, @f3.zvec = @xvec, @yvec, @zvec @f5.meshnum = @ref.jmax + 1 @f1.create @f3.create @f5.mapl2points if @firstcreate @f5.create @f2.find4l if @firstcreate @f2.create @f4.find4l if @firstcreate @f4.create if @firstcreate @c0 = InfoCube6f.new("6f",@csys, [@f0, @f1, @f2, @f3, @f4, @f5]) @c0.uncount @if = findStructure6f([@f0, @f1, @f2, @f3, @f4, @f5]) @firstcreate = false end @currentstatus = { "xvec" => @xvec, "yvec" => @yvec, "zvec" => @zvec, "meshnum" => @meshnum } end
# File infocube.rb, line 731 def refupdate @reflist = { "xvec" => @xvec, "yvec" => @yvec, "zvec" => @zvec, "meshnum" => @meshnum } end
# File infocube.rb, line 734 def update @reflist = { "xvec" => @xvec, "yvec" => @yvec, "zvec" => @zvec, "meshnum" => @meshnum } checknewstatus if @newstatus != @currentstatus || @f0.info[0].changed || @oldcsyspos != @csys.getpos hide create @changed = true show end if @csys.count != 0 @oldcsyspos = @csys.getpos end end