Commit b6d8a858 authored by cmaffeo2's avatar cmaffeo2
Browse files

small changes in organization

parent 314efe04
......@@ -88,7 +88,7 @@ class Segment(ConnectableElement, Group):
self._bead_model_generation = 0 # TODO: remove?
self.segment_model = segment_model # TODO: remove?
self.num_nts = num_nts
self.num_nts = int(num_nts)
if end_position is None:
end_position = np.array((0,0,self.distance_per_nt*num_nts)) + start_position
self.start_position = start_position
......
# set ID [mol new]
graphics $ID delete all
# set ch [open /home/cmaffeo2/Downloads/bunny.ma]
set ch [open /home/cmaffeo2/Downloads/ball.ma]
set helixCount 0
proc getNextVector {ch} {
gets $ch line
set line [split $line]
lrange $line 5 7
}
proc eulerToRot {euler} {
lassign $euler x y z
transmult [transaxis z $z] [transaxis y $y] [transaxis x $x]
}
while {[gets $ch line] >= 0} {
set args [lassign [split $line] cmd obj]
if {$cmd == "createNode"} {
if {$obj == "HelixBase" && $drawBase} {
set drawBase 1
# set v [vecscale 10 [getNextVector $ch]]
set v [coordtrans $R [vecscale 10 [getNextVector $ch]]]
# set v [coordtrans [transmult [trans_from_offset [vecscale 10 [getNextVector $ch]] $R ] {0 0 0}]]
graphics $ID sphere $v radius 2
} elseif {$obj == "vHelix"} {
set drawBase 1
# createNode vHelix -n "helix_1";
# setAttr ".t" -type "double3" -16.9433 11.8494 25.2659 ;
# setAttr ".r" -type "double3" 42.338094401101131 222.16004220698011 5.8192508587610412 ;
# setAttr ".dh" yes;
set v [vecscale 10 [getNextVector $ch]]
set r [getNextVector $ch]
set R [eulerToRot $r]
set R [transmult [trans_from_offset $v] $R ]
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment