Exemplo n.º 1
0
 public StepShapeRepresentationRelationShip GetShapeRelationShip(StepShapeDefinitionRepresentation item)
 {
     foreach (var eachItem in _file.Items)
     {
         if (eachItem.ItemType == StepItemType.ShapeRepresentationRelationship)
         {
             var itemInstance = (StepShapeRepresentationRelationShip)eachItem;
             if (itemInstance.UsedRepresentation != null && itemInstance.UsedRepresentation.Id == item.UsedRepresentation.Id)
             {
                 return(itemInstance);
             }
         }
     }
     return(null);
 }
Exemplo n.º 2
0
        public static void CreateCube(double dimX, double dimY, double dimZ, double cubeX = 0, double cubeY = 0, double cubeZ = 0)
        {
            StepPart part = new StepPart();
            StepShapeDefinitionRepresentation   shapeRep  = new StepShapeDefinitionRepresentation();
            StepProductDefinitionShape          defnShape = new StepProductDefinitionShape();
            StepAdvancedBrepShapeRepresentation brepShapeRepresentation = new StepAdvancedBrepShapeRepresentation();

            StepAxis2Placement axis = new StepAxis2Placement();

            SetDefaultAxis(cubeX, cubeY, cubeZ, axis);


            //Create base face
            double x1, x2, y1, y2;

            double xPlus = 0, xMinus = 0;
            double yPlus = 0, yMinus = 0;
            double zPlus = 0, zMinus = 0;

            GeneratePlusMinusValues(dimZ, out zPlus, out zMinus);

            GenerateRectangularFaceVertices(dimX, dimY, out xPlus, out yPlus, out xMinus, out yMinus);
        }