public JtPlacement2dInt( FamilyInstance fi ) { LocationPoint lp = fi.Location as LocationPoint; Debug.Assert( null != lp, "expected valid family instanace location point" ); Translation = new Point2dInt( lp.Point ); Rotation = Util.ConvertRadiansToDegrees( lp.Rotation ); SymbolId = fi.Symbol.UniqueId; }
/// <summary> /// Create a dummy placement for a non-instance /// part, i.e. a nomral BIM element with a given /// unique id, just for GeoSnoop graphical /// debugging purposes. /// </summary> public JtPlacement2dInt( string uidPart ) { Translation = new Point2dInt( 0, 0 ); Rotation = 0; SymbolId = uidPart; }
/// <summary> /// Expand bounding box to contain /// the given new point. /// </summary> public void ExpandToContain( Point2dInt p ) { if( p.X < xmin ) { xmin = p.X; } if( p.Y < ymin ) { ymin = p.Y; } if( p.X > xmax ) { xmax = p.X; } if( p.Y > ymax ) { ymax = p.Y; } }