public IXbimWire CreateWire(IIfcCompositeCurveSegment compCurveSeg, ILogger logger) { using (new Tracer(LogHelper.CurrentFunctionName(), this._logger, compCurveSeg)) { return(_engine.CreateWire(compCurveSeg, logger)); } }
public IIfcElement CreatePyramid( ref List <IIfcProduct> elements, double height, double botX, double botY, double topX, double topY, double deltaX, double deltaY, Guid guid) { List <IIfcCompositeCurveSegment> Segments = new List <IIfcCompositeCurveSegment>(); IfcAxis2Placement beamLocation = new IfcAxis2Placement(IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(this.Position.get_X(), this.Position.get_Y(), this.Position.get_Z()), this.DirZ, this.DirX)); IIfcAxis2Placement2D axis2Placement2D = IfcTools.CreateAxis2Placement2D(IfcTools.CreatePoint(0.0, 0.0), IfcTools.CreateDirection(1.0, 0.0)); List <IIfcAxis2Placement3D> CrossSectionPositions = new List <IIfcAxis2Placement3D>() { IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(-deltaX / 2.0, -deltaY / 2.0, -height / 2.0), IfcTools.CreateDirection(0.0, 0.0, 1.0), IfcTools.CreateDirection(1.0, 0.0, 0.0)), IfcTools.CreateAxis2Placement3D(IfcTools.CreatePoint(deltaX / 2.0, deltaY / 2.0, height / 2.0), IfcTools.CreateDirection(0.0, 0.0, 1.0), IfcTools.CreateDirection(1.0, 0.0, 0.0)) }; List <IIfcProfileDef> CrossSections = new List <IIfcProfileDef>() { (IIfcProfileDef)IfcTools.IfcDatabase.CreateIfcRectangleProfileDef(new IfcProfileTypeEnum?(IfcProfileTypeEnum.IFC_AREA), (IfcLabel)string.Empty, axis2Placement2D, (IfcPositiveLengthMeasure)botX, (IfcPositiveLengthMeasure)botY), (IIfcProfileDef)IfcTools.IfcDatabase.CreateIfcRectangleProfileDef(new IfcProfileTypeEnum?(IfcProfileTypeEnum.IFC_AREA), (IfcLabel)string.Empty, axis2Placement2D, (IfcPositiveLengthMeasure)topX, (IfcPositiveLengthMeasure)topY) }; IIfcCompositeCurveSegment compositeCurveSegment = IfcTools.IfcDatabase.CreateIfcCompositeCurveSegment(new IfcTransitionCode?(IfcTransitionCode.IFC_CONTINUOUS), new bool?(true), (IIfcCurve)IfcTools.IfcDatabase.CreateIfcPolyline(new List <IIfcCartesianPoint>() { IfcTools.CreatePoint(-deltaX / 2.0, -deltaY / 2.0, -height / 2.0), IfcTools.CreatePoint(deltaX / 2.0, deltaY / 2.0, height / 2.0) })); Segments.Add(compositeCurveSegment); IIfcProductDefinitionShape productDefinitionShape = IfcTools.IfcDatabase.CreateIfcProductDefinitionShape((IfcLabel)null, (IfcText)null, new List <IIfcRepresentation>() { IfcTools.CreateShapeRepresentation((IIfcRepresentationItem)IfcTools.IfcDatabase.CreateIfcSectionedSpine(IfcTools.IfcDatabase.CreateIfcCompositeCurve(Segments, new LogicalEnum?(LogicalEnum.IFC_FALSE)), CrossSections, CrossSectionPositions), "Body", "SectionedSpine") }); IIfcBeam beam = IfcTools.CreateBeam(beamLocation, (IIfcProductRepresentation)productDefinitionShape, guid); IfcTools.AddQuantities((IIfcObject)beam); IfcTools.AddColorToElement((IIfcElement)beam, "green"); IfcTools.AddMaterialToElement(new List <IIfcRoot>() { (IIfcRoot)beam }, "Undefined"); if (!string.IsNullOrEmpty(this.Reference)) { Dictionary <string, object> attributes = new Dictionary <string, object>() { { "PDMS_ID", (object)(IfcLabel)this.Reference } }; IfcTools.AddProperties((IIfcObject)beam, "PDMS Common", attributes); } elements.Add((IIfcProduct)beam); return((IIfcElement)beam); }
private static void Report(IIfcCompositeCurveSegment ifcCompositeCurveSegment, TextHighliter sb) { Report(ifcCompositeCurveSegment.ParentCurve, sb); }
public IXbimWire CreateWire(IIfcCompositeCurveSegment compCurveSeg) { return(_engine.CreateWire(compCurveSeg)); }