Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Get Floor Boundary Script #14

Open
gtalarico opened this issue Sep 5, 2018 · 0 comments
Open

Add Get Floor Boundary Script #14

gtalarico opened this issue Sep 5, 2018 · 0 comments

Comments

@gtalarico
Copy link
Owner

Remove rwp, simplify, document:

IronPython 2.7.7 (2.7.7.0) on .NET 4.0.30319.42000 (64-bit)

>>> doc
<Autodesk.Revit.DB.Document object at 0x000000000000054B [Autodesk.Revit.DB.Document]>

>>> rpw.db.Collector(of_class='RevitLinkInstance')
<rpw:Collector % ..DB.FilteredElementCollector | count:4>

>>> rpw.db.Collector(of_class='RevitLinkInstance').wrapped_elements
[<rpw:Element % ..DB.RevitLinkInstance | id:6846192>, <rpw:Element % ..DB.RevitLinkInstance | id:6847574>, <rpw:Element % ..DB.RevitLinkInstance | id:6847577>, <rpw:Element % ..DB.RevitLinkInstance | id:6923285>]

>>> rpw.db.Collector(of_class='RevitLinkInstance')[0]
<Autodesk.Revit.DB.RevitLinkInstance object at 0x000000000000054C [Autodesk.Revit.DB.RevitLinkInstance]>

>>> rpw.db.Collector(of_class='RevitLinkInstance')[0].Name
'Containers.rvt : 8 : location <Not Shared>'

>>> rpw.db.Collector(of_class='RevitLinkInstance')[1].Name
'AoR Model.rvt : 9 : location <Not Shared>'

>>> rpw.db.Collector(of_class='RevitLinkInstance')[2].Name
'BOG_Flormorado_EC.rvt : 10 : location <Not Shared>'

>>> ec = rpw.db.Collector(of_class='RevitLinkInstance')[2]

>>> ec
<Autodesk.Revit.DB.RevitLinkInstance object at 0x000000000000054D [Autodesk.Revit.DB.RevitLinkInstance]>

>>> rpw.db.Collector(doc=ec.Document, of_class='Floor')
<rpw:Collector % ..DB.FilteredElementCollector | count:17>

>>> rpw.db.Collector(doc=ec.Document, of_class='Floor')[3]
<Autodesk.Revit.DB.Floor object at 0x000000000000054E [Autodesk.Revit.DB.Floor]>

>>> rpw.db.Collector(doc=ec.Document, of_class='Floor')[3]
<Autodesk.Revit.DB.Floor object at 0x000000000000054F [Autodesk.Revit.DB.Floor]>

>>> rpw.db.Collector(doc=ec.Document, of_class='Floor')[4]
<Autodesk.Revit.DB.Floor object at 0x0000000000000550 [Autodesk.Revit.DB.Floor]>

>>> floor= rpw.db.Collector(doc=ec.Document, of_class='Floor')[4]

>>> Options
<type 'Options'>

>>> floor.get_Geometry(Options())
<Autodesk.Revit.DB.GeometryElement object at 0x0000000000000555 [Autodesk.Revit.DB.GeometryElement]>

>>> geo = floor.get_Geometry(Options())

>>> [g for g in geo]
[<Autodesk.Revit.DB.Solid object at 0x0000000000000556 [Autodesk.Revit.DB.Solid]>]

>>> solid = [g for g in geo][0]

>>> solid
<Autodesk.Revit.DB.Solid object at 0x0000000000000556 [Autodesk.Revit.DB.Solid]>

>>> solid.Faces
<Autodesk.Revit.DB.FaceArray object at 0x0000000000000557 [Autodesk.Revit.DB.FaceArray]>

>>> [f for f in solid.Faces]
[<Autodesk.Revit.DB.PlanarFace object at 0x0000000000000558 [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x0000000000000559 [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x000000000000055A [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x000000000000055B [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x000000000000055C [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x000000000000055D [Autodesk.Revit.DB.PlanarFace]>]

>>> faces = [f for f in solid.Faces]

>>> faces
[<Autodesk.Revit.DB.PlanarFace object at 0x000000000000055E [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x000000000000055F [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x0000000000000560 [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x0000000000000561 [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x0000000000000562 [Autodesk.Revit.DB.PlanarFace]>, <Autodesk.Revit.DB.PlanarFace object at 0x0000000000000563 [Autodesk.Revit.DB.PlanarFace]>]

>>> faces[0]
<Autodesk.Revit.DB.PlanarFace object at 0x000000000000055E [Autodesk.Revit.DB.PlanarFace]>

>>> f = faces[0]

>>> f.FaceNormal
<Autodesk.Revit.DB.XYZ object at 0x0000000000000564 [(0.000000000, 0.000000000, -1.000000000)]>

>>> faces[0].FaceNormal
<Autodesk.Revit.DB.XYZ object at 0x0000000000000565 [(0.000000000, 0.000000000, -1.000000000)]>

>>> faces[1].FaceNormal
<Autodesk.Revit.DB.XYZ object at 0x0000000000000566 [(0.000000000, 0.000000000, 1.000000000)]>

>>> faces[2].FaceNormal
<Autodesk.Revit.DB.XYZ object at 0x0000000000000567 [(1.000000000, 0.000000000, 0.000000000)]>

>>> faces[1].FaceNormal
<Autodesk.Revit.DB.XYZ object at 0x0000000000000568 [(0.000000000, 0.000000000, 1.000000000)]>

>>> top = faces[1]

>>> top
<Autodesk.Revit.DB.PlanarFace object at 0x000000000000055F [Autodesk.Revit.DB.PlanarFace]>

>>> top.EdgeLoops
<Autodesk.Revit.DB.EdgeArrayArray object at 0x000000000000056A [Autodesk.Revit.DB.EdgeArrayArray]>

>>> [e for e in top.EdgeLoops]
[<Autodesk.Revit.DB.EdgeArray object at 0x000000000000056B [Autodesk.Revit.DB.EdgeArray]>]

>>> top.GetEdgesAsCurveLoops()
List[CurveLoop]([<Autodesk.Revit.DB.CurveLoop object at 0x000000000000056C [Autodesk.Revit.DB.CurveLoop]>])

>>> curce = top.GetEdgesAsCurveLoops()

>>> curve = top.GetEdgesAsCurveLoops()

>>> curve
List[CurveLoop]([<Autodesk.Revit.DB.CurveLoop object at 0x000000000000056D [Autodesk.Revit.DB.CurveLoop]>])

>>> [c for c in curve]
[<Autodesk.Revit.DB.CurveLoop object at 0x000000000000056D [Autodesk.Revit.DB.CurveLoop]>]

>>> curve
List[CurveLoop]([<Autodesk.Revit.DB.CurveLoop object at 0x000000000000056D [Autodesk.Revit.DB.CurveLoop]>])

>>> curve[0]
<Autodesk.Revit.DB.CurveLoop object at 0x000000000000056D [Autodesk.Revit.DB.CurveLoop]>

>>> [c for c in curve[0]]
[<Autodesk.Revit.DB.Line object at 0x000000000000056E [Autodesk.Revit.DB.Line]>, <Autodesk.Revit.DB.Line object at 0x000000000000056F [Autodesk.Revit.DB.Line]>, <Autodesk.Revit.DB.Line object at 0x0000000000000570 [Autodesk.Revit.DB.Line]>, <Autodesk.Revit.DB.Line object at 0x0000000000000571 [Autodesk.Revit.DB.Line]>]

>>> [c for c in curve[0]][0]
<Autodesk.Revit.DB.Line object at 0x0000000000000572 [Autodesk.Revit.DB.Line]>

>>> line = [c for c in curve[0]][0]

>>> line.GetEndParameter(0)
0.0

>>> line
<Autodesk.Revit.DB.Line object at 0x0000000000000573 [Autodesk.Revit.DB.Line]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant