|
|
|||
File indexing completed on 2026-05-29 08:15:59
0001 // Created on: 1993-03-09 0002 // Created by: JCV 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Geom_AxisPlacement_HeaderFile 0018 #define _Geom_AxisPlacement_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <gp_Ax1.hxx> 0023 #include <Geom_Geometry.hxx> 0024 #include <Standard_Real.hxx> 0025 class gp_Dir; 0026 class gp_Pnt; 0027 0028 class Geom_AxisPlacement; 0029 DEFINE_STANDARD_HANDLE(Geom_AxisPlacement, Geom_Geometry) 0030 0031 //! The abstract class AxisPlacement describes the 0032 //! common behavior of positioning systems in 3D space, 0033 //! such as axis or coordinate systems. 0034 //! The Geom package provides two implementations of 0035 //! 3D positioning systems: 0036 //! - the axis (Geom_Axis1Placement class), which is defined by: 0037 //! - its origin, also termed the "Location point" of the axis, 0038 //! - its unit vector, termed the "Direction" or "main 0039 //! Direction" of the axis; 0040 //! - the right-handed coordinate system 0041 //! (Geom_Axis2Placement class), which is defined by: 0042 //! - its origin, also termed the "Location point" of the coordinate system, 0043 //! - three orthogonal unit vectors, termed 0044 //! respectively the "X Direction", the "Y Direction" 0045 //! and the "Direction" of the coordinate system. As 0046 //! the coordinate system is right-handed, these 0047 //! unit vectors have the following relation: 0048 //! "Direction" = "X Direction" ^ 0049 //! "Y Direction". The "Direction" is also 0050 //! called the "main Direction" because, when the 0051 //! unit vector is modified, the "X Direction" and "Y 0052 //! Direction" are recomputed, whereas when the "X 0053 //! Direction" or "Y Direction" is modified, the "main Direction" does not change. 0054 //! The axis whose origin is the origin of the positioning 0055 //! system and whose unit vector is its "main Direction" is 0056 //! also called the "Axis" or "main Axis" of the positioning system. 0057 class Geom_AxisPlacement : public Geom_Geometry 0058 { 0059 0060 public: 0061 //! Assigns A1 as the "main Axis" of this positioning system. This modifies 0062 //! - its origin, and 0063 //! - its "main Direction". 0064 //! If this positioning system is a 0065 //! Geom_Axis2Placement, then its "X Direction" and 0066 //! "Y Direction" are recomputed. 0067 //! Exceptions 0068 //! For a Geom_Axis2Placement: 0069 //! Standard_ConstructionError if A1 and the 0070 //! previous "X Direction" of the coordinate system are parallel. 0071 Standard_EXPORT void SetAxis(const gp_Ax1& A1); 0072 0073 //! Changes the direction of the axis placement. 0074 //! If <me> is an axis placement two axis the main "Direction" 0075 //! is modified and the "XDirection" and "YDirection" are 0076 //! recomputed. 0077 //! Raises ConstructionError only for an axis placement two axis if V and the 0078 //! previous "XDirection" are parallel because it is not possible 0079 //! to calculate the new "XDirection" and the new "YDirection". 0080 Standard_EXPORT virtual void SetDirection(const gp_Dir& V) = 0; 0081 0082 //! Assigns the point P as the origin of this positioning system. 0083 Standard_EXPORT void SetLocation(const gp_Pnt& P); 0084 0085 //! Computes the angular value, in radians, between the 0086 //! "main Direction" of this positioning system and that 0087 //! of positioning system Other. The result is a value between 0 and Pi. 0088 Standard_EXPORT Standard_Real Angle(const Handle(Geom_AxisPlacement)& Other) const; 0089 0090 //! Returns the main axis of the axis placement. 0091 //! For an "Axis2placement" it is the main axis (Location, Direction ). 0092 //! For an "Axis1Placement" this method returns a copy of <me>. 0093 Standard_EXPORT const gp_Ax1& Axis() const; 0094 0095 //! Returns the main "Direction" of an axis placement. 0096 Standard_EXPORT gp_Dir Direction() const; 0097 0098 //! Returns the Location point (origin) of the axis placement. 0099 Standard_EXPORT gp_Pnt Location() const; 0100 0101 DEFINE_STANDARD_RTTIEXT(Geom_AxisPlacement, Geom_Geometry) 0102 0103 protected: 0104 gp_Ax1 axis; 0105 0106 private: 0107 }; 0108 0109 #endif // _Geom_AxisPlacement_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|