OSE Piping Workbench Ports: Unterschied zwischen den Versionen
Ruslan (Diskussion | Beiträge) |
Ruslan (Diskussion | Beiträge) |
||
| Zeile 7: | Zeile 7: | ||
* A normal vector <math>n \in \mathbb{R}^3</math> which points out of the fitting and it is perpendicular to the port plane. | * A normal vector <math>n \in \mathbb{R}^3</math> which points out of the fitting and it is perpendicular to the port plane. | ||
* A 0 reference angle vector <math>r \in \mathbb{R}^3</math> it shows where is the degree 0°. <math>r</math> must lie in the port plane. | * A 0 reference angle vector <math>r \in \mathbb{R}^3</math> it shows where is the degree 0°. <math>r</math> must lie in the port plane. | ||
| + | All three vectors refer to local coordinates. | ||
Instead of using three separate vectors, we represent the port by its position and its orientation <math>A</math>. | Instead of using three separate vectors, we represent the port by its position and its orientation <math>A</math>. | ||
| Zeile 19: | Zeile 20: | ||
==Adjust two fittings== | ==Adjust two fittings== | ||
When we adjust one fitting to another we want rotate the first fitting in such a way that its socket points in opposite directions as a socket of the other fitting. | When we adjust one fitting to another we want rotate the first fitting in such a way that its socket points in opposite directions as a socket of the other fitting. | ||
| − | Let us assume that the port of the adjusting fitting has position <math>a'</math>, orientation <math>A'</math> with normal <math>n'</math> and 0 degree reference <math>r'</math>. | + | Let us assume that the port of the adjusting fitting has position <math>a'</math>, orientation <math>A'</math> with normal <math>n'</math> and 0 degree reference <math>r'</math>. Everything refering to the local coordinates of the fitting. |
| − | The | + | |
| + | The other fitting has position <math>p</math> and rotation <math>R</math>. The local properties of its port has | ||
| + | has local position <math>a</math>, local orientation <math>A</math>, local normal <math>n</math> and local 0 degree reference <math>r</math>. | ||
| + | That means the corresponding global parameter of the port are | ||
| + | |||
| + | <math display="block"> | ||
| + | \begin{align} | ||
| + | a_g &:= p+Ra \\ | ||
| + | n_g &:= Rn \\ | ||
| + | r_g &:= Rr \\ | ||
| + | \end{align} | ||
| + | </math> | ||
| + | |||
We want to find a rotation matrix <math>B</math>, such that applying it to adjusting fitting the new orientation of its port *in relating to global coordinate* has following properties: | We want to find a rotation matrix <math>B</math>, such that applying it to adjusting fitting the new orientation of its port *in relating to global coordinate* has following properties: | ||
| − | * Its normal vector looks to opposite direction as the normal of the other fitting: <math>Bn'=- | + | * Its normal vector looks to opposite direction as the normal of the other fitting: <math>Bn'=-n_g</math>. |
| − | * Its zero-degree reference points to the same direction <math>Br'= | + | * Its zero-degree reference points to the same direction <math>Br'=r_g</math> |
We compose the matrix from three matrices <math>A'^{-1}</math><math>A_r</math> and <math>A</math>. | We compose the matrix from three matrices <math>A'^{-1}</math><math>A_r</math> and <math>A</math>. | ||
| Zeile 30: | Zeile 43: | ||
* <math>A</math> gives to the rotated fitting the same orientation as the port of the other fitting. | * <math>A</math> gives to the rotated fitting the same orientation as the port of the other fitting. | ||
| − | We have <math>B:=A'^{-1}\cdot A_r \cdot A</math>. | + | We have <math display="block">B:=A'^{-1}\cdot A_r \cdot A</math>. |
Version vom 1. Dezember 2018, 16:59 Uhr
Ports
The OSE Piping Workbench creates fittings. It uses ports to describe the ends of the fittings. The Ports helps to fit the fittings together correctly.
Every port is described by:
- Its position
- A normal vector which points out of the fitting and it is perpendicular to the port plane.
- A 0 reference angle vector it shows where is the degree 0°. must lie in the port plane.
All three vectors refer to local coordinates.
Instead of using three separate vectors, we represent the port by its position and its orientation . The position is a FreeCAD Vector . The orientation is a FreeCAD rotation matrix. When we apply matrix on vectors , , , it creates vectors , , such that
- points in the same direction as the port's normal, .
- shows in the same direction as the angular reference, Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle y^* = r} .
For example in a tee fitting, the matrix Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A} is a rotation along y-axis by Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle \phi = 90^{\circ}} , and then a rotation along z axis by Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle \psi = -90^{\circ}} . See FreeCAD Rotation for more details about rotation.
Adjust two fittings
When we adjust one fitting to another we want rotate the first fitting in such a way that its socket points in opposite directions as a socket of the other fitting. Let us assume that the port of the adjusting fitting has position Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle a'} , orientation Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A'} with normal Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle n'} and 0 degree reference Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle r'} . Everything refering to the local coordinates of the fitting.
The other fitting has position Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle p} and rotation Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle R} . The local properties of its port has has local position Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle a} , local orientation Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A} , local normal Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle n} and local 0 degree reference Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle r} . That means the corresponding global parameter of the port are
Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle \begin{align} a_g &:= p+Ra \\ n_g &:= Rn \\ r_g &:= Rr \\ \end{align} }
We want to find a rotation matrix Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle B} , such that applying it to adjusting fitting the new orientation of its port *in relating to global coordinate* has following properties:
- Its normal vector looks to opposite direction as the normal of the other fitting: Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle Bn'=-n_g} .
- Its zero-degree reference points to the same direction Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle Br'=r_g}
We compose the matrix from three matrices Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A'^{-1}} Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A_r} and Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A} .
- Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A'^{-1}} rotates the fitting in such a way that its port points to x-direction, and 0 reference to y-direction.
- Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A_r} rotates the fitting opposite to x-direction, but its 0 reference still points to y-direction.
- Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle A} gives to the rotated fitting the same orientation as the port of the other fitting.
We have Fehler beim Parsen (MathML mit SVG- oder PNG-Rückgriff (empfohlen für moderne Browser und Barrierefreiheitswerkzeuge): Ungültige Antwort („Math extension cannot connect to Restbase.“) von Server „https://wikimedia.org/api/rest_v1/“:): {\displaystyle B:=A'^{-1}\cdot A_r \cdot A} .