gp_Dir orthogonal zu zwei gp_Dirs in OpenCASCADE ermitteln
English
Deutsch
OCCUtils stellt Bequemerfunktionen zur Berechnung der orthogonalen Richtung zu zwei Richtungen bereit:
direction_example.cpp
#include <occutils/Direction.hxx>
using namespace OCCUtils;
gp_Dir dir1 = /* ... */;
gp_Dir dir2 = /* ... */;
gp_Dir orthogonalDirection = Direction::Orthogonal(dir1, dir2);Falls du OCCUtils nicht verwenden kannst, hier ist der Code, um es manuell zu tun:
gp_dir_orthogonal_example.cpp
gp_Dir orthogonalDirection = dir1.Crossed(dir2);Die verwendete Funktion heißt Crossed(), da die mathematische Operation, die verwendet wird, das Kreuzprodukt zwischen den beiden Richtungsvektoren ist.
Check out similar posts by category:
C/C++, OpenCASCADE
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow