MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / setYDirection

Method setYDirection

src/Base/CoordinateSystem.cpp:95–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void CoordinateSystem::setYDirection(const Vector3d& dir)
96{
97 Vector3d xd = dir % axis.getDirection();
98 if (xd.Sqr() < Base::Vector3d::epsilon()) {
99 throw Base::ValueError("Direction is parallel to Z-direction");
100 }
101 xdir = xd;
102 xdir.Normalize();
103 ydir = axis.getDirection() % xdir;
104 ydir.Normalize();
105}
106
107void CoordinateSystem::setZDirection(const Vector3d& dir)
108{

Callers 1

TESTFunction · 0.45

Calls 3

NormalizeMethod · 0.80
getDirectionMethod · 0.45
SqrMethod · 0.45

Tested by

no test coverage detected