Files
2024-12-12 09:51:40 +01:00

72 lines
6.8 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 RoofsRooms\line\b Revit Platform:\b0 Architecture, MEP\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2009.1\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Rooms/Spaces\line\b Type:\b0 ExternalCommand\line\par
\b Subject:\b0 Geometry checking for Roofs and Rooms (Spaces).\line\b Summary:\b0 \line This sample demonstrates how to check whether Room/Space has bounding Roof, this sample try to work consistently with Revit on bounding checking when exporting gbXML.\f1\par
\f0\par
\lang1031\b Classes:\b0 \f1\par
\pard\ltrpar\nowidctlpar\fi360\f0 Autodesk.Revit.DB.BoundingBoxIntersectsFilter\par
Autodesk.Revit.DB.Mechanical.SpaceFilter \par
Autodesk.Revit.DB.Architecture.RoomFilter\par
Autodesk.Revit.DB.ElementCategoryFilter\par
Autodesk.Revit.DB.FilteredElementCollector\par
Autodesk.Revit.DB.\lang1033 LogicalOrFilter\lang1031\par
Autodesk.Revit.DB.Architecture.Room\par
Autodesk.Revit.DB.Mechanical.Space\par
Autodesk.Revit.DB.BuiltInCategory\par
Autodesk.Revit.DB.Options\par
Autodesk.Revit.DB.BoundingBoxXYZ\par
Autodesk.Revit.DB.GeometryObject\par
Autodesk.Revit.DB.Solid\par
Autodesk.Revit.DB.Face\par
Autodesk.Revit.DB.PlanarFace\par
Autodesk.Revit.DB.ConicalFace\par
Autodesk.Revit.DB.CylindricalFace\par
Autodesk.Revit.DB.RevolvedFace\par
Autodesk.Revit.DB.HermiteFace\par
Autodesk.Revit.DB.RuledFace\par
Autodesk.Revit.DB.Curve\par
Autodesk.Revit.DB.EdgeArray\par
Autodesk.Revit.DB.Edge\par
Autodesk.Revit.DB.XYZArray\par
Autodesk.Revit.DB.XYZ\par
Autodesk.Revit.DB.IntersectionResult\par
\pard\ltrpar\nowidctlpar\f1\par
\lang1033\b\f0 Project Files\b0 : \par
Command.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class RoofsRooms which inherits from IExternalCommmand interface and implements the Execute method; some methods of class are used to retrieve Room/Space and Roof elements\f1 .\par
\pard\ltrpar\nowidctlpar\f0 GeomUtil.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class works as the geometry utility. Methods of this class will be used to check if two solids are intersected, two faces overlap, etc.\par
\pard\ltrpar\nowidctlpar\tx720\f1\par
\pard\ltrpar\nowidctlpar\par
\b\f0 Description\b0 : \par
Functionalities:\par
\pard\ltrpar\nowidctlpar\fi-420\li780\tx780 -\tab Retrieve all Rooms (Space) and Roofs from current project and check them separately\f1 .\par
\pard\ltrpar\nowidctlpar\fi-420\li780\f0 -\tab Check solid geometry of Rooms (Space) and Roofs, check if solid faces of them are coincident or overlap; if some faces of Room (Space) and Roof overlap, Roof will be regarded as bounding of Room (Space)\f1 .\par
\pard\ltrpar\nowidctlpar\par
\f0 Implementation: \par
\pard\ltrpar\nowidctlpar\fi-420\li780\tx780 -\tab To retrieve all Room and Space elements together in current document create separated \lang1031 RoomFilter\lang1033 and \lang1031 SpaceFilter, \lang1033 and then create LogicalOrFilter for them\f1 .\par
\pard\ltrpar\nowidctlpar\fi-420\li780\f0 -\tab To retrieve all Roof elements in current document use ElementCategoryFilter (BuiltInCategory for Roof and Roof Soffit are OST_Roofs and OST_RoofSoffit separately)\f1 .\par
\f0 -\tab Before checking solid geometry, using BoundingBoxIntersectsFilter to check if Room intersects Roof, skip solid checking if BoundingBox of Room and Roof cannot intersect. \f1\par
\pard\ltrpar\nowidctlpar\fi-420\li780\tx780\f0 -\tab To get solid geometry data of Room use Room.ClosedShell.Objects property. \par
\pard\ltrpar\nowidctlpar\fi-420\li780 -\tab To get solid geometry data of Space use Space.ClosedShell.Objects property. \par
\pard\ltrpar\nowidctlpar\fi-420\li780\tx780 -\tab To get all geometry elements of Roof use Element.get_Geometry(Geometry.Options). Objects property\f1\par
\pard\ltrpar\nowidctlpar\fi-420\li780\f0 -\tab To get Face arrays of solid object use Solid.Faces property. \par
-\tab Elements.Face is a base class; the derived classes are PlanarFace, PlanarFace, ConicalFace, CylindricalFace, RevolvedFace, HermiteFace and RuledFace. \f1\par
\f0 -\tab PlanarFace.Origin and Normal properties will be used to check if two Planar Faces are coincident. Maybe the Normals of faces are opposite, and then we can calculate the project distance by using Face.Project(XYZ) method to check if point is in face. \f1\par
\f0 -\tab ConicalFace.Axis, Origin properties and get_Radius(int) method will be used to check if two ConicalFaces are coincident.\f1\par
\f0 -\tab CylindricalFace.Axis, Origin properties and get_Radius(int) method will be used to check if two CylindricalFaces are coincident.\par
-\tab RevolvedFace.Axis, Origin properties andCurve properties will be used to check if two RevolvedFace are coincident; to get points of curve use Curve.Tessellate() method.\f1\par
\f0 -\tab HermiteFace.Points and MixedDerivs properties can be used to check if two HermiteFaces are coincident. \f1\par
\f0 -\tab RuledFace.get_Curve(int) and get_Point(int) methods can be used to retrieve the curve and points of RuledFace, and then use those points and curves to check if two RuledFaces are coincident\f1 .\par
\pard\ltrpar\nowidctlpar\li360\par
\pard\ltrpar\nowidctlpar\b\f0 Instructions:\cf1\b0 \cf0\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Run Revit, draw some Rooms (Spaces) and then bind Roofs to them, you can adjust the \ldblquote Upper Limit\rdblquote and \ldblquote Limit Offset\rdblquote parameters of Rooms (Spaces), \ldblquote Base Level\rdblquote and \ldblquote Base Offset from Level\rdblquote parameters of Roofs. One Architecture sample model (RoofsRooms.rvt) with Rooms and one MEP sample model (MEPRoofsRooms.rvt) with Space are provided under sample project folder. \par
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Run the external command, command will pop up the bounding check results. \par
\pard\ltrpar\nowidctlpar\sl360\slmult1\f1\par
\pard\ltrpar\nowidctlpar\b\f0 Note:\cf1\b0 \cf0\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Before running this external command\f1 ,\f0 please ensure you have turned on \ldblquote Areas and Volumes\rdblquote option in [Settings] - [Area and Volume Computations\'85] - \ldblquote Computations\rdblquote tab\f1 .\f0\par
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Ensure the \ldblquote Room Bounding\rdblquote parameter is checked in element properties dialog of Roof, otherwise the Roof will not be bounding of Room. \par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 3.\tab Currently, Sloped Glazing Roof is not supported by this sample. \par
\pard\ltrpar\nowidctlpar\sl360\slmult1\f1\par
}