예제 #1
0
 /// <summary>
 /// Initialises the Mesh.
 /// </summary>
 /// <param name="powerSHAPE">This is the PowerSHAPE Automation object.</param>
 /// <param name="id">The ID of the new model.</param>
 /// <param name="name">The name of the new model.</param>
 /// <remarks></remarks>
 internal PSMesh(PSAutomation powerSHAPE, int id, string name) : base(powerSHAPE, id, name)
 {
 }
예제 #2
0
 internal PSSurfaceCylinder(PSAutomation powerSHAPE) : base(powerSHAPE)
 {
 }
예제 #3
0
 /// <summary>
 /// Initialises the CompCurve
 /// </summary>
 internal PSCompCurve(PSAutomation powerSHAPE, int id, string name) : base(powerSHAPE, id, name)
 {
 }
 /// <summary>
 /// Creates a new collection.
 /// </summary>
 /// <param name="powerSHAPE">The base instance to interact with PowerShape.</param>
 internal PSModelsCollection(PSAutomation powerSHAPE) : base(powerSHAPE)
 {
 }
 internal PSSolidSpring(PSAutomation powerSHAPE, int id, string name) : base(powerSHAPE, id, name)
 {
 }
예제 #6
0
 /// <summary>
 /// This constructor is required as collection inherits from EntitiesCollection
 /// </summary>
 internal PSLateralsCollection(PSAutomation powerSHAPE, PSSurface parentSurface) : base(powerSHAPE, parentSurface)
 {
 }
 /// <summary>
 /// Creates a new collection.
 /// </summary>
 /// <param name="powerSHAPE">The base instance to interact with PowerShape.</param>
 internal PSLevelsCollection(PSAutomation powerSHAPE)
 {
     _powerSHAPE = powerSHAPE;
 }
 internal PSSolidSpring(PSAutomation powerSHAPE) : base(powerSHAPE)
 {
 }
 internal PSSurfaceExtrusion(PSAutomation powerSHAPE, int id, string name) : base(powerSHAPE, id, name)
 {
 }
 internal PSSolidSphere(PSAutomation powerSHAPE) : base(powerSHAPE)
 {
 }
 internal PSSurfaceExtrusion(PSAutomation powerSHAPE) : base(powerSHAPE)
 {
 }
 public void TestFixtureSetUp()
 {
     _powerShape = new PSAutomation(InstanceReuse.UseExistingInstance);
     _powerShape.DialogsOff();
 }
 /// <summary>
 /// New surfaces collection.
 /// </summary>
 /// <param name="powerSHAPE">The base instance to interact with PowerShape.</param>
 internal PSSurfacesCollection(PSAutomation powerSHAPE) : base(powerSHAPE)
 {
 }
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="powerSHAPE">The base instance to interact with PowerShape.</param>
 /// <remarks></remarks>
 public PSEntityMover(PSAutomation powerSHAPE)
 {
     _powerSHAPE = powerSHAPE;
 }
        /// <summary>
        /// Creates instance objects based on a string identifying an item's type in PowerSHAPE.
        /// </summary>
        /// <param name="powerSHAPE">The base instance to interact with PowerShape.</param>
        /// <param name="type">The identifier PowerSHAPE uses to identify this type of entity.</param>
        /// <param name="id">The identifier of the entity.</param>
        /// <param name="name">The name of the entity.</param>
        /// <returns>The new entity.</returns>
        internal static object CreateEntity(
            PSAutomation powerSHAPE,
            int type,
            int id,
            string name,
            string description,
            string level)
        {
            PSEntity entity = null;

            switch (type)
            {
            case 61:
                entity = new PSAnnotation(powerSHAPE, id, name);
                break;

            case 52:
                entity = new PSArc(powerSHAPE, id, name);
                break;

            case 59:
                entity = new PSCompCurve(powerSHAPE, id, name);
                break;

            case 53:
                entity = new PSCurve(powerSHAPE, id, name);
                break;

            case 58:
                entity = new PSLine(powerSHAPE, id, name);
                break;

            case 49:
                entity = new PSPoint(powerSHAPE, id, name);
                break;

            case 40:
                entity = (PSEntity)PSSolidFactory.CreateSolid(powerSHAPE, id, name, description);
                break;

            case 60:
                switch (description)
                {
                case "Mesh":
                    entity = new PSMesh(powerSHAPE, id, name);
                    break;

                case "Point":
                    entity = new PSPoint(powerSHAPE, id, name);
                    break;

                case "Electrode":
                    entity = new PSElectrode(powerSHAPE, id, name);
                    break;
                }
                break;

            case 21:
                entity = (PSEntity)PSSurfaceFactory.CreateSurface(powerSHAPE, id, name, description);
                break;

            case 54:
                entity = new PSWorkplane(powerSHAPE, id, name);
                break;
            }

            if (entity != null)
            {
                entity._levelNumber = int.Parse(level);
            }

            return(entity);
        }