now i want to get the position relative to the other component, then move one composition to some place, in then end, according the relative position, move the other composition to the other place.
who can help me?
but my method are below, but it failed
relative_postion = one_component.transformation.origin - other_component.transformation.other.
# move one_component to the origin(500, 500, 500)
one_component_vector = Geom::Point3d(0, 0, 0).vector_to(500, 500, 500)
one_component_transformation = Geom::Transformation::translation(one_component_vector)
one_component.transform!(one_component_transformation)
other_component_vector = Geom::Point3d(500, 500, 500).vector_to(relative_postion)
other_component_transformation = Geom::Transformation::translation(other_component_vector)
other_component.transform!(other_component_transformation)
but the other component’s relative position changed. it’s not my unexpected result.