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
MeshInsertProjectedPolygon
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
InteriorTriangles
Declaration
public int[] InteriorTriangles
Field Value
Mesh
Declaration
Field Value
ModifiedRegion
Declaration
public RegionOperator ModifiedRegion
Field Value
Type |
Description |
RegionOperator |
|
Polygon
Declaration
Field Value
Type |
Description |
Polygon2d |
|
ProjectFrame
Declaration
public Frame3f ProjectFrame
Field Value
RemovePolygonInterior
Declaration
public bool RemovePolygonInterior
Field Value
SeedTriangle
Declaration
Field Value
SimplifyInsertion
Declaration
public bool SimplifyInsertion
Field Value
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
Insert()
Declaration
Returns
Validate()
Declaration
public virtual ValidationStatus Validate()
Returns
Type |
Description |
ValidationStatus |
|