C# 클래스 BuildingCoder.Creator

파일 보기 프로젝트 열기: jeremytammik/the_building_coder_samples 1 사용 예제들

공개 메소드들

메소드 설명
CreateModelCurve ( Curve curve ) : ModelCurve
CreateModelCurves ( Curve curve ) : ModelCurveArray
CreateModelLine ( Document doc, XYZ p, XYZ q ) : ModelLine

Create a model line between the two given points. Internally, it creates an arbitrary sketch plane given the model line end points.

Creator ( Document doc ) : System
DrawFaceTriangleNormals ( Face f ) : void
DrawPolygon ( List loop ) : void
DrawPolygons ( List loops ) : void

비공개 메소드들

메소드 설명
CreateModelCurve ( Curve curve, XYZ origin, XYZ normal ) : ModelCurve
GetCurveNormal ( Curve curve ) : XYZ

Determine the plane that a given curve resides in and return its normal vector. Ask the curve for its start and end points and some point in the middle. The latter can be obtained by asking the curve for its parameter range and evaluating it in the middle, or by tessellation. In case of tessellation, you could iterate through the tessellation points and use each one together with the start and end points to try and determine a valid plane. Once one is found, you can add debug assertions to ensure that the other tessellation points (if there are any more) are in the same plane. In the case of the line, the tessellation only returns two points. I once heard that that is the only element that can do that, all non-linear curves return at least three. So you could use this property to determine that a line is a line (and add an assertion as well, if you like). Update, later: please note that the Revit API provides an overload of the NewPlane method taking a CurveArray argument.

NewSketchPlaneContainCurve ( Curve curve ) : SketchPlane

Return a new sketch plane containing the given curve. Update, later: please note that the Revit API provides an overload of the NewPlane method taking a CurveArray argument, which could presumably be used instead.

NewSketchPlanePassLine ( System.Line line ) : SketchPlane

메소드 상세

CreateModelCurve() 공개 메소드

public CreateModelCurve ( Curve curve ) : ModelCurve
curve Curve
리턴 ModelCurve

CreateModelCurves() 공개 메소드

public CreateModelCurves ( Curve curve ) : ModelCurveArray
curve Curve
리턴 ModelCurveArray

CreateModelLine() 공개 정적인 메소드

Create a model line between the two given points. Internally, it creates an arbitrary sketch plane given the model line end points.
public static CreateModelLine ( Document doc, XYZ p, XYZ q ) : ModelLine
doc Document
p XYZ
q XYZ
리턴 ModelLine

Creator() 공개 메소드

public Creator ( Document doc ) : System
doc Document
리턴 System

DrawFaceTriangleNormals() 공개 메소드

public DrawFaceTriangleNormals ( Face f ) : void
f Face
리턴 void

DrawPolygon() 공개 메소드

public DrawPolygon ( List loop ) : void
loop List
리턴 void

DrawPolygons() 공개 메소드

public DrawPolygons ( List loops ) : void
loops List
리턴 void