Search Results for

    Show / Hide Table of Contents

    Class MeshInsertProjectedPolygon

    Inserts a polygon into a mesh using a planar projection. You provide a projection frame and either the polygon in the frame's XY-coordinate system, or a DCurve3 space curve that will be projected.

    Currently you must also provide a seed triangle, that intersects the curve. We flood-fill from the vertices of that triangle to find the interior vertices, and hence the set of faces that are modified.

    The insertion operation splits the existing mesh edges, so the inserted polygon will have more segments than the input polygon, in general. If you set SimplifyInsertion = true, then we collapse these extra edges, so you (should) get back an edge loop with the same number of vertices. However, on a non-planar mesh this means the edges will no longer lie on the input surface.

    If RemovePolygonInterior = true, the faces inside the polygon are deleted

    returns: ModifiedRegion: this is the RegionOperator created to subset the mesh for editing. You can use this to access the modified mesh

    InsertedPolygonVerts: the output vertex ID for Polygon[i]. This does not include the intermediate vertices, it's a 1-1 correspondence.

    InsertedLoop: inserted edge loop on output mesh

    InteriorTriangles: the triangles inside the polygon, null if RemovePolygonInterior=true

    If you would like to change the behavior after the insertion is computed, you can subclass and override BackPropagate().

    [TODO] currently we construct a planar BVTree (but 3D) to map the new vertices to 3D via barycentric interpolation. However we could do this inline. MeshInsertUVPolyCurve needs to fully support working on separate coordinate set (it tries via Get/Set PointF, but it is not 100% working), and it needs to let client know about poke and split events, w/ bary-coords, so that we can compute the new 3D positions.

    Inheritance
    Object
    MeshInsertProjectedPolygon
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: gs
    Assembly: cs.temp.dll.dll
    Syntax
    public class MeshInsertProjectedPolygon

    Constructors

    MeshInsertProjectedPolygon(DMesh3, DCurve3, Frame3f, Int32)

    create Polygon by projecting polygon3 into frame

    Declaration
    public MeshInsertProjectedPolygon(DMesh3 mesh, DCurve3 polygon3, Frame3f frame, int seedTri)
    Parameters
    Type Name Description
    DMesh3 mesh
    DCurve3 polygon3
    Frame3f frame
    Int32 seedTri

    MeshInsertProjectedPolygon(DMesh3, Polygon2d, Frame3f, Int32)

    insert polygon in given frame

    Declaration
    public MeshInsertProjectedPolygon(DMesh3 mesh, Polygon2d poly, Frame3f frame, int seedTri)
    Parameters
    Type Name Description
    DMesh3 mesh
    Polygon2d poly
    Frame3f frame
    Int32 seedTri

    Fields

    InsertedLoop

    Declaration
    public EdgeLoop InsertedLoop
    Field Value
    Type Description
    EdgeLoop

    InsertedPolygonVerts

    Declaration
    public int[] InsertedPolygonVerts
    Field Value
    Type Description
    Int32[]

    InteriorTriangles

    Declaration
    public int[] InteriorTriangles
    Field Value
    Type Description
    Int32[]

    Mesh

    Declaration
    public DMesh3 Mesh
    Field Value
    Type Description
    DMesh3

    ModifiedRegion

    Declaration
    public RegionOperator ModifiedRegion
    Field Value
    Type Description
    RegionOperator

    Polygon

    Declaration
    public Polygon2d Polygon
    Field Value
    Type Description
    Polygon2d

    ProjectFrame

    Declaration
    public Frame3f ProjectFrame
    Field Value
    Type Description
    Frame3f

    RemovePolygonInterior

    Declaration
    public bool RemovePolygonInterior
    Field Value
    Type Description
    Boolean

    SeedTriangle

    Declaration
    public int SeedTriangle
    Field Value
    Type Description
    Int32

    SimplifyInsertion

    Declaration
    public bool SimplifyInsertion
    Field Value
    Type Description
    Boolean

    Methods

    BackPropagate(RegionOperator, Int32[], EdgeLoop)

    Declaration
    protected virtual bool BackPropagate(RegionOperator regionOp, int[] insertedPolyVerts, EdgeLoop insertedLoop)
    Parameters
    Type Name Description
    RegionOperator regionOp
    Int32[] insertedPolyVerts
    EdgeLoop insertedLoop
    Returns
    Type Description
    Boolean

    Insert()

    Declaration
    public bool Insert()
    Returns
    Type Description
    Boolean

    Validate()

    Declaration
    public virtual ValidationStatus Validate()
    Returns
    Type Description
    ValidationStatus
    In This Article
    Back to top ViRGIS VR GIS