+++ /dev/null
-global tcl_platform
-
-if {[array get env QA_DUMP] != "" && $env(QA_DUMP) == "1"} {
- puts "QA commands have been loaded"
- set env(QADEFAULT) $env(CASROOT)/src/QAResources/QADrawAppliInit
- set env(QA_LD_LIBRARY_PATH) $env(CASROOT)/sun/lib/.
- set env(DRAWDEFAULTOLD) $env(DRAWDEFAULT)
- set env(DRAWDEFAULT) "$env(QADEFAULT)"
- set env(CSF_DrawPluginQADefaults) $env(CASROOT)/src/QAResources/.
-}
+++ /dev/null
--- Copyright (c) 1998-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
-
-@ifdefined ( %Draw_WOKSteps_EDL) then
-@set %WOKSteps_XcppGroup = " xcpp.fill xcpp.src xcpp.header obj.cgen obj.inc";
-@endif;
--- /dev/null
+global tcl_platform
+
+if {[array get env QA_DUMP] != "" && $env(QA_DUMP) == "1"} {
+ set env(CSF_DrawPluginQADefaults) $env(CASROOT)/src/DrawResources/.
+ ###catch {pload ALL}
+ catch {pload FULL}
+ #catch {pload -DrawPluginProducts ALL}
+ catch {pload -DrawPluginProducts OMF CANONICALRECOGNITION EMESH PARASOLID DXF SAT }
+ catch {pload QAcommands}
+
+ ###foreach h [array names Draw_Groups] {
+ ### foreach f $Draw_Groups($h) {
+ ### QARebuild $f
+ ### }
+ ###}
+
+catch {source $env(CSF_DrawPluginQADefaults)/QARebuildCommands}
+}
\ No newline at end of file
XDEDRAW : TKXDEDRAW
TOBJ : TKTObjDRAW
DFBROWSER : TKDFBrowser
+QAcommands : TKQADraw
srcinc:::VisualizationDemo.tcl
srcinc:::OCAFDemo.tcl
srcinc:::TKTopTest.tcl
+srcinc:::dftree.tcl
+srcinc:::QARebuildCommands
+srcinc:::DrawAppliInit
--- /dev/null
+foreach h [array names Draw_Groups] {
+ foreach f $Draw_Groups($h) {
+ QARebuild $f
+ }
+}
+++ /dev/null
--- Created on: 1993-03-31
--- Created by: NW,JPB,CAL
--- Copyright (c) 1993-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
--- Package : Graphic3d
--- Updated : Vendredi 2 Octobre 1992
--- Mercredi 31 Mars 1993
--- Mercredi 19 Janvier 1994
--- 1/08/97 ; PCT : Ajout texture mapping
--- 11/97 ; CAL : retrait de la dependance avec math
--- 11/97 ; CAL : retrait des DataStructure
--- 11/97 ; CAL : ajout pointer StructPtr
--- 04/98 ; FGU : ajout champs 'TOR_EMISSION'
--- 16-09-98; BGN: (S3819) Ajout TypeOfTriedronEcho,
--- TypeOfTriedronPosition.
--- 22-09-98; BGN: S3989 (anciennement S3819): report
--- dans Aspect des TypeOfTriedron*
--- 26-03-99 : FMN ; Compatibilite ascendante:
--- Ajout des anciens noms de materiaux.
--- 09-04-99 : GG ; Compatibilite ascendante:
--- NameOfPhysicalMaterial disparait
--- 23-11-99 : GG ; Add material name DEFAULT
--- 16-06-2000 : ATS : Study G005: class ArrayOfPrimitives
--- and derivated used for model presentation.
--- Required: enumeration TypeOfPrimitive;
--- imported PrimitiveArray; class PrimitiveList.
--- 17-12-01 : GG ; IMP171201 : Add material name UserDefined
--- Thanks to Stephane ROUTELOUS
--- 20-01-2009 : ABD Integration support of system fonts (using FTGL and FreeType)
--- Objective : Specifications definitives
-
-package Graphic3d
-
- ---Version:
-
- ---Purpose: This package permits the creation of 3d graphic objects
- -- in a visualiser.
- -- These objects, called structures, are composed of groups of
- -- primitives and attributes.
- -- The group is the smallest editable element of a structure.
- -- A structure can be displayed, erased, high-lighted.
- -- A transformation can be applied to it.
- -- Structures can be connected to form a tree of structures,
- -- composed by transformations.
- -- The visualiser permits global manipulation of structures.
-
- ---Keywords: Structure, Group, Primitives, Line, Marker, Text,
- -- FillAreas, Vertex, Vector, Material, Font, Shading
- ---Warning:
- ---References:
-
-uses
-
- TCollection,
- TColStd,
- OSD,
- Quantity,
- Aspect,
- MMgt,
- Xw,
- WNT,
- AlienImage,
- gp
-is
-
- -----------------------
- -- Category: Exceptions
- -----------------------
-
- exception AspectTextDefinitionError inherits OutOfRange;
- ---Category: Exceptions
-
- exception CycleError inherits DomainError;
- ---Category: Exceptions
-
- exception GroupDefinitionError inherits OutOfRange;
- ---Category: Exceptions
-
- exception InitialisationError inherits OutOfRange;
- ---Category: Exceptions
-
- exception MaterialDefinitionError inherits OutOfRange;
- ---Category: Exceptions
-
- exception PickIdDefinitionError inherits OutOfRange;
- ---Category: Exceptions
-
- exception PlotterDefinitionError inherits OutOfRange;
- ---Category: The exceptions
-
- exception PriorityDefinitionError inherits OutOfRange;
- ---Category: Exceptions
-
- exception StructureDefinitionError inherits OutOfRange;
- ---Category: Exceptions
-
- exception TransformError inherits OutOfRange;
- ---Category: Exceptions
-
- exception VectorError inherits OutOfRange;
- ---Category: Exceptions
-
- -------------------------
- -- Category: Enumerations
- -------------------------
-
- enumeration NameOfMaterial is
- NOM_BRASS, -- laiton (PHYSIC)
- NOM_BRONZE, -- bronze (PHYSIC)
- NOM_COPPER, -- cuivre (PHYSIC)
- NOM_GOLD, -- or (PHYSIC)
-
- NOM_PEWTER, -- etain (PHYSIC)
-
- NOM_PLASTER, -- platre (GENERIC)
- NOM_PLASTIC, -- plastic (GENERIC)
-
- NOM_SILVER, -- argent (PHYSIC)
-
- NOM_STEEL, -- acier (PHYSIC)
-
- NOM_STONE, -- pierre (PHYSIC)
-
- NOM_SHINY_PLASTIC, -- plastique brillant (GENERIC)
- NOM_SATIN, -- satin (GENERIC)
- NOM_METALIZED, -- metallise New (GENERIC)
- NOM_NEON_GNC, -- neon New (GENERIC)
- NOM_CHROME, -- chrome New (PHYSIC)
- NOM_ALUMINIUM, -- aluminium New (PHYSIC)
- NOM_OBSIDIAN, -- obsidian New (PHYSIC)
- NOM_NEON_PHC, -- neon New (PHYSIC)
- NOM_JADE, -- jade New (PHYSIC)
- NOM_DEFAULT,
- NOM_UserDefined -- owner material
- end NameOfMaterial;
- ---Purpose: Types of aspect materials.
- ---Category: Enumerations
-
- enumeration TypeOfMaterial is MATERIAL_ASPECT, -- Materiel generique
- MATERIAL_PHYSIC -- Materiel physique
- end TypeOfMaterial;
- ---Purpose: Types of materials specifies if a material can change color.
- ---Category: Enumerations
-
- enumeration NameOfTexture1D is NOT_1D_ELEVATION,
- NOT_1D_UNKNOWN
- end NameOfTexture1D;
- ---Purpose: Types of standard textures.
- ---Category: Enumerations
-
-
- enumeration NameOfTexture2D is NOT_2D_MATRA,
- NOT_2D_ALIENSKIN,
- NOT_2D_BLUE_ROCK,
- NOT_2D_BLUEWHITE_PAPER,
- NOT_2D_BRUSHED,
- NOT_2D_BUBBLES,
- NOT_2D_BUMP,
- NOT_2D_CAST,
- NOT_2D_CHIPBD,
- NOT_2D_CLOUDS,
- NOT_2D_FLESH,
- NOT_2D_FLOOR,
- NOT_2D_GALVNISD,
- NOT_2D_GRASS,
- NOT_2D_ALUMINUM,
- NOT_2D_ROCK,
- NOT_2D_KNURL,
- NOT_2D_MAPLE,
- NOT_2D_MARBLE,
- NOT_2D_MOTTLED,
- NOT_2D_RAIN,
- NOT_2D_UNKNOWN
- end NameOfTexture2D;
- ---Purpose: Types of standard textures.
- ---Category: Enumerations
-
-
- enumeration NameOfTextureEnv is NOT_ENV_CLOUDS,
- NOT_ENV_CV,
- NOT_ENV_MEDIT,
- NOT_ENV_PEARL,
- NOT_ENV_SKY1,
- NOT_ENV_SKY2,
- NOT_ENV_LINES,
- NOT_ENV_ROAD,
- NOT_ENV_UNKNOWN
- end NameOfTextureEnv;
- ---Purpose: Types of standard textures.
- ---Category: Enumerations
-
- enumeration TypeOfTexture is TOT_1D,
- TOT_2D,
- TOT_2D_MIPMAP;
- ---Purpose: Type of the texture file format.
- ---Category: Enumerations
-
- enumeration TypeOfTextureMode is TOTM_OBJECT,
- TOTM_SPHERE,
- TOTM_EYE,
- TOTM_MANUAL;
- ---Purpose: Type of the texture projection.
- ---Category: Enumerations
-
- enumeration NameOfTexturePlane is NOTP_XY,
- NOTP_YZ,
- NOTP_ZX,
- NOTP_UNKNOWN;
- ---Purpose: Type of the texture projection plane for both S and T texture coordinate.
- ---Category: Enumerations
-
- enumeration TypeOfComposition is TOC_REPLACE,
- TOC_POSTCONCATENATE
- end TypeOfComposition;
- ---Purpose: To manage the transformation matrices of structures.
- ---Category: Enumerations
-
- enumeration TypeOfConnection is TOC_ANCESTOR,
- TOC_DESCENDANT
- end TypeOfConnection;
- ---Purpose: To manage the connections between the structures.
- ---Category: Enumerations
-
- enumeration TypeOfPolygon is TOP_UNKNOWN,
- TOP_COMPLEX,
- TOP_CONCAVE,
- TOP_CONVEX
- end TypeOfPolygon;
- ---Purpose: The type of polygon in a group in a structure.
- ---Category: Enumerations
-
- enumeration TypeOfPrimitive is TOP_UNDEFINED,
- TOP_POLYLINE,
- TOP_POLYGON,
- TOP_TRIANGLEMESH,
- TOP_QUADRANGLEMESH,
- TOP_TEXT,
- TOP_MARKER,
- TOP_PARRAY
- end TypeOfPrimitive;
- ---Purpose: The type of primitive in a group in a structure.
- ---Category: Enumerations
-
- enumeration TypeOfPrimitiveArray is TOPA_UNDEFINED,
- TOPA_POINTS,
- TOPA_POLYLINES,
- TOPA_SEGMENTS,
- TOPA_POLYGONS,
- TOPA_TRIANGLES,
- TOPA_QUADRANGLES,
- TOPA_TRIANGLESTRIPS,
- TOPA_QUADRANGLESTRIPS,
- TOPA_TRIANGLEFANS
- end TypeOfPrimitiveArray;
- ---Purpose: The type of primitive array in a group in a structure.
- ---Category: Enumerations
-
- enumeration TypeOfReflection is TOR_AMBIENT,
- TOR_DIFFUSE,
- TOR_SPECULAR,
- TOR_EMISSION
- end TypeOfReflection;
- ---Purpose: Nature of the reflection of a material.
- ---Category: Enumerations
-
- enumeration TypeOfStructure is TOS_WIREFRAME,
- TOS_SHADING,
- TOS_COMPUTED,
- TOS_ALL
- end TypeOfStructure;
- ---Purpose: Structural attribute indicating if it can be displayed
- -- in wireframe, shadow mode, or both.
- ---Category: Enumerations
-
- enumeration TextPath is TP_UP,
- TP_DOWN,
- TP_LEFT,
- TP_RIGHT
- end TextPath;
- ---Purpose: Direction in which text is displayed.
- ---Category: Enumerations
-
- enumeration HorizontalTextAlignment is HTA_LEFT,
- HTA_CENTER,
- HTA_RIGHT
- end HorizontalTextAlignment;
- ---Purpose: Defines the horizontal position of the text
- -- relative to its anchor.
- ---Category: Enumerations
-
- enumeration VerticalTextAlignment is VTA_BOTTOM,
- VTA_CENTER,
- VTA_TOP
- end VerticalTextAlignment;
- ---Purpose: Defines the vertical position of the text
- -- relative to its anchor.
- ---Category: Enumerations
-
- enumeration GroupAspect is ASPECT_LINE,
- ASPECT_TEXT,
- ASPECT_MARKER,
- ASPECT_FILL_AREA
- end GroupAspect;
- ---Purpose: Identifies primitives aspects defined per group.
- -- - ASPECT_LINE: aspect for line primitives;
- -- - ASPECT_TEXT: aspect for text primitives;
- -- - ASPECT_MARKER: aspect for marker primitives;
- -- - ASPECT_FILL_AREA: aspect for face primitives.
-
- ---------------------------
- -- Category: Imported types
- ---------------------------
-
- imported PrimitiveArray;
-
- imported CBitFields20;
- ---Purpose: Defines the C structure
- ---Category: Imported types
-
- imported CBitFields16;
- ---Purpose: Defines the C structure
- ---Category: Imported types
-
- imported CBitFields8;
- ---Purpose: Defines the C structure
- ---Category: Imported types
-
- imported CBitFields4;
- ---Purpose: Defines the C structure
- ---Category: Imported types
-
- imported CGroup;
- ---Purpose: Defines the C structure <agroup>
- ---Category: Imported types
-
- imported CStructure;
- ---Purpose: Defines the C structure <astructure>
- ---Category: Imported types
-
- imported CLight;
- ---Purpose: Defines the C structure <alight>
- ---Category: Imported types
-
- imported CPick;
- ---Purpose: Defines the C structure <apick>
- ---Category: Imported types
-
- imported CPlane;
- ---Purpose: Defines the C structure <aplane>
- ---Category: Imported types
-
- imported CBounds;
- ---Purpose: Defines the C structure <abounds>
- ---Category: Imported types
-
- imported CUserDraw;
- ---Purpose: Defines the C structure <auserdraw>
- ---Category: Imported types
-
- imported CView;
- ---Purpose: Defines the C structure <aview>
- ---Category: Imported types
-
- imported CGraduatedTrihedron;
- ---Purpose: Defines the C structure of a graduated trihedron.
- ---Category: Imported types
-
- imported CInitTexture;
- imported CTexture;
-
--- ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate )
- imported CTransPersStruct;
- imported TransModeFlags;
--- ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate )
-
-
- --------------------
- -- Category: Classes
- --------------------
-
- class Strips;
- ---Purpose: Contains some static functions to strips treatment
-
- deferred class ArrayOfPrimitives;
- ---Purpose: Contains basic methods for array allocation and filling
-
- class ArrayOfPoints;
- ---Purpose: Contains points array definition
-
- class ArrayOfPolylines;
- ---Purpose: Contains polylines array definition
-
- class ArrayOfSegments;
- ---Purpose: Contains segments array definition
-
- class ArrayOfPolygons;
- ---Purpose: Contains polygons array definition
-
- class ArrayOfTriangles;
- ---Purpose: Contains triangles array definition
-
- class ArrayOfTriangleStrips;
- ---Purpose: Contains triangles strip array definition
-
- class ArrayOfTriangleFans;
- ---Purpose: Contains triangles fan array definition
-
- class ArrayOfQuadrangles;
- ---Purpose: Contains quatrangles array definition
-
- class ArrayOfQuadrangleStrips;
- ---Purpose: Contains quadrangles strip array definition
-
- class AspectLine3d;
- ---Purpose: Grouping line attributes
- ---Category: Classes
-
- class AspectFillArea3d;
- ---Purpose: Grouping face attributes
- ---Category: Classes
-
- class AspectMarker3d;
- ---Purpose: Grouping marker attributes
- ---Category: Classes
-
- class AspectText3d;
- ---Purpose: Grouping text attributes.
- ---Category: Classes
-
- class Group;
- ---Purpose: For grouping together primitives in a structure
- ---Category: Classes
-
- class GraphicDevice;
- ---Purpose: Defines a physical graphic device allowing to
- -- shares graphical ressources.
- ---Category: Classes
-
- class WNTGraphicDevice;
- ---Purpose: Defines a physical graphic device for Windows NT
- ---Category: Classes
-
- class MaterialAspect;
- ---Purpose: Aspect attributes of a 3d face.
- ---Category: Classes
-
- class Structure;
- ---Purpose: Graphic object.
- ---Category: Classes
-
- deferred class GraphicDriver;
- ---Purpose: Defines a graphic driver for 3d interface
-
- deferred class StructureManager;
- ---Purpose: Visualiser with which the graphic objects are associated.
- ---Category: Classes
-
- deferred class DataStructureManager;
- ---Purpose: Visualiser with which the graphic objects are associated.
- ---Category: Classes
-
- deferred class Plotter;
- ---Purpose: Defines the minimal plotter.
- ---Category: The classes
-
- class Vector;
- ---Purpose: 3d vector
- ---Category: Classes
-
- class Vertex;
- ---Purpose: 3d vertex
- ---Category: Classes
-
- class VertexN;
- ---Purpose: 3d vertex with a normal vector
- ---Category: Classes
-
- class VertexNT;
- ---Purpose: 3d vertex with a normal vector and texture coordinate
- ---Category: Classes
-
- class VertexC;
- ---Purpose: 3d vertex with a colour
- ---Category: Classes
-
- class VertexNC;
- ---Purpose: 3d vertex with a normal and a colour
- ---Category: Classes
-
- ---------------------
- -- Category: Pointers
- ---------------------
-
- pointer StructPtr to Structure from Graphic3d;
- ---Category: Pointers
-
- ---------------------------------
- -- Category: Instantiated classes
- ---------------------------------
-
- class ListOfPArray instantiates
- List from TCollection (ArrayOfPrimitives from Graphic3d);
- ---Category: Instantiated classes
-
- class SequenceOfAddress instantiates
- Sequence from TCollection
- (Address from Standard);
- ---Category: Instantiated classes
-
- class SetOfGroup instantiates
- Set from TCollection (Group from Graphic3d);
- ---Category: Instantiated classes
-
- class HSetOfGroup instantiates
- HSet from TCollection
- (Group from Graphic3d, SetOfGroup);
- ---Category: Instantiated classes
-
- class SequenceOfGroup instantiates
- Sequence from TCollection (Group from Graphic3d);
-
- ---Category: Instantiated classes
-
- class HSequenceOfGroup instantiates
- HSequence from TCollection
- (Group from Graphic3d, SequenceOfGroup from Graphic3d);
- ---Category: Instantiated classes
-
- class MapOfStructure instantiates
- Map from TCollection (Structure from Graphic3d,MapTransientHasher from TColStd);
-
-
- ---Category: Instantiated classes
-
- class SequenceOfStructure instantiates
- Sequence from TCollection
- (Structure from Graphic3d);
- ---Category: Instantiated classes
-
- class HSequenceOfStructure instantiates
- HSequence from TCollection
- (Structure from Graphic3d, SequenceOfStructure from Graphic3d);
- ---Category: Instantiated classes
-
- class Array1OfVector instantiates
- Array1 from TCollection (Vector from Graphic3d);
- ---Category: Instantiated classes
-
- class Array1OfVertex instantiates
- Array1 from TCollection (Vertex from Graphic3d);
- ---Category: Instantiated classes
-
- class Array2OfVertex instantiates
- Array2 from TCollection (Vertex from Graphic3d);
- ---Category: Instantiated classes
-
- class Array1OfVertexC instantiates
- Array1 from TCollection (VertexC from Graphic3d);
- ---Category: Instantiated classes
-
- class Array2OfVertexC instantiates
- Array2 from TCollection (VertexC from Graphic3d);
- ---Category: Instantiated classes
-
- class Array1OfVertexN instantiates
- Array1 from TCollection (VertexN from Graphic3d);
- ---Category: Instantiated classes
-
- class Array2OfVertexN instantiates
- Array2 from TCollection (VertexN from Graphic3d);
- ---Category: Instantiated classes
-
- class Array1OfVertexNT instantiates
- Array1 from TCollection (VertexNT from Graphic3d);
- ---Category: Instantiated classes
-
- class Array2OfVertexNT instantiates
- Array2 from TCollection (VertexNT from Graphic3d);
- ---Category: Instantiated classes
-
- class Array1OfVertexNC instantiates
- Array1 from TCollection (VertexNC from Graphic3d);
- ---Category: Instantiated classes
-
- class Array2OfVertexNC instantiates
- Array2 from TCollection (VertexNC from Graphic3d);
- ---Category: Instantiated classes
-
- class ListOfShortReal instantiates
- List from TCollection (ShortReal from Standard);
- ---Category: Instantiated classes
-
- --ABD Integration support of system fonts (using FTGL and FreeType)
- imported NListOfHAsciiString;
- ---Category: Instantiated classes
-
-
- deferred class TextureRoot from Graphic3d;
- deferred class TextureMap from Graphic3d;
- deferred class Texture1D from Graphic3d;
- deferred class Texture2D from Graphic3d;
-
- class TextureEnv from Graphic3d;
- class Texture1Dmanual from Graphic3d;
- class Texture1Dsegment from Graphic3d;
- class Texture2Dmanual from Graphic3d;
- class Texture2Dplane from Graphic3d;
-
-
- enumeration ExportFormat is
-
- EF_PostScript,
- EF_EnhPostScript,
- EF_TEX,
- EF_PDF,
- EF_SVG,
- EF_PGF
-
- end ExportFormat;
-
-
- enumeration SortType is
-
- ST_Simple, -- sorting by depth of center point of primitive(fast)
- ST_BSP_Tree -- sorting by BSPTree (slow, but fine result )
-
- end SortType;
-
-end Graphic3d;
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
--- Copyright (c) 1995-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
--- Copyright (c) 1995-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
--- Copyright (c) 1995-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
NCollection_Vector.hxx
NCollection_DefineVector.hxx
NCollection_StdBase.hxx
-templates2macros.sh
-NCollection.mdl.gz
NCollection_EBTree.hxx
NCollection_UBTree.hxx
+++ /dev/null
-#!/bin/sh
-
-FILES='
-NCollection_Array1.hxx
-NCollection_Array2.hxx
-NCollection_List.hxx
-NCollection_Map.hxx
-NCollection_DataMap.hxx
-NCollection_DoubleMap.hxx
-NCollection_IndexedMap.hxx
-NCollection_IndexedDataMap.hxx
-NCollection_Queue.hxx
-NCollection_SList.hxx
-NCollection_Sequence.hxx
-NCollection_Set.hxx
-NCollection_Stack.hxx
-NCollection_Vector.hxx
-NCollection_BaseCollection.hxx
-NCollection_TListIterator.hxx
-NCollection_TListNode.hxx
-NCollection_HArray1.hxx
-NCollection_HArray2.hxx
-NCollection_HSequence.hxx
-NCollection_HSet.hxx'
-
-#FILES=NCollection_Array2.hxx
-
-for IN_FILE in $FILES; do
-### for IN_FILE in $*; do
-OUT_FILE=`echo $IN_FILE | sed 's/_/_Define/'`
-gawk '
-
-# ------ Function: Print the backslash in the 79th position
- function PrintBSL(str) {
- str0 = " "
- len = length (str)
- if (len > 78) $0 = str " \\"
- else $0 = str substr(str0, 1, 79-len) "\\"
- }
-# -------------- Check and corect the file header -----------
-/\/\/ *Copyright *:/ {
- print "// Automatically created from " in_file " by GAWK"
- }
-/\/\/ *File *:/ ||
-/#(ifndef|define) *NCollection_/ {
- gsub ("NCollection_","NCollection_Define")
- }
-
-# --------------- Modify the include statement for used templates ------
-/^ *\#include <NCollection_BaseCollection.hxx>/ {
- print "\#include <NCollection_DefineBaseCollection.hxx>"
- next
- }
-/^ *\#include <NCollection_T[A-Za-z]*\.hxx>/ {
- gsub ("NCollection_T","NCollection_DefineT")
- }
-/^ *\#include <NCollection_Array[12]\.hxx>/ {
- gsub ("NCollection_Array","NCollection_DefineArray")
- }
-/^ *\#include <NCollection_Sequence\.hxx>/ {
- gsub ("NCollection_Sequence","NCollection_DefineSequence")
- }
-/^ *\#include <NCollection_Set\.hxx>/ {
- gsub ("NCollection_Set","NCollection_DefineSet")
- }
-
-# -------------- Replace line #define NCOLLECTION_H... -----------------
-/^ *#define NCOLLECTION_H.*\(.*\).*$/ {
- defh = $0
- do getline defcl; while (defcl ~ /^ *\\/)
- coll_type = gensub ("^.*public *NCollection_\([A-Za-z0-9_]*\) *<Type>.*$",
- "\\1", 1, defcl)
- gsub (", *Type\\)",", _" coll_type "Type_\)", defh)
- gsub (" *\\\\$","", defh)
- PrintBSL(gensub ("NCOLLECTION_","DEFINE_", 1, defh))
- print
- PrintBSL("")
- print
- gsub ("NCollection_" coll_type " *<Type>", "_" coll_type "Type_", defcl)
- PrintBSL(gensub ("^\(.*\) *\\\\$","\\1", 1, defcl))
- print
- flag = 10
- next
- }
-
-# -------------- Replace the line "\#define ...." for "template ...." --
-/^ *template *< *class/,/^ *{ *$/ {
- if (flag == 0) {
- type = gensub ("^ *template.*NCollection_\([A-Za-z0-9]*\).*$","\\1","g")
- item_t = gensub("^ *template *< *class *\([A-Za-z0-9_]*\) *\(,|>\).*$",\
- "\\1",1)
- item_tt= gensub("^ *template.*, *class *\([A-Za-z0-9_]*\) *\(,|>\).*$",\
- "\\1",1)
- if (item_tt == $0) item_tt = ""
- if (type == "BaseCollection")
- PrintBSL("#define DEFINE_" toupper(type) "(_ClassName_, "item_t")")
- else if (item_tt == "")
- PrintBSL("#define DEFINE_" toupper(type) \
- "(_ClassName_, _BaseCollection_, " item_t ")")
- else
- PrintBSL("#define DEFINE_" toupper(type) \
- "(_ClassName_, _BaseCollection_, " item_t ", " item_tt ")")
- # Special addition for the Iterator
- if (type == "TListIterator")
- {
- print
- PrintBSL("DEFINE_TLISTNODE(TListNode, _BaseCollection_, " item_t ")")
- }
- flag = 1
- } else if (flag == 1) {
- gsub ("^ *", "class _ClassName_ ")
- flag = 2
- }
- }
-
-# --------------- Detect the final line of the template class definition ----
-/^}; *$/{ flag = 0 }
-
-# --------------- Replace C-style comments for C++-style ones ---------------
-/\/\// { if (flag == 2) $0=gensub ("// *\(.*\) *$","/\* \\1 \*/", "g") }
-
-# --------------- Replace "Raise_if.." for "#ifdef DEB ..::Raise.. #endif" --
-/^\# *ifdef *DEB/ {
- nline = 0
- if (flag == 0) {
- while (1) {
- getline debl
- if (debl ~ /^\# *endif/) break;
- print debl
- }
- } else {
- getline debl;
- if (debl !~ /^ *if *\(/) {
- print "ERROR: in " in_file " cannot find if after \#ifdef DEB" \
- > "/dev/stderr"
- exit 1
- }
- if (debl ~ /^ *if *\(.*\) *$/)
- condl = gensub ("^ *if *\\( *(.*) *\\) *$", "\\1", 1, debl)
- else
- condl = gensub ("^ *if *\\( *(.*) *$", "\\1", 1, debl)
- while(1) {
- getline debl;
- if (debl ~ /^\# *endif/) break;
- if (debl !~ /Standard.*::Raise/)
- condl = gensub("^ *(.*[^\\)]) *($|\\) *$)", condl "\\1", 1, debl)
- else {
- PrintBSL(gensub ("^ \(.*\):: *Raise *\\(.*$",
- "\\1_Raise_if", 1, debl))
- print
- PrintBSL(gensub ("^ ( *)Standard.*Raise *\\( *\"NCollection_" \
- type "(.*)\" *\\) *\; *$",
- "\\1 (" condl ", #_ClassName_ \"\\2\")\;",
- 1, debl))
- print
- }
- }
- }
- next
-}
-
-# --------------- Remove #pragma warning (default:4291) from the output -----
-/^\# *ifdef WNT/ {
- defh = $0
- has_printed = 0
- while (1) {
- getline defcl
- if (defcl ~ /^[ \t]*$/) continue;
- if (defcl ~ /^\# *pragma +warning *\(default *: *4291 *\)/) continue;
- if (defcl ~ /^\# *endif/) {
- if (has_printed) print defcl
- break
- }
- if (has_printed == 0) {
- has_printed = 1
- print defh
- }
- print defcl
- }
- next
-}
-
-# --------------- Replace "DEFINE_T.*..." for typedef ... -------------------
-# in classes List, Queue, Set, Stack
-/^ *typedef NCollection_T[A-Za-z]*<TheItemType>/ {
- if (flag > 1) {
- tsup = gensub("^ *typedef.*NCollection_\([A-Za-z0-9]*\).*$","\\1",1)
- tdef = gensub("^ *typedef.*<[A-Za-z0-9]*> *([A-Za-z0-9]*)\;.*$","\\1",1)
- gsub ("typedef.*$", "DEFINE_" toupper(tsup) "(" tdef \
- ",_BaseCollection_," item_t ")")
- }
- }
-
-# --------------- Replace public T* with DEFINE... --------------------------
-/^ *class.*: *public *NCollection_T[A-Za-z]*<.*>/ {
- if (flag > 1) {
- ttempl = gensub("^ *class.*: *public *(NCollection_T[A-Za-z0-9]*<.*>).*$","\\1",1)
- tshort = gensub("^ *class.*: *public *NCollection_(T[A-Za-z0-9]*)<.*$","\\1",1)
- spub = gensub("(^ *class.*: *public *)NCollection_(T[A-Za-z0-9]*)<.*($)",
- "\\1\\2\\3",1)
- tpara = gensub("^.*<(.*)>","\\1",1)
- PrintBSL(" DEFINE_" toupper(tshort) "(" tshort ",_BaseCollection_," tpara ")")
- print
- PrintBSL(spub)
- print
- next
- }
- }
-
-# ------- General case: replace the macro parameter for class name and print -
- { if (flag == 10) {
- nsub = gsub ("NCollection_" coll_type " *<Type>",
- "_" coll_type "Type_")
- if (nsub) {
- gsub (" *\\\\$","")
- PrintBSL($0)
- }
- } else if (flag > 1) {
- gsub ("NCollection_BaseCollection *< *\("item_t"|"item_tt"\) *>", \
- "_BaseCollection_")
- gsub ("NCollection_TListNode *< *\("item_t"|"item_tt"\) *>", \
- "TListNode")
- gsub ("NCollection_TListIterator *< *\("item_t"|"item_tt"\) *>", \
- "TListIterator")
- gsub (ttempl, tshort)
- gsub (":: *Raise *\\( *\"NCollection_" type,
- "::Raise (#_ClassName_ \"")
- PrintBSL(gensub ("NCollection_" type \
- "\(<"item_t">|<"item_tt">|\)\(\[^A-Za-z\]|$\)", \
- "_ClassName_\\2","g"))
- }
- print
- }
-
-' in_file=$IN_FILE out_file=$OUT_FILE $IN_FILE > $OUT_FILE
-echo "\t$IN_FILE converted to $OUT_FILE"
-done
+++ /dev/null
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-QAcommands : TKQADraw
+++ /dev/null
-QAcommands : TKQADraw
+++ /dev/null
-global tcl_platform
-
-source $env(DRAWDEFAULTOLD)
-
-###catch {pload ALL}
-catch {pload FULL}
-#catch {pload -DrawPluginProducts ALL}
-catch {pload -DrawPluginProducts OMF CANONICALRECOGNITION EMESH PARASOLID DXF SAT }
-catch {pload -DrawPluginQA QAcommands}
-
-###foreach h [array names Draw_Groups] {
-### foreach f $Draw_Groups($h) {
-### QARebuild $f
-### }
-###}
-
-catch {source $env(CSF_DrawPluginQADefaults)/QARebuildCommands}
-
+++ /dev/null
-foreach h [array names Draw_Groups] {
- foreach f $Draw_Groups($h) {
- QARebuild $f
- }
-}
+++ /dev/null
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
loginfile:::Plugin
appresource:::XCAF
appresource:::TObj
-srcinc:::dftree.tcl
appresource:::StandardLite
appresource:::MigrationSheet.txt
+++ /dev/null
-MASS: kg
-LENGTH: m
-TIME: s
-ELECTRIC CURRENT: A
-THERMODYNAMIC TEMPERATURE: °K
-AMOUNT OF SUBSTANCE: mol
-PLANE ANGLE: rad
-SOLID ANGLE: sr
-AREA: m²
-VOLUME: m³
-INERTIA: m**4
-ANGULAR SPEED: rad/s
-SPEED: m/s
-ACCELERATION: m/s²
-FREQUENCY: Hz
-VOLUMIC MASS: kg/m³
-MASS FLOW: kg/s
-VOLUME FLOW: m³/s
-CONSUMPTION: m²
-QUANTITY OF MOVEMENT: kg*m/s
-KINETIC MOMENT: kg*m²/s
-MOMENT OF INERTIA: kg*m²
-FORCE: N
-MOMENT OF A FORCE: N*m
-LINEIC FORCE: N/m
-PRESSURE: Pa
-DYNAMIC VISCOSITY: Pa/s
-KINETIC VISCOSITY: m²/s
-TENSION SUPERFICIELLE: m/s²
-ELECTRIC POTENTIAL: V
-ENERGY: J
-POWER: W
-LINEIC POWER: W/m
-SURFACIC POWER: W/m²
-VOLUMIC POWER: W/m³
-COEFFICIENT OF LINEAR INFLATION: 1./°K
-THERMICAL CONDUCTIVITY: W/m/°K
-THERMICAL CONVECTIVITY: W/m²/°K
-THERMICAL MASSIC CAPACITY: J/kg/°K
-ENTROPY: J/°K
-ENTHALPY: J
-LUMINOUS FLUX: Lu
-LUMINANCE: cd/m²
-EXITANCE: lx
-LUMINOUS INTENSITY: cd
-LUMINOUS EXPOSITION: lx*s
-LUMINOUS EFFICACITY: Lu/W
-LUMINOUS FLUX: Lu
-ILLUMINANCE: lx
-ELECTRIC CHARGE: C
-ELECTRIC FIELD: V/m
-ELECTRIC CAPACITANCE: F
-MAGNETIC FIELD: A/m
-MAGNETIC FLUX DENSITY: T
-MAGNETIC FLUX: Wb
-INDUCTANCE: H
-RELUCTANCE: 1./H
-ELECTRIC RESISTANCE: O
-ELECTRIC CONDUCTANCE: S
-RESISTIVITY: O*m
-CONDUCTIVITY: S/m
-MOLAR MASS: kg/mol
-MOLAR VOLUME: m³/mol
-CONCENTRATION: kg/m³
-MOLAR CONCENTRATION: mol/m³
-MOLARITY: mol/kg
-ACCOUSTIC INTENSITY: B
-DOSE EQUIVALENT: Si
-ABSORBED DOSE: Gr
-ACTIVITY (OF A RADIONUCLEIDE): Be
-FLUX OF MAGNETIC INDUCTION: kg*m²/s²/A
-ROTATION ACCELERATION: rad/s²
-TRANSLATION STIFFNESS: N/m
-ROTATION STIFFNESS: N*m/rad
+++ /dev/null
-MASS: kg
-LENGTH: mm
-TIME: s
-ELECTRIC CURRENT: A
-THERMODYNAMIC TEMPERATURE: °K
-AMOUNT OF SUBSTANCE: mol
-PLANE ANGLE: rad
-SOLID ANGLE: sr
-AREA: mm²
-VOLUME: mm³
-INERTIA: mm**4
-ANGULAR SPEED: rad/s
-SPEED: mm/s
-ACCELERATION: mm/s²
-FREQUENCY: Hz
-VOLUMIC MASS: kg/mm³
-MASS FLOW: kg/s
-VOLUME FLOW: mm³/s
-CONSUMPTION: mm²
-QUANTITY OF MOVEMENT: kg*mm/s
-KINETIC MOMENT: kg*mm²/s
-MOMENT OF INERTIA: kg*mm²
-FORCE: kg*mm/s²
-MOMENT OF A FORCE: kg*mm²/s²
-PRESSURE: kg/(mm*s²)
-DYNAMIC VISCOSITY: kg/(mm*s)
-KINETIC VISCOSITY: mm²/s
-TENSION SUPERFICIELLE: mm/s²
-ELECTRIC POTENTIAL: V
-ENERGY: kg*mm²/s²
-POWER: kg*mm²/s³
-LINEIC POWER: kg*mm/s³
-SURFACIC POWER: kg/s³
-VOLUMIC POWER: kg/(mm*s³)
-COEFFICIENT OF LINEAR INFLATION: 1./°K
-THERMICAL CONDUCTIVITY: kg*mm/(s³*°K)
-THERMICAL CONVECTIVITY: kg/(s³*°K)
-THERMICAL MASSIC CAPACITY: mm²/(s²*°K)
-ENTROPY: kg*mm²/(s²*°K)
-ENTHALPY: kg*mm²/s²
-LUMINOUS FLUX: Lu
-LUMINANCE: cd/mm²
-EXITANCE: lx
-LUMINOUS INTENSITY: cd
-LUMINOUS EXPOSITION: lx*s
-LUMINOUS EFFICACITY: s³*Lu/(kg*mm²)
-LUMINOUS FLUX: Lu
-ILLUMINANCE: lx
-ELECTRIC CHARGE: C
-ELECTRIC FIELD: V/mm
-ELECTRIC CAPACITANCE: s**4*A²/(kg*mm²)
-MAGNETIC FIELD: A/mm
-MAGNETIC FLUX DENSITY: T
-MAGNETIC FLUX: kg*mm²/(s²*A)
-INDUCTANCE: kg*mm²/(s²*A²)
-RELUCTANCE: s²*A²/(kg*mm²)
-ELECTRIC RESISTANCE: O
-ELECTRIC CONDUCTANCE: S
-RESISTIVITY: O*mm
-CONDUCTIVITY: S/mm
-MOLAR MASS: kg/mol
-MOLAR VOLUME: mm³/mol
-CONCENTRATION: kg/mm³
-MOLAR CONCENTRATION: mol/mm³
-MOLARITY: mol/kg
-ACCOUSTIC INTENSITY: mm/A²
-DOSE EQUIVALENT: mm²/s²
-ABSORBED DOSE: mm²/s²
-ACTIVITY (OF A RADIONUCLEIDE): Be
-FLUX OF MAGNETIC INDUCTION: kg*mm\062/(s\062*A)
+++ /dev/null
-MASS: kg
-LENGTH: mm
-TIME: s
-ELECTRIC CURRENT: A
-THERMODYNAMIC TEMPERATURE: °K
-AMOUNT OF SUBSTANCE: mol
-PLANE ANGLE: rad
-SOLID ANGLE: sr
-AREA: mm²
-VOLUME: mm³
-INERTIA: mm**4
-ANGULAR SPEED: rad/s
-SPEED: mm/s
-ACCELERATION: mm/s²
-FREQUENCY: Hz
-VOLUMIC MASS: kg/mm³
-MASS FLOW: kg/s
-VOLUME FLOW: mm³/s
-CONSUMPTION: mm²
-QUANTITY OF MOVEMENT: kg*mm/s
-KINETIC MOMENT: kg*mm²/s
-MOMENT OF INERTIA: kg*mm²
-FORCE: kg*mm/s²
-MOMENT OF A FORCE: kg*mm²/s²
-LINEIC FORCE: kg/s²
-PRESSURE: kg/(mm*s²)
-DYNAMIC VISCOSITY: kg/(mm*s)
-KINETIC VISCOSITY: mm²/s
-TENSION SUPERFICIELLE: mm/s²
-ELECTRIC POTENTIAL: V
-ENERGY: kg*mm²/s²
-POWER: kg*mm²/s³
-LINEIC POWER: kg*mm/s³
-SURFACIC POWER: kg/s³
-VOLUMIC POWER: kg/(mm*s³)
-COEFFICIENT OF LINEAR INFLATION: 1./°K
-THERMICAL CONDUCTIVITY: kg*mm/(s³*°K)
-THERMICAL CONVECTIVITY: kg/(s³*°K)
-THERMICAL MASSIC CAPACITY: mm²/(s²*°K)
-ENTROPY: kg*mm²/(s²*°K)
-ENTHALPY: kg*mm²/s²
-LUMINOUS FLUX: Lu
-LUMINANCE: cd/mm²
-EXITANCE: lx
-LUMINOUS INTENSITY: cd
-LUMINOUS EXPOSITION: lx*s
-LUMINOUS EFFICACITY: s³*Lu/(kg*mm²)
-LUMINOUS FLUX: Lu
-ILLUMINANCE: lx
-ELECTRIC CHARGE: C
-ELECTRIC FIELD: V/mm
-ELECTRIC CAPACITANCE: s**4*A²/(kg*mm²)
-MAGNETIC FIELD: A/mm
-MAGNETIC FLUX DENSITY: T
-MAGNETIC FLUX: kg*mm²/(s²*A)
-INDUCTANCE: kg*mm²/(s²*A²)
-RELUCTANCE: s²*A²/(kg*mm²)
-ELECTRIC RESISTANCE: O
-ELECTRIC CONDUCTANCE: S
-RESISTIVITY: O*mm
-CONDUCTIVITY: S/mm
-MOLAR MASS: kg/mol
-MOLAR VOLUME: mm³/mol
-CONCENTRATION: kg/mm³
-MOLAR CONCENTRATION: mol/mm³
-MOLARITY: mol/kg
-ACCOUSTIC INTENSITY: mm/A²
-DOSE EQUIVALENT: mm²/s²
-ABSORBED DOSE: mm²/s²
-ACTIVITY (OF A RADIONUCLEIDE): Be
-FLUX OF MAGNETIC INDUCTION: kg*mm²/(s²*A)
-ROTATION ACCELERATION: rad/s²
-TRANSLATION STIFFNESS: kg/s²
-ROTATION STIFFNESS: kg*mm²/(s²*rad)
+++ /dev/null
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- The content of this file is subject to the Open CASCADE Technology Public
--- License Version 6.5 (the "License"). You may not use the content of this file
--- except in compliance with the License. Please obtain a copy of the License
--- at http://www.opencascade.org and read it completely before using this file.
---
--- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
--- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
---
--- The Original Code and all software distributed under the License is
--- distributed on an "AS IS" basis, without warranty of any kind, and the
--- Initial Developer hereby disclaims all such warranties, including without
--- limitation, any warranties of merchantability, fitness for a particular
--- purpose or non-infringement. Please see the License for the specific terms
--- and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+++ /dev/null
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#ifndef _gp_Quaternion_HeaderFile
-#define _gp_Quaternion_HeaderFile
-
-/**
- * Initial sources based on free samples from
- * http://www.gamedev.ru/code/articles/?id=4215&page=3
- */
-
-#include <gp_Vec.hxx>
-#include <gp_Mat.hxx>
-#include <Precision.hxx>
-
-//! General quaternion class (unit and nonunit),
-//! designed for 3d rotations and orientation representation <br>
-class gp_Quaternion
-{
-
-public:
-
- //! Creates an identity quaternion. <br>
- gp_Quaternion()
- : x (0.0), y (0.0), z (0.0), w (1.0) {}
-
- gp_Quaternion (Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w)
- : x (x), y (y), z (z), w (w) {}
-
- gp_Quaternion (const gp_Quaternion& theToCopy)
- : x (theToCopy.x), y (theToCopy.y), z (theToCopy.z), w (theToCopy.w) {}
-
- gp_Quaternion (const gp_Vec& theVecFrom, const gp_Vec& theVecTo)
- : x (0.0), y (0.0), z (0.0), w (1.0)
- {
- Init (theVecFrom, theVecTo);
- }
-
- gp_Quaternion (const gp_Vec& theVecFrom, const gp_Vec& theVecTo, const gp_Vec& theHelpCrossVec)
- : x (0.0), y (0.0), z (0.0), w (1.0)
- {
- Init (theVecFrom, theVecTo, theHelpCrossVec);
- }
-
- //! Simple equal test without precision
- Standard_Boolean IsEqual (const gp_Quaternion& theOther) const
- {
- if (this == &theOther)
- {
- return Standard_True;
- }
- return Abs (x - theOther.x) <= gp::Resolution() &&
- Abs (y - theOther.y) <= gp::Resolution() &&
- Abs (z - theOther.z) <= gp::Resolution() &&
- Abs (w - theOther.w) <= gp::Resolution();
- }
-
- /**
- * Shortest arc quaternion rotate one vector to another by shortest path.
- * Create rotation from -> to, for any length vectors.
- * If vectors theVecFrom and theVecTo are opposite then rotation axis computed as
- * theVecFrom * gp_Vec(1,0,0) or theVecFrom * gp_Vec(0,0,1).
- */
- void Init (const gp_Vec& theVecFrom, const gp_Vec& theVecTo)
- {
- gp_Vec aVecCross (theVecFrom.Crossed (theVecTo));
- Set (aVecCross.X(), aVecCross.Y(), aVecCross.Z(), theVecFrom.Dot (theVecTo));
- Normalize(); // if "from" or "to" not unit, normalize quat
- w += 1.0; // reducing angle to halfangle
- if (w <= Precision::Confusion()) // angle close to PI
- {
- if ((theVecFrom.Z() * theVecFrom.Z()) > (theVecFrom.X() * theVecFrom.X()))
- Set ( 0.0, theVecFrom.Z(), -theVecFrom.Y(), w); // theVecFrom * gp_Vec(1,0,0)
- else
- Set (theVecFrom.Y(), -theVecFrom.X(), 0.0, w); // theVecFrom * gp_Vec(0,0,1)
- }
- Normalize();
- }
-
- /**
- * Shortest arc quaternion rotate one vector to another by shortest path.
- * If vectors theVecFrom and theVecTo are opposite then rotation axis computed as
- * theVecFrom * theHelpCrossVec.
- */
- void Init (const gp_Vec& theVecFrom, const gp_Vec& theVecTo, const gp_Vec& theHelpCrossVec)
- {
- gp_Vec aVecCross (theVecFrom.Crossed (theVecTo));
- Set (aVecCross.X(), aVecCross.Y(), aVecCross.Z(), theVecFrom.Dot (theVecTo));
- Normalize(); // if "from" or "to" not unit, normalize quat
- w += 1.0; // reducing angle to halfangle
- if (w <= Precision::Confusion()) // angle close to PI
- {
- gp_Vec theAxis = theVecFrom.Crossed (theHelpCrossVec);
- Set (theAxis.X(), theAxis.Y(), theAxis.Z(), w);
- }
- Normalize();
- }
-
- gp_Quaternion (const gp_Vec& theAxis, const Standard_Real& theAngle)
- : x (0.0), y (0.0), z (0.0), w (1.0)
- {
- InitUnit (theAxis, theAngle);
- }
-
- //! Create a unit quaternion from Axis+Angle representation
- void InitUnit (const gp_Vec& theAxis, const Standard_Real& theAngle)
- {
- gp_Vec anAxis = theAxis.Normalized();
- Standard_Real anAngleHalf = 0.5 * theAngle;
- Standard_Real sin_a = Sin (anAngleHalf);
- Set (anAxis.X() * sin_a, anAxis.Y() * sin_a, anAxis.Z() * sin_a, Cos (anAngleHalf));
- }
-
- /**
- * Convert a quaternion to Axis+Angle representation,
- * preserve the axis direction and angle from -PI to +PI
- */
- void GetAxisAngle (gp_Vec& theAxis, Standard_Real& theAngle) const
- {
- Standard_Real vl = Sqrt (x * x + y * y + z * z);
- if (vl > Precision::Confusion())
- {
- Standard_Real ivl = 1.0 / vl;
- theAxis.SetCoord (x * ivl, y * ivl, z * ivl);
- if (w < 0.0)
- {
- theAngle = 2.0 * ATan2 (-vl, -w); // [-PI, 0]
- }
- else
- {
- theAngle = 2.0 * ATan2 ( vl, w); // [ 0, PI]
- }
- }
- else
- {
- theAxis.SetCoord (0.0, 0.0, 0.0);
- theAngle = 0.0;
- }
- }
-
- /**
- * Create a unit quaternion by rotation matrix
- * matrix must contain only rotation (not scale or shear)
- *
- * For numerical stability we find first the greatest component of quaternion
- * and than search others from this one
- */
- void InitUnit (const gp_Mat& theMat)
- {
- Standard_Real tr = theMat (1, 1) + theMat (2, 2) + theMat(3, 3); // trace of martix
- if (tr > 0.0)
- { // if trace positive than "w" is biggest component
- Set (theMat (3, 2) - theMat (2, 3),
- theMat (1, 3) - theMat (3, 1),
- theMat (2, 1) - theMat (1, 2),
- tr + 1.0);
- Scale (0.5 / Sqrt (w)); // "w" contain the "norm * 4"
- }
- else if ((theMat (1, 1) > theMat (2, 2)) && (theMat (1, 1) > theMat (3, 3)))
- { // Some of vector components is bigger
- Set (1.0 + theMat (1, 1) - theMat (2, 2) - theMat (3, 3),
- theMat (1, 2) + theMat (2, 1),
- theMat (1, 3) + theMat (3, 1),
- theMat (3, 2) - theMat (2, 3));
- Scale (0.5 / Sqrt (x));
- }
- else if (theMat (2, 2) > theMat (3, 3))
- {
- Set (theMat (1, 2) + theMat (2, 1),
- 1.0 + theMat (2, 2) - theMat (1, 1) - theMat (3, 3),
- theMat (2, 3) + theMat (3, 2),
- theMat (1, 3) - theMat (3, 1));
- Scale (0.5 / Sqrt (y));
- }
- else
- {
- Set (theMat (1, 3) + theMat (3, 1),
- theMat (2, 3) + theMat (3, 2),
- 1.0 + theMat (3, 3) - theMat (1, 1) - theMat (2, 2),
- theMat (2, 1) - theMat (1, 2));
- Scale (0.5 / Sqrt (z));
- }
- }
-
- gp_Quaternion (const gp_Mat& theMat)
- : x (0.0), y (0.0), z (0.0), w (1.0)
- {
- Init (theMat);
- }
-
- /**
- * Create a nonunit quaternion from rotation matrix
- * martix must contain only rotation (not scale or shear)
- * the result quaternion length is numerical stable
- */
- void Init (const gp_Mat& theMat)
- {
- Standard_Real tr = theMat (1, 1) + theMat (2, 2) + theMat (3, 3); // trace of martix
- if (tr > 0.0)
- { // if trace positive than "w" is biggest component
- Set (theMat (3, 2) - theMat (2, 3),
- theMat (1, 3) - theMat (3, 1),
- theMat (2, 1) - theMat (1, 2),
- tr + 1.0);
- }
- else if ((theMat (1, 1) > theMat (2, 2)) && (theMat (1, 1) > theMat (3, 3)))
- { // Some of vector components is bigger
- Set (1.0 + theMat (1, 1) - theMat (2, 2) - theMat (3, 3),
- theMat (1, 2) + theMat (2, 1),
- theMat (1, 3) + theMat (3, 1),
- theMat (3, 2) - theMat (2, 3));
- }
- else if (theMat (2, 2) > theMat (3, 3))
- {
- Set (theMat (1, 2) + theMat (2, 1),
- 1.0 + theMat (2, 2) - theMat (1, 1) - theMat (3, 3),
- theMat (2, 3) + theMat (3, 2),
- theMat (1, 3) - theMat (3, 1));
- }
- else
- {
- Set (theMat (1, 3) + theMat (3, 1),
- theMat (2, 3) + theMat (3, 2),
- 1.0 + theMat (3, 3) - theMat (1, 1) - theMat (2, 2),
- theMat (2, 1) - theMat (1, 2));
- }
- }
-
- //! Set the rotation to matrix
- void GetRotateMatrix (gp_Mat& theMat) const
- {
- Standard_Real wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2;
- Standard_Real s = 2.0 / Norm();
- x2 = x * s; y2 = y * s; z2 = z * s;
- xx = x * x2; xy = x * y2; xz = x * z2;
- yy = y * y2; yz = y * z2; zz = z * z2;
- wx = w * x2; wy = w * y2; wz = w * z2;
-
- theMat (1, 1) = 1.0 - (yy + zz);
- theMat (1, 2) = xy - wz;
- theMat (1, 3) = xz + wy;
-
- theMat (2, 1) = xy + wz;
- theMat (2, 2) = 1.0 - (xx + zz);
- theMat (2, 3) = yz - wx;
-
- theMat (3, 1) = xz - wy;
- theMat (3, 2) = yz + wx;
- theMat (3, 3) = 1.0 - (xx + yy);
- // 1 division 16 multiplications 15 addidtions 12 variables
- }
-
- //! Set the rotation from unit quat to matrix
- void GetRotateMatrixFromUnit (gp_Mat& theMat) const
- {
- Standard_Real wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2;
- x2 = x + x; y2 = y + y; z2 = z + z;
- xx = x * x2; xy = x * y2; xz = x * z2;
- yy = y * y2; yz = y * z2; zz = z * z2;
- wx = w * x2; wy = w * y2; wz = w * z2;
-
- theMat (1, 1) = 1.0 - (yy + zz);
- theMat (1, 2) = xy - wz;
- theMat (1, 3) = xz + wy;
-
- theMat (2, 1) = xy + wz;
- theMat (2, 2) = 1.0 - (xx + zz);
- theMat (2, 3) = yz - wx;
-
- theMat (3, 1) = xz - wy;
- theMat (3, 2) = yz + wx;
- theMat (3, 3) = 1.0 - (xx + yy);
- }
-
- void Set (Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w)
- {
- this->x = x; this->y = y; this->z = z; this->w = w;
- }
-
- void Set (const gp_Quaternion& theQuaternion)
- {
- x = theQuaternion.x; y = theQuaternion.y; z = theQuaternion.z; w = theQuaternion.w;
- }
-
- Standard_Real X() const
- {
- return x;
- }
-
- Standard_Real Y() const
- {
- return y;
- }
-
- Standard_Real Z() const
- {
- return z;
- }
-
- Standard_Real W() const
- {
- return w;
- }
-
- //! Make identity quaternion (zero-rotation)
- void Ident()
- {
- x = 0.0; y = 0.0; z = 0.0; w = 1.0;
- }
-
- //! Reverse rotation
- void Conjugate()
- {
- x = -x; y = -y; z = -z;
- }
-
- //! Return reversed rotation
- gp_Quaternion Conjugated() const
- {
- return gp_Quaternion (-x, -y, -z, w);
- }
-
- //! Rotation will not be changed by this operation (except 0-scaling)
- void Scale (Standard_Real theScale)
- {
- x *= theScale; y *= theScale; z *= theScale; w *= theScale;
- }
-
- gp_Quaternion Scaled (const Standard_Real theScale) const
- {
- return gp_Quaternion (x * theScale, y * theScale, z * theScale, w * theScale);
- }
-
- Standard_Real Norm() const
- {
- return x * x + y * y + z * z + w * w;
- }
-
- Standard_Real Magnitude() const
- {
- return Sqrt (Norm());
- }
-
- //! Invert quaternion q = q^-1
- void Invert()
- {
- Standard_Real in = 1.0 / Norm();
- Set (-x * in, -y * in, -z * in, w * in);
- }
-
- //! Return inversed quaternion q^-1
- gp_Quaternion Inverted() const
- {
- Standard_Real in = 1.0 / Norm();
- return gp_Quaternion (-x * in, -y * in, -z * in, w * in);
- }
-
- /**
- * Stabilize quaternion length within 1 - 1/4
- * This operation is a lot faster than normalization
- * and preserve length goes to 0 or infinity
- */
- void StabilizeLength()
- {
- Standard_Real cs = Abs (x) + Abs (y) + Abs (z) + Abs (w);
- if (cs > 0.0)
- {
- x /= cs; y /= cs; z /= cs; w /= cs;
- }
- else
- {
- Ident();
- }
- }
-
- /**
- * Scale quaternion that its norm goes to 1
- * The appearing of 0 magnitude or near is a error,
- * so we can be sure that can divide by magnitude
- */
- void Normalize()
- {
- Standard_Real aMagn = Magnitude();
- if (aMagn < Precision::Confusion())
- {
- StabilizeLength();
- aMagn = Magnitude();
- }
- Scale (1.0 / aMagn);
- }
-
- gp_Quaternion Normalized() const
- {
- gp_Quaternion aNormilizedQ (*this);
- aNormilizedQ.Normalize();
- return aNormilizedQ;
- }
-
- gp_Quaternion operator-() const
- {
- return gp_Quaternion (-x, -y, -z, -w);
- }
-
- //! Result is "rotations mix"
- gp_Quaternion Added (const gp_Quaternion& theQ) const
- {
- return gp_Quaternion (x + theQ.x, y + theQ.y, z + theQ.z, w + theQ.w);
- }
-
- //! Result is "rotations mix"
- gp_Quaternion operator+ (const gp_Quaternion& theQ) const
- {
- return Added(theQ);
- }
-
- //! Result is "rotations mix"
- gp_Quaternion Subtracted (const gp_Quaternion& theQ) const
- {
- return gp_Quaternion (x - theQ.x, y - theQ.y, z - theQ.z, w - theQ.w);
- }
-
- //! Result is "rotations mix"
- gp_Quaternion operator- (const gp_Quaternion& theQ) const
- {
- return Subtracted (theQ);
- }
-
- //! Rotation will not be changed by this operation (except 0-scaling)
- gp_Quaternion operator* (const Standard_Real& theScale) const
- {
- return gp_Quaternion (x * theScale, y * theScale, z * theScale, w * theScale);
- }
-
- /**
- * Multiply function - work the same as Matrices multiplying.
- * qq' = (cross(v,v') + wv' + w'v, ww' - dot(v,v'))
- * Result is rotation combination: q' than q (here q=this, q'=theQ).
- * Notices than:
- * qq' != q'q;
- * qq^-1 = q;
- */
- gp_Quaternion operator* (const gp_Quaternion& theQ) const
- {
- return gp_Quaternion (w * theQ.x + x * theQ.w + y * theQ.z - z * theQ.y,
- w * theQ.y + y * theQ.w + z * theQ.x - x * theQ.z,
- w * theQ.z + z * theQ.w + x * theQ.y - y * theQ.x,
- w * theQ.w - x * theQ.x - y * theQ.y - z * theQ.z);
- // 16 multiplications 12 addidtions 0 variables
- }
-
- //! Result is "rotations mix"
- const gp_Quaternion& Add (const gp_Quaternion& theQ)
- {
- x += theQ.x; y += theQ.y; z += theQ.z; w += theQ.w;
- return *this;
- }
-
- //! Result is "rotations mix"
- const gp_Quaternion& operator+= (const gp_Quaternion& theQ)
- {
- return Add (theQ);
- }
-
- //! Result is "rotations mix"
- const gp_Quaternion& Subtract (const gp_Quaternion& theQ)
- {
- x -= theQ.x; y -= theQ.y; z -= theQ.z; w -= theQ.w;
- return *this;
- }
-
- //! Result is "rotations mix"
- const gp_Quaternion& operator-= (const gp_Quaternion& theQ)
- {
- return Subtract(theQ);
- }
-
- const gp_Quaternion& operator*= (const gp_Quaternion& theQ)
- {
- Set ((*this) * theQ); // have no optimization here
- return *this;
- }
-
- //! Inner product / scalar product / Dot
- Standard_Real Dot (const gp_Quaternion& theQ)
- {
- return x * theQ.x + y * theQ.y + z * theQ.z + w * theQ.w;
- }
-
- //! Return rotation angle from -PI to PI
- Standard_Real GetRotationAngle() const
- {
- if (w < 0.0)
- {
- return 2.0 * ATan2 (-Sqrt (x * x + y * y + z * z), -w);
- }
- else
- {
- return 2.0 * ATan2 ( Sqrt (x * x + y * y + z * z), w);
- }
- }
-
- //! Return vector rotated by quaternion
- gp_Vec Rotated (const gp_Vec& theVec) const
- {
- gp_Quaternion theQ (theVec.X() * w + theVec.Z() * y - theVec.Y() * z,
- theVec.Y() * w + theVec.X() * z - theVec.Z() * x,
- theVec.Z() * w + theVec.Y() * x - theVec.X() * y,
- theVec.X() * x + theVec.Y() * y + theVec.Z() * z);
- return gp_Vec (w * theQ.x + x * theQ.w + y * theQ.z - z * theQ.y,
- w * theQ.y + y * theQ.w + z * theQ.x - x * theQ.z,
- w * theQ.z + z * theQ.w + x * theQ.y - y * theQ.x) * (1.0 / Norm());
- }
-
-private:
-
-Standard_Real x;
-Standard_Real y;
-Standard_Real z;
-Standard_Real w;
-
-};
-
-#endif //_gp_Quaternion_HeaderFile