C# Class Revit.SDK.Samples.CurtainWallGrid.CS.GridGeometry

manages the behaviors & operations of CurtainGrid
Datei anzeigen Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
AddAllMullions ( ) : void

add mullions to all the segments of the curtain grid due to the limitations of Mullions, it's not available yet to add mullions to the edges of the curtain grid as Revit UI does

AddAllSegments ( ) : void

add all the deleted segments back for a grid line

AddSegment ( ) : void

add a new segment to the specified location

AddUGridLine ( ) : void

add a new U grid line to the specified location

AddVGridLine ( ) : void

add a new V grid line to the specified location

DeleteAllMullions ( ) : void

delete all the mullions of the curtain grid

GetLineToBeMoved ( ) : bool

get the grid line to be removed

GridGeometry ( MyDocument myDoc ) : System

constructor

LockOrUnlockSelectedGridLine ( ) : void

toggle the selected grid line's Lock status: if it's locked, unlock it, vice versa

MoveGridLine ( System mousePosition ) : bool

move the selected grid line to the location of the mouse cursor

ReloadGeometryData ( ) : void

reload all the geometry data of the curtain grid (grid lines, vertexes, and convert them to 2D format)

ReloadGridProperties ( ) : void

obtain all the properties of the curtain grid

RemoveSegment ( ) : void

remove the selected segment from the curtain grid

Private Methods

Method Description
GetCurtainGridVertexes ( ) : bool

get all of the 4 vertexes of the curtain grid

GetPoints ( CurtainCellSet cells ) : List

get all the vertexes of the curtain cells

GetULines ( ) : void

get all the U grid lines' data of the curtain grid

GetVLines ( ) : void

get all the V grid lines' data of the curtain grid

GetVertexesByCells ( CurtainCellSet cells, Autodesk &minXYZ, Autodesk &maxXYZ ) : void

get the vertexes of the bounding box which covers all the curtain cells

GetVertexesByPoints ( List points, Autodesk &minXYZ, Autodesk &maxXYZ ) : void

get a bounding box which covers all the input points

MimicRecursiveDelete ( bool &canRemove, SegmentLine2D segLine2D, List removeList ) : void

the "regeneration" step: if there're only 2 segments existing in one joint and they're in the same line, delete one seg will cause the other been deleted automatically

MimicRemoveSegment ( bool &canRemove, SegmentLine2D seg, List removeList ) : void

remove the segment from the grid line

MimicRemoveSegments ( bool &canRemove, List removeList ) : void

a simulative "Delete Segment" operation before real deletion as we may occur some situations that prevent us to delete the specific segment for example, delete the specific segment will make some other segments to be deleted automatically (the "conjoint" ones) and the "automatically deleted" segment is the last segment of its parent grid line in this situation, we should prevent deleting that specific segment and rollback all the simulative deletion

Method Details

AddAllMullions() public method

add mullions to all the segments of the curtain grid due to the limitations of Mullions, it's not available yet to add mullions to the edges of the curtain grid as Revit UI does
public AddAllMullions ( ) : void
return void

AddAllSegments() public method

add all the deleted segments back for a grid line
public AddAllSegments ( ) : void
return void

AddSegment() public method

add a new segment to the specified location
public AddSegment ( ) : void
return void

AddUGridLine() public method

add a new U grid line to the specified location
public AddUGridLine ( ) : void
return void

AddVGridLine() public method

add a new V grid line to the specified location
public AddVGridLine ( ) : void
return void

DeleteAllMullions() public method

delete all the mullions of the curtain grid
public DeleteAllMullions ( ) : void
return void

GetLineToBeMoved() public method

get the grid line to be removed
public GetLineToBeMoved ( ) : bool
return bool

GridGeometry() public method

constructor
public GridGeometry ( MyDocument myDoc ) : System
myDoc MyDocument /// the document of the sample ///
return System

LockOrUnlockSelectedGridLine() public method

toggle the selected grid line's Lock status: if it's locked, unlock it, vice versa
public LockOrUnlockSelectedGridLine ( ) : void
return void

MoveGridLine() public method

move the selected grid line to the location of the mouse cursor
public MoveGridLine ( System mousePosition ) : bool
mousePosition System /// indicates the destination position of the grid line ///
return bool

ReloadGeometryData() public method

reload all the geometry data of the curtain grid (grid lines, vertexes, and convert them to 2D format)
public ReloadGeometryData ( ) : void
return void

ReloadGridProperties() public method

obtain all the properties of the curtain grid
public ReloadGridProperties ( ) : void
return void

RemoveSegment() public method

remove the selected segment from the curtain grid
public RemoveSegment ( ) : void
return void