public IgesOffsetSurface(IgesVector direction, double distance, IgesEntity surface)
     : base()
 {
     Direction = direction;
     Distance  = distance;
     Surface   = surface;
 }
Esempio n. 2
0
 internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder)
 {
     Direction = IgesVector.Vector3D(parameters, 0);
     Distance  = Double(parameters, 3);
     binder.BindEntity(Integer(parameters, 4), e => Surface = e);
     return(5);
 }
Esempio n. 3
0
 public IgesOffsetSurface(IgesFile file, Vector3D direction, double distance, IgesEntity surface)
     : base(file)
 {
     Direction = direction;
     Distance  = distance;
     Surface   = surface;
 }
 public IgesLabelPlacement(IgesViewBase view, IgesPoint location, IgesLeader leader, int level, IgesEntity label)
 {
     View     = view;
     Location = location;
     Leader   = leader;
     Level    = level;
     Label    = label;
 }
        internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder)
        {
            int index = 0;

            Direction = Vector(parameters, ref index);
            Distance  = Double(parameters, index++);
            binder.BindEntity(Integer(parameters, index++), e => Surface = e);
            return(index);
        }
Esempio n. 6
0
        internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder)
        {
            var index = 0;

            binder.BindEntity(Integer(parameters, index++), generalNote => GeneralNote = generalNote as IgesGeneralNote);
            binder.BindEntity(Integer(parameters, index++), leader => FirstLeader      = leader as IgesLeader);
            binder.BindEntity(Integer(parameters, index++), geometry => Geometry       = geometry);
            return(index);
        }
        internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder)
        {
            int index = 0;

            binder.BindEntity(Integer(parameters, index++), e => Surface = e);
            IsOuterBoundaryD = !Boolean(parameters, index++);
            var boundaryEntityCount = Integer(parameters, index++);

            binder.BindEntity(Integer(parameters, index++), e => OuterBoundary = e);
            for (int i = 0; i < boundaryEntityCount; i++)
            {
                binder.BindEntity(Integer(parameters, index++), e => BoundaryEntities.Add(e));
            }

            return(index);
        }
Esempio n. 8
0
 public int GetOrWriteEntityIndex(IgesEntity entity)
 {
     if (entity == null)
     {
         return(0);
     }
     else if (!EntityMap.ContainsKey(entity))
     {
         var index = entity.AddDirectoryAndParameterLines(this, entity.File);
         EntityMap[entity] = index;
         return(index);
     }
     else
     {
         return(EntityMap[entity]);
     }
 }
Esempio n. 9
0
 internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder)
 {
     Location = IgesPoint.Point3D(parameters, 0);
     binder.BindEntity(Integer(parameters, 3), e => DisplaySymbolGeometry = e);
     RawConnectionType    = Integer(parameters, 4);
     ConnectionType       = Enum.IsDefined(typeof(IgesConnectionType), RawConnectionType)
         ? ConnectionType = (IgesConnectionType)RawConnectionType
         : ConnectionType = IgesConnectionType.ImplementorDefined;
     FunctionType         = (IgesConnectionFunctionType)Integer(parameters, 5);
     FunctionIdentifier   = String(parameters, 6);
     binder.BindEntity(Integer(parameters, 7), e => FunctionIdentifierTextDisplayTemplate = e);
     FunctionName = String(parameters, 8);
     binder.BindEntity(Integer(parameters, 9), e => FunctionNameTextDisplayTemplate = e);
     UniqueIdentifier = Integer(parameters, 10);
     RawFunctionCode  = Integer(parameters, 11);
     FunctionCode     = Enum.IsDefined(typeof(IgesConnectionFunctionCode), RawFunctionCode)
         ? (IgesConnectionFunctionCode)RawFunctionCode
         : IgesConnectionFunctionCode.ImplementorDefined;
     ConnectPointMayBeSwapped = !Boolean(parameters, 12);
     binder.BindEntity(Integer(parameters, 13), e => Owner = e);
     return(14);
 }
Esempio n. 10
0
        internal static IgesEntity FromData(IgesDirectoryData directoryData, List <string> parameters, IgesReaderBinder binder)
        {
            IgesEntity entity = null;

            switch (directoryData.EntityType)
            {
            case IgesEntityType.AngularDimension:
                entity = new IgesAngularDimension();
                break;

            case IgesEntityType.AssociativityInstance:
                switch (directoryData.FormNumber)
                {
                case 5:
                    entity = new IgesLabelDisplayAssociativity();
                    break;
                }
                break;

            case IgesEntityType.Block:
                entity = new IgesBlock();
                break;

            case IgesEntityType.BooleanTree:
                entity = new IgesBooleanTree();
                break;

            case IgesEntityType.Boundary:
                entity = new IgesBoundary();
                break;

            case IgesEntityType.BoundedSurface:
                entity = new IgesBoundedSurface();
                break;

            case IgesEntityType.CircularArc:
                entity = new IgesCircularArc();
                break;

            case IgesEntityType.ColorDefinition:
                entity = new IgesColorDefinition();
                break;

            case IgesEntityType.CompositeCurve:
                entity = new IgesCompositeCurve();
                break;

            case IgesEntityType.ConicArc:
                entity = new IgesConicArc();
                break;

            case IgesEntityType.ConnectPoint:
                entity = new IgesConnectPoint();
                break;

            case IgesEntityType.CopiousData:
                entity = new IgesCopiousData();
                break;

            case IgesEntityType.CurveDimension:
                entity = new IgesCurveDimension();
                break;

            case IgesEntityType.CurveOnAParametricSurface:
                entity = new IgesCurveOnAParametricSurface();
                break;

            case IgesEntityType.DiameterDimension:
                entity = new IgesDiameterDimension();
                break;

            case IgesEntityType.Direction:
                entity = new IgesDirection();
                break;

            case IgesEntityType.ElementResults:
                entity = new IgesElementResults();
                break;

            case IgesEntityType.Ellipsoid:
                entity = new IgesEllipsoid();
                break;

            case IgesEntityType.FlagNote:
                entity = new IgesFlagNote();
                break;

            case IgesEntityType.Flash:
                entity = new IgesFlash();
                break;

            case IgesEntityType.FiniteElement:
                entity = new IgesFiniteElementDummy();
                break;

            case IgesEntityType.GeneralLabel:
                entity = new IgesGeneralLabel();
                break;

            case IgesEntityType.GeneralNote:
                entity = new IgesGeneralNote();
                break;

            case IgesEntityType.GeneralSymbol:
                entity = new IgesGeneralSymbol();
                break;

            case IgesEntityType.Leader:
                entity = new IgesLeader();
                break;

            case IgesEntityType.Line:
                entity = new IgesLine();
                break;

            case IgesEntityType.LinearDimension:
                entity = new IgesLinearDimension();
                break;

            case IgesEntityType.LineFontDefinition:
                switch (directoryData.FormNumber)
                {
                case 1:
                    entity = new IgesTemplateLineFontDefinition();
                    break;

                case 2:
                    entity = new IgesPatternLineFontDefinition();
                    break;
                }
                break;

            case IgesEntityType.ManifestSolidBRepObject:
                entity = new IgesManifestSolidBRepObject();
                break;

            case IgesEntityType.NewGeneralNote:
                entity = new IgesNewGeneralNote();
                break;

            case IgesEntityType.NodalDisplacementAndRotation:
                entity = new IgesNodalDisplacementAndRotation();
                break;

            case IgesEntityType.NodalResults:
                entity = new IgesNodalResults();
                break;

            case IgesEntityType.Node:
                entity = new IgesNode();
                break;

            case IgesEntityType.Null:
                entity = new IgesNull();
                break;

            case IgesEntityType.OffsetCurve:
                entity = new IgesOffsetCurve();
                break;

            case IgesEntityType.OffsetSurface:
                entity = new IgesOffsetSurface();
                break;

            case IgesEntityType.OrdinateDimension:
                entity = new IgesOrdinateDimension();
                break;

            case IgesEntityType.ParametricSplineCurve:
                entity = new IgesParametricSplineCurve();
                break;

            case IgesEntityType.ParametricSplineSurface:
                entity = new IgesParametricSplineSurface();
                break;

            case IgesEntityType.Plane:
                entity = new IgesPlane();
                break;

            case IgesEntityType.PlaneSurface:
                entity = new IgesPlaneSurface();
                break;

            case IgesEntityType.Point:
                entity = new IgesLocation();
                break;

            case IgesEntityType.PointDimension:
                entity = new IgesPointDimension();
                break;

            case IgesEntityType.Property:
                switch (directoryData.FormNumber)
                {
                case 1:
                    entity = new IgesDefinitionLevelsProperty();
                    break;
                }
                break;

            case IgesEntityType.RadiusDimension:
                entity = new IgesRadiusDimension();
                break;

            case IgesEntityType.RationalBSplineCurve:
                entity = new IgesRationalBSplineCurve();
                break;

            case IgesEntityType.RationalBSplineSurface:
                entity = new IgesRationalBSplineSurface();
                break;

            case IgesEntityType.RightAngularWedge:
                entity = new IgesRightAngularWedge();
                break;

            case IgesEntityType.RightCircularConeFrustrum:
                entity = new IgesRightCircularConeFrustrum();
                break;

            case IgesEntityType.RightCircularConicalSurface:
                entity = new IgesRightCircularConicalSurface();
                break;

            case IgesEntityType.RightCircularCylinder:
                entity = new IgesRightCircularCylinder();
                break;

            case IgesEntityType.RightCircularCylindricalSurface:
                entity = new IgesRightCircularCylindricalSurface();
                break;

            case IgesEntityType.RuledSurface:
                entity = new IgesRuledSurface();
                break;

            case IgesEntityType.SelectedComponent:
                entity = new IgesSelectedComponent();
                break;

            case IgesEntityType.SolidAssembly:
                entity = new IgesSolidAssembly();
                break;

            case IgesEntityType.SolidOfLinearExtrusion:
                entity = new IgesSolidOfLinearExtrusion();
                break;

            case IgesEntityType.SolidOfRevolution:
                entity = new IgesSolidOfRevolution();
                break;

            case IgesEntityType.Sphere:
                entity = new IgesSphere();
                break;

            case IgesEntityType.SphericalSurface:
                entity = new IgesSphericalSurface();
                break;

            case IgesEntityType.SubfigureDefinition:
                entity = new IgesSubfigureDefinition();
                break;

            case IgesEntityType.SurfaceOfRevolution:
                entity = new IgesSurfaceOfRevolution();
                break;

            case IgesEntityType.TabulatedCylinder:
                entity = new IgesTabulatedCylinder();
                break;

            case IgesEntityType.TextDisplayTemplate:
                entity = new IgesTextDisplayTemplate();
                break;

            case IgesEntityType.TextFontDefinition:
                entity = new IgesTextFontDefinition();
                break;

            case IgesEntityType.ToroidalSurface:
                entity = new IgesToroidalSurface();
                break;

            case IgesEntityType.Torus:
                entity = new IgesTorus();
                break;

            case IgesEntityType.TransformationMatrix:
                entity = new IgesTransformationMatrix();
                break;

            case IgesEntityType.TrimmedParametricSurface:
                entity = new IgesTrimmedParametricSurface();
                break;

            case IgesEntityType.View:
                switch (directoryData.FormNumber)
                {
                case 0:
                    entity = new IgesView();
                    break;

                case 1:
                    entity = new IgesPerspectiveView();
                    break;
                }
                break;
            }

            if (entity != null)
            {
                entity.PopulateDirectoryData(directoryData);
                int nextIndex = entity.ReadParameters(parameters, binder);
                entity.ReadCommonPointers(parameters, nextIndex, binder);
            }

            return(entity);
        }
Esempio n. 11
0
 public IgesBoundaryItem(IgesEntity entity, bool isReversed, IEnumerable <IgesEntity> associatedParameterCurves)
 {
     Entity     = entity;
     IsReversed = isReversed;
     AssociatedParameterCurves = new List <IgesEntity>(associatedParameterCurves);
 }
 public IgesManifestSolidBRepVoid(IgesEntity shell, bool isOriented)
 {
     Shell      = shell;
     IsOriented = isOriented;
 }
Esempio n. 13
0
 public IgesRuledSurface(IgesEntity firstCurve, IgesEntity secondCurve)
     : this()
 {
     FirstCurve  = firstCurve;
     SecondCurve = secondCurve;
 }
Esempio n. 14
0
 public IgesSolidAndTransformationMatrix(IgesEntity solid, IgesTransformationMatrix matrix)
 {
     Solid = solid;
     TransformationMatrix = matrix;
 }