Show / Hide Table of Contents

    Class ImportMeshElement

    An element definition whose representation is provided by an imported mesh like an STL.

    Examples
    var path = "../../../models/STL/Hilti_2008782_Speed lock clevis hanger MH-SLC 2_ EG_2.stl";
    var shiny = new Material("shiny", Colors.Red, 1.0, 0.9);
    var bracket = new ImportMeshElement(path, Units.LengthUnit.Millimeter, shiny);
    model.AddElement(bracket);
    
    var brackets = new List<ElementInstance>();
    for (var u = 0; u < 360.0; u += 20)
    {
        var t = new Transform(new Vector3(1, 0, 0));
        t.Rotate(Vector3.ZAxis, u);
        var instance = bracket.CreateInstance(t, $"Component_{u}");
        model.AddElement(instance);
    }
    
    Inheritance
    System.Object
    Element
    GeometricElement
    MeshElement
    ImportMeshElement
    Implements
    System.ComponentModel.INotifyPropertyChanged
    ITessellate
    Inherited Members
    MeshElement._mesh
    MeshElement.Mesh
    MeshElement.Tessellate(Mesh, Transform, Color)
    GeometricElement.Bounds
    GeometricElement.Transform
    GeometricElement.Material
    GeometricElement.Representation
    GeometricElement.IsElementDefinition
    GeometricElement.ModifyVertexAttributes
    GeometricElement.UpdateRepresentations()
    GeometricElement.UpdateBoundsAndComputeSolid(Boolean)
    GeometricElement.CreateInstance(Transform, String)
    GeometricElement.ToMesh(Boolean)
    GeometricElement.HasGeometry()
    GeometricElement.Intersects(Plane, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Line>>)
    GeometricElement.TryToGraphicsBuffers(List<GraphicsBuffers>, String, Nullable<MeshPrimitive.ModeEnum>)
    Element.Id
    Element.Name
    Element.AdditionalProperties
    Element.PropertyChanged
    Element.RaisePropertyChanged(String)
    Element.SetMapping(String, MappingBase)
    Element.GetMapping(String)
    Element.GetMapping<T>(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements
    Assembly: Hypar.Elements.dll
    Syntax
    public sealed class ImportMeshElement : MeshElement, INotifyPropertyChanged, ITessellate

    Constructors

    ImportMeshElement(String, Units.LengthUnit, Material, Guid, String)

    Construct an import mesh element.

    Declaration
    public ImportMeshElement(string path, Units.LengthUnit lengthUnit, Material material = null, Guid id = default(Guid), string name = null)
    Parameters
    Type Name Description
    System.String path

    The path to the element's mesh on disk.

    Units.LengthUnit lengthUnit

    The length unit used in the provided mesh.

    Material material

    The element's material.

    System.Guid id

    The element's id.

    System.String name

    The element's name.

    Properties

    Path

    The path to the element's mesh on disk.

    Declaration
    public string Path { get; }
    Property Value
    Type Description
    System.String

    Implements

    System.ComponentModel.INotifyPropertyChanged
    ITessellate

    Extension Methods

    ElementProxyExtensions.Proxy<T>(T, String)
    Identity.AddOverrideIdentity(Element, IOverride)
    Identity.AddOverrideIdentity(Element, String, String, Object)
    Identity.AddOverrideValue(Element, String, Object)
    Identity.OverrideIds<T>(Element, String)
    In This Article
    • Constructors
      • ImportMeshElement(String, Units.LengthUnit, Material, Guid, String)
    • Properties
      • Path
    • Implements
    • Extension Methods