This simple example makes an RMF file with several rigid copies of the same thing
4 from __future__
import print_function
7 file_name = RMF._get_temporary_file_path(
"reference_frame.rmfz")
8 print(
"file is", file_name)
10 fh.add_frame(
"root", RMF.FRAME)
12 rh = fh.get_root_node()
14 reference_frame_factory = RMF.ReferenceFrameFactory(fh)
15 segment_factory = RMF.SegmentFactory(fh)
16 color_factory = RMF.ColoredFactory(fh)
19 origin = rh.add_child(
"origin", RMF.REPRESENTATION)
20 rbo = reference_frame_factory.get(origin)
23 x = origin.add_child(
"x", RMF.GEOMETRY)
24 sx = segment_factory.get(x)
26 cx = color_factory.get(x)
28 y = origin.add_child(
"y", RMF.GEOMETRY)
29 sy = segment_factory.get(y)
31 cy = color_factory.get(y)
33 z = origin.add_child(
"z", RMF.GEOMETRY)
34 sz = segment_factory.get(z)
36 cz = color_factory.get(z)
42 remote = rh.add_child(
"remote", RMF.REPRESENTATION)
43 rbr = reference_frame_factory.get(remote)