Analysis, optimization and prototyping of a parallel RCM mechanism of a surgical robot for craniotomy surgery