package ShapeGallery { private import ShapeItems::*; private import SI::*; private import MeasurementReferences::*; item def Housing :> RectangularCuboid { attribute :>> length = 120 [mm]; attribute :>> width = 60 [mm]; attribute :>> height = 35 [mm]; } item def Shaft :> RightCircularCylinder { attribute :>> radius = 15 [mm]; attribute :>> height = 90 [mm]; } item def Assembly { // Parent placement is inherited by every component. attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (200,100,0) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 30 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } item housing : Housing { attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (0,0,0) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 0 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } } item shaft : Shaft { attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (60,30,35) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 0 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } } item ball : Sphere { attribute :>> radius = 25 [mm]; attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (60,30,155) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 0 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } } item seal : Torus { attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (60,30,110) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 0 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } attribute :>> majorRadius = 35 [mm]; attribute :>> minorRadius = 5 [mm]; } item nose : RightCircularCone { attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (60,30,190) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 0 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } attribute :>> radius = 25 [mm]; attribute :>> height = 60 [mm]; } item wedge : Wedge { attribute coordinateFrame { attribute transformation : TranslationRotationSequence { attribute shift : Translation { attribute translationVector = (160,0,0) [mm]; } attribute turn : Rotation { attribute axisDirection = (0,0,1); attribute angle = 90 [deg]; attribute isIntrinsic = true; } attribute :>> elements = (shift,turn); } } attribute :>> length = 50 [mm]; attribute :>> width = 35 [mm]; attribute :>> height = 60 [mm]; } } item assembly : Assembly; view assemblyView { expose assembly::**; } view housingView { expose assembly::housing; } view shaftAndSealView { expose assembly::shaft; expose assembly::seal; } }