本文整理汇总了C#中ISIS.GME.Dsml.CyPhyML.Interfaces类的典型用法代码示例。如果您正苦于以下问题:C# ISIS.GME.Dsml.CyPhyML.Interfaces类的具体用法?C# ISIS.GME.Dsml.CyPhyML.Interfaces怎么用?C# ISIS.GME.Dsml.CyPhyML.Interfaces使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISIS.GME.Dsml.CyPhyML.Interfaces类属于命名空间,在下文中一共展示了ISIS.GME.Dsml.CyPhyML.Interfaces类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetCADModelTypesFromFilenames
public static void SetCADModelTypesFromFilenames(CyPhyML.Component c)
{
foreach (CyPhyML.CADModel cadModel in c.Children.CADModelCollection)
{
List<ISIS.GME.Common.Interfaces.FCO> resources = new List<ISIS.GME.Common.Interfaces.FCO>();
foreach (var usesResource in cadModel.DstConnections.UsesResourceCollection)
{
resources.Add(usesResource.DstEnd);
}
foreach (var usesResource in cadModel.SrcConnections.UsesResourceCollection)
{
resources.Add(usesResource.SrcEnd);
}
foreach (var resource in resources.Where(f => f.Impl.MetaBase.Name == "Resource")
.Select(f => CyPhyMLClasses.Resource.Cast(f.Impl)))
{
if (resource.Attributes.Path.EndsWith(".prt") || resource.Attributes.Path.EndsWith(".PRT"))
{
cadModel.Attributes.FileType = CyPhyMLClasses.CADModel.AttributesClass.FileType_enum.Part;
}
if (resource.Attributes.Path.EndsWith(".asm") || resource.Attributes.Path.EndsWith(".ASM"))
{
cadModel.Attributes.FileType = CyPhyMLClasses.CADModel.AttributesClass.FileType_enum.Assembly;
}
}
}
}
开发者ID:neemask,项目名称:meta-core,代码行数:27,代码来源:CyphyMetaLinkUtils.cs
示例2: IsParent
private bool IsParent(CyPhy.ConnectorComposition conn, CyPhy.ComponentAssembly topassembly)
{
GmeCommon.Interfaces.Container container = conn.ParentContainer;
while (container != null)
{
if (container.Guid == topAssembly.Guid)
return true;
container = container.ParentContainer;
}
return false;
}
开发者ID:neemask,项目名称:meta-core,代码行数:11,代码来源:CommonTraversal.cs
示例3: CommonTraversal
public CommonTraversal(GmeCommon.Interfaces.FCO start, CyPhy.ComponentAssembly topassembly)
{
Initialize();
startNodeID = start.ID;
this.topAssembly = topassembly;
if (start is CyPhy.Connector)
{
VisitConnector(start as CyPhy.Connector, (MgaFCO)start.ParentContainer.Impl);
}
else if (start is CyPhy.CADDatum)
{
VisitCADDatum(start as CyPhy.CADDatum);
}
}
开发者ID:pombredanne,项目名称:metamorphosys-desktop,代码行数:16,代码来源:CommonTraversal.cs
示例4: CFDConfig
public CFDConfig(CyPhy.CFDSolverSetting setting,
CyPhy.CFDTestBench testBench)
{
MeshFineness = (int)testBench.Attributes.MeshFineness + 1;
SimulationTime = testBench.Attributes.SimulationTime;
Core = testBench.Attributes.Core.ToString();
}
开发者ID:neemask,项目名称:meta-core,代码行数:7,代码来源:CFDConfig.cs
示例5: VisitConnector
private void VisitConnector(CyPhy.Connector connector, MgaFCO parent)
{
if (!visitedPorts.Contains(connector.ID + "_" + parent.ID))
{
visitedPorts.Add(connector.ID + "_" + parent.ID);
bool parentIsComponent = (connector.ParentContainer is CyPhy.Component);
bool isStart = (connector.ID == startNodeID);
if (!isStart && parentIsComponent)
{
FoundConnectedNodes.Add(connector);
}
foreach (CyPhy.ConnectorComposition conn in connector.SrcConnections.ConnectorCompositionCollection)
{
if (topAssembly != null && !IsParent(conn, topAssembly)) continue;
if (parent.ObjType != GME.MGA.Meta.objtype_enum.OBJTYPE_REFERENCE ||
GetRefportOrParent((MgaConnection) conn.Impl, "src").ID == parent.ID)
VisitConnector(conn.SrcEnds.Connector, parent);
}
foreach (CyPhy.ConnectorComposition conn in connector.DstConnections.ConnectorCompositionCollection)
{
if (topAssembly != null && !IsParent(conn, topAssembly)) continue;
if (parent.ObjType != GME.MGA.Meta.objtype_enum.OBJTYPE_REFERENCE ||
GetRefportOrParent((MgaConnection)conn.Impl, "dst").ID == parent.ID)
VisitConnector(conn.DstEnds.Connector, parent);
}
}
}
开发者ID:neemask,项目名称:meta-core,代码行数:32,代码来源:CommonTraversal.cs
示例6: CollectLeafComponents
private void CollectLeafComponents(List<CyPhy.Component> result, CyPhy.ComponentAssembly assembly)
{
foreach (var compref in assembly.Children.ComponentRefCollection)
{
if (compref.AllReferred != null)
{
if (compref.AllReferred is CyPhy.ComponentAssemblyRef)
{
CollectLeafComponents(result, compref.AllReferred as CyPhy.ComponentAssembly);
}
else if (compref.AllReferred is CyPhy.Component)
{
// Interested in components with CAD Model only
if ((compref.AllReferred as CyPhy.Component).Children.CADModelCollection.Any())
result.Add(compref as CyPhy.Component);
}
}
}
foreach (var compass in assembly.Children.ComponentAssemblyCollection)
{
CollectLeafComponents(result, compass);
}
foreach (var comp in assembly.Children.ComponentCollection)
{
// Interested in components with CAD Model only
if ((comp as CyPhy.Component).Children.CADModelCollection.Any())
result.Add(comp);
}
}
开发者ID:robertowens,项目名称:meta-core,代码行数:29,代码来源:FEATestBench.cs
示例7: InjectMetaLinkData
/// <summary>
/// Injects Meta-Link related data into a pre-existing structure
/// </summary>
/// <param name="assembly"></param>
public void InjectMetaLinkData(CyPhy.ComponentAssembly assembly, MetaLinkData data)
{
// There's only one cadassembly in case of Meta-Link!!
foreach (DataRep.CADAssembly a in assemblies.Values)
{
a.MetaLinkData = data;
}
}
开发者ID:neemask,项目名称:meta-core,代码行数:12,代码来源:CADContainer.cs
示例8: TBCadParameterMapping
public TBCadParameterMapping(CyPhy.CADParameter cadParam,
string tbParamName)
{
ComponentCADParameterName = cadParam.Attributes.ParameterName;
if (cadParam.ParentContainer.ParentContainer.Kind == "Component")
ComponentInstanceGUID = CyPhyClasses.Component.Cast(cadParam.ParentContainer.ParentContainer.Impl).Attributes.InstanceGUID;
TestBenchParameterName = tbParamName;
}
开发者ID:neemask,项目名称:meta-core,代码行数:8,代码来源:TBCadParameterMapping.cs
示例9: TestBenchTypeProcessor
public TestBenchTypeProcessor(CyPhy.TestBenchType testBenchType)
{
this.testBenchType = testBenchType;
this.OriginalSystemUnderTest = testBenchType.Children.TopLevelSystemUnderTestCollection.FirstOrDefault();
// HACK: used by PET, SoT and CyPhy2Modelica_v2 [old code]
this.GetInvokedObject().RegistryValue["TestBenchUniqueName"] = this.testBenchType.Name;
}
开发者ID:pombredanne,项目名称:metamorphosys-desktop,代码行数:8,代码来源:TestBenchTypeProcessor.cs
示例10: CommonTraversal
public CommonTraversal(CyPhy.ConnectorComposition connection, CyPhy.ComponentAssembly topassembly)
{
Initialize();
startNodeID = "";
this.topAssembly = topassembly;
VisitConnectorComposition(connection);
}
开发者ID:metamorph-inc,项目名称:meta-core,代码行数:9,代码来源:CommonTraversal.cs
示例11: CreateFlatData
public void CreateFlatData(CyPhy.ComponentAssembly cyphyasm)
{
List<CyPhy.Component> regular = new List<CyPhy.Component>();
List<CyPhy.Component> size2fitcomponents = new List<CyPhy.Component>();
// [1] Grabs all components
FindComponents(cyphyasm, regular, size2fitcomponents);
ProcessComponents(regular, size2fitcomponents, cyphyasm);
}
开发者ID:neemask,项目名称:meta-core,代码行数:10,代码来源:CADFlatDataCreator.cs
示例12: CalmWaterSolverSettings
public CalmWaterSolverSettings(CyPhy.CalmWaterSolverSettings settings,
CyPhy.CFDTestBench testBench)
: base(settings,
testBench)
{
Tier = 3;
FluidMaterial = (MaterialType)(int)settings.Attributes.FluidMaterial;
FluidTemperature = settings.Attributes.FluidTemperature;
VehicleVelocity = settings.Attributes.VehicleVelocity;
}
开发者ID:neemask,项目名称:meta-core,代码行数:10,代码来源:CFDConfig.cs
示例13: GetParamUnitName
private bool GetParamUnitName(CyPhy.Parameter param, ref string unit)
{
if (param.AllReferred as CyPhy.unit != null)
{
unit = (param.AllReferred as CyPhy.unit).Attributes.Symbol;
return true;
} else {
return false;
}
}
开发者ID:robertowens,项目名称:meta-core,代码行数:10,代码来源:FEATestBench.cs
示例14: CADComponent
public CADComponent(CyPhy.Component cyphycomp, string ProjectDirectory, bool size2fit = false, string format = "Creo")
{
Type = CADDataType.Component;
StructuralInterfaceNodes = new Dictionary<string, StructuralInterfaceConstraint>();
DisplayID = cyphycomp.Attributes.InstanceGUID;
Id = cyphycomp.ID;
GraphvizID = UtilityHelpers.CleanString2(cyphycomp.ID, 50, "-");
AVMID = cyphycomp.Attributes.AVMID;
RevID = "";
VersionID = cyphycomp.Attributes.Version;
CADFormat = format;
Name = cyphycomp.Name;
CadParameters = new List<CADParameter>();
ModelType = "Part";
Size2Fit = size2fit;
MaterialName = "";
CyPhyModelPath = cyphycomp.GetDirectoryPath(ProjectDirectory: ProjectDirectory);
Classification = cyphycomp.Attributes.Classifications;
HyperLink = cyphycomp.ToHyperLink();
CadElementsList = new List<CAD.ElementType>();
pointCoordinatesList = new List<TestBenchModel.TBComputation>();
CreateStructuralInterfaceEquivalent(cyphycomp);
AddManufacturingParameters(cyphycomp);
var specialinstr = cyphycomp.Children.ParameterCollection.Where(p => p.Name.ToUpper() == SpecialInstrParamStr);
if (specialinstr.Any())
{
SpecialInstructions = specialinstr.First().Attributes.Value.Replace("\"", "");
}
// META-3555 hack
if (cyphycomp.Children.CADModelCollection.Any())
{
foreach (var datum in cyphycomp.Children.CADModelCollection.First().Children.CADDatumCollection)
{
if (datum.Name == "FRONT" || datum.Name == "TOP" || datum.Name == "RIGHT")
{
SpecialDatums.Add(new Datum(datum, "", false));
}
}
}
foreach (var prop in cyphycomp.Children.PropertyCollection)
{
if (prop.Name.StartsWith("METADATA."))
{
MetaData.Add(prop.Name.Substring(9), prop.Attributes.Value);
}
}
TraverseComposites(cyphycomp);
CreatePointCoordinatesList(cyphycomp);
}
开发者ID:metamorph-inc,项目名称:meta-core,代码行数:55,代码来源:CADComponent.cs
示例15: Expand
public override void Expand(CyPhy.ComponentAssembly configuration)
{
this.Configuration = configuration;
if (this.OriginalSystemUnderTest.Referred.DesignEntity.ID == configuration.ID)
{
this.expandedTestBenchType = this.testBenchType;
}
else
{
// create temp folder for test bench
CyPhy.Testing testing = CyPhyClasses.Testing.Cast(this.testBenchType.ParentContainer.Impl);
var tempFolderName = AnalysisModelProcessor.GetTemporaryFolderName(this.testBenchType.Impl);
CyPhy.Testing tempFolder = testing.Children.TestingCollection.FirstOrDefault(x => x.Name == tempFolderName);
if (tempFolder == null)
{
tempFolder = CyPhyClasses.Testing.Create(testing);
tempFolder.Name = tempFolderName;
this.AddToTraceabilityAndTemporary(tempFolder.Impl, testing.Impl, recursive: false);
}
// copy test bench
var tempCopy = (tempFolder.Impl as MgaFolder).CopyFCODisp(this.testBenchType.Impl as MgaFCO);
// fix name
tempCopy.Name = AnalysisModelProcessor.GetTemporaryObjectName(this.testBenchType.Impl, configuration.Impl);
this.AddToTraceabilityAndTemporary(tempCopy, this.testBenchType.Impl);
// set expanded property to the expanded element
this.expandedTestBenchType = CyPhyClasses.TestBenchType.Cast(tempCopy);
var tlsut = this.expandedTestBenchType.Children.TopLevelSystemUnderTestCollection.FirstOrDefault();
// switch references
try
{
// redirect SUT
var switcher = new ReferenceSwitcher.ReferenceSwitcherInterpreter();
switcher.SwitchReference(configuration.Impl as MgaFCO, tlsut.Impl as IMgaReference);
}
catch (Exception ex)
{
// handle failures for this (use case we can lose ports/connections/
// what if something is an instance/subtype/readonly etc...
throw new AnalysisModelExpandFailedException("ReferenceSwitcher failed.", ex);
}
// redirect TIPs
this.SwitchAllTipReferences();
}
}
开发者ID:metamorph-inc,项目名称:meta-core,代码行数:54,代码来源:TestBenchTypeProcessor.cs
示例16: EnsureComponentAssemblyFolder
/// <summary>
/// Given a component assembly, ensures that the component assembly has a backend folder
/// for storing resources. Creates a folder if necessary.
/// </summary>
/// <param name="ProjectDirectory">Directory in which the /designs/ folder resides. Defaults to project directory of <paramref name="componentAssembly"/></param>
/// <returns>The path of the ComponentAssembly folder, relative to the project root</returns>
public static String EnsureComponentAssemblyFolder(CyPhy.ComponentAssembly componentAssembly, string ProjectDirectory = null)
{
var mp_MgaProject = componentAssembly.Impl.Project;
String p_ProjectRoot = ProjectDirectory ?? mp_MgaProject.GetRootDirectoryPath();
if (string.IsNullOrEmpty(componentAssembly.Attributes.Path))
{
componentAssembly.Attributes.Path = GetRandomComponentAssemblyDir();
}
Directory.CreateDirectory(Path.Combine(p_ProjectRoot, componentAssembly.Attributes.Path));
return componentAssembly.Attributes.Path;
}
开发者ID:neemask,项目名称:meta-core,代码行数:19,代码来源:ComponentLibraryManager.cs
示例17: HydrostaticsSolverSettings
public HydrostaticsSolverSettings(CyPhy.HydrostaticsSolverSettings settings,
CyPhy.CFDTestBench testBench)
: base(settings,
testBench)
{
FluidMaterial = (MaterialType)(int)settings.Attributes.FluidMaterial;
FluidTemperature = settings.Attributes.FluidTemperature;
RollAngleStart = settings.Attributes.RollAngleStart;
RollAngleEnd = settings.Attributes.RollAngleEnd;
RollAngleStep = settings.Attributes.RollAngleStepSize;
PitchAngleStart = settings.Attributes.PitchAngleStart;
PitchAngleEnd = settings.Attributes.PitchAngleEnd;
PitchAngleStep = settings.Attributes.PitchAngleStepSize;
}
开发者ID:neemask,项目名称:meta-core,代码行数:14,代码来源:CFDConfig.cs
示例18: ParametricExplorationProcessor
public ParametricExplorationProcessor(CyPhy.ParametricExploration parametricExploration)
{
this.parametricExploration = parametricExploration;
this.OriginalSystemUnderTest = parametricExploration
.Children
.TestBenchRefCollection
.FirstOrDefault()
.Referred
.TestBenchType
.Children
.TopLevelSystemUnderTestCollection
.FirstOrDefault();
}
开发者ID:pombredanne,项目名称:metamorphosys-desktop,代码行数:14,代码来源:ParametricExplorationProcessor.cs
示例19: TestBenchSuiteProcessor
public TestBenchSuiteProcessor(CyPhy.TestBenchSuite testBenchSuite)
{
this.testBenchSuite = testBenchSuite;
this.OriginalSystemUnderTest = testBenchSuite
.Children
.TestBenchRefCollection
.FirstOrDefault()
.Referred
.TestBenchType
.Children
.TopLevelSystemUnderTestCollection
.FirstOrDefault();
}
开发者ID:metamorph-inc,项目名称:meta-core,代码行数:14,代码来源:TestBenchSuiteProcessor.cs
示例20: GetAllComponents
List<CyPhy.Component> GetAllComponents(CyPhy.Components componentsFolder)
{
List<CyPhy.Component> componentList = new List<CyPhy.Component>();
foreach (CyPhy.Components childComponentsFolder in componentsFolder.Children.ComponentsCollection)
{
componentList.AddRange(GetAllComponents(childComponentsFolder));
}
foreach (CyPhy.Component childComponent in componentsFolder.Children.ComponentCollection)
{
componentList.Add(childComponent);
}
return componentList;
}
开发者ID:neemask,项目名称:meta-core,代码行数:14,代码来源:CyPhyComponentExporter.cs
注:本文中的ISIS.GME.Dsml.CyPhyML.Interfaces类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论