From f704340f2b1a5eac14c128fa21148fbe19d76282 Mon Sep 17 00:00:00 2001 From: Tomas Pavlicek Date: Fri, 9 Aug 2019 14:12:29 +0200 Subject: [PATCH 01/39] Enhance Radius dimension drawing --- src/Mod/TechDraw/Gui/QGIArrow.cpp | 21 +- src/Mod/TechDraw/Gui/QGIArrow.h | 9 +- src/Mod/TechDraw/Gui/QGIViewDimension.cpp | 450 +++++++++++++----- src/Mod/TechDraw/Gui/QGIViewDimension.h | 20 + .../TechDraw/Gui/ViewProviderDimension.cpp | 9 +- src/Mod/TechDraw/Gui/ViewProviderDimension.h | 3 +- 6 files changed, 368 insertions(+), 144 deletions(-) diff --git a/src/Mod/TechDraw/Gui/QGIArrow.cpp b/src/Mod/TechDraw/Gui/QGIArrow.cpp index 8c56c6ede3..001ef5739b 100644 --- a/src/Mod/TechDraw/Gui/QGIArrow.cpp +++ b/src/Mod/TechDraw/Gui/QGIArrow.cpp @@ -45,10 +45,10 @@ QGIArrow::QGIArrow() : m_fill(Qt::SolidPattern), m_size(5.0), m_style(0), + m_flipped(false), m_dirMode(false), m_dir(Base::Vector3d(1.0,0.0,0.0)) { - isFlipped = false; m_brush.setStyle(m_fill); setCacheMode(QGraphicsItem::NoCache); @@ -57,43 +57,38 @@ QGIArrow::QGIArrow() : setFlag(QGraphicsItem::ItemIsMovable, false); } - -void QGIArrow::flip(bool state) { - isFlipped = state; -} - void QGIArrow::draw() { QPainterPath path; if (m_style == 0) { if (m_dirMode) { path = makeFilledTriangle(getDirection(), m_size,m_size/6.0); } else { - path = makeFilledTriangle(m_size,m_size/6.0,isFlipped); //"arrow l/w sb 3/1" ?? + path = makeFilledTriangle(m_size,m_size/6.0,isFlipped()); //"arrow l/w sb 3/1" ?? } } else if (m_style == 1) { if (m_dirMode) { path = makeOpenArrow(getDirection(), m_size,m_size/3.0); //broad arrow? } else { - path = makeOpenArrow(m_size,m_size/3.0,isFlipped); + path = makeOpenArrow(m_size,m_size/3.0,isFlipped()); } } else if (m_style == 2) { if (m_dirMode) { path = makeHashMark(getDirection(), m_size/2.0,m_size/2.0); //big enough? } else { - path = makeHashMark(m_size/2.0,m_size/2.0,isFlipped); //big enough? + path = makeHashMark(m_size/2.0,m_size/2.0,isFlipped()); //big enough? } } else if (m_style == 3) { - path = makeDot(m_size/2.0,m_size/2.0,isFlipped); + path = makeDot(m_size/2.0,m_size/2.0,isFlipped()); } else if (m_style == 4) { - path = makeOpenDot(m_size/2.0,m_size/2.0,isFlipped); + path = makeOpenDot(m_size/2.0,m_size/2.0,isFlipped()); } else if (m_style == 5) { if (m_dirMode) { path = makeForkArrow(getDirection(), m_size/2.0,m_size/2.0); //big enough? } else { - path = makeForkArrow(m_size/2.0,m_size/2.0,isFlipped); //big enough? + path = makeForkArrow(m_size/2.0,m_size/2.0,isFlipped()); //big enough? } } else { - path = makeFilledTriangle(m_size,m_size/6.0,isFlipped); //sb a question mark or ??? + path = makeFilledTriangle(m_size,m_size/6.0,isFlipped()); //sb a question mark or ??? } setPath(path); } diff --git a/src/Mod/TechDraw/Gui/QGIArrow.h b/src/Mod/TechDraw/Gui/QGIArrow.h index 7c5215a1d7..9074a4b7ab 100644 --- a/src/Mod/TechDraw/Gui/QGIArrow.h +++ b/src/Mod/TechDraw/Gui/QGIArrow.h @@ -46,15 +46,18 @@ public: public: void draw(); - void flip(bool state); + bool isFlipped() { return m_flipped; } + void setFlipped(bool flipped) { m_flipped = flipped; } + void flip() { m_flipped = !m_flipped; } double getSize() { return m_size; } void setSize(double s); int getStyle() { return m_style; } void setStyle(int s) { m_style = s; } bool getDirMode() { return m_dirMode; } void setDirMode(bool b) { m_dirMode = b; } - Base::Vector3d getDirection(void) { return m_dir; } + Base::Vector3d getDirection(void) { return m_flipped ? -m_dir : m_dir; } void setDirection(Base::Vector3d v) { m_dir = v; } + void setDirection(double angle) { m_dir = Base::Vector3d(cos(angle), sin(angle), 0.0); } static int getPrefArrowStyle(); static double getPrefArrowSize(); static double getOverlapAdjust(int style, double size); @@ -78,7 +81,7 @@ private: Qt::BrushStyle m_fill; double m_size; int m_style; - bool isFlipped; + bool m_flipped; bool m_dirMode; Base::Vector3d m_dir; }; diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp index 7eef5d5d0a..9964af89fd 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp @@ -69,6 +69,10 @@ #include "ViewProviderDimension.h" #include "DrawGuiUtil.h" +#ifndef M_2PI + #define M_2PI 6.283185307179586476925287 +#endif + //TODO: hide the Qt coord system (+y down). using namespace TechDraw; @@ -182,8 +186,7 @@ void QGIDatumLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt QStyleOptionGraphicsItem myOption(*option); myOption.state &= ~QStyle::State_Selected; -// painter->drawRect(boundingRect()); //good for debugging - + //painter->drawRect(boundingRect()); //good for debugging } void QGIDatumLabel::setPosFromCenter(const double &xCenter, const double &yCenter) @@ -1171,127 +1174,7 @@ void QGIViewDimension::draw() // dim->getViewPart()->addVertex(curveCenter,true); // } } else if(strcmp(dimType, "Radius") == 0) { - // preferred terminology: Dimension Text, Dimension Line(s), Extension Lines, Arrowheads - // radius gets 1 dimension line from the dimension text to a point on the curve - Base::Vector3d pointOnCurve,curveCenter; - double radius; - arcPoints pts = dim->getArcPoints(); - bool isArc = pts.isArc; - radius = Rez::guiX(pts.radius); - curveCenter = Rez::guiX(pts.center); - pointOnCurve = Rez::guiX(pts.onCurve.first); - QRectF mappedRect = mapRectFromItem(datumLabel, datumLabel->boundingRect()); - lblCenter = Base::Vector3d(mappedRect.center().x(), mappedRect.center().y(), 0.0); - - // Note Bounding Box size is not the same width or height as text (only used for finding center) - float bbX = datumLabel->boundingRect().width(); - float bbY = datumLabel->boundingRect().height(); - datumLabel->setTransformOriginPoint(bbX / 2, bbY /2); - datumLabel->setRotation(0.0); //label is always right side up & horizontal - - //if inside the arc (len(DimLine < radius)) arrow goes from center to edge away from label - //if outside the arc arrow kinks, then goes to edge nearest label - bool outerPlacement = false; - if ((lblCenter - curveCenter).Length() > radius) { //label is outside circle - outerPlacement = true; - } - - Base::Vector3d dirDimLine = (lblCenter - curveCenter).Normalize(); - if (fabs(dirDimLine.Length()) < (Precision::Confusion())) { - dirDimLine = Base::Vector3d(-1.0,0.0,0.0); - } -// Base::Vector3d adjustDir = dirDimLine; //adjust line lengths for arrowheads - double dimLineAdjust = Rez::guiX(QGIArrow::getOverlapAdjust(QGIArrow::getPrefArrowStyle(), - QGIArrow::getPrefArrowSize())); - - - Base::Vector3d dLineStart; - Base::Vector3d dLineEnd; //?? radius draws line from text to curve?? (diam is curve to text!) - Base::Vector3d kinkPoint; - margin = Rez::guiX(5.f); //space around label - double kinkLength = Rez::guiX(5.0); //sb % of horizontal dist(lblCenter,curveCenter)??? - if (outerPlacement) { - double offset = getDefaultTextHorizontalOffset(lblCenter.x > curveCenter.x); - dLineStart.y = lblCenter.y; - dLineStart.x = lblCenter.x + offset; //start at right or left of label - kinkLength = (lblCenter.x < curveCenter.x) ? kinkLength : -kinkLength; - kinkPoint.y = dLineStart.y; - kinkPoint.x = dLineStart.x + kinkLength; - pointOnCurve = curveCenter + (kinkPoint - curveCenter).Normalize() * radius; - dLineEnd = pointOnCurve + (kinkPoint - curveCenter).Normalize() * dimLineAdjust; - if ((kinkPoint - curveCenter).Length() < radius) { - dirDimLine = (curveCenter - kinkPoint).Normalize(); - } else { - dirDimLine = (kinkPoint - curveCenter).Normalize(); - } - } else { - dLineStart = curveCenter - dirDimLine * margin; //just beyond centerpoint - pointOnCurve = curveCenter - dirDimLine * radius; - dLineEnd = pointOnCurve + dirDimLine * dimLineAdjust; - kinkPoint = dLineStart; //no kink - } - - //handle partial arc weird cases - if (isArc) { - Base::Vector3d midPt = Rez::guiX(pts.midArc); - Base::Vector3d startPt = Rez::guiX(pts.arcEnds.first); - Base::Vector3d endPt = Rez::guiX(pts.arcEnds.second); - if (outerPlacement && - !dim->leaderIntersectsArc(Rez::appX(curveCenter),Rez::appX(kinkPoint))) { //keep pathological case within arc - pointOnCurve = midPt; - } else if (!outerPlacement) { - if ((midPt - lblCenter).Length() > (midPt - curveCenter).Length()) { //label is farther than center - dirDimLine = dirDimLine * -1; - } - dLineStart = curveCenter + dirDimLine * margin; - pointOnCurve = curveCenter + dirDimLine * radius; - dLineEnd = pointOnCurve - dirDimLine * dimLineAdjust; - kinkPoint = dLineStart; - if (!dim->leaderIntersectsArc(Rez::appX(dLineStart),Rez::appX(pointOnCurve))) { //keep pathological case within arc - if ((pointOnCurve - endPt).Length() < (pointOnCurve - startPt).Length()) { - if (!pts.arcCW ) { - pointOnCurve = endPt; - } else { - pointOnCurve = startPt; - } - } else { - if (!pts.arcCW ) { - pointOnCurve = startPt; - } else { - pointOnCurve = endPt; - } - } - dLineStart = curveCenter + (pointOnCurve - curveCenter).Normalize() * margin; - dLineEnd = pointOnCurve - dirDimLine * dimLineAdjust; - kinkPoint = dLineStart; - } - } - } - - QPainterPath dLinePath; //radius dimension line path - dLinePath.moveTo(dLineStart.x, dLineStart.y); - dLinePath.lineTo(kinkPoint.x, kinkPoint.y); - dLinePath.lineTo(dLineEnd.x, dLineEnd.y); - - dimLines->setPath(dLinePath); - //NOTE: in this case aHead1->dirMode is false and Qt rotation is used to point arrowhead - aHead1->setStyle(QGIArrow::getPrefArrowStyle()); - aHead1->setSize(QGIArrow::getPrefArrowSize()); - aHead1->draw(); - - Base::Vector3d ar1Pos = pointOnCurve; - Base::Vector3d dirArrowLine = (pointOnCurve - kinkPoint).Normalize(); - float arAngle = atan2(dirArrowLine.y, dirArrowLine.x) * 180 / M_PI; - - aHead1->setPos(ar1Pos.x, ar1Pos.y); - aHead1->setRotation(arAngle); - aHead1->show(); - aHead2->hide(); -// if (dim->CentreLines.getValue()) { -// curveCenterMark->setPos(curveCenter.x,curveCenter.y); -// centerMark->show(); -// dim->getViewPart()->addVertex(curveCenter,true); -// } + drawRadius(dim, vp); } else if( (strcmp(dimType, "Angle") == 0) || (strcmp(dimType, "Angle3Pt") == 0)) { anglePoints pts = dim->getAnglePoints(); @@ -1408,7 +1291,7 @@ void QGIViewDimension::draw() dimLines->setPath(path); //NOTE: arrowheads are dirMode(false) - aHead1->flip(true); + aHead1->setFlipped(true); aHead1->setStyle(QGIArrow::getPrefArrowStyle()); aHead1->setSize(QGIArrow::getPrefArrowSize()); aHead1->draw(); @@ -1489,6 +1372,281 @@ void QGIViewDimension::draw() } } +int QGIViewDimension::classifyPointToArcPosition(double pointDistance, double pointAngle, + double radius, double startAngle, double endAngle, bool clockwise) const +{ + if (angleWithinSector(pointAngle, startAngle, endAngle, clockwise)) { + return pointDistance > radius ? OUTER_SECTOR : INNER_SECTOR; + } + + if (angleWithinSector(addAngles(pointAngle, M_PI), startAngle, endAngle, clockwise)) { + return OPPOSITE_SECTOR; + } + + return COMPLEMENT_SECTOR; +} + +double QGIViewDimension::computeLineAndLabelAngles(Base::Vector3d lineTarget, Base::Vector3d labelCenter, + double lineLabelDistance, double &lineAngle, double &labelAngle) const +{ + // By default horizontal line and no label rotation + lineAngle = 0.0; + labelAngle = 0.0; + + Base::Vector3d rawDirection(labelCenter - lineTarget); + double rawDistance = rawDirection.Length(); + if (rawDistance < Precision::Confusion()) { // Almost single point, can't tell + return 0.0; + } + + double rawAngle = atan2(rawDirection.y, rawDirection.x); + lineAngle = rawAngle; + + // If we are too close to the line origin, no further adjustments + if (lineLabelDistance >= rawDistance) { + return 0.0; + } + + // Rotate the line by angle between the label rectangle center and label bottom side center + double devAngle = getStandardLinePlacement(rawAngle)*asin(lineLabelDistance/rawDistance); + lineAngle = addAngles(lineAngle, devAngle); + + labelAngle = devAngle > 0.0 ? lineAngle : addAngles(lineAngle, M_PI); + + return devAngle; +} + +Base::Vector3d QGIViewDimension::computeLineOriginPoint(Base::Vector3d lineTarget, double projectedLabelDistance, + double lineAngle, double labelWidth, double direction) const +{ + return lineTarget + (projectedLabelDistance + direction*(0.5*labelWidth + getDefaultReferenceLineOverhang())) + *Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); +} + +void QGIViewDimension::drawRadius(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const +{ + // Preferred terminology according to ISO 129-1 for Radius: + // Dimensional Value, Leader Line, Reference Line, Terminator + + QPainterPath radiusPath; + aHead1->setFlipped(false); + + datumLabel->setRotation(0.0); + QRectF mappedRect = mapRectFromItem(datumLabel, datumLabel->boundingRect()); + Base::Vector3d labelCenter = Base::Vector3d(mappedRect.center().x(), mappedRect.center().y(), 0.0); + + arcPoints curvePoints = dimension->getArcPoints(); + + Base::Vector3d curveCenter = Rez::guiX(curvePoints.center); + double mappedRadius = Rez::guiX(curvePoints.radius); + double centerDistance = (labelCenter - curveCenter).Length(); + + double arcStartAngle; + double arcEndAngle; + bool arcClockwise; + if (curvePoints.isArc) { + arcStartAngle = atan2(curvePoints.arcEnds.first.y - curvePoints.center.y, + curvePoints.arcEnds.first.x - curvePoints.center.x); + arcEndAngle = atan2(curvePoints.arcEnds.second.y - curvePoints.center.y, + curvePoints.arcEnds.second.x - curvePoints.center.x); + arcClockwise = !curvePoints.arcCW; + } + else { // A circle arc covers the whole plane + arcStartAngle = -M_PI; + arcEndAngle = +M_PI; + arcClockwise = false; + } + + double labelAngle = 0.0; + Base::Vector3d arcPoint; + double lineAngle; + + if (viewProvider->TiltText.getValue()) { // We may rotate the label so no reference line is needed + double devAngle = computeLineAndLabelAngles(curveCenter, labelCenter, + getDefaultTextVerticalOffset(), lineAngle, labelAngle); + // Correct the label center distance projected on the leader line + centerDistance *= cos(devAngle); + + Base::Vector3d originPoint; + Base::Vector3d targetPoint; + switch (classifyPointToArcPosition(centerDistance, lineAngle, mappedRadius, + arcStartAngle, arcEndAngle, arcClockwise)) { + case INNER_SECTOR: { + // The label is placed within the arc sector angle, there's always point + // on the arc where the leader line can cross it perpendicularly + arcPoint = curveCenter + mappedRadius*Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); + + if (viewProvider->ExtendToCenter.getValue()) { // Start in the very center + originPoint = curveCenter; + } + else { // Start on the label side closer to the center + originPoint = computeLineOriginPoint(curveCenter, centerDistance, lineAngle, + mappedRect.width(), -1.0); + } + targetPoint = arcPoint; + break; + } + case OUTER_SECTOR: { + // Same situation as when on the inner side of sector + arcPoint = curveCenter + mappedRadius*Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); + aHead1->flip(); + + originPoint = computeLineOriginPoint(curveCenter, centerDistance, lineAngle, + mappedRect.width(), +1.0); + // If leader line shall not be extended to the center, start on the arc projection + targetPoint = viewProvider->ExtendToCenter.getValue() ? curveCenter : arcPoint; + break; + } + case OPPOSITE_SECTOR: { + // If the label is placed within the vertically opposite angle of the arc sector, + // the leader line passing through the arc center can mark a point on the arc + arcPoint = curveCenter - mappedRadius*Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); + aHead1->flip(); + + originPoint = computeLineOriginPoint(curveCenter, centerDistance, lineAngle, + mappedRect.width(), +1.0); + targetPoint = arcPoint; + break; + } + default: { + // Label outside both arc wedges + arcPoint = Rez::guiX(curvePoints.midArc); + aHead1->flip(); + devAngle = computeLineAndLabelAngles(arcPoint, labelCenter, + getDefaultTextVerticalOffset(), lineAngle, labelAngle); + centerDistance = (labelCenter - arcPoint).Length()*cos(devAngle); + + originPoint = computeLineOriginPoint(arcPoint, centerDistance, lineAngle, + mappedRect.width(), +1.0); + targetPoint = arcPoint; + break; + } + } + + // Draw only the leader line from start point to end point + radiusPath.moveTo(originPoint.x, originPoint.y); + radiusPath.lineTo(targetPoint.x, targetPoint.y); + } + else { // The dimensional value text must stay horizontal + Base::Vector3d leftJoint(mappedRect.left() - getDefaultReferenceLineOverhang(), + labelCenter.y + getDefaultTextVerticalOffset(), 0.0); + Base::Vector3d rightJoint(mappedRect.right() + getDefaultReferenceLineOverhang(), + labelCenter.y + getDefaultTextVerticalOffset(), 0.0); + + double leftAngle = atan2(leftJoint.y - curveCenter.y, leftJoint.x - curveCenter.x); + double rightAngle = atan2(rightJoint.y - curveCenter.y, rightJoint.x - curveCenter.x); + + int leftPosition = classifyPointToArcPosition((leftJoint - curveCenter).Length(), + leftAngle, mappedRadius, arcStartAngle, arcEndAngle, arcClockwise); + int rightPosition = classifyPointToArcPosition((rightJoint - curveCenter).Length(), + rightAngle, mappedRadius, arcStartAngle, arcEndAngle, arcClockwise); + + Base::Vector3d originPoint; + Base::Vector3d jointPoint; + Base::Vector3d targetPoint; + if (leftPosition >= OPPOSITE_SECTOR || rightPosition >= OPPOSITE_SECTOR) { + // At least from one of the reference line sides can run the leader line + // perpendicularly to the arc, i.e. in direction to the center + if (leftPosition >= OPPOSITE_SECTOR && rightPosition >= OPPOSITE_SECTOR) { + // Both are acceptable, so choose the more convenient one + double leftBend = leftPosition == INNER_SECTOR ? M_PI - fabs(leftAngle) : fabs(leftAngle); + double rightBend = rightPosition == INNER_SECTOR ? fabs(rightAngle) : M_PI - fabs(rightAngle); + + // If right leader line bends less or does not cross the dimensional value, + // use it by marking left point as outlayer + if (leftBend <= M_PI_2 || rightBend <= M_PI_2) { // At least one line is not crossing the text + if (rightBend < leftBend) { + leftPosition = COMPLEMENT_SECTOR; + } + } + else { + bool leftDown = leftPosition == INNER_SECTOR ? leftAngle > 0.0 : leftAngle < 0.0; + bool rightDown = rightPosition == INNER_SECTOR ? rightAngle > 0.0 : rightAngle < 0.0; + + if (leftDown == rightDown) { // Both lines go downwards or upwards + if (rightBend < leftBend) { + leftPosition = COMPLEMENT_SECTOR; + } + } + else if (rightDown) { + leftPosition = COMPLEMENT_SECTOR; + } + } + } + + int resultPosition; + if (leftPosition >= OPPOSITE_SECTOR) { + originPoint = rightJoint; + jointPoint = leftJoint; + lineAngle = leftAngle; + resultPosition = leftPosition; + } + else { + originPoint = leftJoint; + jointPoint = rightJoint; + lineAngle = rightAngle; + resultPosition = rightPosition; + } + + switch (resultPosition) { + case INNER_SECTOR: + arcPoint = curveCenter + mappedRadius*Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); + targetPoint = arcPoint; + break; + case OUTER_SECTOR: + arcPoint = curveCenter + mappedRadius*Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); + // If desired, extend the target point to the center + targetPoint = viewProvider->ExtendToCenter.getValue() ? curveCenter : arcPoint; + aHead1->flip(); + break; + case OPPOSITE_SECTOR: + arcPoint = curveCenter - mappedRadius*Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); + targetPoint = arcPoint; + aHead1->flip(); + break; + } + } + else { // Both joint points lay outside the vertical angles + arcPoint = Rez::guiX(curvePoints.midArc); + + if (labelCenter.x >= arcPoint.x) { // Place the dimensional value right + originPoint = rightJoint; + jointPoint = leftJoint; + } + else { // Place the dimensional value left + originPoint = leftJoint; + jointPoint = rightJoint; + } + + targetPoint = arcPoint; + lineAngle = atan2(targetPoint.y - jointPoint.y, targetPoint.x - jointPoint.x); + } + + radiusPath.moveTo(originPoint.x, originPoint.y); + radiusPath.lineTo(jointPoint.x, jointPoint.y); + radiusPath.lineTo(targetPoint.x, targetPoint.y); + } + + datumLabel->setTransformOriginPoint(datumLabel->boundingRect().width()*0.5, + datumLabel->boundingRect().height()*0.5); + datumLabel->setRotation(labelAngle*180.0/M_PI); + + dimLines->setPath(radiusPath); + + aHead1->setPos(arcPoint.x, arcPoint.y); + aHead1->setDirMode(true); + aHead1->setDirection(lineAngle); + if (viewProvider->FlipArrowheads.getValue()) { + aHead1->flip(); + } + aHead1->setStyle(QGIArrow::getPrefArrowStyle()); + aHead1->setSize(QGIArrow::getPrefArrowSize()); + aHead1->draw(); + aHead1->show(); + + aHead2->hide(); +} + QColor QGIViewDimension::getNormalColor() { Base::Reference hGrp = App::GetApplication().GetUserParameter() @@ -1613,6 +1771,50 @@ double QGIViewDimension::getDefaultTextVerticalOffset() const return textMult*Rez::guiX(vp->Fontsize.getValue()) + TextOffsetFudge; } +double QGIViewDimension::getDefaultReferenceLineOverhang() const +{ + return 2.0*TextOffsetFudge; +} + +double QGIViewDimension::getStandardLinePlacement(double labelAngle) +{ + // According to ISO 129-1 Standard Figure 23, the bordering angle is 2/3 PI, resp. -1/3 PI + // As Qt Y axis points downwards, all signs are flipped + return labelAngle > +M_PI/3.0 || labelAngle < -2.0*M_PI/3.0 + ? -1.0 : +1.0; +} + +bool QGIViewDimension::angleWithinSector(double testAngle, double startAngle, double endAngle, bool clockwise) +{ + if (clockwise) { + std::swap(startAngle, endAngle); + } + + if (endAngle < startAngle) { + endAngle += M_2PI; + } + + if (testAngle < startAngle) { + testAngle += M_2PI; + } + + return testAngle <= endAngle; +} + +double QGIViewDimension::addAngles(double angle1, double angle2) +{ + angle1 += angle2; + + if (angle2 >= 0.0) { + if (angle1 > +M_PI) angle1 -= M_2PI; + return angle1; + } + else { + if (angle1 < -M_PI) angle1 += M_2PI; + return angle1; + } +} + //frame, border, caption are never shown in QGIVD, so shouldn't be in bRect QRectF QGIViewDimension::boundingRect() const { diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.h b/src/Mod/TechDraw/Gui/QGIViewDimension.h index 53f5fbc630..d95757d881 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.h +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.h @@ -48,6 +48,7 @@ namespace TechDrawGui class QGIArrow; class QGIDimLines; class QGIViewDimension; +class ViewProviderDimension; class QGIDatumLabel : public QGraphicsObject { @@ -154,6 +155,20 @@ public Q_SLOTS: void updateDim(bool obtuse = false); protected: + + static const int INNER_SECTOR = 3; + static const int OUTER_SECTOR = 2; + static const int OPPOSITE_SECTOR = 1; + static const int COMPLEMENT_SECTOR = 0; + + int classifyPointToArcPosition(double pointDistance, double pointAngle, + double radius, double startAngle, double endAngle, bool clockwise) const; + double computeLineAndLabelAngles(Base::Vector3d lineTarget, Base::Vector3d labelCenter, + double lineLabelDistance, double &lineAngle, double &labelAngle) const; + Base::Vector3d computeLineOriginPoint(Base::Vector3d lineTarget, double projectedLabelDistance, + double lineAngle, double labelWidth, double direction) const; + + void drawRadius(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const; void draw() override; virtual QVariant itemChange( GraphicsItemChange change, const QVariant &value ) override; @@ -178,6 +193,11 @@ private: double getDefaultTextHorizontalOffset(bool toLeft) const; double getDefaultTextVerticalOffset() const; + double getDefaultReferenceLineOverhang() const; + + static double getStandardLinePlacement(double labelAngle); + static bool angleWithinSector(double testAngle, double startAngle, double endAngle, bool clockwise); + static double addAngles(double angle1, double angle2); }; } // namespace MDIViewPageGui diff --git a/src/Mod/TechDraw/Gui/ViewProviderDimension.cpp b/src/Mod/TechDraw/Gui/ViewProviderDimension.cpp index 3f5ad9ed3e..6fd65c7576 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderDimension.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderDimension.cpp @@ -79,8 +79,9 @@ ViewProviderDimension::ViewProviderDimension() fcColor.setPackedValue(hGrp->GetUnsigned("Color", 0x00000000)); ADD_PROPERTY_TYPE(Color,(fcColor),group,App::Prop_None,"The color of the Dimension"); - ADD_PROPERTY_TYPE(FlipArrowheads ,(false),group,App::Prop_None,"Reverse the normal direction of arrowheads on dimline"); - + ADD_PROPERTY_TYPE(FlipArrowheads, (false), group, App::Prop_None,"Reverse the normal direction of arrowheads on dimline"); + ADD_PROPERTY_TYPE(TiltText, (true), group, App::Prop_None,"Rotate the text label so it is parallel with dimline"); + ADD_PROPERTY_TYPE(ExtendToCenter, (true), group, App::Prop_None,"Prolong the leader line right upto the center point"); } ViewProviderDimension::~ViewProviderDimension() @@ -131,7 +132,9 @@ void ViewProviderDimension::onChanged(const App::Property* p) if ((p == &Font) || (p == &Fontsize) || (p == &LineWidth) || - (p == &FlipArrowheads)) { + (p == &FlipArrowheads) || + (p == &TiltText) || + (p == &ExtendToCenter)) { QGIView* qgiv = getQView(); if (qgiv) { qgiv->updateView(true); diff --git a/src/Mod/TechDraw/Gui/ViewProviderDimension.h b/src/Mod/TechDraw/Gui/ViewProviderDimension.h index 0e6607b71c..9daf9c6b43 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderDimension.h +++ b/src/Mod/TechDraw/Gui/ViewProviderDimension.h @@ -49,7 +49,8 @@ public: App::PropertyFloat LineWidth; App::PropertyColor Color; App::PropertyBool FlipArrowheads; - + App::PropertyBool TiltText; + App::PropertyBool ExtendToCenter; virtual void attach(App::DocumentObject *); virtual void setDisplayMode(const char* ModeName); From 641d946fa47573562026e042b1706759bd47611e Mon Sep 17 00:00:00 2001 From: wandererfan Date: Sat, 10 Aug 2019 09:43:26 -0400 Subject: [PATCH 02/39] [TD]Allow Aligned & Uniform Conventions on Radius Dims --- src/Mod/TechDraw/Gui/QGIViewDimension.cpp | 162 +++++++++++++++++++++- src/Mod/TechDraw/Gui/QGIViewDimension.h | 8 +- 2 files changed, 165 insertions(+), 5 deletions(-) diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp index 9964af89fd..51f50fc954 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp @@ -36,7 +36,7 @@ # include # include - # include + # include #endif #include @@ -70,7 +70,8 @@ #include "DrawGuiUtil.h" #ifndef M_2PI - #define M_2PI 6.283185307179586476925287 +// #define M_2PI 6.283185307179586476925287 + #define M_2PI (M_PI * 2.0) #endif //TODO: hide the Qt coord system (+y down). @@ -1174,7 +1175,13 @@ void QGIViewDimension::draw() // dim->getViewPart()->addVertex(curveCenter,true); // } } else if(strcmp(dimType, "Radius") == 0) { - drawRadius(dim, vp); + if (prefRadiusAligned() == 0) { //ISO + drawRadiusAligned(dim, vp); + } else if (prefRadiusAligned() == 1) { //ASME + drawRadiusUniform(dim, vp); + } else { + Base::Console().Error("QGIVD::draw - bad radiusAligned pref: %d\n", prefRadiusAligned()); + } } else if( (strcmp(dimType, "Angle") == 0) || (strcmp(dimType, "Angle3Pt") == 0)) { anglePoints pts = dim->getAnglePoints(); @@ -1423,7 +1430,9 @@ Base::Vector3d QGIViewDimension::computeLineOriginPoint(Base::Vector3d lineTarge *Base::Vector3d(cos(lineAngle), sin(lineAngle), 0.0); } -void QGIViewDimension::drawRadius(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const +//draw a Radius dimension using "aligned" convention (ISO) +void QGIViewDimension::drawRadiusAligned(TechDraw::DrawViewDimension *dimension, + ViewProviderDimension *viewProvider) const { // Preferred terminology according to ISO 129-1 for Radius: // Dimensional Value, Leader Line, Reference Line, Terminator @@ -1461,6 +1470,7 @@ void QGIViewDimension::drawRadius(TechDraw::DrawViewDimension *dimension, ViewPr Base::Vector3d arcPoint; double lineAngle; + //TODO: does this violate "Aligned" convention? if (viewProvider->TiltText.getValue()) { // We may rotate the label so no reference line is needed double devAngle = computeLineAndLabelAngles(curveCenter, labelCenter, getDefaultTextVerticalOffset(), lineAngle, labelAngle); @@ -1634,6 +1644,7 @@ void QGIViewDimension::drawRadius(TechDraw::DrawViewDimension *dimension, ViewPr dimLines->setPath(radiusPath); aHead1->setPos(arcPoint.x, arcPoint.y); + aHead1->setRotation(0.0); aHead1->setDirMode(true); aHead1->setDirection(lineAngle); if (viewProvider->FlipArrowheads.getValue()) { @@ -1647,6 +1658,141 @@ void QGIViewDimension::drawRadius(TechDraw::DrawViewDimension *dimension, ViewPr aHead2->hide(); } +//Draw a Radius dimension using "uniform" alignment convention (Ansi/Asme) +void QGIViewDimension::drawRadiusUniform(TechDraw::DrawViewDimension* dim, + TechDrawGui::ViewProviderDimension* viewProvider) const +{ + // preferred terminology: Dimension Text, Dimension Line(s), Extension Lines, Arrowheads + // radius gets 1 dimension line from the dimension text to a point on the curve + aHead1->setFlipped(false); + + Base::Vector3d pointOnCurve,curveCenter; + double radius; + arcPoints pts = dim->getArcPoints(); + bool isArc = pts.isArc; + radius = Rez::guiX(pts.radius); + curveCenter = Rez::guiX(pts.center); + pointOnCurve = Rez::guiX(pts.onCurve.first); + QRectF mappedRect = mapRectFromItem(datumLabel, datumLabel->boundingRect()); + Base::Vector3d lblCenter = Base::Vector3d(mappedRect.center().x(), mappedRect.center().y(), 0.0); + + // Note Bounding Box size is not the same width or height as text (only used for finding center) + float bbX = datumLabel->boundingRect().width(); + float bbY = datumLabel->boundingRect().height(); + datumLabel->setTransformOriginPoint(bbX / 2, bbY /2); + datumLabel->setRotation(0.0); //label is always right side up & horizontal + + //if inside the arc (len(DimLine < radius)) arrow goes from center to edge away from label + //if outside the arc arrow kinks, then goes to edge nearest label + bool outerPlacement = false; + if ((lblCenter - curveCenter).Length() > radius) { //label is outside circle + outerPlacement = true; + } + + Base::Vector3d dirDimLine = (lblCenter - curveCenter).Normalize(); + if (fabs(dirDimLine.Length()) < (Precision::Confusion())) { + dirDimLine = Base::Vector3d(-1.0,0.0,0.0); + } +// Base::Vector3d adjustDir = dirDimLine; //adjust line lengths for arrowheads + double dimLineAdjust = Rez::guiX(QGIArrow::getOverlapAdjust(QGIArrow::getPrefArrowStyle(), + QGIArrow::getPrefArrowSize())); + + Base::Vector3d dLineStart; + Base::Vector3d dLineEnd; //?? radius draws line from text to curve?? (diam is curve to text!) + Base::Vector3d kinkPoint; + double margin = Rez::guiX(5.f); //space around label + double kinkLength = Rez::guiX(5.0); //sb % of horizontal dist(lblCenter,curveCenter)??? + if (outerPlacement) { + double offset = getDefaultTextHorizontalOffset(lblCenter.x > curveCenter.x); + dLineStart.y = lblCenter.y; + dLineStart.x = lblCenter.x + offset; //start at right or left of label + kinkLength = (lblCenter.x < curveCenter.x) ? kinkLength : -kinkLength; + kinkPoint.y = dLineStart.y; + kinkPoint.x = dLineStart.x + kinkLength; + pointOnCurve = curveCenter + (kinkPoint - curveCenter).Normalize() * radius; + dLineEnd = pointOnCurve + (kinkPoint - curveCenter).Normalize() * dimLineAdjust; + if ((kinkPoint - curveCenter).Length() < radius) { + dirDimLine = (curveCenter - kinkPoint).Normalize(); + } else { + dirDimLine = (kinkPoint - curveCenter).Normalize(); + } + } else { + dLineStart = curveCenter - dirDimLine * margin; //just beyond centerpoint + pointOnCurve = curveCenter - dirDimLine * radius; + dLineEnd = pointOnCurve + dirDimLine * dimLineAdjust; + kinkPoint = dLineStart; //no kink + } + + //handle partial arc weird cases + if (isArc) { + Base::Vector3d midPt = Rez::guiX(pts.midArc); + Base::Vector3d startPt = Rez::guiX(pts.arcEnds.first); + Base::Vector3d endPt = Rez::guiX(pts.arcEnds.second); + if (outerPlacement && + !dim->leaderIntersectsArc(Rez::appX(curveCenter),Rez::appX(kinkPoint))) { //keep pathological case within arc + pointOnCurve = midPt; + } else if (!outerPlacement) { + if ((midPt - lblCenter).Length() > (midPt - curveCenter).Length()) { //label is farther than center + dirDimLine = dirDimLine * -1; + } + dLineStart = curveCenter + dirDimLine * margin; + pointOnCurve = curveCenter + dirDimLine * radius; + dLineEnd = pointOnCurve - dirDimLine * dimLineAdjust; + kinkPoint = dLineStart; + if (!dim->leaderIntersectsArc(Rez::appX(dLineStart),Rez::appX(pointOnCurve))) { //keep pathological case within arc + if ((pointOnCurve - endPt).Length() < (pointOnCurve - startPt).Length()) { + if (!pts.arcCW ) { + pointOnCurve = endPt; + } else { + pointOnCurve = startPt; + } + } else { + if (!pts.arcCW ) { + pointOnCurve = startPt; + } else { + pointOnCurve = endPt; + } + } + dLineStart = curveCenter + (pointOnCurve - curveCenter).Normalize() * margin; + dLineEnd = pointOnCurve - dirDimLine * dimLineAdjust; + kinkPoint = dLineStart; + } + } + } + + QPainterPath dLinePath; //radius dimension line path + dLinePath.moveTo(dLineStart.x, dLineStart.y); + dLinePath.lineTo(kinkPoint.x, kinkPoint.y); + dLinePath.lineTo(dLineEnd.x, dLineEnd.y); + + dimLines->setPath(dLinePath); + + Base::Vector3d ar1Pos = pointOnCurve; + Base::Vector3d dirArrowLine = (pointOnCurve - kinkPoint).Normalize(); + float arAngle = atan2(dirArrowLine.y, dirArrowLine.x) * 180 / M_PI; + + //NOTE: in this case aHead1->dirMode is false and Qt rotation is used to point arrowhead + aHead1->setPos(ar1Pos.x, ar1Pos.y); + aHead1->setDirMode(false); + aHead1->setRotation(arAngle); + if (viewProvider->FlipArrowheads.getValue()) { + aHead1->flip(); + } + aHead1->setStyle(QGIArrow::getPrefArrowStyle()); + aHead1->setSize(QGIArrow::getPrefArrowSize()); + aHead1->draw(); + aHead1->show(); + + aHead2->hide(); + +// code for showCenterMark as attribute of Dimension instead of View +// if (dim->CentreLines.getValue()) { +// curveCenterMark->setPos(curveCenter.x,curveCenter.y); +// centerMark->show(); +// dim->getViewPart()->addVertex(curveCenter,true); +// } +} + QColor QGIViewDimension::getNormalColor() { Base::Reference hGrp = App::GetApplication().GetUserParameter() @@ -1864,5 +2010,13 @@ void QGIViewDimension::setPens(void) aHead2->setWidth(m_lineWidth); } +int QGIViewDimension::prefRadiusAligned(void) +{ + int result = 0; + Base::Reference hGrp = App::GetApplication().GetUserParameter() + .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Standards"); + result = hGrp->GetInt("RadiusAligned", 0); //default to ISO + return result; +} #include diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.h b/src/Mod/TechDraw/Gui/QGIViewDimension.h index d95757d881..beafe7feea 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.h +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.h @@ -168,8 +168,12 @@ protected: Base::Vector3d computeLineOriginPoint(Base::Vector3d lineTarget, double projectedLabelDistance, double lineAngle, double labelWidth, double direction) const; - void drawRadius(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const; void draw() override; + void drawRadiusAligned(TechDraw::DrawViewDimension *dimension, + ViewProviderDimension *viewProvider) const; + void drawRadiusUniform(TechDraw::DrawViewDimension *dimension, + ViewProviderDimension *viewProvider) const; + virtual QVariant itemChange( GraphicsItemChange change, const QVariant &value ) override; virtual void setSvgPens(void); @@ -177,6 +181,8 @@ protected: Base::Vector3d findIsoDir(Base::Vector3d ortho); Base::Vector3d findIsoExt(Base::Vector3d isoDir); QString getPrecision(void); + + int prefRadiusAligned(void); protected: bool hasHover; From 3148d92d6ecfb92f39ad4c4ad2730b29c35de9a4 Mon Sep 17 00:00:00 2001 From: IMback Date: Sun, 11 Aug 2019 17:09:56 +0200 Subject: [PATCH 03/39] Changed hole diameter detection to avoid tessilation inaccuracies in more cases. --- src/Mod/Path/PathScripts/PathCircularHoleBase.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathCircularHoleBase.py b/src/Mod/Path/PathScripts/PathCircularHoleBase.py index 0c4bec33de..f97d85451c 100644 --- a/src/Mod/Path/PathScripts/PathCircularHoleBase.py +++ b/src/Mod/Path/PathScripts/PathCircularHoleBase.py @@ -141,8 +141,15 @@ class ObjectOp(PathOp.ObjectOp): if shape.ShapeType == 'Edge' and type(shape.Curve) == Part.Circle: return shape.Curve.Radius * 2 - - # for all other shapes the diameter is just the dimension in X + + if shape.ShapeType == 'Face': + for i in range(len(shape.Edges)): + if type(shape.Edges[i].Curve) == Part.Circle: + return shape.Edges[i].Curve.Radius * 2 + + + # for all other shapes the diameter is just the dimension in X. This may be inaccurate as the BoundBox is calculated on the tesselated geometry + PathLog.warning(translate("Path", "Hole diameter may be inaccurate due to tessellation on face. Consider selecting hole edge.")) return shape.BoundBox.XLength except Part.OCCError as e: PathLog.error(e) From cf4804ebc0f297ab4730a3547e2b96192bf4a27a Mon Sep 17 00:00:00 2001 From: IMback Date: Sun, 11 Aug 2019 20:56:17 +0200 Subject: [PATCH 04/39] Improve irregular hole detection. --- src/Mod/Path/PathScripts/PathCircularHoleBase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathCircularHoleBase.py b/src/Mod/Path/PathScripts/PathCircularHoleBase.py index f97d85451c..8ab4e85d4a 100644 --- a/src/Mod/Path/PathScripts/PathCircularHoleBase.py +++ b/src/Mod/Path/PathScripts/PathCircularHoleBase.py @@ -144,7 +144,9 @@ class ObjectOp(PathOp.ObjectOp): if shape.ShapeType == 'Face': for i in range(len(shape.Edges)): - if type(shape.Edges[i].Curve) == Part.Circle: + if (type(shape.Edges[i].Curve) == Part.Circle and + shape.Edges[i].Curve.Radius * 2 < shape.BoundBox.XLength*1.1 and + shape.Edges[i].Curve.Radius * 2 > shape.BoundBox.XLength*0.9): return shape.Edges[i].Curve.Radius * 2 From 683397b187e218d235f9887b0ea4222f9fedcd53 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 12 Aug 2019 19:22:58 -0300 Subject: [PATCH 05/39] Arch: Allow to turn off material color and object color syncing --- src/Mod/Arch/ArchComponent.py | 9 ++++++++- src/Mod/Arch/Resources/ui/preferences-arch.ui | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index 4aaab11d87..f442560b23 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -741,12 +741,19 @@ class ViewProviderComponent: vobj.Proxy = self self.Object = vobj.Object + self.setProperties(self,vobj) + + def setProperties(self,vobj): + + if not "UseMaterialColor" in vobj.PropertiesList: + vobj.addProperty("App::PropertyBool","UseMaterialColor","Component",QT_TRANSLATE_NOOP("App::Property","Use the material color as this object's shape color, if available")) + vobj.UseMaterialColor = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetBool("UseMaterialColor",True) def updateData(self,obj,prop): #print(obj.Name," : updating ",prop) if prop == "Material": - if obj.Material: + if obj.Material and ( (not hasattr(obj.ViewObject,"UseMaterialColor")) or obj.ViewObject.UseMaterialColor): if hasattr(obj.Material,"Material"): if 'DiffuseColor' in obj.Material.Material: if "(" in obj.Material.Material['DiffuseColor']: diff --git a/src/Mod/Arch/Resources/ui/preferences-arch.ui b/src/Mod/Arch/Resources/ui/preferences-arch.ui index 8b070cd0da..59c8603a90 100644 --- a/src/Mod/Arch/Resources/ui/preferences-arch.ui +++ b/src/Mod/Arch/Resources/ui/preferences-arch.ui @@ -7,7 +7,7 @@ 0 0 446 - 792 + 811 @@ -217,6 +217,19 @@ + + + + If this is checked, when an Arch object has a material, the object will take the color of the material. This can be overridden for each object. + + + Use material color as shape color + + + true + + + From 347b818076f52a562c2ab915982d30a68846cb57 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 12 Aug 2019 19:36:15 -0300 Subject: [PATCH 06/39] AddonManager: Check that the addon folder actually contains files before declaring it installed --- src/Mod/AddonManager/addonmanager_workers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/AddonManager/addonmanager_workers.py b/src/Mod/AddonManager/addonmanager_workers.py index 0eec92e9e4..87e9b26c2d 100644 --- a/src/Mod/AddonManager/addonmanager_workers.py +++ b/src/Mod/AddonManager/addonmanager_workers.py @@ -91,10 +91,11 @@ class UpdateWorker(QtCore.QThread): if url: addondir = moddir + os.sep + name #print ("found:",name," at ",url) - if not os.path.exists(addondir): - state = 0 - else: + if os.path.exists(addondir) and os.listdir(addondir): + # make sure the folder exists and it contains files! state = 1 + else: + state = 0 repos.append([name,url,state]) # querying custom addons customaddons = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons").GetString("CustomRepositories","").split("\n") From a210ec3733cda38c99b778038e2fac55e59cfa56 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 12 Aug 2019 19:40:33 -0300 Subject: [PATCH 07/39] Arch: fixed wrong copy/paste, duh... --- src/Mod/Arch/ArchComponent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index f442560b23..e9df5625b6 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -741,7 +741,7 @@ class ViewProviderComponent: vobj.Proxy = self self.Object = vobj.Object - self.setProperties(self,vobj) + self.setProperties(vobj) def setProperties(self,vobj): From 537a011a1d61066baa54bb2287715d07baa0d138 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 12 Aug 2019 19:46:40 -0300 Subject: [PATCH 08/39] Draft: Fixed leftover from badly merged commit --- src/Mod/Draft/importSVG.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index e66eb229b7..1f7c0c837d 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -743,15 +743,6 @@ class svgHandler(xml.sax.ContentHandler): ret = msgBox.exec_() if ret == QtGui.QMessageBox.Yes: self.svgdpi = 96.0 -<<<<<<< HEAD - else: - self.svgdpi = 90.0 - if ret: - FCC.PrintMessage(translate("ImportSVG", _msg) + "\n") - FCC.PrintMessage(translate("ImportSVG", _qst) + "\n") - FCC.PrintMessage("*** User specified " - + str(self.svgdpi) + " dpi ***\n") -======= if 'style' in data: if not data['style']: pass#empty style attribute stops inheriting from parent @@ -832,7 +823,6 @@ class svgHandler(xml.sax.ContentHandler): self.grouptransform.append(m) else: self.transform = m ->>>>>>> 6d64c2b2c6bc64ce21e7c2f4ed7e1ab2c8991f8e else: self.svgdpi = 96.0 FCC.PrintMessage(_msg + "\n") From 16c26cb3b1cd7209ea8efc8cb30b3b18fd80cf95 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 12 Aug 2019 21:30:45 -0300 Subject: [PATCH 09/39] Draft: Reorganizing DraftEdit and future Draft command modules --- src/Mod/Arch/InitGui.py | 3 --- src/Mod/Draft/DraftEdit.py | 24 +++++++++++++++++++----- src/Mod/Draft/DraftTools.py | 6 ++++++ src/Mod/Draft/InitGui.py | 4 ---- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/Mod/Arch/InitGui.py b/src/Mod/Arch/InitGui.py index f7567fd408..012385f9e9 100644 --- a/src/Mod/Arch/InitGui.py +++ b/src/Mod/Arch/InitGui.py @@ -64,9 +64,6 @@ class ArchWorkbench(Workbench): FreeCADGui.addCommand('Arch_RebarTools', RebarGroupCommand()) self.archtools[2] = "Arch_RebarTools" - # setup Draft_Edit command - import DraftEdit - FreeCADGui.addCommand('Draft_Edit',DraftEdit.Edit()) # draft tools self.drafttools = ["Draft_Line","Draft_Wire","Draft_Circle","Draft_Arc","Draft_Ellipse", diff --git a/src/Mod/Draft/DraftEdit.py b/src/Mod/Draft/DraftEdit.py index 80040504bf..1ff7758c08 100644 --- a/src/Mod/Draft/DraftEdit.py +++ b/src/Mod/Draft/DraftEdit.py @@ -27,16 +27,24 @@ __title__="FreeCAD Draft Edit Tool" __author__ = "Yorik van Havre, Werner Mayer, Martin Burbaum, Ken Cline, Dmitry Chigrin" __url__ = "http://www.freecadweb.org" -import FreeCAD, FreeCADGui, Draft, DraftTools, math +import FreeCAD +import Draft +import math from FreeCAD import Vector -from DraftTrackers import * -from PySide import QtCore -from PySide.QtCore import QT_TRANSLATE_NOOP -from DraftTools import translate +# Do not import GUI-related modules if GUI is not there +if FreeCAD.GuiUp: + import FreeCADGui + import DraftTools + from DraftTrackers import * + from PySide import QtCore + from PySide.QtCore import QT_TRANSLATE_NOOP + from DraftTools import translate + class Edit(): + "The Draft_Edit FreeCAD command definition" def __init__(self): @@ -1125,3 +1133,9 @@ class Edit(): self.obj.TagPosition = self.invpl.multVec(v) else: self.obj.Group[self.editing-1].Placement.Base = self.invpl.multVec(v) + + + +if FreeCAD.GuiUp: + # setup command + FreeCADGui.addCommand('Draft_Edit', Edit()) diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py index 05a9cfb244..3eed82ec76 100644 --- a/src/Mod/Draft/DraftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -46,6 +46,12 @@ from DraftSnap import * from DraftTrackers import * from pivy import coin +#--------------------------------------------------------------------------- +# Commands that have been migrated to their own modules +#--------------------------------------------------------------------------- + +import DraftEdit + #--------------------------------------------------------------------------- # Preflight stuff #--------------------------------------------------------------------------- diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index 3f62136e74..083d7912ce 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -65,7 +65,6 @@ class DraftWorkbench(Workbench): # Import Draft tools, icons try: import os, Draft_rc, DraftTools, DraftGui - import DraftEdit from DraftTools import translate FreeCADGui.addLanguagePath(":/translations") FreeCADGui.addIconPath(":/icons") @@ -73,9 +72,6 @@ class DraftWorkbench(Workbench): print(inst) FreeCAD.Console.PrintError("Error: Initializing one or more of the Draft modules failed, Draft will not work as expected.\n") - # setup commands - FreeCADGui.addCommand('Draft_Edit', DraftEdit.Edit()) - # setup menus self.cmdList = ["Draft_Line", "Draft_Wire", "Draft_Circle", "Draft_ArcTools", "Draft_Ellipse", From e4132f580088c5d370a691de192c04c3cd50090c Mon Sep 17 00:00:00 2001 From: paullee0 Date: Thu, 25 Jul 2019 23:43:30 +0800 Subject: [PATCH 10/39] Multi-Width to support Sketch with multiple wires Discussion:- https://forum.freecadweb.org/viewtopic.php?f=23&t=37708&p=321956#p321956 --- src/Mod/Arch/ArchWall.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index 369ea99553..e05b62b2e3 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -804,6 +804,8 @@ class _Wall(ArchComponent.Component): # TODO currently layers were not supported when len(basewires) > 0 width = 0 + widths = obj.OverrideWidth + if obj.OverrideWidth: if obj.OverrideWidth[0]: width = obj.OverrideWidth[0] @@ -811,7 +813,7 @@ class _Wall(ArchComponent.Component): if obj.Width: width = obj.Width.Value else: - print("Width or Widths Of Wall [0] should not be 0") + print("Width or OverrideWidth[0] should not be 0") return height = obj.Height.Value @@ -888,9 +890,12 @@ class _Wall(ArchComponent.Component): if (len(self.basewires) == 1) and layers: self.basewires = [self.basewires[0] for l in layers] + layeroffset = 0 baseface = None for i,wire in enumerate(self.basewires): + + edgeNum = len(wire.Edges) e = wire.Edges[0] if isinstance(e.Curve,Part.Circle): dvec = e.Vertexes[0].Point.sub(e.Curve.Center) @@ -911,7 +916,7 @@ class _Wall(ArchComponent.Component): dvec2 = DraftVecUtils.scaleTo(dvec,off) wire = DraftGeomUtils.offsetWire(wire,dvec2) - w2 = DraftGeomUtils.offsetWire(wire,dvec,False, False, obj.OverrideWidth) + w2 = DraftGeomUtils.offsetWire(wire,dvec,False, False, widths) w1 = Part.Wire(Part.__sortEdges__(wire.Edges)) sh = DraftGeomUtils.bind(w1,w2) @@ -928,7 +933,7 @@ class _Wall(ArchComponent.Component): dvec2 = DraftVecUtils.scaleTo(dvec,off) wire = DraftGeomUtils.offsetWire(wire,dvec2) - w2 = DraftGeomUtils.offsetWire(wire,dvec,False, False, obj.OverrideWidth) + w2 = DraftGeomUtils.offsetWire(wire,dvec,False, False, widths) w1 = Part.Wire(Part.__sortEdges__(wire.Edges)) sh = DraftGeomUtils.bind(w1,w2) @@ -944,12 +949,16 @@ class _Wall(ArchComponent.Component): else: dvec.multiply(width/2) ## TODO width Value should be of no use (width/2), width Direction remains 'in use' - overrideWidthHalfen = [i/2 for i in obj.OverrideWidth] + overrideWidthHalfen = [i/2 for i in widths] + w1 = DraftGeomUtils.offsetWire(wire,dvec,False, False, overrideWidthHalfen) dvec = dvec.negative() w2 = DraftGeomUtils.offsetWire(wire,dvec,False, False, overrideWidthHalfen) sh = DraftGeomUtils.bind(w1,w2) + + del widths[0:edgeNum] + if sh: sh.fix(0.1,0,1) # fixes self-intersecting wires f = Part.Face(sh) From 0056edb6cb991cac78162c057095270e9162b108 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sun, 4 Aug 2019 18:21:41 -0500 Subject: [PATCH 11/39] Draft: importDWG.py, added proper docstrings to the functions --- src/Mod/Draft/importDWG.py | 103 +++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/src/Mod/Draft/importDWG.py b/src/Mod/Draft/importDWG.py index b24444af64..3bfa6fb3d7 100644 --- a/src/Mod/Draft/importDWG.py +++ b/src/Mod/Draft/importDWG.py @@ -38,8 +38,20 @@ import six if open.__module__ == '__builtin__': pythonopen = open # to distinguish python built-in open function from the one declared here + def open(filename): - "called when freecad opens a file." + """Open filename and parse using importDXF.open(). + + Parameters + ---------- + filename : str + The path to the filename to be opened. + + Returns + ------- + App::Document + The new FreeCAD document object created, with the parsed information. + """ dxf = convertToDxf(filename) if dxf: import importDXF @@ -47,8 +59,26 @@ def open(filename): return doc return + def insert(filename,docname): - "called when freecad imports a file" + """Imports a file using importDXF.insert(). + + If no document exist, it is created. + + Parameters + ---------- + filename : str + The path to the filename to be opened. + docname : str + The name of the active App::Document if one exists, or + of the new one created. + + Returns + ------- + App::Document + The active FreeCAD document, or the document created if none exists, + with the parsed information. + """ dxf = convertToDxf(filename) if dxf: import importDXF @@ -56,8 +86,26 @@ def insert(filename,docname): return doc return + def export(objectslist,filename): "called when freecad exports a file" + """Export the DWG file with a given list of objects. + + The objects are exported with importDXF.export(). + Then the result is converted to DWG. + + Parameters + ---------- + exportList : list + List of document objects to export. + filename : str + Path to the new file. + + Returns + ------- + str + The same `filename` input. + """ import importDXF,os,tempfile outdir = tempfile.mkdtemp() dxf = outdir + os.sep + os.path.splitext(os.path.basename(filename))[0] + ".dxf" @@ -65,9 +113,24 @@ def export(objectslist,filename): convertToDwg(dxf,filename) return filename + def getTeighaConverter(): + """Find the ODA (formerly Teigha) executable. + + It searches the FreeCAD parameters database, then searches for common + paths in Linux and Windows systems. + + Parameters + ---------- + None + + Returns + ------- + str + The full path of the converter executable + '/usr/bin/TeighaFileConverter' + """ import FreeCAD,os,platform - "finds the Teigha Converter executable" p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") p = p.GetString("TeighaFileConverter") if p: @@ -93,8 +156,22 @@ def getTeighaConverter(): FreeCAD.Console.PrintMessage(translate("draft","ODA (formerly Teigha) File Converter not found, DWG support is disabled")+"\n") return None + def convertToDxf(dwgfilename): - "converts a DWG file to DXF" + """Convert a DWG file to a DXF file. + + If the converter is found it is used, otherwise the convesion fails. + + Parameters + ---------- + dwgfilename : str + The input filename. + + Returns + ------- + str + The new file produced. + """ import os,tempfile,subprocess,sys #import os,tempfile teigha = getTeighaConverter() if teigha: @@ -117,8 +194,24 @@ def convertToDxf(dwgfilename): print("without spaces and non-english characters, or try saving to a lower DWG version") return None + def convertToDwg(dxffilename,dwgfilename): - "converts a DXF file to DWG" + """Convert a DXF file to a DWG file. + + If the converter is found it is used, otherwise the convesion fails. + + Parameters + ---------- + dxffilename : str + The input DXF file + dwgfilename : str + The output DWG file + + Returns + ------- + str + The same `dwgfilename` file path. + """ import os,subprocess #import os teigha = getTeighaConverter() if teigha: From 12d59b76d385fa6936906509644cd6d378cb69d4 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sun, 4 Aug 2019 18:36:45 -0500 Subject: [PATCH 12/39] Draft: importDWG.py, improve Pythonic style, spacing around commas --- src/Mod/Draft/importDWG.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Mod/Draft/importDWG.py b/src/Mod/Draft/importDWG.py index 3bfa6fb3d7..1cb6e10fb7 100644 --- a/src/Mod/Draft/importDWG.py +++ b/src/Mod/Draft/importDWG.py @@ -60,7 +60,7 @@ def open(filename): return -def insert(filename,docname): +def insert(filename, docname): """Imports a file using importDXF.insert(). If no document exist, it is created. @@ -82,13 +82,12 @@ def insert(filename,docname): dxf = convertToDxf(filename) if dxf: import importDXF - doc = importDXF.insert(dxf,docname) + doc = importDXF.insert(dxf, docname) return doc return -def export(objectslist,filename): - "called when freecad exports a file" +def export(objectslist, filename): """Export the DWG file with a given list of objects. The objects are exported with importDXF.export(). @@ -106,11 +105,11 @@ def export(objectslist,filename): str The same `filename` input. """ - import importDXF,os,tempfile + import importDXF, os, tempfile outdir = tempfile.mkdtemp() dxf = outdir + os.sep + os.path.splitext(os.path.basename(filename))[0] + ".dxf" - importDXF.export(objectslist,dxf) - convertToDwg(dxf,filename) + importDXF.export(objectslist, dxf) + convertToDwg(dxf, filename) return filename @@ -130,7 +129,7 @@ def getTeighaConverter(): The full path of the converter executable '/usr/bin/TeighaFileConverter' """ - import FreeCAD,os,platform + import FreeCAD, os, platform p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") p = p.GetString("TeighaFileConverter") if p: @@ -153,7 +152,8 @@ def getTeighaConverter(): if os.path.exists(teigha): return teigha from DraftTools import translate - FreeCAD.Console.PrintMessage(translate("draft","ODA (formerly Teigha) File Converter not found, DWG support is disabled")+"\n") + FreeCAD.Console.PrintMessage(translate("draft", + "ODA (formerly Teigha) File Converter not found, DWG support is disabled")+"\n") return None @@ -172,7 +172,7 @@ def convertToDxf(dwgfilename): str The new file produced. """ - import os,tempfile,subprocess,sys #import os,tempfile + import os, tempfile, subprocess, sys #import os,tempfile teigha = getTeighaConverter() if teigha: indir = os.path.dirname(dwgfilename) @@ -181,10 +181,10 @@ def convertToDxf(dwgfilename): cmdline = '"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"' % (teigha, indir, outdir, basename) print("Converting: " + cmdline) if six.PY2: - if isinstance(cmdline,six.text_type): + if isinstance(cmdline, six.text_type): encoding = sys.getfilesystemencoding() cmdline = cmdline.encode(encoding) - subprocess.call(cmdline, shell=True) #os.system(cmdline) + subprocess.call(cmdline, shell=True) #os.system(cmdline) result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf" if os.path.exists(result): print("Conversion successful") @@ -195,7 +195,7 @@ def convertToDxf(dwgfilename): return None -def convertToDwg(dxffilename,dwgfilename): +def convertToDwg(dxffilename, dwgfilename): """Convert a DXF file to a DWG file. If the converter is found it is used, otherwise the convesion fails. @@ -206,13 +206,13 @@ def convertToDwg(dxffilename,dwgfilename): The input DXF file dwgfilename : str The output DWG file - + Returns ------- str The same `dwgfilename` file path. """ - import os,subprocess #import os + import os, subprocess #import os teigha = getTeighaConverter() if teigha: indir = os.path.dirname(dxffilename) @@ -220,6 +220,6 @@ def convertToDwg(dxffilename,dwgfilename): basename = os.path.basename(dxffilename) cmdline = '"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"' % (teigha, indir, outdir, basename) print("converting " + cmdline) - subprocess.call(cmdline, shell=True) #os.system(cmdline) + subprocess.call(cmdline, shell=True) #os.system(cmdline) return dwgfilename return None From 0804564d8154debf3ee2b4ff3a02ed50b794691b Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sun, 4 Aug 2019 20:17:07 -0500 Subject: [PATCH 13/39] Draft: importDWG.py, improve Pythonic style, maximum line length; also translate the console messages --- src/Mod/Draft/importDWG.py | 50 ++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/src/Mod/Draft/importDWG.py b/src/Mod/Draft/importDWG.py index 1cb6e10fb7..9f01fb9225 100644 --- a/src/Mod/Draft/importDWG.py +++ b/src/Mod/Draft/importDWG.py @@ -32,11 +32,26 @@ # This module is only a thin layer that uses the ODA (formerly Teigha) File # Converter application to convert to/from DXF. Then the real work is done by # importDXF +# +# /usr/bin/ODAFileConverter +# +# Test files +# https://knowledge.autodesk.com/support/autocad/downloads/ +# caas/downloads/content/autocad-sample-files.html import six +import FreeCAD +from FreeCAD import Console as FCC +if FreeCAD.GuiUp: + from DraftTools import translate +else: + def translate(context, txt): + return txt + +# Save the native open function to avoid collisions if open.__module__ == '__builtin__': - pythonopen = open # to distinguish python built-in open function from the one declared here + pythonopen = open def open(filename): @@ -107,7 +122,8 @@ def export(objectslist, filename): """ import importDXF, os, tempfile outdir = tempfile.mkdtemp() - dxf = outdir + os.sep + os.path.splitext(os.path.basename(filename))[0] + ".dxf" + _basename = os.path.splitext(os.path.basename(filename))[0] + dxf = outdir + os.sep + _basename + ".dxf" importDXF.export(objectslist, dxf) convertToDwg(dxf, filename) return filename @@ -145,15 +161,18 @@ def getTeighaConverter(): if os.path.exists(odadir): subdirs = os.walk(odadir).next()[1] for sub in subdirs: - t = odadir + os.sep + sub + os.sep + "TeighaFileConverter.exe" + t = (odadir + os.sep + sub + os.sep + + "TeighaFileConverter.exe") + t = os.path.join(odadir, sub, "TeighaFileConverter.exe") if os.path.exists(t): teigha = t if teigha: if os.path.exists(teigha): return teigha from DraftTools import translate - FreeCAD.Console.PrintMessage(translate("draft", - "ODA (formerly Teigha) File Converter not found, DWG support is disabled")+"\n") + _msg = ("ODA (formerly Teigha) File Converter not found, " + "DWG support is disabled") + FCC.PrintMessage(translate("draft", _msg) + "\n") return None @@ -172,26 +191,30 @@ def convertToDxf(dwgfilename): str The new file produced. """ - import os, tempfile, subprocess, sys #import os,tempfile + import os, tempfile, subprocess, sys teigha = getTeighaConverter() if teigha: indir = os.path.dirname(dwgfilename) outdir = tempfile.mkdtemp() basename = os.path.basename(dwgfilename) - cmdline = '"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"' % (teigha, indir, outdir, basename) + cmdline = ('"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"' + % (teigha, indir, outdir, basename)) print("Converting: " + cmdline) if six.PY2: if isinstance(cmdline, six.text_type): encoding = sys.getfilesystemencoding() cmdline = cmdline.encode(encoding) - subprocess.call(cmdline, shell=True) #os.system(cmdline) + subprocess.call(cmdline, shell=True) # os.system(cmdline) result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf" if os.path.exists(result): print("Conversion successful") return result else: - print("Error during DWG to DXF conversion. Try moving the DWG file to a directory path") - print("without spaces and non-english characters, or try saving to a lower DWG version") + _msg = ("Error during DWG to DXF conversion. " + "Try moving the DWG file to a directory path\n" + "without spaces and non-english characters, " + "or try saving to a lower DWG version.") + FCC.PrintMessage(translate("ImportDWG", _msg) + "\n") return None @@ -212,14 +235,15 @@ def convertToDwg(dxffilename, dwgfilename): str The same `dwgfilename` file path. """ - import os, subprocess #import os + import os, subprocess teigha = getTeighaConverter() if teigha: indir = os.path.dirname(dxffilename) outdir = os.path.dirname(dwgfilename) basename = os.path.basename(dxffilename) - cmdline = '"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"' % (teigha, indir, outdir, basename) + cmdline = ('"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"' + % (teigha, indir, outdir, basename)) print("converting " + cmdline) - subprocess.call(cmdline, shell=True) #os.system(cmdline) + subprocess.call(cmdline, shell=True) # os.system(cmdline) return dwgfilename return None From b0df1a6f21b2aaa644ab082afdeb4c3e20be1fa3 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sun, 4 Aug 2019 21:28:42 -0500 Subject: [PATCH 14/39] Draft: importDWG.py, moved documentation text; added test for ODAFileConverter --- src/Mod/Draft/importDWG.py | 81 +++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/src/Mod/Draft/importDWG.py b/src/Mod/Draft/importDWG.py index 9f01fb9225..5f51835235 100644 --- a/src/Mod/Draft/importDWG.py +++ b/src/Mod/Draft/importDWG.py @@ -1,43 +1,49 @@ # -*- coding: utf8 -*- - -#*************************************************************************** -#* * -#* Copyright (c) 2009 Yorik van Havre * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** - -"FreeCAD Draft Workbench - DWG importer/exporter" - ## @package importDWG # \ingroup DRAFT # \brief DWG file importer & exporter -# -# This module provides support for importing and exporting Autodesk DWG files. -# This module is only a thin layer that uses the ODA (formerly Teigha) File -# Converter application to convert to/from DXF. Then the real work is done by -# importDXF -# -# /usr/bin/ODAFileConverter -# -# Test files -# https://knowledge.autodesk.com/support/autocad/downloads/ -# caas/downloads/content/autocad-sample-files.html +''' +@package importDWG +ingroup DRAFT +\brief DWG file importer & exporter + +This module provides support for importing and exporting Autodesk DWG files. +This module is only a thin layer that uses the ODA (formerly Teigha) File +Converter application to convert to/from DXF. Then the real work is done by +importDXF + +The converter may be called +/usr/bin/TeighaFileConverter +/usr/bin/ODAFileConverter + +Test files +https://knowledge.autodesk.com/support/autocad/downloads/ + caas/downloads/content/autocad-sample-files.html +''' +# Check code quality with +# flake8 --ignore=E226,E266,E401,W503 + +# *************************************************************************** +# * * +# * Copyright (c) 2009 Yorik van Havre * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import six import FreeCAD @@ -97,6 +103,7 @@ def insert(filename, docname): dxf = convertToDxf(filename) if dxf: import importDXF + # Warning: function doesn't return? doc = importDXF.insert(dxf, docname) return doc return @@ -156,6 +163,8 @@ def getTeighaConverter(): teigha = None if platform.system() == "Linux": teigha = "/usr/bin/TeighaFileConverter" + if not os.path.exists(teigha): + teigha = "/usr/bin/ODAFileConverter" elif platform.system() == "Windows": odadir = os.path.expandvars("%ProgramFiles%\ODA") if os.path.exists(odadir): From 534014042793f9a88eefae40e88f630265115190 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sun, 4 Aug 2019 21:35:00 -0500 Subject: [PATCH 15/39] Draft: importDWG.py, use FreeCAD.Console.Print, instead of basic Python print() --- src/Mod/Draft/importDWG.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/importDWG.py b/src/Mod/Draft/importDWG.py index 5f51835235..3ed05ec142 100644 --- a/src/Mod/Draft/importDWG.py +++ b/src/Mod/Draft/importDWG.py @@ -45,6 +45,8 @@ https://knowledge.autodesk.com/support/autocad/downloads/ # * * # *************************************************************************** +# TODO: use subprocess.popen() instead of subprocess.call() + import six import FreeCAD from FreeCAD import Console as FCC @@ -208,7 +210,8 @@ def convertToDxf(dwgfilename): basename = os.path.basename(dwgfilename) cmdline = ('"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"' % (teigha, indir, outdir, basename)) - print("Converting: " + cmdline) + FCC.PrintMessage(translate("ImportDWG", "Converting: ") + + cmdline + "\n") if six.PY2: if isinstance(cmdline, six.text_type): encoding = sys.getfilesystemencoding() @@ -216,7 +219,8 @@ def convertToDxf(dwgfilename): subprocess.call(cmdline, shell=True) # os.system(cmdline) result = outdir + os.sep + os.path.splitext(basename)[0] + ".dxf" if os.path.exists(result): - print("Conversion successful") + FCC.PrintMessage(translate("ImportDWG", + "Conversion successful") + "\n") return result else: _msg = ("Error during DWG to DXF conversion. " @@ -252,7 +256,8 @@ def convertToDwg(dxffilename, dwgfilename): basename = os.path.basename(dxffilename) cmdline = ('"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"' % (teigha, indir, outdir, basename)) - print("converting " + cmdline) + FCC.PrintMessage(translate("ImportDWG", "Converting: ") + + cmdline + "\n") subprocess.call(cmdline, shell=True) # os.system(cmdline) return dwgfilename return None From 3f99446607aa4afc0ec859f78487ae73b4c085cf Mon Sep 17 00:00:00 2001 From: Amritpal Singh Date: Fri, 9 Aug 2019 20:32:57 +0530 Subject: [PATCH 16/39] [AddonManager] Added RebarAddon icon. Issue link: https://github.com/amrit3701/FreeCAD-Reinforcement/issues/24 --- .../AddonManager/Resources/AddonManager.qrc | 1 + .../icons/Reinforcement_workbench_icon.svg | 169 ++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 src/Mod/AddonManager/Resources/icons/Reinforcement_workbench_icon.svg diff --git a/src/Mod/AddonManager/Resources/AddonManager.qrc b/src/Mod/AddonManager/Resources/AddonManager.qrc index a38442a591..78f28880a2 100644 --- a/src/Mod/AddonManager/Resources/AddonManager.qrc +++ b/src/Mod/AddonManager/Resources/AddonManager.qrc @@ -31,6 +31,7 @@ icons/Part-o-magic_workbench_icon.svg icons/Plot_workbench_icon.svg icons/pyrate_workbench_icon.svg + icons/Reinforcement_workbench_icon.svg icons/Reporting_workbench_icon.svg icons/Render_workbench_icon.svg icons/sheetmetal_workbench_icon.svg diff --git a/src/Mod/AddonManager/Resources/icons/Reinforcement_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/Reinforcement_workbench_icon.svg new file mode 100644 index 0000000000..fed850ea00 --- /dev/null +++ b/src/Mod/AddonManager/Resources/icons/Reinforcement_workbench_icon.svg @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [Yorik van Havre] + + + Arch_Rebar + 2013-10-07 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Arch/Resources/icons/Arch_Rebar.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + From a2103d814fd60a89ffbd9631f22ba559ec9685a8 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sat, 10 Aug 2019 17:19:10 -0500 Subject: [PATCH 17/39] Draft: DraftGui.py, the docstrings need triple quotes and be next to the method or class in order to be picked up by Doxygen or Sphinx; this complies with PEP 257 --- src/Mod/Draft/DraftGui.py | 89 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index a2b5749f21..e8a80c7289 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -34,10 +34,9 @@ __url__ = ["http://www.freecadweb.org"] # toolbars and task panels, and Qt-dependent utilities such as # a delayed (todo) commit system -''' -This is the GUI part of the Draft module. +"""This is the GUI part of the Draft module. Report to Draft.py for info -''' +""" import six @@ -128,12 +127,13 @@ inCommandShortcuts = { class todo: - ''' static todo class, delays execution of functions. Use todo.delay + """static todo class, delays execution of functions. Use todo.delay to schedule geometry manipulation that would crash coin if done in the - event callback''' + event callback - '''List of (function, argument) pairs to be executed by - QtCore.QTimer.singleShot(0,doTodo).''' + List of (function, argument) pairs to be executed by + QtCore.QTimer.singleShot(0,doTodo). + """ itinerary = [] commitlist = [] afteritinerary = [] @@ -283,7 +283,7 @@ class DraftBaseWidget(QtGui.QWidget): return QtGui.QWidget.eventFilter(self, widget, event) class DraftDockWidget(DraftBaseWidget): - "custom Widget that emits a resized() signal when resized" + """custom Widget that emits a resized() signal when resized""" def __init__(self,parent = None): QtGui.QWidget.__init__(self,parent) def resizeEvent(self,event): @@ -295,7 +295,7 @@ class DraftDockWidget(DraftBaseWidget): QtGui.QWidget.changeEvent(self,event) class DraftLineEdit(QtGui.QLineEdit): - "custom QLineEdit widget that has the power to catch Escape keypress" + """custom QLineEdit widget that has the power to catch Escape keypress""" def __init__(self, parent=None): QtGui.QLineEdit.__init__(self, parent) def keyPressEvent(self, event): @@ -336,7 +336,7 @@ class DraftTaskPanel: return False class DraftToolBar: - "main draft Toolbar" + """main draft Toolbar""" def __init__(self): self.tray = None self.sourceCmd = None @@ -508,7 +508,7 @@ class DraftToolBar: layout.addWidget(cb) def setupToolBar(self,task=False): - "sets the draft toolbar up" + """sets the draft toolbar up""" # command @@ -753,7 +753,7 @@ class DraftToolBar: #QtCore.QObject.connect(self.STrackValue,QtCore.SIGNAL("returnPressed()"),self.checkSTrack) def setupTray(self): - "sets draft tray buttons up" + """sets draft tray buttons up""" self.wplabel = self._pushbutton("wplabel", self.toptray, icon='Draft_SelectPlane',hide=False,width=120) defaultWP = Draft.getParam("defaultWP",0) @@ -947,7 +947,7 @@ class DraftToolBar: else: # create a dummy task to block the UI during the works class dummy: - "an empty dialog" + """an empty dialog""" def __init__(self,extra=None): if extra: if isinstance(extra,list): @@ -972,7 +972,7 @@ class DraftToolBar: self.setTitle(title,icon) def redraw(self): - "utility function that is performed after each clicked point" + """utility function that is performed after each clicked point""" self.checkLocal() def setFocus(self,f=None): @@ -1356,7 +1356,7 @@ class DraftToolBar: self.delButton.setChecked(not(addmode)) def checkLocal(self): - "checks if x,y,z coords must be displayed as local or global" + """checks if x,y,z coords must be displayed as local or global""" self.labelx.setText(translate("draft", "Global X")) self.labely.setText(translate("draft", "Global Y")) self.labelz.setText(translate("draft", "Global Z")) @@ -1408,14 +1408,14 @@ class DraftToolBar: p.SetBool("OffsetCopyMode",bool(val)) def relocate(self): - "relocates the right-aligned buttons depending on the toolbar size" + """relocates the right-aligned buttons depending on the toolbar size""" if self.baseWidget.geometry().width() < 400: self.layout.setDirection(QtGui.QBoxLayout.TopToBottom) else: self.layout.setDirection(QtGui.QBoxLayout.LeftToRight) def makeDumbTask(self,extra=None,callback=None): - "create a dumb taskdialog to prevent deleting the temp object" + """create a dumb taskdialog to prevent deleting the temp object""" class TaskPanel: def __init__(self,extra=None,callback=None): if extra: @@ -1431,7 +1431,7 @@ class DraftToolBar: FreeCADGui.Control.showDialog(panel) def setGridSize(self,text): - "sets the Draft grid to the given grid size" + """sets the Draft grid to the given grid size""" try: q = FreeCAD.Units.Quantity(text) except: @@ -1442,7 +1442,7 @@ class DraftToolBar: FreeCADGui.Snapper.setGrid() def setMainline(self,val): - "sets the grid main lines" + """sets the grid main lines""" if val > 1: Draft.setParam("gridEvery",val) if hasattr(FreeCADGui,"Snapper"): @@ -1456,7 +1456,7 @@ class DraftToolBar: #--------------------------------------------------------------------------- def getcol(self): - "opens a color picker dialog" + """opens a color picker dialog""" oldColor = self.color self.color=QtGui.QColorDialog.getColor() if not QtGui.QColor.isValid(self.color): #user canceled @@ -1480,7 +1480,7 @@ class DraftToolBar: i.ViewObject.PointColor = col def getfacecol(self): - "opens a color picker dialog" + """opens a color picker dialog""" oldColor = self.facecolor self.facecolor=QtGui.QColorDialog.getColor() if not QtGui.QColor.isValid(self.facecolor): #user canceled @@ -1546,7 +1546,7 @@ class DraftToolBar: self.updateSnapper() def validatePoint(self): - "function for checking and sending numbers entered manually" + """function for checking and sending numbers entered manually""" if self.sourceCmd or self.pointcallback: if (self.labelRadius.isVisible()): try: @@ -1673,7 +1673,7 @@ class DraftToolBar: def finish(self): - "finish button action" + """finish button action""" if self.sourceCmd: self.sourceCmd.finish(False) if self.cancel: @@ -1683,27 +1683,27 @@ class DraftToolBar: FreeCADGui.ActiveDocument.resetEdit() def escape(self): - "escapes the current command" + """escapes the current command""" self.continueMode = False if not self.taskmode: self.continueCmd.setChecked(False) self.finish() def closeLine(self): - "close button action" + """close button action""" self.sourceCmd.finish(True) FreeCADGui.ActiveDocument.resetEdit() def wipeLine(self): - "wipes existing segments of a line" + """wipes existing segments of a line""" self.sourceCmd.wipe() def orientWP(self): - "reorients the current working plane" + """reorients the current working plane""" self.sourceCmd.orientWP() def selectEdge(self): - "allows the dimension command to select an edge" + """allows the dimension command to select an edge""" if hasattr(self.sourceCmd,"selectEdge"): self.sourceCmd.selectEdge() @@ -1726,15 +1726,14 @@ class DraftToolBar: self.sourceCmd.selectHandler("alignToWP") def undoSegment(self): - "undo last line segment" + """undo last line segment""" if hasattr(self.sourceCmd,"undolast"): self.sourceCmd.undolast() def checkSpecialChars(self,txt): - ''' - checks for special characters in the entered coords that must be + """checks for special characters in the entered coords that must be treated as shortcuts - ''' + """ # in-command shortcut definitions #Relative @@ -1840,7 +1839,7 @@ class DraftToolBar: self.updateSnapper() def updateSnapper(self): - "updates the snapper track line if applicable" + """updates the snapper track line if applicable""" if hasattr(FreeCADGui,"Snapper"): if FreeCADGui.Snapper.trackLine: if FreeCADGui.Snapper.trackLine.Visible: @@ -1863,10 +1862,9 @@ class DraftToolBar: self.textValue.setText(tstr) def sendText(self): - ''' - this function sends the entered text to the active draft command + """this function sends the entered text to the active draft command if enter has been pressed twice. Otherwise it blanks the line. - ''' + """ if self.textline == len(self.textbuffer): if self.textline: if not self.currEditText: @@ -1884,7 +1882,7 @@ class DraftToolBar: self.setCurrentText('') def lineUp(self): - "displays previous line in text editor" + """displays previous line in text editor""" if self.textline: if self.textline == len(self.textbuffer): self.textbuffer.append(self.textValue.text()) @@ -1897,7 +1895,7 @@ class DraftToolBar: self.textValue.setText(self.textbuffer[self.textline]) def displayPoint(self, point=None, last=None, plane=None, mask=None): - "this function displays the passed coords in the x, y, and z widgets" + """this function displays the passed coords in the x, y, and z widgets""" if self.taskmode and (not self.isTaskOn): return @@ -1966,7 +1964,7 @@ class DraftToolBar: def getDefaultColor(self,type,rgb=False): - "gets color from the preferences or toolbar" + """gets color from the preferences or toolbar""" r = 0 g = 0 b = 0 @@ -1997,7 +1995,7 @@ class DraftToolBar: return (r,g,b) def cross(self,on=True): - "deprecated" + """deprecated""" pass def toggleConstrMode(self,checked): @@ -2045,7 +2043,7 @@ class DraftToolBar: FreeCADGui.runCommand("Draft_SelectPlane") def popupMenu(self,llist,ilist=None,pos=None): - "pops up a menu filled with the given list" + """pops up a menu filled with the given list""" self.groupmenu = QtGui.QMenu() for i,l in enumerate(llist): if ilist: @@ -2363,7 +2361,7 @@ class FacebinderTaskPanel: return int(QtGui.QDialogButtonBox.Ok) def update(self): - 'fills the treewidget' + """fills the treewidget""" self.tree.clear() if self.obj: for f in self.obj.Faces: @@ -2439,8 +2437,7 @@ class FacebinderTaskPanel: class ScaleTaskPanel: - - '''A Task Panel for the Scale tool''' + """A Task Panel for the Scale tool""" def __init__(self): self.sourceCmd = None @@ -2628,7 +2625,7 @@ class ShapeStringTaskPanel: self.setPoint(origin) def action(self,arg): - "scene event handler" + """scene event handler""" import DraftTools if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": @@ -2648,7 +2645,7 @@ class ShapeStringTaskPanel: self.task.sbZ.setProperty('rawValue',point.z) def createObject(self): - "creates object in the current doc" + """creates object in the current doc""" dquote = '"' if sys.version_info.major < 3: # Python3: no more unicode String = 'u' + dquote + str(self.task.leString.text().encode('unicode_escape')) + dquote From 445538c7dd1a3251ea00b7e570cce3e3cca06d7d Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Fri, 9 Aug 2019 00:51:27 -0500 Subject: [PATCH 18/39] Draft: WorkingPlane, improved Pythonic style, line length < 79 characters; shorter variables to save space and have line lengths < 79 characters; added whitespace to comments and used the self.__repr__() method to shorten the impression to the terminal; broke the line inside parentheses to make the line shorter; inside alignToSelection() test for faces first to use alignToFace(), which actually works; leave alignToCurve() for later, as it doesn't actually do anything at the moment; improved docstrings in isOrtho(), the orthogonality is tested for u, v, and axis, on the global axis +Y only; removed wrongly placed comment in restore() method; improved file docstring at the top. --- src/Mod/Draft/WorkingPlane.py | 133 +++++++++++++++++++++------------- 1 file changed, 83 insertions(+), 50 deletions(-) diff --git a/src/Mod/Draft/WorkingPlane.py b/src/Mod/Draft/WorkingPlane.py index e839bfc7a1..b11cf08403 100644 --- a/src/Mod/Draft/WorkingPlane.py +++ b/src/Mod/Draft/WorkingPlane.py @@ -4,11 +4,15 @@ # # This module provides the plane class which provides a virtual working plane # in FreeCAD and a couple of utility functions. -""" +"""@package WorkingPlane +\ingroup DRAFT +\brief This module handles the working plane and grid of the Draft Workbench. + This module provides the plane class which provides a virtual working plane in FreeCAD and a couple of utility functions. -The Working Plane is mostly intended to be used in the Draft Workbench -to draw 2D objects. +The working plane is mostly intended to be used in the Draft Workbench +to draw 2D objects in various orientations, not only in the standard XY, +YZ, and XZ planes. """ # *************************************************************************** @@ -37,6 +41,7 @@ to draw 2D objects. import FreeCAD, math, DraftVecUtils from FreeCAD import Vector +from FreeCAD import Console as FCC __title__ = "FreeCAD Working Plane utility" __author__ = "Ken Cline" @@ -67,7 +72,9 @@ class plane: A placeholder for a stored state. """ - def __init__(self, u=Vector(1, 0, 0), v=Vector(0, 1, 0), w=Vector(0, 0, 1), pos=Vector(0, 0, 0)): + def __init__(self, + u=Vector(1, 0, 0), v=Vector(0, 1, 0), w=Vector(0, 0, 1), + pos=Vector(0, 0, 0)): """Initialize the working plane. Parameters @@ -98,7 +105,11 @@ class plane: def __repr__(self): """Show the string representation of the object.""" - return "Workplane x="+str(DraftVecUtils.rounded(self.u))+" y="+str(DraftVecUtils.rounded(self.v))+" z="+str(DraftVecUtils.rounded(self.axis)) + text = "Workplane" + text += " x=" + str(DraftVecUtils.rounded(self.u)) + text += " y=" + str(DraftVecUtils.rounded(self.v)) + text += " z=" + str(DraftVecUtils.rounded(self.axis)) + return text def copy(self): """Return a new plane that is a copy of the present object.""" @@ -198,7 +209,8 @@ class plane: **Note:** for 2D these trigonometric operations produce the full `|xp|` distance. """ - if direction == None: direction = self.axis + if direction is None: + direction = self.axis return direction.dot(self.position.sub(p)) def projectPoint(self, p, direction=None): @@ -257,7 +269,7 @@ class plane: if not direction: direction = self.axis t = Vector(direction) - #t.normalize() + # t.normalize() a = round(t.getAngle(self.axis), DraftVecUtils.precision()) pp = round((math.pi)/2, DraftVecUtils.precision()) if a == pp: @@ -314,8 +326,8 @@ class plane: offsetVector.multiply(offset) self.position = point.add(offsetVector) self.weak = False - # FreeCAD.Console.PrintMessage("(position = " + str(self.position) + ")\n") - # FreeCAD.Console.PrintMessage("Current workplane: x="+str(DraftVecUtils.rounded(self.u))+" y="+str(DraftVecUtils.rounded(self.v))+" z="+str(DraftVecUtils.rounded(self.axis))+"\n") + # FCC.PrintMessage("(position = " + str(self.position) + ")\n") + # FCC.PrintMessage(self.__repr__() + "\n") def alignToPointAndAxis_SVG(self, point, axis, offset=0): """Align the working plane to a point and an axis (vector). @@ -387,50 +399,51 @@ class plane: self.u = axis.negative().cross(ref_vec) self.u.normalize() self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) - #projcase = "Case new" + # projcase = "Case new" elif ((abs(axis.y) > abs(axis.z)) and (abs(axis.z) >= abs(axis.x))): ref_vec = Vector(1.0, 0.0, 0.0) self.u = axis.negative().cross(ref_vec) self.u.normalize() self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) - #projcase = "Y>Z, View Y" + # projcase = "Y>Z, View Y" elif ((abs(axis.y) >= abs(axis.x)) and (abs(axis.x) > abs(axis.z))): ref_vec = Vector(0.0, 0., 1.0) self.u = axis.cross(ref_vec) self.u.normalize() self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) - #projcase = "ehem. XY, Case XY" + # projcase = "ehem. XY, Case XY" elif ((abs(axis.x) > abs(axis.z)) and (abs(axis.z) >= abs(axis.y))): self.u = axis.cross(ref_vec) self.u.normalize() self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) - #projcase = "X>Z, View X" + # projcase = "X>Z, View X" elif ((abs(axis.z) >= abs(axis.y)) and (abs(axis.y) > abs(axis.x))): ref_vec = Vector(1.0, 0., 0.0) self.u = axis.cross(ref_vec) self.u.normalize() self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) - #projcase = "Y>X, Case YZ" + # projcase = "Y>X, Case YZ" else: self.u = axis.negative().cross(ref_vec) self.u.normalize() self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) - #projcase = "else" + # projcase = "else" - #spat_vec = self.u.cross(self.v) - #spat_res = spat_vec.dot(axis) - #FreeCAD.Console.PrintMessage(projcase + " spat Prod = " + str(spat_res) + "\n") + # spat_vec = self.u.cross(self.v) + # spat_res = spat_vec.dot(axis) + # FCC.PrintMessage(projcase + " spat Prod = " + str(spat_res) + "\n") - offsetVector = Vector(axis); offsetVector.multiply(offset) + offsetVector = Vector(axis) + offsetVector.multiply(offset) self.position = point.add(offsetVector) self.weak = False - # FreeCAD.Console.PrintMessage("(position = " + str(self.position) + ")\n") - # FreeCAD.Console.PrintMessage("Current workplane: x="+str(DraftVecUtils.rounded(self.u))+" y="+str(DraftVecUtils.rounded(self.v))+" z="+str(DraftVecUtils.rounded(self.axis))+"\n") + # FCC.PrintMessage("(position = " + str(self.position) + ")\n") + # FCC.PrintMessage(self.__repr__() + "\n") def alignToCurve(self, shape, offset=0): """Align plane to curve. NOT YET IMPLEMENTED. @@ -453,10 +466,10 @@ class plane: if shape.isNull(): return False elif shape.ShapeType == 'Edge': - #??? TODO: process curve here. look at shape.edges[0].Curve + # ??? TODO: process curve here. look at shape.edges[0].Curve return False elif shape.ShapeType == 'Wire': - #??? TODO: determine if edges define a plane + # ??? TODO: determine if edges define a plane return False else: return False @@ -490,7 +503,7 @@ class plane: v1.normalize() v2.normalize() v3.normalize() - #print v1,v2,v3 + # print(v1,v2,v3) self.u = v1 self.v = v2 self.axis = v3 @@ -528,7 +541,9 @@ class plane: """ # Set face to the unique selected face, if found if shape.ShapeType == 'Face': - self.alignToPointAndAxis(shape.Faces[0].CenterOfMass, shape.Faces[0].normalAt(0, 0), offset) + self.alignToPointAndAxis(shape.Faces[0].CenterOfMass, + shape.Faces[0].normalAt(0, 0), + offset) import DraftGeomUtils q = DraftGeomUtils.getQuad(shape) if q: @@ -625,12 +640,13 @@ class plane: if len(sex) == 0: return False elif len(sex) == 1: - if not sex[0].Object.isDerivedFrom("Part::Feature") \ - or not sex[0].Object.Shape: + if (not sex[0].Object.isDerivedFrom("Part::Feature") + or not sex[0].Object.Shape): return False - return self.alignToCurve(sex[0].Object.Shape, offset) \ - or self.alignToFace(sex[0].Object.Shape, offset) \ - or (len(sex[0].SubObjects) == 1 and self.alignToFace(sex[0].SubObjects[0], offset)) + return (self.alignToFace(sex[0].Object.Shape, offset) + or (len(sex[0].SubObjects) == 1 + and self.alignToFace(sex[0].SubObjects[0], offset)) + or self.alignToCurve(sex[0].Object.Shape, offset)) else: # len(sex) > 2, look for point and line, three points, etc. return False @@ -673,12 +689,19 @@ class plane: try: import FreeCADGui from pivy import coin - rot = FreeCADGui.ActiveDocument.ActiveView.getCameraNode().getField("orientation").getValue() - upvec = Vector(rot.multVec(coin.SbVec3f(0, 1, 0)).getValue()) - vdir = FreeCADGui.ActiveDocument.ActiveView.getViewDirection() - if (vdir.getAngle(self.axis) > 0.001) and (vdir.getAngle(self.axis) < 3.14159): - # don't change the WP if it is already perpendicular to the current view - self.alignToPointAndAxis(Vector(0, 0, 0), vdir.negative(), 0, upvec) + view = FreeCADGui.ActiveDocument.ActiveView + camera = view.getCameraNode() + rot = camera.getField("orientation").getValue() + coin_up = coin.SbVec3f(0, 1, 0) + upvec = Vector(rot.multVec(coin_up).getValue()) + vdir = view.getViewDirection() + # The angle is between 0 and 180 degrees. + angle = vdir.getAngle(self.axis) + if (angle > 0.001) and (angle < 3.14159): + # don't change the plane if it is already + # perpendicular to the current view + self.alignToPointAndAxis(Vector(0, 0, 0), + vdir.negative(), 0, upvec) except: pass self.weak = True @@ -709,8 +732,9 @@ class plane: # Arch active container if FreeCAD.GuiUp: import FreeCADGui - if FreeCADGui.ActiveDocument.ActiveView: - a = FreeCADGui.ActiveDocument.ActiveView.getActiveObject("Arch") + view = FreeCADGui.ActiveDocument.ActiveView + if view: + a = view.getActiveObject("Arch") if a: p = a.Placement.inverse().multiply(p) return p @@ -744,9 +768,10 @@ class plane: 0.0, 0.0, 0.0, 1.0) p = FreeCAD.Placement(m) # Arch active container if based on App Part - #if FreeCAD.GuiUp: + # if FreeCAD.GuiUp: # import FreeCADGui - # a = FreeCADGui.ActiveDocument.ActiveView.getActiveObject("Arch") + # view = FreeCADGui.ActiveDocument.ActiveView + # a = view.getActiveObject("Arch") # if a: # p = a.Placement.inverse().multiply(p) return p @@ -761,9 +786,10 @@ class plane: """ n = self.axis # Arch active container if based on App Part - #if FreeCAD.GuiUp: + # if FreeCAD.GuiUp: # import FreeCADGui - # a = FreeCADGui.ActiveDocument.ActiveView.getActiveObject("Arch") + # view = FreeCADGui.ActiveDocument.ActiveView + # a = view.getActiveObject("Arch") # if a: # n = a.Placement.inverse().Rotation.multVec(n) return n @@ -818,7 +844,6 @@ class plane: Restores the attributes `u`, `v`, `axis`, `position` and `weak` from `stored`, and set `stored` to `None`. """ - "restores a previously saved plane state, if exists" if self.stored: self.u = self.stored[0] self.v = self.stored[1] @@ -1071,22 +1096,30 @@ class plane: def isOrtho(self): """Return True if the plane axes are orthogonal with the global axes. - Orthogonal means that the angle between `u` and the global axis `+X` + Orthogonal means that the angle between `u` and the global axis `+Y` is a multiple of 90 degrees, meaning 0, -90, 90, -180, 180, -270, 270, or 360 degrees. - And similarly for `v` and `axis` with `+Y` and `+Z`, respectively. + And similarly for `v` and `axis`. + All three axes should be orthogonal to the `+Y` axis. + + Due to rounding errors, the angle difference is rounded + to 6 decimal digits to do the test. Returns ------- bool Returns `True` if all three `u`, `v`, and `axis` - are orthogonal with their respective global axes `+X`, `+Y`, - and `+Z`. + are orthogonal with the global axis `+Y`. Otherwise it returns `False`. """ - if round(self.u.getAngle(Vector(0, 1, 0)), 6) in [0, -1.570796, 1.570796, -3.141593, 3.141593, -4.712389, 4.712389, 6.283185]: - if round(self.v.getAngle(Vector(0, 1, 0)), 6) in [0, -1.570796, 1.570796, -3.141593, 3.141593, -4.712389, 4.712389, 6.283185]: - if round(self.axis.getAngle(Vector(0, 1, 0)), 6) in [0, -1.570796, 1.570796, -3.141593, 3.141593, -4.712389, 4.712389, 6.283185]: + ortho = [0, -1.570796, 1.570796, + -3.141593, 3.141593, + -4.712389, 4.712389, 6.283185] + # Shouldn't the angle difference be calculated with + # the other global axes `+X` and `+Z` as well? + if round(self.u.getAngle(Vector(0, 1, 0)), 6) in ortho: + if round(self.v.getAngle(Vector(0, 1, 0)), 6) in ortho: + if round(self.axis.getAngle(Vector(0, 1, 0)), 6) in ortho: return True return False From cf368ac2b028fed538fa0a0ba6fd5d11ddd0ae50 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sat, 10 Aug 2019 13:37:49 -0500 Subject: [PATCH 19/39] Draft: DraftLayer, the docstrings need triple quotes next to the method or class name so they are correctly picked up by the Doxygen or Sphinx program to generate the documentation --- src/Mod/Draft/DraftLayer.py | 50 ++++++++----------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/src/Mod/Draft/DraftLayer.py b/src/Mod/Draft/DraftLayer.py index e829fc1984..166e1d0fd2 100644 --- a/src/Mod/Draft/DraftLayer.py +++ b/src/Mod/Draft/DraftLayer.py @@ -31,14 +31,13 @@ def translate(ctx,txt): def QT_TRANSLATE_NOOP(ctx,txt): return txt -"This module contains everything related to Draft Layers" +"""This module contains everything related to Draft Layers""" def makeLayer(name=None,linecolor=None,drawstyle=None,shapecolor=None,transparency=None): - - '''makeLayer([name,linecolor,drawstyle,shapecolor,transparency]): - creates a Layer object in the active document''' - + """makeLayer([name,linecolor,drawstyle,shapecolor,transparency]): + creates a Layer object in the active document + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError(translate("draft","No active document. Aborting")+"\n") return @@ -63,9 +62,7 @@ def makeLayer(name=None,linecolor=None,drawstyle=None,shapecolor=None,transparen def getLayerContainer(): - - '''getLayerContainer(): returns a group object to put layers in''' - + """getLayerContainer(): returns a group object to put layers in""" for obj in FreeCAD.ActiveDocument.Objects: if obj.Name == "LayerContainer": return obj @@ -78,17 +75,14 @@ def getLayerContainer(): class CommandLayer(): - - "The Draft_Layer FreeCAD command" + """The Draft_Layer FreeCAD command""" def GetResources(self): - return {'Pixmap' : 'Draft_VisGroup', 'MenuText': QT_TRANSLATE_NOOP("Draft_Layer", "Layer"), 'ToolTip' : QT_TRANSLATE_NOOP("Draft_Layer", "Adds a layer")} def Activated(self): - import FreeCADGui FreeCAD.ActiveDocument.openTransaction("Create Layer") FreeCADGui.addModule("Draft") @@ -99,31 +93,25 @@ class CommandLayer(): class Layer: - - "The Draft Layer object" + """The Draft Layer object""" def __init__(self,obj): - self.Type = "Layer" obj.Proxy = self self.Object = obj self.setProperties(obj) def onDocumentRestored(self,obj): - self.setProperties(obj) def setProperties(self,obj): - if not "Group" in obj.PropertiesList: obj.addProperty("App::PropertyLinkList","Group","Layer",QT_TRANSLATE_NOOP("App::Property","The objects that are part of this layer")) def __getstate__(self): - return self.Type def __setstate__(self,state): - if state: self.Type = state @@ -131,7 +119,6 @@ class Layer: pass def addObject(self,obj,child): - g = obj.Group if not child in g: g.append(child) @@ -139,11 +126,9 @@ class Layer: class ViewProviderLayer: - - "A View Provider for the Layer object" + """A View Provider for the Layer object""" def __init__(self,vobj): - vobj.addProperty("App::PropertyBool","OverrideChildren","Layer",QT_TRANSLATE_NOOP("App::Property","If on, the child objects of this layer will match its visual aspects")) vobj.addProperty("App::PropertyColor","LineColor","Layer",QT_TRANSLATE_NOOP("App::Property","The line color of the children of this layer")) vobj.addProperty("App::PropertyColor","ShapeColor","Layer",QT_TRANSLATE_NOOP("App::Property","The shape color of the children of this layer")) @@ -164,14 +149,12 @@ class ViewProviderLayer: vobj.Proxy = self def getIcon(self): - if hasattr(self,"icondata"): return self.icondata import Draft_rc return ":/icons/Draft_VisGroup.svg" def attach(self,vobj): - self.Object = vobj.Object from pivy import coin sep = coin.SoGroup() @@ -179,37 +162,29 @@ class ViewProviderLayer: return def claimChildren(self): - if hasattr(self,"Object") and hasattr(self.Object,"Group"): return self.Object.Group def getDisplayModes(self, vobj): - return ["Default"] def getDefaultDisplayMode(self): - return "Default" def setDisplayMode(self, mode): - return mode def __getstate__(self): - return None def __setstate__(self,state): - return None def updateData(self,obj,prop): - if prop == "Group": self.onChanged(obj.ViewObject,"LineColor") def onChanged(self,vobj,prop): - if hasattr(vobj,"OverrideChildren") and vobj.OverrideChildren: if hasattr(vobj,"Object")and hasattr(vobj.Object,"Group"): for o in vobj.Object.Group: @@ -249,15 +224,12 @@ class ViewProviderLayer: self.icondata = ba.data().decode("latin1") def canDragObject(self,obj): - return True def canDragObjects(self): - return True def dragObject(self,vobj,otherobj): - if hasattr(vobj.Object,"Group"): if otherobj in vobj.Object.Group: g = vobj.Object.Group @@ -309,8 +281,7 @@ class ViewProviderLayer: class LayerContainer: - - "The Layer Container" + """The Layer Container""" def __init__(self,obj): @@ -335,8 +306,7 @@ class LayerContainer: class ViewProviderLayerContainer: - - "A View Provider for the Layer Container" + """A View Provider for the Layer Container""" def __init__(self,vobj): From 09046c98b1306f408c38f2b3d09b7b28828f3cac Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sat, 10 Aug 2019 16:24:38 -0500 Subject: [PATCH 20/39] Draft: Draft.py, the docstrings need triple quotes and be next to the method or class in order to be picked up by Doxygen or Sphinx; this complies with PEP 257 --- src/Mod/Draft/Draft.py | 299 ++++++++++++++++++++--------------------- 1 file changed, 146 insertions(+), 153 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 38792ab8fd..9c57686630 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -45,7 +45,7 @@ __url__ = "http://www.freecadweb.org" # # @{ -'''The Draft module offers a range of tools to create and manipulate basic 2D objects''' +"""The Draft module offers a range of tools to create and manipulate basic 2D objects""" import FreeCAD, math, sys, os, DraftVecUtils, WorkingPlane from FreeCAD import Vector @@ -93,7 +93,7 @@ def stringencodecoin(ustr): return ustr.encode('latin1') def typecheck (args_and_types, name="?"): - "typecheck([arg1,type),(arg2,type),...]): checks arguments types" + """typecheck([arg1,type),(arg2,type),...]): checks arguments types""" for v,t in args_and_types: if not isinstance (v,t): w = "typecheck[" + str(name) + "]: " @@ -125,7 +125,7 @@ def getParamType(param): return None def getParam(param,default=None): - "getParam(parameterName): returns a Draft parameter value from the current config" + """getParam(parameterName): returns a Draft parameter value from the current config""" p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") t = getParamType(param) #print("getting param ",param, " of type ",t, " default: ",str(default)) @@ -157,7 +157,7 @@ def getParam(param,default=None): return None def setParam(param,value): - "setParam(parameterName,value): sets a Draft parameter with the given value" + """setParam(parameterName,value): sets a Draft parameter with the given value""" p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") t = getParamType(param) if t == "int": @@ -178,11 +178,11 @@ def setParam(param,value): p.SetUnsigned(param,value) def precision(): - "precision(): returns the precision value from Draft user settings" + """precision(): returns the precision value from Draft user settings""" return getParam("precision",6) def tolerance(): - "tolerance(): returns the tolerance value from Draft user settings" + """tolerance(): returns the tolerance value from Draft user settings""" return getParam("tolerance",0.05) def epsilon(): @@ -191,14 +191,14 @@ def epsilon(): return (1.0/(10.0**tolerance())) def getRealName(name): - "getRealName(string): strips the trailing numbers from a string name" + """getRealName(string): strips the trailing numbers from a string name""" for i in range(1,len(name)): if not name[-i] in '1234567890': return name[:len(name)-(i-1)] return name def getType(obj): - "getType(object): returns the Draft type of the given object" + """getType(object): returns the Draft type of the given object""" import Part if not obj: return None @@ -237,7 +237,7 @@ def getObjectsOfType(objectslist,typ): return objs def get3DView(): - "get3DView(): returns the current view if it is 3D, or the first 3D view found, or None" + """get3DView(): returns the current view if it is 3D, or the first 3D view found, or None""" if FreeCAD.GuiUp: import FreeCADGui v = FreeCADGui.ActiveDocument.ActiveView @@ -267,7 +267,7 @@ def isClone(obj,objtype,recursive=False): return False def getGroupNames(): - "returns a list of existing groups in the document" + """returns a list of existing groups in the document""" glist = [] doc = FreeCAD.ActiveDocument for obj in doc.Objects: @@ -276,7 +276,7 @@ def getGroupNames(): return glist def ungroup(obj): - "removes the current object from any group it belongs to" + """removes the current object from any group it belongs to""" for g in getGroupNames(): grp = FreeCAD.ActiveDocument.getObject(g) if obj in grp.Group: @@ -285,7 +285,7 @@ def ungroup(obj): grp.Group = g def autogroup(obj): - "adds a given object to the autogroup, if applicable" + """adds a given object to the autogroup, if applicable""" if FreeCAD.GuiUp: if hasattr(FreeCADGui,"draftToolBar"): if hasattr(FreeCADGui.draftToolBar,"autogroup") and (not FreeCADGui.draftToolBar.isConstructionMode()): @@ -307,7 +307,7 @@ def autogroup(obj): a.addObject(obj) def dimSymbol(symbol=None,invert=False): - "returns the current dim symbol from the preferences as a pivy SoMarkerSet" + """returns the current dim symbol from the preferences as a pivy SoMarkerSet""" if symbol == None: symbol = getParam("dimsymbol",0) from pivy import coin @@ -346,9 +346,9 @@ def dimSymbol(symbol=None,invert=False): return coin.SoSphere() def dimDash(p1, p2): - '''dimDash(p1, p2): returns pivy SoSeparator. + """dimDash(p1, p2): returns pivy SoSeparator. Used for making Tick-2, DimOvershoot, ExtOvershoot dashes. - ''' + """ from pivy import coin dash = coin.SoSeparator() v = coin.SoVertexProperty() @@ -360,8 +360,8 @@ def dimDash(p1, p2): return dash def shapify(obj): - '''shapify(object): transforms a parametric shape object into - non-parametric and returns the new object''' + """shapify(object): transforms a parametric shape object into + non-parametric and returns the new object""" if not (obj.isDerivedFrom("Part::Feature")): return None if not "Shape" in obj.PropertiesList: return None shape = obj.Shape @@ -390,10 +390,10 @@ def shapify(obj): return newobj def getGroupContents(objectslist,walls=False,addgroups=False,spaces=False,noarchchild=False): - '''getGroupContents(objectlist,[walls,addgroups]): if any object of the given list + """getGroupContents(objectlist,[walls,addgroups]): if any object of the given list is a group, its content is appended to the list, which is returned. If walls is True, walls and structures are also scanned for included windows or rebars. If addgroups - is true, the group itself is also included in the list.''' + is true, the group itself is also included in the list.""" def getWindows(obj): l = [] if getType(obj) in ["Wall","Structure"]: @@ -475,7 +475,7 @@ def printShape(shape): print(" ",v.Point) def compareObjects(obj1,obj2): - "Prints the differences between 2 objects" + """Prints the differences between 2 objects""" if obj1.TypeId != obj2.TypeId: print(obj1.Name + " and " + obj2.Name + " are of different types") @@ -496,13 +496,13 @@ def compareObjects(obj1,obj2): print("Property " + p + " doesn't exist in one of the objects") def formatObject(target,origin=None): - ''' + """ formatObject(targetObject,[originObject]): This function applies to the given target object the current properties set on the toolbar (line color and line width), or copies the properties of another object if given as origin. It also places the object in construction group if needed. - ''' + """ if not target: return obrep = target.ViewObject @@ -554,19 +554,19 @@ def formatObject(target,origin=None): obrep.DiffuseColor = matchrep.DiffuseColor def getSelection(): - "getSelection(): returns the current FreeCAD selection" + """getSelection(): returns the current FreeCAD selection""" if gui: return FreeCADGui.Selection.getSelection() return None def getSelectionEx(): - "getSelectionEx(): returns the current FreeCAD selection (with subobjects)" + """getSelectionEx(): returns the current FreeCAD selection (with subobjects)""" if gui: return FreeCADGui.Selection.getSelectionEx() return None def select(objs=None): - "select(object): deselects everything and selects only the passed object or list" + """select(object): deselects everything and selects only the passed object or list""" if gui: FreeCADGui.Selection.clearSelection() if objs: @@ -577,7 +577,7 @@ def select(objs=None): FreeCADGui.Selection.addSelection(obj) def loadSvgPatterns(): - "loads the default Draft SVG patterns and custom patters if available" + """loads the default Draft SVG patterns and custom patters if available""" import importSVG from PySide import QtCore FreeCAD.svgpatterns = {} @@ -693,9 +693,9 @@ def loadTexture(filename,size=None): return None def getMovableChildren(objectslist,recursive=True): - '''getMovableChildren(objectslist,[recursive]): extends the given list of objects + """getMovableChildren(objectslist,[recursive]): extends the given list of objects with all child objects that have a "MoveWithHost" property set to True. If - recursive is True, all descendents are considered, otherwise only direct children.''' + recursive is True, all descendents are considered, otherwise only direct children.""" added = [] if not isinstance(objectslist,list): objectslist = [objectslist] @@ -724,13 +724,13 @@ def getMovableChildren(objectslist,recursive=True): return added def makeCircle(radius, placement=None, face=None, startangle=None, endangle=None, support=None): - '''makeCircle(radius,[placement,face,startangle,endangle]) + """makeCircle(radius,[placement,face,startangle,endangle]) or makeCircle(edge,[face]): Creates a circle object with given radius. If placement is given, it is used. If face is False, the circle is shown as a wireframe, otherwise as a face. If startangle AND endangle are given (in degrees), they are used and the object appears as an arc. If an edge - is passed, its Curve must be a Part.Circle''' + is passed, its Curve must be a Part.Circle""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -780,10 +780,10 @@ def makeCircle(radius, placement=None, face=None, startangle=None, endangle=None return obj def makeRectangle(length, height, placement=None, face=None, support=None): - '''makeRectangle(length,width,[placement],[face]): Creates a Rectangle + """makeRectangle(length,width,[placement],[face]): Creates a Rectangle object with length in X direction and height in Y direction. If a placement is given, it is used. If face is False, the - rectangle is shown as a wireframe, otherwise as a face.''' + rectangle is shown as a wireframe, otherwise as a face.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -805,7 +805,7 @@ def makeRectangle(length, height, placement=None, face=None, support=None): return obj def makeDimension(p1,p2,p3=None,p4=None): - '''makeDimension(p1,p2,[p3]) or makeDimension(object,i1,i2,p3) + """makeDimension(p1,p2,[p3]) or makeDimension(object,i1,i2,p3) or makeDimension(objlist,indices,p3): Creates a Dimension object with the dimension line passign through p3.The current line width and color will be used. There are multiple ways to create a dimension, depending on @@ -816,7 +816,7 @@ def makeDimension(p1,p2,p3=None,p4=None): - (object,i1,mode,p3): creates a linked dimension to the given object, i1 is the index of the (curved) edge to measure, and mode is either "radius" or "diameter". - ''' + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -878,9 +878,9 @@ def makeDimension(p1,p2,p3=None,p4=None): return obj def makeAngularDimension(center,angles,p3,normal=None): - '''makeAngularDimension(center,angle1,angle2,p3,[normal]): creates an angular Dimension + """makeAngularDimension(center,angle1,angle2,p3,[normal]): creates an angular Dimension from the given center, with the given list of angles, passing through p3. - ''' + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -912,11 +912,11 @@ def makeAngularDimension(center,angles,p3,normal=None): return obj def makeWire(pointslist,closed=False,placement=None,face=None,support=None): - '''makeWire(pointslist,[closed],[placement]): Creates a Wire object + """makeWire(pointslist,[closed],[placement]): Creates a Wire object from the given list of vectors. If closed is True or first and last points are identical, the wire is closed. If face is true (and wire is closed), the wire will appear filled. Instead of - a pointslist, you can also pass a Part Wire.''' + a pointslist, you can also pass a Part Wire.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -956,12 +956,12 @@ def makeWire(pointslist,closed=False,placement=None,face=None,support=None): return obj def makePolygon(nfaces,radius=1,inscribed=True,placement=None,face=None,support=None): - '''makePolgon(nfaces,[radius],[inscribed],[placement],[face]): Creates a + """makePolgon(nfaces,[radius],[inscribed],[placement],[face]): Creates a polygon object with the given number of faces and the radius. if inscribed is False, the polygon is circumscribed around a circle with the given radius, otherwise it is inscribed. If face is True, the resulting shape is displayed as a face, otherwise as a wireframe. - ''' + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -986,9 +986,9 @@ def makePolygon(nfaces,radius=1,inscribed=True,placement=None,face=None,support= return obj def makeLine(p1,p2=None): - '''makeLine(p1,p2): Creates a line between p1 and p2. + """makeLine(p1,p2): Creates a line between p1 and p2. makeLine(LineSegment): Creates a line from a Part.LineSegment - makeLine(Shape): Creates a line from first vertex to last vertex of the given shape''' + makeLine(Shape): Creates a line from first vertex to last vertex of the given shape""" if not p2: if hasattr(p1,"StartPoint") and hasattr(p1,"EndPoint"): p2 = p1.EndPoint @@ -1003,11 +1003,11 @@ def makeLine(p1,p2=None): return obj def makeBSpline(pointslist,closed=False,placement=None,face=None,support=None): - '''makeBSpline(pointslist,[closed],[placement]): Creates a B-Spline object + """makeBSpline(pointslist,[closed],[placement]): Creates a B-Spline object from the given list of vectors. If closed is True or first and last points are identical, the wire is closed. If face is true (and wire is closed), the wire will appear filled. Instead of - a pointslist, you can also pass a Part Wire.''' + a pointslist, you can also pass a Part Wire.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1047,8 +1047,8 @@ def makeBSpline(pointslist,closed=False,placement=None,face=None,support=None): return obj def makeBezCurve(pointslist,closed=False,placement=None,face=None,support=None,Degree=None): - '''makeBezCurve(pointslist,[closed],[placement]): Creates a Bezier Curve object - from the given list of vectors. Instead of a pointslist, you can also pass a Part Wire.''' + """makeBezCurve(pointslist,[closed],[placement]): Creates a Bezier Curve object + from the given list of vectors. Instead of a pointslist, you can also pass a Part Wire.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1085,11 +1085,11 @@ def makeBezCurve(pointslist,closed=False,placement=None,face=None,support=None,D return obj def makeText(stringslist,point=Vector(0,0,0),screen=False): - '''makeText(strings,[point],[screen]): Creates a Text object at the given point, + """makeText(strings,[point],[screen]): Creates a Text object at the given point, containing the strings given in the strings list, one string by line (strings can also be one single string). The current color and text height and font specified in preferences are used. - If screen is True, the text always faces the view direction.''' + If screen is True, the text always faces the view direction.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1114,7 +1114,7 @@ def makeText(stringslist,point=Vector(0,0,0),screen=False): return obj def makeCopy(obj,force=None,reparent=False): - '''makeCopy(object): returns an exact copy of an object''' + """makeCopy(object): returns an exact copy of an object""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1223,7 +1223,7 @@ def makeCopy(obj,force=None,reparent=False): return newobj def makeBlock(objectslist): - '''makeBlock(objectslist): Creates a Draft Block from the given objects''' + """makeBlock(objectslist): Creates a Draft Block from the given objects""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1238,7 +1238,7 @@ def makeBlock(objectslist): return obj def makeArray(baseobject,arg1,arg2,arg3,arg4=None,arg5=None,arg6=None,name="Array"): - '''makeArray(object,xvector,yvector,xnum,ynum,[name]) for rectangular array, or + """makeArray(object,xvector,yvector,xnum,ynum,[name]) for rectangular array, or makeArray(object,xvector,yvector,zvector,xnum,ynum,znum,[name]) for rectangular array, or makeArray(object,center,totalangle,totalnum,[name]) for polar array: Creates an array of the given object @@ -1246,7 +1246,7 @@ def makeArray(baseobject,arg1,arg2,arg3,arg4=None,arg5=None,arg6=None,name="Arra at xvector distance between iterations, same for y direction with yvector and ynum, same for z direction with zvector and znum. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, - including the original. The result is a parametric Draft Array.''' + including the original. The result is a parametric Draft Array.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1282,11 +1282,11 @@ def makeArray(baseobject,arg1,arg2,arg3,arg4=None,arg5=None,arg6=None,name="Arra return obj def makePathArray(baseobject,pathobject,count,xlate=None,align=False,pathobjsubs=[]): - '''makePathArray(docobj,path,count,xlate,align,pathobjsubs): distribute + """makePathArray(docobj,path,count,xlate,align,pathobjsubs): distribute count copies of a document baseobject along a pathobject or subobjects of a pathobject. Optionally translates each copy by FreeCAD.Vector xlate direction and distance to adjust for difference in shape centre vs shape reference point. - Optionally aligns baseobject to tangent/normal/binormal of path.''' + Optionally aligns baseobject to tangent/normal/binormal of path.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1314,7 +1314,7 @@ def makePathArray(baseobject,pathobject,count,xlate=None,align=False,pathobjsubs return obj def makePointArray(base, ptlst): - '''makePointArray(base,pointlist):''' + """makePointArray(base,pointlist):""" obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","PointArray") _PointArray(obj, base, ptlst) obj.Base = base @@ -1329,9 +1329,9 @@ def makePointArray(base, ptlst): return obj def makeEllipse(majradius,minradius,placement=None,face=True,support=None): - '''makeEllipse(majradius,minradius,[placement],[face],[support]): makes + """makeEllipse(majradius,minradius,[placement],[face],[support]): makes an ellipse with the given major and minor radius, and optionally - a placement.''' + a placement.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1354,9 +1354,9 @@ def makeEllipse(majradius,minradius,placement=None,face=True,support=None): return obj def extrude(obj,vector,solid=False): - '''makeExtrusion(object,vector): extrudes the given object + """makeExtrusion(object,vector): extrudes the given object in the direction given by the vector. The original object - gets hidden.''' + gets hidden.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1372,8 +1372,8 @@ def extrude(obj,vector,solid=False): return newobj def joinWires(wires, joinAttempts = 0): - '''joinWires(objects): merges a set of wires where possible, if any of those - wires have a coincident start and end point''' + """joinWires(objects): merges a set of wires where possible, if any of those + wires have a coincident start and end point""" if joinAttempts > len(wires): return joinAttempts += 1 @@ -1387,8 +1387,8 @@ def joinWires(wires, joinAttempts = 0): joinWires(wires, joinAttempts) def joinTwoWires(wire1, wire2): - '''joinTwoWires(object, object): joins two wires if they share a common - point as a start or an end''' + """joinTwoWires(object, object): joins two wires if they share a common + point as a start or an end""" wire1AbsPoints = [wire1.Placement.multVec(point) for point in wire1.Points] wire2AbsPoints = [wire2.Placement.multVec(point) for point in wire2.Points] if (wire1AbsPoints[0] == wire2AbsPoints[-1] and wire1AbsPoints[-1] == wire2AbsPoints[0]) \ @@ -1445,10 +1445,10 @@ def splitOpenWire(wire, newPoint, edgeIndex): makeWire(wire2Points, placement=wire.Placement) def fuse(object1,object2): - '''fuse(oject1,object2): returns an object made from + """fuse(oject1,object2): returns an object made from the union of the 2 given objects. If the objects are coplanar, a special Draft Wire is used, otherwise we use - a standard Part fuse.''' + a standard Part fuse.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -1484,11 +1484,11 @@ def fuse(object1,object2): return obj def cut(object1,object2): + """cut(oject1,object2): returns a cut object made from + the difference of the 2 given objects.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return - '''cut(oject1,object2): returns a cut object made from - the difference of the 2 given objects.''' obj = FreeCAD.ActiveDocument.addObject("Part::Cut","Cut") obj.Base = object1 obj.Tool = object2 @@ -1550,11 +1550,11 @@ def isClosedEdge(edge_index, object): return edge_index + 1 >= len(object.Points) def move(objectslist,vector,copy=False): - '''move(objects,vector,[copy]): Moves the objects contained + """move(objects,vector,[copy]): Moves the objects contained in objects (that can be an object or a list of objects) in the direction and distance indicated by the given vector. If copy is True, the actual objects are not moved, but copies - are created instead. The objects (or their copies) are returned.''' + are created instead. The objects (or their copies) are returned.""" typecheck([(vector,Vector), (copy,bool)], "move") if not isinstance(objectslist,list): objectslist = [objectslist] objectslist.extend(getMovableChildren(objectslist)) @@ -1636,7 +1636,7 @@ def move(objectslist,vector,copy=False): return newobjlist def array(objectslist,arg1,arg2,arg3,arg4=None,arg5=None,arg6=None): - '''array(objectslist,xvector,yvector,xnum,ynum) for rectangular array, + """array(objectslist,xvector,yvector,xnum,ynum) for rectangular array, array(objectslist,xvector,yvector,zvector,xnum,ynum,znum) for rectangular array, or array(objectslist,center,totalangle,totalnum) for polar array: Creates an array of the objects contained in list (that can be an object or a list of objects) @@ -1647,7 +1647,7 @@ def array(objectslist,arg1,arg2,arg3,arg4=None,arg5=None,arg6=None): the original. This function creates an array of independent objects. Use makeArray() to create a - parametric array object.''' + parametric array object.""" def rectArray(objectslist,xvector,yvector,xnum,ynum): typecheck([(xvector,Vector), (yvector,Vector), (xnum,int), (ynum,int)], "rectArray") @@ -1733,12 +1733,12 @@ def rotateEdge(object, edge_index, angle, center, axis): rotateVertex(object, edge_index+1, angle, center, axis) def rotate(objectslist,angle,center=Vector(0,0,0),axis=Vector(0,0,1),copy=False): - '''rotate(objects,angle,[center,axis,copy]): Rotates the objects contained + """rotate(objects,angle,[center,axis,copy]): Rotates the objects contained in objects (that can be a list of objects or an object) of the given angle (in degrees) around the center, using axis as a rotation axis. If axis is omitted, the rotation will be around the vertical Z axis. If copy is True, the actual objects are not moved, but copies - are created instead. The objects (or their copies) are returned.''' + are created instead. The objects (or their copies) are returned.""" import Part typecheck([(copy,bool)], "rotate") if not isinstance(objectslist,list): objectslist = [objectslist] @@ -1840,11 +1840,11 @@ def copyScaledEdge(object, edge_index, scale, center): return makeLine(vertex1, vertex2) def scale(objectslist,scale=Vector(1,1,1),center=Vector(0,0,0),copy=False): - '''scale(objects,vector,[center,copy,legacy]): Scales the objects contained + """scale(objects,vector,[center,copy,legacy]): Scales the objects contained in objects (that can be a list of objects or an object) of the given scale factors defined by the given vector (in X, Y and Z directions) around given center. If copy is True, the actual objects are not moved, but copies - are created instead. The objects (or their copies) are returned.''' + are created instead. The objects (or their copies) are returned.""" if not isinstance(objectslist, list): objectslist = [objectslist] newobjlist = [] @@ -1902,7 +1902,7 @@ def scale(objectslist,scale=Vector(1,1,1),center=Vector(0,0,0),copy=False): return newobjlist def offset(obj,delta,copy=False,bind=False,sym=False,occ=False): - '''offset(object,delta,[copymode],[bind]): offsets the given wire by + """offset(object,delta,[copymode],[bind]): offsets the given wire by applying the given delta Vector to its first vertex. If copymode is True, another object is created, otherwise the same object gets offsetted. If bind is True, and provided the wire is open, the original @@ -1910,7 +1910,7 @@ def offset(obj,delta,copy=False,bind=False,sym=False,occ=False): if sym is True, bind must be true too, and the offset is made on both sides, the total width being the given delta length. If offsetting a BSpline, the delta must not be a Vector but a list of Vectors, one for - each node of the spline.''' + each node of the spline.""" import Part, DraftGeomUtils newwire = None delete = None @@ -1920,7 +1920,7 @@ def offset(obj,delta,copy=False,bind=False,sym=False,occ=False): print("the offset tool is currently unable to offset a non-Draft object directly - Creating a copy") def getRect(p,obj): - "returns length,height,placement" + """returns length,height,placement""" pl = obj.Placement.copy() pl.Base = p[0] diag = p[2].sub(p[0]) @@ -1935,7 +1935,7 @@ def offset(obj,delta,copy=False,bind=False,sym=False,occ=False): return l,h,pl def getRadius(obj,delta): - "returns a new radius for a regular polygon" + """returns a new radius for a regular polygon""" an = math.pi/obj.FacesNumber nr = DraftVecUtils.rotate(delta,-an) nr.multiply(1/math.cos(an)) @@ -2086,10 +2086,10 @@ def offset(obj,delta,copy=False,bind=False,sym=False,occ=False): return newobj def draftify(objectslist,makeblock=False,delete=True): - '''draftify(objectslist,[makeblock],[delete]): turns each object of the given list + """draftify(objectslist,[makeblock],[delete]): turns each object of the given list (objectslist can also be a single object) into a Draft parametric wire. If makeblock is True, multiple objects will be grouped in a block. - If delete = False, old objects are not deleted''' + If delete = False, old objects are not deleted""" import DraftGeomUtils, Part if not isinstance(objectslist,list): @@ -2122,8 +2122,8 @@ def draftify(objectslist,makeblock=False,delete=True): return newobjlist def getDXF(obj,direction=None): - '''getDXF(object,[direction]): returns a DXF entity from the given - object. If direction is given, the object is projected in 2D.''' + """getDXF(object,[direction]): returns a DXF entity from the given + object. If direction is given, the object is projected in 2D.""" plane = None result = "" if obj.isDerivedFrom("Drawing::View") or obj.isDerivedFrom("TechDraw::DrawView"): @@ -2207,11 +2207,11 @@ getSVG = svg.getSVG def makeDrawingView(obj,page,lwmod=None,tmod=None,otherProjection=None): - ''' + """ makeDrawingView(object,page,[lwmod,tmod]) - adds a View of the given object to the given page. lwmod modifies lineweights (in percent), tmod modifies text heights (in percent). The Hint scale, X and Y of the page are used. - ''' + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -2262,11 +2262,11 @@ def makeDrawingView(obj,page,lwmod=None,tmod=None,otherProjection=None): return viewobj def makeShape2DView(baseobj,projectionVector=None,facenumbers=[]): - ''' + """ makeShape2DView(object,[projectionVector,facenumbers]) - adds a 2D shape to the document, which is a 2D projection of the given object. A specific projection vector can also be given. You can also specify a list of face numbers to be considered in individual faces mode. - ''' + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -2285,7 +2285,7 @@ def makeShape2DView(baseobj,projectionVector=None,facenumbers=[]): def makeSketch(objectslist,autoconstraints=False,addTo=None, delete=False,name="Sketch",radiusPrecision=-1): - '''makeSketch(objectslist,[autoconstraints],[addTo],[delete],[name],[radiusPrecision]): + """makeSketch(objectslist,[autoconstraints],[addTo],[delete],[name],[radiusPrecision]): Makes a Sketch objectslist with the given Draft objects. @@ -2307,7 +2307,7 @@ def makeSketch(objectslist,autoconstraints=False,addTo=None, * radiusPrecision(-1): If <0, disable radius constraint. If =0, add indiviaul radius constraint. If >0, the radius will be rounded according to this precision, and 'Equal' constraint will be added to curve with equal - radius within precision.''' + radius within precision.""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") @@ -2569,7 +2569,7 @@ def makeSketch(objectslist,autoconstraints=False,addTo=None, return nobj def makePoint(X=0, Y=0, Z=0,color=None,name = "Point", point_size= 5): - ''' makePoint(x,y,z ,[color(r,g,b),point_size]) or + """ makePoint(x,y,z ,[color(r,g,b),point_size]) or makePoint(Vector,color(r,g,b),point_size]) - creates a Point in the current document. example usage: @@ -2580,7 +2580,7 @@ def makePoint(X=0, Y=0, Z=0,color=None,name = "Point", point_size= 5): p1 = makePoint(1,0,0,(1,0,0)) # color = red p1.X = 1 #move it in x p1.ViewObject.PointColor =(0.0,0.0,1.0) #change the color-make sure values are floats - ''' + """ if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -2605,8 +2605,8 @@ def makePoint(X=0, Y=0, Z=0,color=None,name = "Point", point_size= 5): return obj def makeShapeString(String,FontFile,Size = 100,Tracking = 0): - '''ShapeString(Text,FontFile,Height,Track): Turns a text string - into a Compound Shape''' + """ShapeString(Text,FontFile,Height,Track): Turns a text string + into a Compound Shape""" if not FreeCAD.ActiveDocument: FreeCAD.Console.PrintError("No active document. Aborting\n") return @@ -2627,12 +2627,11 @@ def makeShapeString(String,FontFile,Size = 100,Tracking = 0): return obj def clone(obj,delta=None,forcedraft=False): - - '''clone(obj,[delta,forcedraft]): makes a clone of the given object(s). The clone is an exact, + """clone(obj,[delta,forcedraft]): makes a clone of the given object(s). The clone is an exact, linked copy of the given object. If the original object changes, the final object changes too. Optionally, you can give a delta Vector to move the clone from the original position. If forcedraft is True, the resulting object is a Draft clone - even if the input object is an Arch object.''' + even if the input object is an Arch object.""" prefix = getParam("ClonePrefix","") cl = None @@ -2699,9 +2698,9 @@ def clone(obj,delta=None,forcedraft=False): return cl def getCloneBase(obj,strict=False): - '''getCloneBase(obj,[strict]): returns the object cloned by this object, if + """getCloneBase(obj,[strict]): returns the object cloned by this object, if any, or this object if it is no clone. If strict is True, if this object is - not a clone, this function returns False''' + not a clone, this function returns False""" if hasattr(obj,"CloneOf"): if obj.CloneOf: return getCloneBase(obj.CloneOf) @@ -2713,8 +2712,8 @@ def getCloneBase(obj,strict=False): def mirror(objlist,p1,p2): - '''mirror(objlist,p1,p2,[clone]): creates a mirrored version of the given object(s) - along an axis that passes through the two vectors p1 and p2.''' + """mirror(objlist,p1,p2,[clone]): creates a mirrored version of the given object(s) + along an axis that passes through the two vectors p1 and p2.""" if not objlist: FreeCAD.Console.PrintError(translate("draft","No object given")+"\n") @@ -2748,11 +2747,11 @@ def mirror(objlist,p1,p2): def heal(objlist=None,delete=True,reparent=True): - '''heal([objlist],[delete],[reparent]) - recreates Draft objects that are damaged, + """heal([objlist],[delete],[reparent]) - recreates Draft objects that are damaged, for example if created from an earlier version. If delete is True, the damaged objects are deleted (default). If ran without arguments, all the objects in the document will be healed if they are damaged. If reparent is True (default), - new objects go at the very same place in the tree than their original.''' + new objects go at the very same place in the tree than their original.""" auto = False @@ -3461,7 +3460,7 @@ def downgrade(objects,delete=False,force=None): def makeWorkingPlaneProxy(placement): - "creates a Working Plane proxy object in the current document" + """creates a Working Plane proxy object in the current document""" if FreeCAD.ActiveDocument: obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython","WPProxy") WorkingPlaneProxy(obj) @@ -3473,8 +3472,8 @@ def makeWorkingPlaneProxy(placement): return obj def getParameterFromV0(edge, offset): - '''return parameter at distance offset from edge.Vertexes[0]''' - '''sb method in Part.TopoShapeEdge???''' + """return parameter at distance offset from edge.Vertexes[0] + sb method in Part.TopoShapeEdge???""" lpt = edge.valueAt(edge.getParameterByLength(0)) vpt = edge.Vertexes[0].Point @@ -3490,7 +3489,7 @@ def getParameterFromV0(edge, offset): def calculatePlacement(globalRotation, edge, offset, RefPt, xlate, align, normal=None): - '''Orient shape to tangent at parm offset along edge.''' + """Orient shape to tangent at parm offset along edge.""" import functools # http://en.wikipedia.org/wiki/Euler_angles # start with null Placement point so translate goes to right place. @@ -3576,7 +3575,7 @@ def calculatePlacement(globalRotation, edge, offset, RefPt, xlate, align, normal def calculatePlacementsOnPath(shapeRotation, pathwire, count, xlate, align): - '''Calculates the placements of a shape along a given path so that each copy will be distributed evenly''' + """Calculates the placements of a shape along a given path so that each copy will be distributed evenly""" import Part import DraftGeomUtils @@ -3642,7 +3641,7 @@ def calculatePlacementsOnPath(shapeRotation, pathwire, count, xlate, align): #--------------------------------------------------------------------------- class _DraftObject: - "The base class for Draft objects" + """The base class for Draft objects""" def __init__(self,obj,tp="Unknown"): obj.Proxy = self self.Type = tp @@ -3661,7 +3660,7 @@ class _DraftObject: pass class _ViewProviderDraft: - "The base class for Draft Viewproviders" + """The base class for Draft Viewproviders""" def __init__(self, vobj): vobj.Proxy = self @@ -3788,7 +3787,7 @@ class _ViewProviderDraft: return objs class _ViewProviderDraftAlt(_ViewProviderDraft): - "a view provider that doesn't swallow its base object" + """a view provider that doesn't swallow its base object""" def __init__(self,vobj): _ViewProviderDraft.__init__(self,vobj) @@ -3797,7 +3796,7 @@ class _ViewProviderDraftAlt(_ViewProviderDraft): return [] class _ViewProviderDraftPart(_ViewProviderDraftAlt): - "a view provider that displays a Part icon instead of a Draft icon" + """a view provider that displays a Part icon instead of a Draft icon""" def __init__(self,vobj): _ViewProviderDraftAlt.__init__(self,vobj) @@ -3807,7 +3806,7 @@ class _ViewProviderDraftPart(_ViewProviderDraftAlt): class _Dimension(_DraftObject): - "The Draft Dimension object" + """The Draft Dimension object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Dimension") obj.addProperty("App::PropertyVectorDistance","Start","Draft",QT_TRANSLATE_NOOP("App::Property","Startpoint of dimension")) @@ -3890,7 +3889,7 @@ class _Dimension(_DraftObject): class _ViewProviderDimension(_ViewProviderDraft): - "A View Provider for the Draft Dimension object" + """A View Provider for the Draft Dimension object""" def __init__(self, obj): obj.addProperty("App::PropertyLength","FontSize","Draft",QT_TRANSLATE_NOOP("App::Property","Font size")) obj.addProperty("App::PropertyInteger","Decimals","Draft",QT_TRANSLATE_NOOP("App::Property","The number of decimals to show")) @@ -3923,7 +3922,7 @@ class _ViewProviderDimension(_ViewProviderDraft): _ViewProviderDraft.__init__(self,obj) def attach(self, vobj): - "called on object creation" + """called on object creation""" from pivy import coin self.Object = vobj.Object self.color = coin.SoBaseColor() @@ -3988,7 +3987,7 @@ class _ViewProviderDimension(_ViewProviderDraft): self.onChanged(vobj,"ExtOvershoot") def updateData(self, obj, prop): - "called when the base object is changed" + """called when the base object is changed""" import DraftGui if prop in ["Start","End","Dimline","Direction"]: @@ -4165,7 +4164,7 @@ class _ViewProviderDimension(_ViewProviderDraft): self.line.coordIndex.setValues(0,4,(0,1,2,3)) def onChanged(self, vobj, prop): - "called when a view property has changed" + """called when a view property has changed""" if (prop == "FontSize") and hasattr(vobj,"FontSize"): if hasattr(self,"font"): @@ -4334,7 +4333,7 @@ class _ViewProviderDimension(_ViewProviderDraft): self.setDisplayMode(state) class _AngularDimension(_DraftObject): - "The Draft AngularDimension object" + """The Draft AngularDimension object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"AngularDimension") obj.addProperty("App::PropertyAngle","FirstAngle","Draft",QT_TRANSLATE_NOOP("App::Property","Start angle of the dimension")) @@ -4364,7 +4363,7 @@ class _AngularDimension(_DraftObject): fp.ViewObject.update() class _ViewProviderAngularDimension(_ViewProviderDraft): - "A View Provider for the Draft Angular Dimension object" + """A View Provider for the Draft Angular Dimension object""" def __init__(self, obj): obj.addProperty("App::PropertyLength","FontSize","Draft",QT_TRANSLATE_NOOP("App::Property","Font size")) obj.addProperty("App::PropertyInteger","Decimals","Draft",QT_TRANSLATE_NOOP("App::Property","The number of decimals to show")) @@ -4675,7 +4674,7 @@ class _ViewProviderAngularDimension(_ViewProviderDraft): class _Rectangle(_DraftObject): - "The Rectangle object" + """The Rectangle object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Rectangle") @@ -4767,7 +4766,7 @@ class _ViewProviderRectangle(_ViewProviderDraft): vobj.addProperty("App::PropertyFile","TextureImage","Draft",QT_TRANSLATE_NOOP("App::Property","Defines a texture image (overrides hatch patterns)")) class _Circle(_DraftObject): - "The Circle object" + """The Circle object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Circle") @@ -4796,7 +4795,7 @@ class _Circle(_DraftObject): obj.positionBySupport() class _Ellipse(_DraftObject): - "The Circle object" + """The Circle object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Ellipse") @@ -4836,7 +4835,7 @@ class _Ellipse(_DraftObject): obj.positionBySupport() class _Wire(_DraftObject): - "The Wire object" + """The Wire object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Wire") @@ -5003,7 +5002,7 @@ class _Wire(_DraftObject): class _ViewProviderWire(_ViewProviderDraft): - "A View Provider for the Wire object" + """A View Provider for the Wire object""" def __init__(self, obj): _ViewProviderDraft.__init__(self,obj) obj.addProperty("App::PropertyBool","EndArrow","Draft",QT_TRANSLATE_NOOP("App::Property","Displays a Dimension symbol at the end of the wire")) @@ -5100,7 +5099,7 @@ class _ViewProviderWire(_ViewProviderDraft): FreeCAD.Console.PrintMessage(translate("Draft","This Wire is already flat")+"\n") class _Polygon(_DraftObject): - "The Polygon object" + """The Polygon object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Polygon") @@ -5154,7 +5153,7 @@ class _Polygon(_DraftObject): class _DrawingView(_DraftObject): - "The Draft DrawingView object" + """The Draft DrawingView object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"DrawingView") obj.addProperty("App::PropertyVector","Direction","Shape View",QT_TRANSLATE_NOOP("App::Property","Projection direction")) @@ -5216,7 +5215,7 @@ class _DrawingView(_DraftObject): return getDXF(obj) class _BSpline(_DraftObject): - "The BSpline object" + """The BSpline object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"BSpline") @@ -5296,7 +5295,7 @@ class _BSpline(_DraftObject): _ViewProviderBSpline = _ViewProviderWire class _BezCurve(_DraftObject): - "The BezCurve object" + """The BezCurve object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"BezCurve") @@ -5426,7 +5425,7 @@ class _BezCurve(_DraftObject): _ViewProviderBezCurve = _ViewProviderWire class _Block(_DraftObject): - "The Block object" + """The Block object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"Block") @@ -5445,7 +5444,7 @@ class _Block(_DraftObject): obj.positionBySupport() class _Shape2DView(_DraftObject): - "The Shape2DView object" + """The Shape2DView object""" def __init__(self,obj): obj.addProperty("App::PropertyLink","Base","Draft",QT_TRANSLATE_NOOP("App::Property","The base object this 2D view must represent")) @@ -5622,7 +5621,7 @@ class _Shape2DView(_DraftObject): obj.Placement = pl class _Array(_DraftObject): - "The Draft Array object" + """The Draft Array object""" def __init__(self,obj): _DraftObject.__init__(self,obj,"Array") @@ -5723,7 +5722,7 @@ class _Array(_DraftObject): class _PathArray(_DraftObject): - "The Draft Path Array object" + """The Draft Path Array object""" def __init__(self,obj): _DraftObject.__init__(self,obj,"PathArray") @@ -5786,7 +5785,7 @@ class _PathArray(_DraftObject): return (Part.makeCompound(base)) class _PointArray(_DraftObject): - "The Draft Point Array object" + """The Draft Point Array object""" def __init__(self, obj, bobj, ptlst): _DraftObject.__init__(self,obj,"PointArray") obj.addProperty("App::PropertyLink","Base","Draft",QT_TRANSLATE_NOOP("App::Property","Base")).Base = bobj @@ -5836,7 +5835,7 @@ class _PointArray(_DraftObject): obj.Shape = obj.Base.Shape.copy() class _Point(_DraftObject): - "The Draft Point object" + """The Draft Point object""" def __init__(self, obj,x=0,y=0,z=0): _DraftObject.__init__(self,obj,"Point") obj.addProperty("App::PropertyDistance","X","Draft",QT_TRANSLATE_NOOP("App::Property","X Location")).X = x @@ -5852,7 +5851,7 @@ class _Point(_DraftObject): obj.Placement.Base = FreeCAD.Vector(obj.X.Value,obj.Y.Value,obj.Z.Value) class _ViewProviderPoint(_ViewProviderDraft): - "A viewprovider for the Draft Point object" + """A viewprovider for the Draft Point object""" def __init__(self, obj): _ViewProviderDraft.__init__(self,obj) @@ -5874,7 +5873,7 @@ class _ViewProviderPoint(_ViewProviderDraft): return ":/icons/Draft_Dot.svg" class _Clone(_DraftObject): - "The Clone object" + """The Clone object""" def __init__(self,obj): _DraftObject.__init__(self,obj,"Clone") @@ -5959,7 +5958,7 @@ class _Clone(_DraftObject): return None class _ViewProviderClone: - "a view provider that displays a Clone icon instead of a Draft icon" + """a view provider that displays a Clone icon instead of a Draft icon""" def __init__(self,vobj): vobj.Proxy = self @@ -6005,7 +6004,7 @@ class _ViewProviderClone: vobj.DiffuseColor = colors class _ViewProviderDraftArray(_ViewProviderDraft): - "a view provider that displays a Array icon instead of a Draft icon" + """a view provider that displays a Array icon instead of a Draft icon""" def __init__(self,vobj): _ViewProviderDraft.__init__(self,vobj) @@ -6041,7 +6040,7 @@ class _ViewProviderDraftArray(_ViewProviderDraft): vobj.DiffuseColor = colors class _ShapeString(_DraftObject): - "The ShapeString object" + """The ShapeString object""" def __init__(self, obj): _DraftObject.__init__(self,obj,"ShapeString") @@ -6190,7 +6189,7 @@ class _ShapeString(_DraftObject): class _Facebinder(_DraftObject): - "The Draft Facebinder object" + """The Draft Facebinder object""" def __init__(self,obj): _DraftObject.__init__(self,obj,"Facebinder") obj.addProperty("App::PropertyLinkSubList","Faces","Draft",QT_TRANSLATE_NOOP("App::Property","Linked faces")) @@ -6252,7 +6251,7 @@ class _Facebinder(_DraftObject): obj.Placement = pl def addSubobjects(self,obj,facelinks): - "adds facelinks to this facebinder" + """adds facelinks to this facebinder""" objs = obj.Faces for o in facelinks: if isinstance(o,tuple) or isinstance(o,list): @@ -6288,8 +6287,7 @@ class _ViewProviderFacebinder(_ViewProviderDraft): class WorkingPlaneProxy: - - "The Draft working plane proxy object" + """The Draft working plane proxy object""" def __init__(self,obj): obj.Proxy = self @@ -6325,8 +6323,7 @@ class WorkingPlaneProxy: class ViewProviderWorkingPlaneProxy: - - "A View Provider for working plane proxies" + """A View Provider for working plane proxies""" def __init__(self,vobj): # ViewData: 0,1,2: position; 3,4,5,6: rotation; 7: near dist; 8: far dist, 9:aspect ratio; @@ -6526,8 +6523,7 @@ def makeLabel(targetpoint=None,target=None,direction=None,distance=None,labeltyp class DraftLabel: - - "The Draft Label object" + """The Draft Label object""" def __init__(self,obj): obj.Proxy = self @@ -6609,8 +6605,7 @@ class DraftLabel: class ViewProviderDraftLabel: - - "A View Provider for the Draft Label" + """A View Provider for the Draft Label""" def __init__(self,vobj): vobj.addProperty("App::PropertyLength","TextSize","Base",QT_TRANSLATE_NOOP("App::Property","The size of the text")) @@ -6837,8 +6832,7 @@ class ViewProviderDraftLabel: class DraftText: - - "The Draft Text object" + """The Draft Text object""" def __init__(self,obj): obj.Proxy = self @@ -6851,8 +6845,7 @@ class DraftText: class ViewProviderDraftText: - - "A View Provider for the Draft Label" + """A View Provider for the Draft Label""" def __init__(self,vobj): vobj.addProperty("App::PropertyLength","FontSize","Base",QT_TRANSLATE_NOOP("App::Property","The size of the text")) @@ -6963,7 +6956,7 @@ class ViewProviderDraftText: def convertDraftTexts(textslist=[]): - "converts the given Draft texts (or all that are found in the active document) to the new object" + """converts the given Draft texts (or all that are found in the active document) to the new object""" if not isinstance(textslist,list): textslist = [textslist] if not textslist: From a72d78507d9a2b4af1cb44ff6f07410fa1e30431 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sat, 10 Aug 2019 18:45:35 -0500 Subject: [PATCH 21/39] Draft: DraftTools.py, the docstrings need triple quotes and be next to the method or class in order to be picked up by Doxygen or Sphinx; this complies with PEP 257. --- src/Mod/Draft/DraftTools.py | 261 ++++++++++++++++++------------------ 1 file changed, 130 insertions(+), 131 deletions(-) diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py index 3eed82ec76..468cf64fb6 100644 --- a/src/Mod/Draft/DraftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -102,15 +102,14 @@ def selectObject(arg): FreeCAD.activeDraftCommand.proceed() def getPoint(target,args,mobile=False,sym=False,workingplane=True,noTracker=False): - ''' - Function used by the Draft Tools. + """Function used by the Draft Tools. returns a constrained 3d point and its original point. if mobile=True, the constraining occurs from the location of mouse cursor when Shift is pressed, otherwise from last entered point. If sym=True, x and y values stay always equal. If workingplane=False, the point won't be projected on the Working Plane. if noTracker is True, the tracking line will not be displayed - ''' + """ ui = FreeCADGui.draftToolBar @@ -144,7 +143,7 @@ def getPoint(target,args,mobile=False,sym=False,workingplane=True,noTracker=Fals return point,ctrlPoint,info def getSupport(mouseEvent=None): - "returns the supporting object and sets the working plane" + """returns the supporting object and sets the working plane""" plane.save() if mouseEvent: return setWorkingPlaneToObjectUnderCursor(mouseEvent) @@ -194,7 +193,7 @@ def setWorkingPlaneToSelectedObject(): return None def hasMod(args,mod): - "checks if args has a specific modifier" + """checks if args has a specific modifier""" if mod == "shift": return args["ShiftDown"] elif mod == "ctrl": @@ -203,7 +202,7 @@ def hasMod(args,mod): return args["AltDown"] def setMod(args,mod,state): - "sets a specific modifier state in args" + """sets a specific modifier state in args""" if mod == "shift": args["ShiftDown"] = state elif mod == "ctrl": @@ -219,7 +218,7 @@ def setMod(args,mod,state): #--------------------------------------------------------------------------- class DraftTool: - "The base class of all Draft Tools" + """The base class of all Draft Tools""" def __init__(self): self.commitList = [] @@ -291,11 +290,11 @@ class DraftTool: self.commitList = [] def commit(self,name,func): - "stores actions to be committed to the FreeCAD document" + """stores actions to be committed to the FreeCAD document""" self.commitList.append((name,func)) def getStrings(self,addrot=None): - "returns a couple of useful strings for building python commands" + """returns a couple of useful strings for building python commands""" # current plane rotation p = plane.getRotation() @@ -329,7 +328,7 @@ class DraftTool: #--------------------------------------------------------------------------- class SelectPlane(DraftTool): - "The Draft_SelectPlane FreeCAD command definition" + """The Draft_SelectPlane FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_SelectPlane', @@ -549,7 +548,7 @@ def redraw3DView(): pass class Creator(DraftTool): - "A generic Draft Creator Tool used by creation tools such as line or arc" + """A generic Draft Creator Tool used by creation tools such as line or arc""" def __init__(self): DraftTool.__init__(self) @@ -560,7 +559,7 @@ class Creator(DraftTool): self.support = getSupport() class Line(Creator): - "The Line FreeCAD command definition" + """The Line FreeCAD command definition""" def __init__(self, wiremode=False): Creator.__init__(self) @@ -592,7 +591,7 @@ class Line(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick first point")+"\n") def action(self, arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent" and arg["Key"] == "ESCAPE": self.finish() elif arg["Type"] == "SoLocation2Event": @@ -619,7 +618,7 @@ class Line(Creator): self.finish(True,cont=True) def finish(self,closed=False,cont=False): - "terminates the operation and closes the poly if asked" + """terminates the operation and closes the poly if asked""" self.removeTemporaryObject() if self.oldWP: FreeCAD.DraftWorkingPlane = self.oldWP @@ -670,7 +669,7 @@ class Line(Creator): self.obj = None def undolast(self): - "undoes last line segment" + """undoes last line segment""" if (len(self.node) > 1): self.node.pop() last = self.node[-1] @@ -686,7 +685,7 @@ class Line(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick next point")+"\n") def drawSegment(self,point): - "draws a new segment" + """draws a new segment""" if self.planetrack and self.node: self.planetrack.set(self.node[-1]) if (len(self.node) == 1): @@ -708,7 +707,7 @@ class Line(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick next point")+"\n") def wipe(self): - "removes all previous segments and starts from last point" + """removes all previous segments and starts from last point""" if len(self.node) > 1: # self.obj.Shape.nullify() - for some reason this fails self.obj.ViewObject.Visibility = False @@ -737,7 +736,7 @@ class Line(Creator): self.planetrack.set(self.node[-1]) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) self.node.append(self.point) self.drawSegment(self.point) @@ -746,7 +745,7 @@ class Line(Creator): self.ui.setNextFocus() class Wire(Line): - "a FreeCAD command for creating a wire" + """a FreeCAD command for creating a wire""" def __init__(self): Line.__init__(self,wiremode=True) @@ -787,7 +786,7 @@ class Wire(Line): class BSpline(Line): - "a FreeCAD command for creating a B-spline" + """a FreeCAD command for creating a B-spline""" def __init__(self): Line.__init__(self,wiremode=True) @@ -804,7 +803,7 @@ class BSpline(Line): self.bsplinetrack = bsplineTracker() def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -838,7 +837,7 @@ class BSpline(Line): FreeCAD.Console.PrintMessage(translate("draft", "Spline has been closed")+"\n") def undolast(self): - "undoes last line segment" + """undoes last line segment""" if (len(self.node) > 1): self.node.pop() self.bsplinetrack.update(self.node) @@ -860,7 +859,7 @@ class BSpline(Line): FreeCAD.Console.PrintMessage(translate("draft", "Pick next point, or Finish (shift-F) or close (o)")+"\n") def finish(self,closed=False,cont=False): - "terminates the operation and closes the poly if asked" + """terminates the operation and closes the poly if asked""" if self.ui: self.bsplinetrack.finalize() if not Draft.getParam("UiMode",1): @@ -887,7 +886,7 @@ class BSpline(Line): self.Activated() class BezCurve(Line): - "a FreeCAD command for creating a Bezier Curve" + """a FreeCAD command for creating a Bezier Curve""" def __init__(self): Line.__init__(self,wiremode=True) @@ -905,7 +904,7 @@ class BezCurve(Line): self.bezcurvetrack = bezcurveTracker() def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -940,7 +939,7 @@ class BezCurve(Line): FreeCAD.Console.PrintMessage(translate("draft", "Bezier curve has been closed")+"\n") def undolast(self): - "undoes last line segment" + """undoes last line segment""" if (len(self.node) > 1): self.node.pop() self.bezcurvetrack.update(self.node,degree=self.degree) @@ -979,7 +978,7 @@ class BezCurve(Line): return(w) def finish(self,closed=False,cont=False): - "terminates the operation and closes the poly if asked" + """terminates the operation and closes the poly if asked""" if self.ui: if hasattr(self,"bezcurvetrack"): self.bezcurvetrack.finalize() @@ -1006,7 +1005,7 @@ class BezCurve(Line): self.Activated() class CubicBezCurve(Line): - "a FreeCAD command for creating a 3rd degree Bezier Curve" + """a FreeCAD command for creating a 3rd degree Bezier Curve""" def __init__(self): Line.__init__(self,wiremode=True) @@ -1024,7 +1023,7 @@ class CubicBezCurve(Line): self.bezcurvetrack = bezcurveTracker() def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -1093,7 +1092,7 @@ class CubicBezCurve(Line): # old code has been to insensitive def undolast(self): - "undoes last line segment" + """undoes last line segment""" if (len(self.node) > 1): self.node.pop() self.bezcurvetrack.update(self.node,degree=self.degree) @@ -1138,7 +1137,7 @@ class CubicBezCurve(Line): return(w) def finish(self,closed=False,cont=False): - "terminates the operation and closes the poly if asked" + """terminates the operation and closes the poly if asked""" if self.ui: if hasattr(self,"bezcurvetrack"): self.bezcurvetrack.finalize() @@ -1171,7 +1170,7 @@ class CubicBezCurve(Line): class FinishLine: - "a FreeCAD command to finish any running Line drawing operation" + """a FreeCAD command to finish any running Line drawing operation""" def Activated(self): if (FreeCAD.activeDraftCommand != None): @@ -1191,7 +1190,7 @@ class FinishLine: class CloseLine: - "a FreeCAD command to close any running Line drawing operation" + """a FreeCAD command to close any running Line drawing operation""" def Activated(self): if (FreeCAD.activeDraftCommand != None): @@ -1211,7 +1210,7 @@ class CloseLine: class UndoLine: - "a FreeCAD command to undo last drawn segment of a line" + """a FreeCAD command to undo last drawn segment of a line""" def Activated(self): if (FreeCAD.activeDraftCommand != None): @@ -1231,7 +1230,7 @@ class UndoLine: class Rectangle(Creator): - "the Draft_Rectangle FreeCAD command definition" + """the Draft_Rectangle FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Rectangle', @@ -1254,7 +1253,7 @@ class Rectangle(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick first point")+"\n") def finish(self,closed=False,cont=False): - "terminates the operation and closes the poly if asked" + """terminates the operation and closes the poly if asked""" Creator.finish(self) if self.ui: if hasattr(self,"fillstate"): @@ -1266,7 +1265,7 @@ class Rectangle(Creator): self.Activated() def createObject(self): - "creates the final object in the current doc" + """creates the final object in the current doc""" p1 = self.node[0] p3 = self.node[-1] diagonal = p3.sub(p1) @@ -1312,7 +1311,7 @@ class Rectangle(Creator): self.finish(cont=True) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -1333,7 +1332,7 @@ class Rectangle(Creator): self.appendPoint(self.point) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) self.appendPoint(self.point) @@ -1352,7 +1351,7 @@ class Rectangle(Creator): class Arc(Creator): - "the Draft_Arc FreeCAD command definition" + """the Draft_Arc FreeCAD command definition""" def __init__(self): self.closedCircle=False @@ -1383,7 +1382,7 @@ class Arc(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick center point")+"\n") def finish(self,closed=False,cont=False): - "finishes the arc" + """finishes the arc""" Creator.finish(self) if self.ui: self.linetrack.finalize() @@ -1415,7 +1414,7 @@ class Arc(Creator): self.angle = newangle def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -1550,7 +1549,7 @@ class Arc(Creator): self.drawArc() def drawArc(self): - "actually draws the FreeCAD object" + """actually draws the FreeCAD object""" rot,sup,pts,fil = self.getStrings() if self.closedCircle: try: @@ -1618,7 +1617,7 @@ class Arc(Creator): self.finish(cont=True) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.center = Vector(numx,numy,numz) self.node = [self.center] self.arctrack.setCenter(self.center) @@ -1629,7 +1628,7 @@ class Arc(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick radius")+"\n") def numericRadius(self,rad): - "this function gets called by the toolbar when valid radius have been entered there" + """this function gets called by the toolbar when valid radius have been entered there""" if (self.step == 1): self.rad = rad if len(self.tangents) == 2: @@ -1674,7 +1673,7 @@ class Arc(Creator): class Circle(Arc): - "The Draft_Circle FreeCAD command definition" + """The Draft_Circle FreeCAD command definition""" def __init__(self): self.closedCircle=True @@ -1688,7 +1687,7 @@ class Circle(Arc): class Polygon(Creator): - "the Draft_Polygon FreeCAD command definition" + """the Draft_Polygon FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Polygon', @@ -1716,7 +1715,7 @@ class Polygon(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick center point")+"\n") def finish(self,closed=False,cont=False): - "finishes the arc" + """finishes the arc""" Creator.finish(self) if self.ui: self.arctrack.finalize() @@ -1725,7 +1724,7 @@ class Polygon(Creator): self.Activated() def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -1817,7 +1816,7 @@ class Polygon(Creator): self.drawPolygon() def drawPolygon(self): - "actually draws the FreeCAD object" + """actually draws the FreeCAD object""" rot,sup,pts,fil = self.getStrings() FreeCADGui.addModule("Draft") if Draft.getParam("UsePartPrimitives",False): @@ -1844,7 +1843,7 @@ class Polygon(Creator): self.finish(cont=True) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.center = Vector(numx,numy,numz) self.node = [self.center] self.arctrack.setCenter(self.center) @@ -1855,7 +1854,7 @@ class Polygon(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick radius")+"\n") def numericRadius(self,rad): - "this function gets called by the toolbar when valid radius have been entered there" + """this function gets called by the toolbar when valid radius have been entered there""" self.rad = rad if len(self.tangents) == 2: cir = DraftGeomUtils.circleFrom2tan1rad(self.tangents[0], self.tangents[1], rad) @@ -1873,7 +1872,7 @@ class Polygon(Creator): class Ellipse(Creator): - "the Draft_Ellipse FreeCAD command definition" + """the Draft_Ellipse FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Ellipse', @@ -1893,7 +1892,7 @@ class Ellipse(Creator): FreeCAD.Console.PrintMessage(translate("draft", "Pick first point")+"\n") def finish(self,closed=False,cont=False): - "terminates the operation and closes the poly if asked" + """terminates the operation and closes the poly if asked""" Creator.finish(self) if self.ui: self.rect.off() @@ -1903,7 +1902,7 @@ class Ellipse(Creator): self.Activated() def createObject(self): - "creates the final object in the current doc" + """creates the final object in the current doc""" p1 = self.node[0] p3 = self.node[-1] diagonal = p3.sub(p1) @@ -1952,7 +1951,7 @@ class Ellipse(Creator): self.finish(cont=True) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -1973,7 +1972,7 @@ class Ellipse(Creator): self.appendPoint(self.point) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) self.appendPoint(self.point) @@ -1992,7 +1991,7 @@ class Ellipse(Creator): class Text(Creator): - "This class creates an annotation feature." + """This class creates an annotation feature.""" def GetResources(self): return {'Pixmap' : 'Draft_Text', @@ -2016,7 +2015,7 @@ class Text(Creator): FreeCADGui.draftToolBar.show() def finish(self,closed=False,cont=False): - "terminates the operation" + """terminates the operation""" Creator.finish(self) if self.ui: del self.dialog @@ -2024,7 +2023,7 @@ class Text(Creator): self.Activated() def createObject(self): - "creates an object in the current doc" + """creates an object in the current doc""" tx = '[' for l in self.text: if len(tx) > 1: @@ -2045,7 +2044,7 @@ class Text(Creator): self.finish(cont=True) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -2072,7 +2071,7 @@ class Text(Creator): class Dimension(Creator): - "The Draft_Dimension FreeCAD command definition" + """The Draft_Dimension FreeCAD command definition""" def __init__(self): self.max=2 @@ -2121,7 +2120,7 @@ class Dimension(Creator): FreeCADGui.draftToolBar.show() def setFromSelection(self): - "If we already have selected geometry, fill the nodes accordingly" + """If we already have selected geometry, fill the nodes accordingly""" sel = FreeCADGui.Selection.getSelectionEx() import DraftGeomUtils if len(sel) == 1: @@ -2148,7 +2147,7 @@ class Dimension(Creator): self.link = [sel[0].Object,n] def hasMeasures(self): - "checks if only measurements objects are selected" + """checks if only measurements objects are selected""" sel = FreeCADGui.Selection.getSelection() if not sel: return False @@ -2158,7 +2157,7 @@ class Dimension(Creator): return True def finish(self,closed=False): - "terminates the operation" + """terminates the operation""" self.cont = None self.dir = None Creator.finish(self) @@ -2180,7 +2179,7 @@ class Dimension(Creator): 'FreeCAD.ActiveDocument.recompute()']) def createObject(self): - "creates an object in the current doc" + """creates an object in the current doc""" FreeCADGui.addModule("Draft") if self.angledata: normal = "None" @@ -2236,7 +2235,7 @@ class Dimension(Creator): self.selectmode = not(self.selectmode) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -2413,7 +2412,7 @@ class Dimension(Creator): self.finish() def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) self.node.append(self.point) self.dimtrack.update(self.node) @@ -2425,7 +2424,7 @@ class Dimension(Creator): self.finish() class ShapeString(Creator): - "This class creates a shapestring feature." + """This class creates a shapestring feature.""" def GetResources(self): return {'Pixmap' : 'Draft_ShapeString', @@ -2462,7 +2461,7 @@ class ShapeString(Creator): FreeCADGui.draftToolBar.show() def createObject(self): - "creates object in the current doc" + """creates object in the current doc""" #print("debug: D_T ShapeString.createObject type(self.SString): " str(type(self.SString))) dquote = '"' @@ -2493,7 +2492,7 @@ class ShapeString(Creator): self.finish() def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -2541,7 +2540,7 @@ class ShapeString(Creator): self.createObject() def finish(self, finishbool=False): - "terminates the operation" + """terminates the operation""" Creator.finish(self) if self.ui: # del self.dialog # what does this do?? @@ -2553,14 +2552,14 @@ class ShapeString(Creator): #--------------------------------------------------------------------------- class Modifier(DraftTool): - "A generic Modifier Tool, used by modification tools such as move" + """A generic Modifier Tool, used by modification tools such as move""" def __init__(self): DraftTool.__init__(self) self.copymode = False class Move(Modifier): - "The Draft_Move FreeCAD command definition" + """The Draft_Move FreeCAD command definition""" def __init__(self): Modifier.__init__(self) @@ -2610,7 +2609,7 @@ class Move(Modifier): Modifier.finish(self) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent" and arg["Key"] == "ESCAPE": self.finish() elif arg["Type"] == "SoLocation2Event": @@ -2728,7 +2727,7 @@ class Move(Modifier): ['Draft.move('+objects+','+DraftVecUtils.toString(self.vector)+',copy='+str(self.ui.isCopy.isChecked())+')', 'FreeCAD.ActiveDocument.recompute()']) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) if not self.node: self.node.append(self.point) @@ -2745,7 +2744,7 @@ class Move(Modifier): class ApplyStyle(Modifier): - "The Draft_ApplyStyle FreeCA command definition" + """The Draft_ApplyStyle FreeCA command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Apply', @@ -2782,7 +2781,7 @@ class ApplyStyle(Modifier): c.append('Draft.formatObject(FreeCAD.ActiveDocument.'+ob.Name+')') class Rotate(Modifier): - "The Draft_Rotate FreeCAD command definition" + """The Draft_Rotate FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Rotate', @@ -2821,7 +2820,7 @@ class Rotate(Modifier): FreeCAD.Console.PrintMessage(translate("draft", "Pick rotation center")+"\n") def action(self, arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent" and arg["Key"] == "ESCAPE": self.finish() elif arg["Type"] == "SoLocation2Event": @@ -2939,7 +2938,7 @@ class Rotate(Modifier): self.ghosts.append(ghostTracker(subelement)) def finish(self, closed=False, cont=False): - "finishes the arc" + """finishes the arc""" if self.arctrack: self.arctrack.finalize() for ghost in self.ghosts: @@ -3020,7 +3019,7 @@ class Rotate(Modifier): 'FreeCAD.ActiveDocument.recompute()']) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.center = Vector(numx,numy,numz) self.node = [self.center] self.arctrack.setCenter(self.center) @@ -3033,7 +3032,7 @@ class Rotate(Modifier): FreeCAD.Console.PrintMessage(translate("draft", "Pick base angle")+"\n") def numericRadius(self,rad): - "this function gets called by the toolbar when valid radius have been entered there" + """this function gets called by the toolbar when valid radius have been entered there""" if (self.step == 1): self.ui.labelRadius.setText(translate("draft","Rotation")) self.firstangle = math.radians(rad) @@ -3050,7 +3049,7 @@ class Rotate(Modifier): class Offset(Modifier): - "The Draft_Offset FreeCAD command definition" + """The Draft_Offset FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Offset', @@ -3125,7 +3124,7 @@ class Offset(Modifier): self.running = True def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -3241,7 +3240,7 @@ class Offset(Modifier): class Stretch(Modifier): - "The Draft_Stretch FreeCAD command definition" + """The Draft_Stretch FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Stretch', @@ -3302,7 +3301,7 @@ class Stretch(Modifier): FreeCAD.Console.PrintMessage(translate("draft", "Pick first point of selection rectangle")+"\n") def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -3408,7 +3407,7 @@ class Stretch(Modifier): self.ui.redraw() def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" point = Vector(numx,numy,numz) self.addPoint(point) @@ -3421,7 +3420,7 @@ class Stretch(Modifier): Modifier.finish(self) def doStretch(self): - "does the actual stretching" + """does the actual stretching""" commitops = [] if self.displacement: if self.displacement.Length > 0: @@ -3696,10 +3695,10 @@ class Downgrade(Modifier): self.finish() class Trimex(Modifier): - ''' The Draft_Trimex FreeCAD command definition. + """The Draft_Trimex FreeCAD command definition. This tool trims or extends lines, wires and arcs, or extrudes single faces. SHIFT constrains to the last point - or extrudes in direction to the face normal.''' + or extrudes in direction to the face normal.""" def GetResources(self): return {'Pixmap' : 'Draft_Trimex', @@ -3792,7 +3791,7 @@ class Trimex(Modifier): FreeCAD.Console.PrintMessage(translate("draft", "Pick distance")+"\n") def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -3828,7 +3827,7 @@ class Trimex(Modifier): self.finish() def extrude(self,shift=False,real=False): - "redraws the ghost in extrude mode" + """redraws the ghost in extrude mode""" self.newpoint = self.obj.Shape.Faces[0].CenterOfMass dvec = self.point.sub(self.newpoint) if not shift: delta = DraftVecUtils.project(dvec,self.normal) @@ -3845,7 +3844,7 @@ class Trimex(Modifier): return delta.Length def redraw(self,point,snapped=None,shift=False,alt=False,real=None): - "redraws the ghost" + """redraws the ghost""" # initializing reverse = False @@ -3964,7 +3963,7 @@ class Trimex(Modifier): else: return dist def trimObject(self): - "trims the actual object" + """trims the actual object""" if self.extrudeMode: delta = self.extrude(self.shift,real=True) #print("delta",delta) @@ -4025,7 +4024,7 @@ class Trimex(Modifier): for g in self.ghost: g.off() def trimObjects(self,objectslist): - "attempts to trim two objects together" + """attempts to trim two objects together""" import Part wires = [] for obj in objectslist: @@ -4109,7 +4108,7 @@ class Trimex(Modifier): Draft.select(self.obj) def numericRadius(self,dist): - "this function gets called by the toolbar when valid distance have been entered there" + """this function gets called by the toolbar when valid distance have been entered there""" self.force = dist self.trimObject() self.finish() @@ -4177,7 +4176,7 @@ class Scale(Modifier): self.call = self.view.addEventCallback("SoEvent",self.action) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent" and arg["Key"] == "ESCAPE": self.finish() elif arg["Type"] == "SoLocation2Event": @@ -4289,7 +4288,7 @@ class Scale(Modifier): ghost.on() def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when a valid base point has been entered" + """this function gets called by the toolbar when a valid base point has been entered""" self.point = Vector(numx,numy,numz) self.node.append(self.point) if not self.pickmode: @@ -4326,7 +4325,7 @@ class Scale(Modifier): ghost.finalize() class ToggleConstructionMode(): - "The Draft_ToggleConstructionMode FreeCAD command definition" + """The Draft_ToggleConstructionMode FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Construction', @@ -4339,7 +4338,7 @@ class ToggleConstructionMode(): class ToggleContinueMode(): - "The Draft_ToggleContinueMode FreeCAD command definition" + """The Draft_ToggleContinueMode FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Rotate', @@ -4351,7 +4350,7 @@ class ToggleContinueMode(): class Drawing(Modifier): - "The Draft Drawing command definition" + """The Draft Drawing command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Drawing', @@ -4410,7 +4409,7 @@ class Drawing(Modifier): self.doc.recompute() def createDefaultPage(self): - "created a default page" + """created a default page""" template = Draft.getParam("template",FreeCAD.getResourceDir()+'Mod/Drawing/Templates/A3_Landscape.svg') page = self.doc.addObject('Drawing::FeaturePage','Page') page.ViewObject.HintOffsetX = 200 @@ -4422,7 +4421,7 @@ class Drawing(Modifier): class ToggleDisplayMode(): - "The ToggleDisplayMode FreeCAD command definition" + """The ToggleDisplayMode FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_SwitchMode', @@ -4446,7 +4445,7 @@ class ToggleDisplayMode(): obj.ViewObject.DisplayMode = "Flat Lines" class EditImproved(Modifier): - "The Draft_Edit_Improved FreeCAD command definition" + """The Draft_Edit_Improved FreeCAD command definition""" def __init__(self): self.is_running = False @@ -4531,7 +4530,7 @@ class EditImproved(Modifier): pass class AddToGroup(): - "The AddToGroup FreeCAD command definition" + """The AddToGroup FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_AddToGroup', @@ -4575,7 +4574,7 @@ class AddToGroup(): class AddPoint(Modifier): - "The Draft_AddPoint FreeCAD command definition" + """The Draft_AddPoint FreeCAD command definition""" def __init__(self): self.running = False @@ -4600,7 +4599,7 @@ class AddPoint(Modifier): class DelPoint(Modifier): - "The Draft_DelPoint FreeCAD command definition" + """The Draft_DelPoint FreeCAD command definition""" def __init__(self): self.running = False @@ -4625,7 +4624,7 @@ class DelPoint(Modifier): class WireToBSpline(Modifier): - "The Draft_Wire2BSpline FreeCAD command definition" + """The Draft_Wire2BSpline FreeCAD command definition""" def __init__(self): self.running = False @@ -4670,7 +4669,7 @@ class WireToBSpline(Modifier): class SelectGroup(): - "The SelectGroup FreeCAD command definition" + """The SelectGroup FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_SelectGroup', @@ -4702,7 +4701,7 @@ class SelectGroup(): class Shape2DView(Modifier): - "The Shape2DView FreeCAD command definition" + """The Shape2DView FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_2DShapeView', @@ -4746,7 +4745,7 @@ class Shape2DView(Modifier): class Draft2Sketch(Modifier): - "The Draft2Sketch FreeCAD command definition" + """The Draft2Sketch FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Draft2Sketch', @@ -4804,7 +4803,7 @@ class Draft2Sketch(Modifier): class Array(Modifier): - "The Shape2DView FreeCAD command definition" + """The Shape2DView FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Array', @@ -4834,7 +4833,7 @@ class Array(Modifier): self.finish() class PathArray(Modifier): - "The PathArray FreeCAD command definition" + """The PathArray FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_PathArray', @@ -4870,7 +4869,7 @@ class PathArray(Modifier): self.finish() class PointArray(Modifier): - "The PointArray FreeCAD command definition" + """The PointArray FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_PointArray', @@ -4901,7 +4900,7 @@ class PointArray(Modifier): self.finish() class Point(Creator): - "this class will create a vertex after the user clicks a point on the screen" + """this class will create a vertex after the user clicks a point on the screen""" def GetResources(self): return {'Pixmap' : 'Draft_Point', @@ -4938,7 +4937,7 @@ class Point(Creator): self.ui.displayPoint(self.point) def numericInput(self,numx,numy,numz): - "called when a numeric value is entered on the toolbar" + """called when a numeric value is entered on the toolbar""" self.point = FreeCAD.Vector(numx,numy,numz) self.click() @@ -4974,14 +4973,14 @@ class Point(Creator): self.finish() def finish(self,cont=False): - "terminates the operation and restarts if needed" + """terminates the operation and restarts if needed""" Creator.finish(self) if self.ui: if self.ui.continueMode: self.Activated() class ShowSnapBar(): - "The ShowSnapBar FreeCAD command definition" + """The ShowSnapBar FreeCAD command definition""" def GetResources(self): return {'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ShowSnapBar", "Show Snap Bar"), @@ -4993,7 +4992,7 @@ class ShowSnapBar(): class Draft_Clone(Modifier): - "The Draft Clone command definition" + """The Draft Clone command definition""" def __init__(self): Modifier.__init__(self) @@ -5041,7 +5040,7 @@ class Draft_Clone(Modifier): class ToggleGrid(): - "The Draft ToggleGrid command definition" + """The Draft ToggleGrid command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Grid', @@ -5061,7 +5060,7 @@ class ToggleGrid(): FreeCADGui.Snapper.forceGridOff=False class Heal(): - "The Draft Heal command definition" + """The Draft Heal command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Heal', @@ -5079,7 +5078,7 @@ class Heal(): class Draft_Facebinder(Creator): - "The Draft Facebinder command definition" + """The Draft Facebinder command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Facebinder', @@ -5127,7 +5126,7 @@ class Draft_FlipDimension(): class Mirror(Modifier): - "The Draft_Mirror FreeCAD command definition" + """The Draft_Mirror FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Mirror', @@ -5169,7 +5168,7 @@ class Mirror(Modifier): self.Activated() def mirror(self,p1,p2,copy=False): - "mirroring the real shapes" + """mirroring the real shapes""" sel = '[' for o in self.sel: if len(sel) > 1: @@ -5182,7 +5181,7 @@ class Mirror(Modifier): 'FreeCAD.ActiveDocument.recompute()']) def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -5234,7 +5233,7 @@ class Mirror(Modifier): self.finish(cont=True) def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) if not self.node: self.node.append(self.point) @@ -5305,7 +5304,7 @@ class Draft_Slope(): class SetAutoGroup(): - "The SetAutoGroup FreeCAD command definition" + """The SetAutoGroup FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_AutoGroup', @@ -5361,7 +5360,7 @@ class SetAutoGroup(): class SetWorkingPlaneProxy(): - "The SetWorkingPlaneProxy FreeCAD command definition" + """The SetWorkingPlaneProxy FreeCAD command definition""" def GetResources(self): return {'Pixmap' : 'Draft_SelectPlane', @@ -5384,7 +5383,7 @@ class SetWorkingPlaneProxy(): class Draft_Label(Creator): - "The Draft_Label command definition" + """The Draft_Label command definition""" def GetResources(self): return {'Pixmap' : 'Draft_Label', @@ -5458,7 +5457,7 @@ class Draft_Label(Creator): self.finish() def action(self,arg): - "scene event handler" + """scene event handler""" if arg["Type"] == "SoKeyboardEvent": if arg["Key"] == "ESCAPE": self.finish() @@ -5494,7 +5493,7 @@ class Draft_Label(Creator): self.create() def numericInput(self,numx,numy,numz): - "this function gets called by the toolbar when valid x, y, and z have been entered there" + """this function gets called by the toolbar when valid x, y, and z have been entered there""" self.point = Vector(numx,numy,numz) if not self.node: # first click From f7587c30d8bf534a8f247bb96c5184484b3d32ee Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sat, 10 Aug 2019 19:41:58 -0500 Subject: [PATCH 22/39] Draft: DraftTrackers.py, the docstrings need triple quotes and be next to the method or class name so they are correctly picked up by Doxygen or Sphinx to generate documentation; this complies with PEP 257 --- src/Mod/Draft/DraftTrackers.py | 108 ++++++++++++++++----------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/src/Mod/Draft/DraftTrackers.py b/src/Mod/Draft/DraftTrackers.py index 72ea47317b..137e87ed33 100644 --- a/src/Mod/Draft/DraftTrackers.py +++ b/src/Mod/Draft/DraftTrackers.py @@ -39,7 +39,7 @@ from pivy import coin class Tracker: - "A generic Draft Tracker, to be used by other specific trackers" + """A generic Draft Tracker, to be used by other specific trackers""" def __init__(self,dotted=False,scolor=None,swidth=None,children=[],ontop=False,name=None): global Part, DraftGeomUtils import Part, DraftGeomUtils @@ -111,7 +111,7 @@ class Tracker: sg.insertChild(self.switch,0) class snapTracker(Tracker): - "A Snap Mark tracker, used by tools that support snapping" + """A Snap Mark tracker, used by tools that support snapping""" def __init__(self): color = coin.SoBaseColor() color.rgb = FreeCADGui.draftToolBar.getDefaultColor("snap") @@ -141,7 +141,7 @@ class snapTracker(Tracker): class lineTracker(Tracker): - "A Line tracker, used by the tools that need to draw temporary lines" + """A Line tracker, used by the tools that need to draw temporary lines""" def __init__(self,dotted=False,scolor=None,swidth=None,ontop=False): line = coin.SoLineSet() line.numVertices.setValue(2) @@ -150,7 +150,7 @@ class lineTracker(Tracker): Tracker.__init__(self,dotted,scolor,swidth,[self.coords,line],ontop,name="lineTracker") def p1(self,point=None): - "sets or gets the first point of the line" + """sets or gets the first point of the line""" if point: if self.coords.point.getValues()[0].getValue() != tuple(point): self.coords.point.set1Value(0,point.x,point.y,point.z) @@ -158,7 +158,7 @@ class lineTracker(Tracker): return Vector(self.coords.point.getValues()[0].getValue()) def p2(self,point=None): - "sets or gets the second point of the line" + """sets or gets the second point of the line""" if point: if self.coords.point.getValues()[-1].getValue() != tuple(point): self.coords.point.set1Value(1,point.x,point.y,point.z) @@ -166,13 +166,13 @@ class lineTracker(Tracker): return Vector(self.coords.point.getValues()[-1].getValue()) def getLength(self): - "returns the length of the line" + """returns the length of the line""" p1 = Vector(self.coords.point.getValues()[0].getValue()) p2 = Vector(self.coords.point.getValues()[-1].getValue()) return (p2.sub(p1)).Length class rectangleTracker(Tracker): - "A Rectangle tracker, used by the rectangle tool" + """A Rectangle tracker, used by the rectangle tool""" def __init__(self,dotted=False,scolor=None,swidth=None,face=False): self.origin = Vector(0,0,0) line = coin.SoLineSet() @@ -192,13 +192,13 @@ class rectangleTracker(Tracker): self.v = FreeCAD.DraftWorkingPlane.v def setorigin(self,point): - "sets the base point of the rectangle" + """sets the base point of the rectangle""" self.coords.point.set1Value(0,point.x,point.y,point.z) self.coords.point.set1Value(4,point.x,point.y,point.z) self.origin = point def update(self,point): - "sets the opposite (diagonal) point of the rectangle" + """sets the opposite (diagonal) point of the rectangle""" diagonal = point.sub(self.origin) inpoint1 = self.origin.add(DraftVecUtils.project(diagonal,self.v)) inpoint2 = self.origin.add(DraftVecUtils.project(diagonal,self.u)) @@ -217,40 +217,40 @@ class rectangleTracker(Tracker): self.v = self.u.cross(norm) def p1(self,point=None): - "sets or gets the base point of the rectangle" + """sets or gets the base point of the rectangle""" if point: self.setorigin(point) else: return Vector(self.coords.point.getValues()[0].getValue()) def p2(self): - "gets the second point (on u axis) of the rectangle" + """gets the second point (on u axis) of the rectangle""" return Vector(self.coords.point.getValues()[3].getValue()) def p3(self,point=None): - "sets or gets the opposite (diagonal) point of the rectangle" + """sets or gets the opposite (diagonal) point of the rectangle""" if point: self.update(point) else: return Vector(self.coords.point.getValues()[2].getValue()) def p4(self): - "gets the fourth point (on v axis) of the rectangle" + """gets the fourth point (on v axis) of the rectangle""" return Vector(self.coords.point.getValues()[1].getValue()) def getSize(self): - "returns (length,width) of the rectangle" + """returns (length,width) of the rectangle""" p1 = Vector(self.coords.point.getValues()[0].getValue()) p2 = Vector(self.coords.point.getValues()[2].getValue()) diag = p2.sub(p1) return ((DraftVecUtils.project(diag,self.u)).Length,(DraftVecUtils.project(diag,self.v)).Length) def getNormal(self): - "returns the normal of the rectangle" + """returns the normal of the rectangle""" return (self.u.cross(self.v)).normalize() def isInside(self,point): - "returns True if the given point is inside the rectangle" + """returns True if the given point is inside the rectangle""" vp = point.sub(self.p1()) uv = self.p2().sub(self.p1()) vv = self.p4().sub(self.p1()) @@ -264,7 +264,7 @@ class rectangleTracker(Tracker): return False class dimTracker(Tracker): - "A Dimension tracker, used by the dimension tool" + """A Dimension tracker, used by the dimension tool""" def __init__(self,dotted=False,scolor=None,swidth=None): line = coin.SoLineSet() line.numVertices.setValue(4) @@ -308,7 +308,7 @@ class dimTracker(Tracker): self.coords.point.setValues(0,4,points) class bsplineTracker(Tracker): - "A bspline tracker" + """A bspline tracker""" def __init__(self,dotted=False,scolor=None,swidth=None,points = []): self.bspline = None self.points = points @@ -375,7 +375,7 @@ class bsplineTracker(Tracker): FreeCAD.Console.PrintWarning("bsplineTracker.recompute() failed to read-in Inventor string\n") ####################################### class bezcurveTracker(Tracker): - "A bezcurve tracker" + """A bezcurve tracker""" def __init__(self,dotted=False,scolor=None,swidth=None,points = []): self.bezcurve = None self.points = points @@ -459,7 +459,7 @@ class bezcurveTracker(Tracker): ####################################### class arcTracker(Tracker): - "An arc tracker" + """An arc tracker""" def __init__(self,dotted=False,scolor=None,swidth=None,start=0,end=math.pi*2,normal=None): self.circle = None self.startangle = math.degrees(start) @@ -477,35 +477,35 @@ class arcTracker(Tracker): Tracker.__init__(self,dotted,scolor,swidth,[self.trans, self.sep],name="arcTracker") def getDeviation(self): - "returns a deviation vector that represents the base of the circle" + """returns a deviation vector that represents the base of the circle""" import Part c = Part.makeCircle(1,Vector(0,0,0),self.normal) return c.Vertexes[0].Point def setCenter(self,cen): - "sets the center point" + """sets the center point""" self.trans.translation.setValue([cen.x,cen.y,cen.z]) def setRadius(self,rad): - "sets the radius" + """sets the radius""" self.trans.scaleFactor.setValue([rad,rad,rad]) def getRadius(self): - "returns the current radius" + """returns the current radius""" return self.trans.scaleFactor.getValue()[0] def setStartAngle(self,ang): - "sets the start angle" + """sets the start angle""" self.startangle = math.degrees(ang) self.recompute() def setEndAngle(self,ang): - "sets the end angle" + """sets the end angle""" self.endangle = math.degrees(ang) self.recompute() def getAngle(self,pt): - "returns the angle of a given vector in radians" + """returns the angle of a given vector in radians""" c = self.trans.translation.getValue() center = Vector(c[0],c[1],c[2]) rad = pt.sub(center) @@ -514,25 +514,25 @@ class arcTracker(Tracker): return(a) def getAngles(self): - "returns the start and end angles in degrees" + """returns the start and end angles in degrees""" return(self.startangle,self.endangle) def setStartPoint(self,pt): - "sets the start angle from a point" + """sets the start angle from a point""" self.setStartAngle(-self.getAngle(pt)) def setEndPoint(self,pt): - "sets the end angle from a point" + """sets the end angle from a point""" self.setEndAngle(-self.getAngle(pt)) def setApertureAngle(self,ang): - "sets the end angle by giving the aperture angle" + """sets the end angle by giving the aperture angle""" ap = math.degrees(ang) self.endangle = self.startangle + ap self.recompute() def setBy3Points(self,p1,p2,p3): - "sets the arc by three points" + """sets the arc by three points""" import Part try: arc=Part.ArcOfCircle(p1,p2,p3) @@ -619,7 +619,7 @@ class ghostTracker(Tracker): Tracker.__init__(self,dotted,scolor,swidth,children=self.children,name="ghostTracker") def update(self,obj): - "recreates the ghost from a new object" + """recreates the ghost from a new object""" obj.ViewObject.show() self.finalize() sep = self.getNode(obj) @@ -628,23 +628,23 @@ class ghostTracker(Tracker): obj.ViewObject.hide() def move(self,delta): - "moves the ghost to a given position, relative from its start position" + """moves the ghost to a given position, relative from its start position""" self.trans.translation.setValue([delta.x,delta.y,delta.z]) def rotate(self,axis,angle): - "rotates the ghost of a given angle" + """rotates the ghost of a given angle""" self.trans.rotation.setValue(coin.SbVec3f(DraftVecUtils.tup(axis)),angle) def center(self,point): - "sets the rotation/scale center of the ghost" + """sets the rotation/scale center of the ghost""" self.trans.center.setValue(point.x,point.y,point.z) def scale(self,delta): - "scales the ghost by the given factor" + """scales the ghost by the given factor""" self.trans.scaleFactor.setValue([delta.x,delta.y,delta.z]) def getNode(self,obj): - "returns a coin node representing the given object" + """returns a coin node representing the given object""" import Part if isinstance(obj,Part.Shape): return self.getNodeLight(obj) @@ -654,7 +654,7 @@ class ghostTracker(Tracker): return self.getNodeFull(obj) def getNodeFull(self,obj): - "gets a coin node which is a full copy of the current representation" + """gets a coin node which is a full copy of the current representation""" sep = coin.SoSeparator() try: sep.addChild(obj.ViewObject.RootNode.copy()) @@ -671,7 +671,7 @@ class ghostTracker(Tracker): return sep def getNodeLight(self,shape): - "extract a lighter version directly from a shape" + """extract a lighter version directly from a shape""" # error-prone sep = coin.SoSeparator() try: @@ -706,7 +706,7 @@ class ghostTracker(Tracker): self.trans.setMatrix(m) class editTracker(Tracker): - "A node edit tracker" + """A node edit tracker""" def __init__(self,pos=Vector(0,0,0),name=None,idx=0,objcol=None,\ marker=FreeCADGui.getMarkerIndex("quad", 9),inactive=False): color = coin.SoBaseColor() @@ -746,7 +746,7 @@ class editTracker(Tracker): self.set(self.get().add(delta)) class PlaneTracker(Tracker): - "A working plane tracker" + """A working plane tracker""" def __init__(self): # getting screen distance p1 = Draft.get3DView().getPoint((100,100)) @@ -794,7 +794,7 @@ class PlaneTracker(Tracker): self.on() class wireTracker(Tracker): - "A wire tracker" + """A wire tracker""" def __init__(self,wire): self.line = coin.SoLineSet() self.closed = DraftGeomUtils.isReallyClosed(wire) @@ -827,7 +827,7 @@ class wireTracker(Tracker): self.coords.point.set1Value(i,[p.x,p.y,p.z]) class gridTracker(Tracker): - "A grid tracker" + """A grid tracker""" def __init__(self): col = self.getGridColor() pick = coin.SoPickStyle() @@ -873,7 +873,7 @@ class gridTracker(Tracker): return [r, g, b] def update(self): - "redraws the grid" + """redraws the grid""" # resize the grid to make sure it fits an exact pair number of main lines numlines = self.numlines//self.mainlines//2*2*self.mainlines bound = (numlines//2)*self.space @@ -927,14 +927,14 @@ class gridTracker(Tracker): self.update() def reset(self): - "resets the grid according to preferences settings" + """resets the grid according to preferences settings""" self.space = Draft.getParam("gridSpacing",1) self.mainlines = Draft.getParam("gridEvery",10) self.numlines = Draft.getParam("gridSize",100) self.update() def set(self): - "moves and rotates the grid according to the current WP" + """moves and rotates the grid according to the current WP""" self.reset() Q = FreeCAD.DraftWorkingPlane.getRotation().Rotation.Q P = FreeCAD.DraftWorkingPlane.position @@ -943,7 +943,7 @@ class gridTracker(Tracker): self.on() def getClosestNode(self,point): - "returns the closest node from the given point" + """returns the closest node from the given point""" # get the 2D coords. # point = FreeCAD.DraftWorkingPlane.projectPoint(point) pt = FreeCAD.DraftWorkingPlane.getLocalCoords(point) @@ -953,7 +953,7 @@ class gridTracker(Tracker): return pt class boxTracker(Tracker): - "A box tracker, can be based on a line object" + """A box tracker, can be based on a line object""" def __init__(self,line=None,width=0.1,height=1,shaded=False): self.trans = coin.SoTransform() m = coin.SoMaterial() @@ -1024,7 +1024,7 @@ class boxTracker(Tracker): return self.cube.depth.getValue() class radiusTracker(Tracker): - "A tracker that displays a transparent sphere to inicate a radius" + """A tracker that displays a transparent sphere to inicate a radius""" def __init__(self,position=FreeCAD.Vector(0,0,0),radius=1): self.trans = coin.SoTransform() self.trans.translation.setValue([position.x,position.y,position.z]) @@ -1048,7 +1048,7 @@ class radiusTracker(Tracker): self.sphere.radius.setValue(arg2) class archDimTracker(Tracker): - "A wrapper around a Sketcher dim" + """A wrapper around a Sketcher dim""" def __init__(self,p1=FreeCAD.Vector(0,0,0),p2=FreeCAD.Vector(1,0,0),mode=1): import SketcherGui self.dimnode = coin.SoType.fromName("SoDatumLabel").createInstance() @@ -1063,7 +1063,7 @@ class archDimTracker(Tracker): Tracker.__init__(self,children=[self.dimnode],name="archDimTracker") def setString(self,text=None): - "sets the dim string to the given value or auto value" + """sets the dim string to the given value or auto value""" self.dimnode.param1.setValue(.5) p1 = Vector(self.dimnode.pnts.getValues()[0].getValue()) p2 = Vector(self.dimnode.pnts.getValues()[-1].getValue()) @@ -1083,7 +1083,7 @@ class archDimTracker(Tracker): self.dimnode.datumtype.setValue(mode) def p1(self,point=None): - "sets or gets the first point of the dim" + """sets or gets the first point of the dim""" if point: self.dimnode.pnts.set1Value(0,point.x,point.y,point.z) self.setString() @@ -1091,7 +1091,7 @@ class archDimTracker(Tracker): return Vector(self.dimnode.pnts.getValues()[0].getValue()) def p2(self,point=None): - "sets or gets the second point of the dim" + """sets or gets the second point of the dim""" if point: self.dimnode.pnts.set1Value(1,point.x,point.y,point.z) self.setString() From 050ac16f1c145a2d4cd48b266f227a27f09bea43 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Mon, 12 Aug 2019 12:18:03 -0400 Subject: [PATCH 23/39] Fix misc. typos Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller -L od,orign,orginx,orginy` --- src/Gui/View3DInventorViewer.h | 3 +-- src/Mod/Arch/exportIFC.py | 2 +- src/Mod/Arch/importIFC.py | 8 ++++---- src/Mod/Draft/DraftVecUtils.py | 4 ++-- src/Mod/Draft/WorkingPlane.py | 10 +++++----- src/Mod/Draft/importSVG.py | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index 278ec84c27..fe53f68b5b 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -379,7 +379,7 @@ protected: enum eWinGestureTuneState{ ewgtsDisabled, //suppress tuning/re-tuning after errors - ewgtsNeedTuning, //gestures are to be retuned upon next event + ewgtsNeedTuning, //gestures are to be re-tuned upon next event ewgtsTuned }; eWinGestureTuneState winGestureTuneState;//See ViewerEventFilter::eventFilter function for explanation @@ -458,4 +458,3 @@ private: } // namespace Gui #endif // GUI_VIEW3DINVENTORVIEWER_H - diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 48be36ec21..4dabbb9cef 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -111,7 +111,7 @@ END-ISO-10303-21; # ************************************************************************************************ # ********** duplicate methods **************** -# TODO red rid of this duplicate +# TODO get rid of this duplicate def getPreferences(): diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index e63c7f570e..32dbe8c8ac 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -173,7 +173,7 @@ def dms2dd(degrees, minutes, seconds, milliseconds=0): # ************************************************************************************************ # ********** duplicate methods **************** -# TODO red rid of this duplicate +# TODO get rid of this duplicate def getPreferences(): """retrieves IFC preferences""" @@ -1195,9 +1195,9 @@ def insert(filename,docname,skip=[],only=[],root=None): if hasattr(objects[o],"Material"): # the reason behind ... # there are files around in which the material color is different from the shape color - # all viewers use the shape color wheras in FreeCAD the shape color will be - # overwritten by the material coloer (if there is a material with a color) - # in such a case FreeCAD shows different color than all common ifc viewers + # all viewers use the shape color whereas in FreeCAD the shape color will be + # overwritten by the material color (if there is a material with a color). + # In such a case FreeCAD shows different a color than all common ifc viewers # https://forum.freecadweb.org/viewtopic.php?f=39&t=38440 col = objects[o].ViewObject.ShapeColor[:3] dig = 5 diff --git a/src/Mod/Draft/DraftVecUtils.py b/src/Mod/Draft/DraftVecUtils.py index 40dd50d4d1..5fce420641 100644 --- a/src/Mod/Draft/DraftVecUtils.py +++ b/src/Mod/Draft/DraftVecUtils.py @@ -347,7 +347,7 @@ def angle(u, v=Vector(1, 0, 0), normal=Vector(0, 0, 1)): dp = u.dot(v)/ll # Due to rounding errors, the dot product could be outside - # the range [-1, 1], so let's force it to be withing this range. + # the range [-1, 1], so let's force it to be within this range. if dp < -1: dp = -1 elif dp > 1: @@ -785,7 +785,7 @@ def removeDoubles(vlist): Finding duplicated vectors tests for `equality` which depends on the `precision` parameter in the parameter database. - Paramaters + Parameters ---------- vlist : list of Base::Vector3 List with vectors. diff --git a/src/Mod/Draft/WorkingPlane.py b/src/Mod/Draft/WorkingPlane.py index b11cf08403..7367d52af1 100644 --- a/src/Mod/Draft/WorkingPlane.py +++ b/src/Mod/Draft/WorkingPlane.py @@ -66,7 +66,7 @@ class plane: A vector that is supposed to be perpendicular to `u` and `v`; it is helpful although redundant. position : Base::Vector3 - A point throught which the plane goes through, + A point, which the plane goes through, that helps define the working plane. stored : bool A placeholder for a stored state. @@ -159,7 +159,7 @@ class plane: The points are as follows - * `p` is an arbitraty point outside the plane. + * `p` is an arbitrary point outside the plane. * `c` is a known point on the plane, for example, `plane.position`. * `x` is the intercept on the plane from `p` in @@ -532,7 +532,7 @@ class plane: Returns ------- bool - `True` if the operation was succesful, and `False` if the shape + `True` if the operation was successful, and `False` if the shape is not a `'Face'`. See Also @@ -585,7 +585,7 @@ class plane: Returns ------- bool - `True` if the operation was succesful, and `False` otherwise. + `True` if the operation was successful, and `False` otherwise. """ import Part w = Part.makePolygon([p1, p2, p3, p1]) @@ -612,7 +612,7 @@ class plane: Returns ------- bool - `True` if the operation was succesful, and `False` otherwise. + `True` if the operation was successful, and `False` otherwise. It returns `False` if the selection has no elements, or if it has more than one element, or if the object is not derived from `'Part::Feature'` diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index 1f7c0c837d..14bcd44368 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -1559,7 +1559,7 @@ class svgHandler(xml.sax.ContentHandler): obj.ViewObject.TextColor = (0.0, 0.0, 0.0, 0.0) def endElement(self, name): - """Finish procesing the element indicated by the name. + """Finish processing the element indicated by the name. Parameters ---------- From 2469dacf7476a060ee6aade7752fe5d8de025adb Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Mon, 12 Aug 2019 15:10:50 -0400 Subject: [PATCH 24/39] Fix issue in previous commit --- src/Mod/Arch/importIFC.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 32dbe8c8ac..5f0840674f 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -1197,7 +1197,7 @@ def insert(filename,docname,skip=[],only=[],root=None): # there are files around in which the material color is different from the shape color # all viewers use the shape color whereas in FreeCAD the shape color will be # overwritten by the material color (if there is a material with a color). - # In such a case FreeCAD shows different a color than all common ifc viewers + # In such a case FreeCAD shows a different color than all common ifc viewers # https://forum.freecadweb.org/viewtopic.php?f=39&t=38440 col = objects[o].ViewObject.ShapeColor[:3] dig = 5 From c02fb5f6b1e31e4acad175845e737823bd9fe0a9 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Mon, 12 Aug 2019 11:54:38 -0400 Subject: [PATCH 25/39] [AddonManager] Add ThreadProfile WB icon + fix whitespace issue in .qrc file --- .../AddonManager/Resources/AddonManager.qrc | 3 +- .../icons/ThreadProfile_workbench_icon.svg | 83 +++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 src/Mod/AddonManager/Resources/icons/ThreadProfile_workbench_icon.svg diff --git a/src/Mod/AddonManager/Resources/AddonManager.qrc b/src/Mod/AddonManager/Resources/AddonManager.qrc index 78f28880a2..2cf0decd9e 100644 --- a/src/Mod/AddonManager/Resources/AddonManager.qrc +++ b/src/Mod/AddonManager/Resources/AddonManager.qrc @@ -24,7 +24,7 @@ icons/InventorLoader_workbench_icon.svg icons/kicadStepUpMod_workbench_icon.svg icons/lattice2_workbench_icon.svg - icons/LCInterlocking_workbench_icon.svg + icons/LCInterlocking_workbench_icon.svg icons/Lithophane_workbench_icon.svg icons/Manipulator_workbench_icon.svg icons/MOOC_workbench_icon.svg @@ -38,6 +38,7 @@ icons/slic3r-tools_workbench_icon.svg icons/Ship_workbench_icon.svg icons/timber_workbench_icon.svg + icons/ThreadProfile_workbench_icon.svg icons/yaml-workspace_workbench_icon.svg translations/AddonManager_af.qm translations/AddonManager_ar.qm diff --git a/src/Mod/AddonManager/Resources/icons/ThreadProfile_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/ThreadProfile_workbench_icon.svg new file mode 100644 index 0000000000..c730b07e22 --- /dev/null +++ b/src/Mod/AddonManager/Resources/icons/ThreadProfile_workbench_icon.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + From bd985feef323468380a2e5dd88fb3b7046849826 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Mon, 12 Aug 2019 16:48:06 -0400 Subject: [PATCH 26/39] [AddonManager] Add CADExchanger workbench icon Manually created this .svg file. This PR also fixes a previous commit typos for AirplaneDesign and A2plus workbenches that fail to make them display correctly in the AddonManager GUI --- .../AddonManager/Resources/AddonManager.qrc | 3 +- ...nch-icon.svg => A2plus_workbench_icon.svg} | 0 .../icons/CADExchanger_workbench_icon.svg | 84 +++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) rename src/Mod/AddonManager/Resources/icons/{A2plus_workbench-icon.svg => A2plus_workbench_icon.svg} (100%) create mode 100644 src/Mod/AddonManager/Resources/icons/CADExchanger_workbench_icon.svg diff --git a/src/Mod/AddonManager/Resources/AddonManager.qrc b/src/Mod/AddonManager/Resources/AddonManager.qrc index 2cf0decd9e..0f2af8729c 100644 --- a/src/Mod/AddonManager/Resources/AddonManager.qrc +++ b/src/Mod/AddonManager/Resources/AddonManager.qrc @@ -2,11 +2,12 @@ icons/3D_Printing_Tools_workbench_icon.svg icons/A2plus_workbench_icon.svg - icons/AirPlaneDesign_workbench-icon.svg + icons/AirPlaneDesign_workbench_icon.svg icons/ArchTextures_workbench_icon.svg icons/BIMBots_workbench_icon.svg icons/BIM_workbench_icon.svg icons/BOLTSFC_workbench_icon.svg + icons/CADExchanger_workbench_icon.svg icons/cadquery_module_workbench_icon.svg icons/CfdOF_workbench_icon.svg icons/CurvedShapes_workbench_icon.svg diff --git a/src/Mod/AddonManager/Resources/icons/A2plus_workbench-icon.svg b/src/Mod/AddonManager/Resources/icons/A2plus_workbench_icon.svg similarity index 100% rename from src/Mod/AddonManager/Resources/icons/A2plus_workbench-icon.svg rename to src/Mod/AddonManager/Resources/icons/A2plus_workbench_icon.svg diff --git a/src/Mod/AddonManager/Resources/icons/CADExchanger_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/CADExchanger_workbench_icon.svg new file mode 100644 index 0000000000..49ff8dfa50 --- /dev/null +++ b/src/Mod/AddonManager/Resources/icons/CADExchanger_workbench_icon.svg @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + From a66c8a31369607606fd3ad6f91a5942d837bd301 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Mon, 12 Aug 2019 21:59:58 -0500 Subject: [PATCH 27/39] Draft: importSVG, commit 2a139a89 accidentally introduced blady merged code that produced syntax errors; then 537a011a tried to fix it by removing the syntax errors; however a large block of text needs to be removed as well; this was supposed to happen in pull request #2418; however, that pull request no longer merges cleanly so it was withdrawn; this commit finally fixes the problem. --- src/Mod/Draft/importSVG.py | 87 +++----------------------------------- 1 file changed, 7 insertions(+), 80 deletions(-) diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index 14bcd44368..347209c98c 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -743,86 +743,13 @@ class svgHandler(xml.sax.ContentHandler): ret = msgBox.exec_() if ret == QtGui.QMessageBox.Yes: self.svgdpi = 96.0 - if 'style' in data: - if not data['style']: - pass#empty style attribute stops inheriting from parent - else: - content = data['style'].replace(' ','') - content = content.split(';') - for i in content: - pair = i.split(':') - if len(pair)>1: data[pair[0]]=pair[1] - - for k in ['x','y','x1','y1','x2','y2','r','rx','ry','cx','cy','width','height']: - if k in data: - data[k] = getsize(data[k][0],'css'+str(self.svgdpi)) - - for k in ['fill','stroke','stroke-width','font-size']: - if k in data: - if isinstance(data[k],list): - if data[k][0].lower().startswith("rgb("): - data[k] = ",".join(data[k]) - else: - data[k]=data[k][0] - - # extracting style info - - self.fill = None - self.color = None - self.width = None - self.text = None - - if name == 'svg': - m=FreeCAD.Matrix() - if not self.disableUnitScaling: - if 'width' in data and 'height' in data and \ - 'viewBox' in data: - vbw=float(data['viewBox'][2]) - vbh=float(data['viewBox'][3]) - w=attrs.getValue('width') - h=attrs.getValue('height') - self.viewbox=(vbw,vbh) - if len(self.grouptransform)==0: - unitmode='mm'+str(self.svgdpi) - else: #nested svg element - unitmode='css'+str(self.svgdpi) - abw = getsize(w,unitmode) - abh = getsize(h,unitmode) - sx=abw/vbw - sy=abh/vbh - preservearstr=' '.join(data.get('preserveAspectRatio',[])).lower() - uniformscaling = round(sx/sy,5) == 1 - if uniformscaling: - m.scale(Vector(sx,sy,1)) - else: - FreeCAD.Console.PrintWarning('Scaling Factors do not match!!!\n') - if preservearstr.startswith('none'): - m.scale(Vector(sx,sy,1)) - else: #preserve the aspect ratio - if preservearstr.endswith('slice'): - sxy=max(sx,sy) - else: - sxy=min(sx,sy) - m.scale(Vector(sxy,sxy,1)) - elif len(self.grouptransform)==0: - #fallback to current dpi - m.scale(Vector(25.4/self.svgdpi,25.4/self.svgdpi,1)) - self.grouptransform.append(m) - if 'fill' in data: - if data['fill'][0] != 'none': - self.fill = getcolor(data['fill']) - if 'stroke' in data: - if data['stroke'][0] != 'none': - self.color = getcolor(data['stroke']) - if 'stroke-width' in data: - if data['stroke-width'] != 'none': - self.width = getsize(data['stroke-width'],'css'+str(self.svgdpi)) - if 'transform' in data: - m = self.getMatrix(attrs.getValue('transform')) - if name == "g": - self.grouptransform.append(m) - else: - self.transform = m + else: + self.svgdpi = 90.0 + if ret: + FCC.PrintMessage(translate("ImportSVG", _msg) + "\n") + FCC.PrintMessage(translate("ImportSVG", _qst) + "\n") + FCC.PrintMessage("*** User specified " + + str(self.svgdpi) + " dpi ***\n") else: self.svgdpi = 96.0 FCC.PrintMessage(_msg + "\n") From ce943982ec2a5dfd0d3227ebba8f900963653f47 Mon Sep 17 00:00:00 2001 From: furti Date: Wed, 14 Aug 2019 16:25:38 +0200 Subject: [PATCH 28/39] Arch: Fix missing cache value for SectionPlane When the Arch SectionPlane was rendered via TechDraw in Solid mode, the last parameter "fillSpaces" was not set for the svgcache. So the next render operation threw an exeption because there where only 4 instead of 5 elements in the cache list. --- src/Mod/Arch/ArchSectionPlane.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 11507159ff..dad02306d3 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -298,7 +298,7 @@ def getSVG(section, renderMode="Wireframe", allOn=False, showHidden=False, scale svgcache += render.getHiddenSVG(linewidth="SVGLINEWIDTH") svgcache += '\n' # print(render.info()) - section.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill] + section.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces] else: if not svgcache: From a937461d6f4a3a1d0dcefede92d9adbfd1403aab Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 14 Aug 2019 16:04:52 -0300 Subject: [PATCH 29/39] Arch: Merge of PR #2259 - Fix ifc project --- src/Mod/Arch/Arch.py | 1 + src/Mod/Arch/ArchBuildingPart.py | 6 +- src/Mod/Arch/ArchCommands.py | 4 +- src/Mod/Arch/ArchComponent.py | 25 +- src/Mod/Arch/ArchFloor.py | 10 +- src/Mod/Arch/ArchIFC.py | 310 +- src/Mod/Arch/ArchIFCSchema.py | 4 + src/Mod/Arch/ArchIFCView.py | 71 + src/Mod/Arch/ArchProject.py | 126 + src/Mod/Arch/ArchSite.py | 7 +- src/Mod/Arch/ArchStructure.py | 2 +- src/Mod/Arch/ArchWall.py | 10 +- src/Mod/Arch/CMakeLists.txt | 5 + src/Mod/Arch/InitGui.py | 2 +- src/Mod/Arch/Presets/ifc_contexts_IFC4.json | 146 + src/Mod/Arch/Presets/ifc_products_IFC4.json | 10339 ++++++++++++++-- src/Mod/Arch/Resources/Arch.qrc | 2 + src/Mod/Arch/Resources/icons/Arch_Project.svg | 423 + .../Resources/icons/Arch_Project_Tree.svg | 435 + src/Mod/Arch/exportIFC.py | 25 +- src/Mod/Arch/exportIFCHelper.py | 140 + src/Mod/Arch/importIFC.py | 138 +- src/Mod/Arch/importIFCHelper.py | 70 + 23 files changed, 11337 insertions(+), 964 deletions(-) create mode 100644 src/Mod/Arch/ArchIFCView.py create mode 100644 src/Mod/Arch/ArchProject.py create mode 100644 src/Mod/Arch/Presets/ifc_contexts_IFC4.json create mode 100644 src/Mod/Arch/Resources/icons/Arch_Project.svg create mode 100644 src/Mod/Arch/Resources/icons/Arch_Project_Tree.svg create mode 100644 src/Mod/Arch/exportIFCHelper.py create mode 100644 src/Mod/Arch/importIFCHelper.py diff --git a/src/Mod/Arch/Arch.py b/src/Mod/Arch/Arch.py index 78cc22f692..4494218424 100644 --- a/src/Mod/Arch/Arch.py +++ b/src/Mod/Arch/Arch.py @@ -43,6 +43,7 @@ if FreeCAD.GuiUp: from ArchWall import * from ArchFloor import * from ArchFence import * +from ArchProject import * from ArchSite import * from ArchBuilding import * from ArchStructure import * diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index 9f68cf5115..7eb2105a8b 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -313,7 +313,7 @@ class CommandBuildingPart: -class BuildingPart: +class BuildingPart(ArchIFC.IfcProduct): "The BuildingPart object" @@ -326,7 +326,7 @@ class BuildingPart: self.setProperties(obj) def setProperties(self,obj): - ArchIFC.setProperties(obj) + ArchIFC.IfcProduct.setProperties(self, obj) pl = obj.PropertiesList if not "Height" in pl: @@ -366,7 +366,7 @@ class BuildingPart: def onChanged(self,obj,prop): - ArchIFC.onChanged(obj, prop) + ArchIFC.IfcProduct.onChanged(self, obj, prop) if prop == "Height": for child in obj.Group: diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index 9917e375a1..87780c46d6 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -116,7 +116,7 @@ def addComponents(objectsList,host): if not isinstance(objectsList,list): objectsList = [objectsList] hostType = Draft.getType(host) - if hostType in ["Floor","Building","Site","BuildingPart"]: + if hostType in ["Floor","Building","Site","Project","BuildingPart"]: for o in objectsList: host.addObject(o) elif hostType in ["Wall","Structure","Window","Roof","Stairs","StructuralSystem","Panel","Component"]: @@ -744,7 +744,7 @@ def pruneIncluded(objectslist,strict=False): if obj.isDerivedFrom("Part::Feature"): if not (Draft.getType(obj) in ["Window","Clone","Pipe","Rebar"]): for parent in obj.InList: - if parent.isDerivedFrom("Part::Feature") and not (Draft.getType(parent) in ["Space","Facebinder","Window","Roof","Clone","Site"]): + if parent.isDerivedFrom("Part::Feature") and not (Draft.getType(parent) in ["Space","Facebinder","Window","Roof","Clone","Site","Project"]): if not parent.isDerivedFrom("Part::Part2DObject"): # don't consider 2D objects based on arch elements if hasattr(parent,"Host") and (parent.Host == obj): diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index e9df5625b6..ded738bdd3 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -133,22 +133,20 @@ def removeFromComponent(compobject,subobject): -class Component: - +class Component(ArchIFC.IfcProduct): "The default Arch Component object" - def __init__(self,obj): - + def __init__(self, obj): obj.Proxy = self - Component.setProperties(self,obj) + Component.setProperties(self, obj) self.Type = "Component" - def setProperties(self,obj): + def setProperties(self, obj): "Sets the needed properties of this object" - ArchIFC.setProperties(obj) + ArchIFC.IfcProduct.setProperties(self, obj) pl = obj.PropertiesList if not "Base" in pl: @@ -195,9 +193,8 @@ class Component: #self.MoveWithHost = False self.Type = "Component" - def onDocumentRestored(self,obj): - - Component.setProperties(self,obj) + def onDocumentRestored(self, obj): + Component.setProperties(self, obj) def execute(self,obj): @@ -210,24 +207,20 @@ class Component: obj.Shape = shape def __getstate__(self): - # for compatibility with 0.17 if hasattr(self,"Type"): return self.Type return "Component" def __setstate__(self,state): - return None def onBeforeChange(self,obj,prop): - if prop == "Placement": self.oldPlacement = FreeCAD.Placement(obj.Placement) - def onChanged(self,obj,prop): - - ArchIFC.onChanged(obj, prop) + def onChanged(self, obj, prop): + ArchIFC.IfcProduct.onChanged(self, obj, prop) if prop == "Placement": if hasattr(self,"oldPlacement"): diff --git a/src/Mod/Arch/ArchFloor.py b/src/Mod/Arch/ArchFloor.py index a800199327..1c24cb313d 100644 --- a/src/Mod/Arch/ArchFloor.py +++ b/src/Mod/Arch/ArchFloor.py @@ -22,7 +22,7 @@ #* * #*************************************************************************** -import FreeCAD,Draft,ArchCommands, DraftVecUtils +import FreeCAD,Draft,ArchCommands, DraftVecUtils, ArchIFC if FreeCAD.GuiUp: import FreeCADGui from PySide import QtCore, QtGui @@ -121,7 +121,7 @@ Floor creation aborted.") + "\n" FreeCAD.ActiveDocument.recompute() -class _Floor: +class _Floor(ArchIFC.IfcProduct): "The Floor object" @@ -134,6 +134,7 @@ class _Floor: def setProperties(self,obj): + ArchIFC.IfcProduct.setProperties(self, obj) pl = obj.PropertiesList if not "Height" in pl: obj.addProperty("App::PropertyLength","Height","Floor",QT_TRANSLATE_NOOP("App::Property","The height of this object")) @@ -142,10 +143,6 @@ class _Floor: if not hasattr(obj,"Placement"): # obj can be a Part Feature and already has a placement obj.addProperty("App::PropertyPlacement","Placement","Base",QT_TRANSLATE_NOOP("App::Property","The placement of this object")) - if not "IfcType" in pl: - obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object")) - import ArchIFC - obj.IfcType = ArchIFC.IfcTypes self.Type = "Floor" def onDocumentRestored(self,obj): @@ -161,6 +158,7 @@ class _Floor: return None def onChanged(self,obj,prop): + ArchIFC.IfcProduct.onChanged(self, obj, prop) if not hasattr(self,"Object"): # on restore, self.Object is not there anymore diff --git a/src/Mod/Arch/ArchIFC.py b/src/Mod/Arch/ArchIFC.py index 120e284b5e..d5b2616dde 100644 --- a/src/Mod/Arch/ArchIFC.py +++ b/src/Mod/Arch/ArchIFC.py @@ -9,181 +9,185 @@ else: return txt import ArchIFCSchema -IfcTypes = ['Undefined']+[''.join(map(lambda x: x if x.islower() else " "+x, t[3:]))[1:] for t in ArchIFCSchema.IfcProducts.keys()] -def setProperties(obj): +IfcTypes = [''.join(map(lambda x: x if x.islower() else " "+x, t[3:]))[1:] for t in ArchIFCSchema.IfcProducts.keys()] - "Checks and sets all the needed IFC-related properties" +class IfcRoot: + def setProperties(self, obj): + if not "IfcData" in obj.PropertiesList: + obj.addProperty("App::PropertyMap","IfcData","IFC",QT_TRANSLATE_NOOP("App::Property","IFC data")) - if not "IfcType" in obj.PropertiesList: - obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object")) - obj.IfcType = IfcTypes + if not "IfcType" in obj.PropertiesList: + obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object")) + obj.IfcType = self.getCanonicalisedIfcTypes() - if not "IfcData" in obj.PropertiesList: - obj.addProperty("App::PropertyMap","IfcData","IFC",QT_TRANSLATE_NOOP("App::Property","IFC data")) + if not "IfcProperties" in obj.PropertiesList: + obj.addProperty("App::PropertyMap","IfcProperties","IFC",QT_TRANSLATE_NOOP("App::Property","IFC properties of this object")) - if not "IfcProperties" in obj.PropertiesList: - obj.addProperty("App::PropertyMap","IfcProperties","IFC",QT_TRANSLATE_NOOP("App::Property","IFC properties of this object")) + self.migrateDeprecatedAttributes(obj) - migrateDeprecatedAttributes(obj) + def onChanged(self, obj, prop): + if prop == "IfcType": + self.setupIfcAttributes(obj) + self.setupIfcComplexAttributes(obj) + if obj.getGroupOfProperty(prop) == "IFC Attributes": + self.setObjIfcAttributeValue(obj, prop, obj.getPropertyByName(prop)) -def onChanged(obj, prop): + def setupIfcAttributes(self, obj): + ifcTypeSchema = self.getIfcTypeSchema(obj.IfcType) + if ifcTypeSchema is None: + return + self.purgeUnusedIfcAttributesFromPropertiesList(ifcTypeSchema, obj) + self.addIfcAttributes(ifcTypeSchema, obj) - "Called by Arch object's OnChanged method" + def setupIfcComplexAttributes(self, obj): + ifcTypeSchema = self.getIfcTypeSchema(obj.IfcType) + if ifcTypeSchema is None: + return + IfcData = obj.IfcData + if "complex_attributes" not in IfcData: + IfcData["complex_attributes"] = "{}" + ifcComplexAttributes = json.loads(IfcData["complex_attributes"]) + for attribute in ifcTypeSchema["complex_attributes"]: + if attribute["name"] not in ifcComplexAttributes.keys(): + ifcComplexAttributes[attribute["name"]] = {} + IfcData["complex_attributes"] = json.dumps(ifcComplexAttributes) + obj.IfcData = IfcData - if prop == "IfcType": - setupIfcAttributes(obj) - if obj.getGroupOfProperty(prop) == "IFC Attributes": - setObjIfcAttributeValue(obj, prop, obj.getPropertyByName(prop)) + def getIfcTypeSchema(self, IfcType): + name = "Ifc" + IfcType.replace(" ", "") + if IfcType == "Undefined": + name = "IfcBuildingElementProxy" + if name in self.getIfcSchema(): + return self.getIfcSchema()[name] + return None -def getIfcProduct(IfcType): - - "Returns an IFC product name from an obj.IfcType" - - name = "Ifc" + IfcType.replace(" ", "") - if IfcType == "Undefined": - name = "IfcBuildingElementProxy" - if name in ArchIFCSchema.IfcProducts: - return ArchIFCSchema.IfcProducts[name] - return None + def getIfcSchema(self): + return {} -def getIfcProductAttribute(ifcProduct, name): - - "Returns the attributes of a given product" + def getCanonicalisedIfcTypes(self): + schema = self.getIfcSchema() + return [''.join(map(lambda x: x if x.islower() else " "+x, t[3:]))[1:] for t in schema.keys()] - for attribute in ifcProduct["attributes"]: - if attribute["name"].replace(' ', '') == name: - return attribute - return None + def getIfcAttributeSchema(self, ifcTypeSchema, name): + for attribute in ifcTypeSchema["attributes"]: + if attribute["name"].replace(' ', '') == name: + return attribute + return None -def setupIfcAttributes(obj): + def addIfcAttributes(self, ifcTypeSchema, obj): + for attribute in ifcTypeSchema["attributes"]: + if attribute["name"] in obj.PropertiesList \ + or attribute["name"] == "RefLatitude" \ + or attribute["name"] == "RefLongitude" \ + or attribute["name"] == "Name": + continue + self.addIfcAttribute(obj, attribute) + self.addIfcAttributeValueExpressions(obj, attribute) - "Sets the necessary IFC attribute properties for an object" - - ifcProduct = getIfcProduct(obj.IfcType) - if ifcProduct is None: - return - purgeUnusedIfcAttributesFromPropertiesList(ifcProduct, obj) - addIfcProductAttributesToObj(ifcProduct, obj) - -def addIfcProductAttributesToObj(ifcProduct, obj): - - "Adds the necessary attribute properties to an object" - - for attribute in ifcProduct["attributes"]: - if attribute["name"] in obj.PropertiesList \ - or attribute["name"] == "RefLatitude" \ - or attribute["name"] == "RefLongitude": - continue - addIfcProductAttribute(obj, attribute) - addIfcAttributeValueExpressions(obj, attribute) - -def addIfcProductAttribute(obj, attribute): - - "Adds a given attribute property" - - if not hasattr(obj,"IfcData"): - return - IfcData = obj.IfcData - if "attributes" not in IfcData: - IfcData["attributes"] = "{}" - IfcAttributes = json.loads(IfcData["attributes"]) - IfcAttributes[attribute["name"]] = attribute - IfcData["attributes"] = json.dumps(IfcAttributes) - obj.IfcData = IfcData - if attribute["is_enum"]: - obj.addProperty("App::PropertyEnumeration", attribute["name"], "IFC Attributes", QT_TRANSLATE_NOOP("App::Property", "Description of IFC attributes are not yet implemented")) - setattr(obj, attribute["name"], attribute["enum_values"]) - else: - import ArchIFCSchema - propertyType = "App::" + ArchIFCSchema.IfcTypes[attribute["type"]]["property"] - obj.addProperty(propertyType, attribute["name"], "IFC Attributes", QT_TRANSLATE_NOOP("App::Property", "Description of IFC attributes are not yet implemented")) - -def addIfcAttributeValueExpressions(obj, attribute): - - "Binds the given attribute properties with expressions" - - if not attribute["name"] in obj.PropertiesList: - return - if obj.getGroupOfProperty(attribute["name"]) != "IFC Attributes": - return - if attribute["name"] == "OverallWidth": - if "Length" in obj.PropertiesList: - obj.setExpression("OverallWidth", "Length.Value") - elif "Width" in obj.PropertiesList: - obj.setExpression("OverallWidth", "Width.Value") - elif obj.Shape and (obj.Shape.BoundBox.XLength > obj.Shape.BoundBox.YLength): - obj.setExpression("OverallWidth", "Shape.BoundBox.XLength") - elif obj.Shape: - obj.setExpression("OverallWidth", "Shape.BoundBox.YLength") - elif attribute["name"] == "OverallHeight": - if "Height" in obj.PropertiesList: - obj.setExpression("OverallHeight", "Height.Value") + def addIfcAttribute(self, obj, attribute): + if not hasattr(obj, "IfcData"): + return + IfcData = obj.IfcData + if "attributes" not in IfcData: + IfcData["attributes"] = "{}" + IfcAttributes = json.loads(IfcData["attributes"]) + IfcAttributes[attribute["name"]] = attribute + IfcData["attributes"] = json.dumps(IfcAttributes) + obj.IfcData = IfcData + if attribute["is_enum"]: + obj.addProperty("App::PropertyEnumeration", attribute["name"], "IFC Attributes", QT_TRANSLATE_NOOP("App::Property", "Description of IFC attributes are not yet implemented")) + setattr(obj, attribute["name"], attribute["enum_values"]) else: - obj.setExpression("OverallHeight", "Shape.BoundBox.ZLength") - elif attribute["name"] == "ElevationWithFlooring": - if "Shape" in obj.PropertiesList: + import ArchIFCSchema + propertyType = "App::" + ArchIFCSchema.IfcTypes[attribute["type"]]["property"] + obj.addProperty(propertyType, attribute["name"], "IFC Attributes", QT_TRANSLATE_NOOP("App::Property", "Description of IFC attributes are not yet implemented")) + + def addIfcAttributeValueExpressions(self, obj, attribute): + if obj.getGroupOfProperty(attribute["name"]) != "IFC Attributes" \ + or attribute["name"] not in obj.PropertiesList: + return + if attribute["name"] == "OverallWidth": + if "Length" in obj.PropertiesList: + obj.setExpression("OverallWidth", "Length.Value") + elif "Width" in obj.PropertiesList: + obj.setExpression("OverallWidth", "Width.Value") + elif obj.Shape and (obj.Shape.BoundBox.XLength > obj.Shape.BoundBox.YLength): + obj.setExpression("OverallWidth", "Shape.BoundBox.XLength") + elif obj.Shape: + obj.setExpression("OverallWidth", "Shape.BoundBox.YLength") + elif attribute["name"] == "OverallHeight": + if "Height" in obj.PropertiesList: + obj.setExpression("OverallHeight", "Height.Value") + else: + obj.setExpression("OverallHeight", "Shape.BoundBox.ZLength") + elif attribute["name"] == "ElevationWithFlooring" and "Shape" in obj.PropertiesList: obj.setExpression("ElevationWithFlooring", "Shape.BoundBox.ZMin") - elif attribute["name"] == "Elevation": - if "Placement" in obj.PropertiesList: + elif attribute["name"] == "Elevation" and "Placement" in obj.PropertiesList: obj.setExpression("Elevation", "Placement.Base.z") - elif attribute["name"] == "NominalDiameter": - if "Diameter" in obj.PropertiesList: + elif attribute["name"] == "NominalDiameter" and "Diameter" in obj.PropertiesList: obj.setExpression("NominalDiameter", "Diameter.Value") - elif attribute["name"] == "BarLength": - if "Length" in obj.PropertiesList: + elif attribute["name"] == "BarLength" and "Length" in obj.PropertiesList: obj.setExpression("BarLength", "Length.Value") - elif attribute["name"] == "RefElevation": - if "Elevation" in obj.PropertiesList: + elif attribute["name"] == "RefElevation" and "Elevation" in obj.PropertiesList: obj.setExpression("RefElevation", "Elevation.Value") - elif attribute["name"] == "LongName": - obj.LongName = obj.Label + elif attribute["name"] == "LongName": + obj.LongName = obj.Label -def setObjIfcAttributeValue(obj, attributeName, value): - - "Sets the value of a given attribute property" - - IfcData = obj.IfcData - if "attributes" not in IfcData: - IfcData["attributes"] = "{}" - IfcAttributes = json.loads(IfcData["attributes"]) - if isinstance(value, FreeCAD.Units.Quantity): - value = float(value) - if not attributeName in IfcAttributes: - IfcAttributes[attributeName] = {} - IfcAttributes[attributeName]["value"] = value - IfcData["attributes"] = json.dumps(IfcAttributes) - obj.IfcData = IfcData + def setObjIfcAttributeValue(self, obj, attributeName, value): + IfcData = obj.IfcData + if "attributes" not in IfcData: + IfcData["attributes"] = "{}" + IfcAttributes = json.loads(IfcData["attributes"]) + if isinstance(value, FreeCAD.Units.Quantity): + value = float(value) + if not attributeName in IfcAttributes: + IfcAttributes[attributeName] = {} + IfcAttributes[attributeName]["value"] = value + IfcData["attributes"] = json.dumps(IfcAttributes) + obj.IfcData = IfcData -def purgeUnusedIfcAttributesFromPropertiesList(ifcProduct, obj): - - "Removes unused attribute properties" - - for property in obj.PropertiesList: - if obj.getGroupOfProperty(property) != "IFC Attributes": - continue - ifcProductAttribute = getIfcProductAttribute(ifcProduct, property) - if ifcProductAttribute is None or ifcProductAttribute["is_enum"] is True: - obj.removeProperty(property) + def setObjIfcComplexAttributeValue(self, obj, attributeName, value): + IfcData = obj.IfcData + IfcAttributes = json.loads(IfcData["complex_attributes"]) + IfcAttributes[attributeName] = value + IfcData["complex_attributes"] = json.dumps(IfcAttributes) + obj.IfcData = IfcData -def migrateDeprecatedAttributes(obj): - - "Fixes obsolete properties" + def getObjIfcComplexAttribute(self, obj, attributeName): + return json.loads(obj.IfcData["complex_attributes"])[attributeName] - if "Role" in obj.PropertiesList: - r = obj.Role - obj.removeProperty("Role") - if r in IfcTypes: - obj.IfcType = r - FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" Role property to IfcType\n") + def purgeUnusedIfcAttributesFromPropertiesList(self, ifcTypeSchema, obj): + for property in obj.PropertiesList: + if obj.getGroupOfProperty(property) != "IFC Attributes": + continue + ifcAttribute = self.getIfcAttributeSchema(ifcTypeSchema, property) + if ifcAttribute is None or ifcAttribute["is_enum"] is True: + obj.removeProperty(property) - if "IfcRole" in obj.PropertiesList: - r = obj.IfcRole - obj.removeProperty("IfcRole") - if r in IfcTypes: - obj.IfcType = r - FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" IfcRole property to IfcType\n") - - if "IfcAttributes"in obj.PropertiesList: - obj.IfcData = obj.IfcAttributes - obj.removeProperty("IfcAttributes") + def migrateDeprecatedAttributes(self, obj): + if "Role" in obj.PropertiesList: + r = obj.Role + obj.removeProperty("Role") + if r in IfcTypes: + obj.IfcType = r + FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" Role property to IfcType\n") + + if "IfcRole" in obj.PropertiesList: + r = obj.IfcRole + obj.removeProperty("IfcRole") + if r in IfcTypes: + obj.IfcType = r + FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" IfcRole property to IfcType\n") + + if "IfcAttributes"in obj.PropertiesList: + obj.IfcData = obj.IfcAttributes + obj.removeProperty("IfcAttributes") + +class IfcProduct(IfcRoot): + def getIfcSchema(self): + return ArchIFCSchema.IfcProducts + +class IfcContext(IfcRoot): + def getIfcSchema(self): + return ArchIFCSchema.IfcContexts diff --git a/src/Mod/Arch/ArchIFCSchema.py b/src/Mod/Arch/ArchIFCSchema.py index 98eabcde87..33d971d8ab 100644 --- a/src/Mod/Arch/ArchIFCSchema.py +++ b/src/Mod/Arch/ArchIFCSchema.py @@ -3,6 +3,10 @@ import FreeCAD, os, json ifcVersions = ["IFC4", "IFC2X3"] IfcVersion = ifcVersions[FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("IfcVersion",0)] +with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets", +"ifc_contexts_" + IfcVersion + ".json")) as f: + IfcContexts = json.load(f) + with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets", "ifc_products_" + IfcVersion + ".json")) as f: IfcProducts = json.load(f) diff --git a/src/Mod/Arch/ArchIFCView.py b/src/Mod/Arch/ArchIFCView.py new file mode 100644 index 0000000000..b16b1c6791 --- /dev/null +++ b/src/Mod/Arch/ArchIFCView.py @@ -0,0 +1,71 @@ +import FreeCAD, ArchIFC + +if FreeCAD.GuiUp: + import FreeCADGui + from PySide import QtGui + +class IfcContextView: + def setEdit(self, viewObject, mode): + # What does mode do? + FreeCADGui.Control.showDialog(IfcContextUI(viewObject.Object)) + return True + +class IfcContextUI: + def __init__(self, object): + self.object = object + self.lineEditObjects = [] + self.createBaseLayout() + self.createMapConversionFormLayout() + self.prefillMapConversionForm() + self.form = self.baseWidget + + def accept(self): + data = {} + for lineEdit in self.lineEditObjects: + data[lineEdit.objectName()] = lineEdit.text() + ArchIFC.IfcRoot.setObjIfcComplexAttributeValue(self, self.object, "RepresentationContexts", data) + return True + + def createBaseLayout(self): + self.baseWidget = QtGui.QWidget() + self.baseLayout = QtGui.QVBoxLayout(self.baseWidget) + + def createMapConversionFormLayout(self): + self.baseLayout.addWidget(self.createLabel("Target Coordinate Reference System")) + self.baseLayout.addLayout(self.createFormEntry("name", "Name")) + self.baseLayout.addLayout(self.createFormEntry("description", "Description")) + self.baseLayout.addLayout(self.createFormEntry("geodetic_datum", "Geodetic datum")) + self.baseLayout.addLayout(self.createFormEntry("vertical_datum", "Vertical datum")) + self.baseLayout.addLayout(self.createFormEntry("map_projection", "Map projection")) + self.baseLayout.addLayout(self.createFormEntry("map_zone", "Map zone")) + self.baseLayout.addLayout(self.createFormEntry("map_unit", "Map unit")) + + self.baseLayout.addWidget(self.createLabel("Map Conversion")) + self.baseLayout.addLayout(self.createFormEntry("eastings", "Eastings")) + self.baseLayout.addLayout(self.createFormEntry("northings", "Northings")) + self.baseLayout.addLayout(self.createFormEntry("orthogonal_height", "Orthogonal height")) + self.baseLayout.addLayout(self.createFormEntry("true_north", "True north (anti-clockwise from +Y)")) + self.baseLayout.addLayout(self.createFormEntry("scale", "Scale")) + + def prefillMapConversionForm(self): + data = ArchIFC.IfcRoot.getObjIfcComplexAttribute(self, self.object, "RepresentationContexts") + for lineEdit in self.lineEditObjects: + if lineEdit.objectName() in data.keys(): + lineEdit.setText(data[lineEdit.objectName()]) + + def createFormEntry(self, name, label): + layout = QtGui.QHBoxLayout(self.baseWidget) + layout.addWidget(self.createLabel(label)) + layout.addWidget(self.createLineEdit(name)) + return layout + + def createLabel(self, value): + label = QtGui.QLabel(self.baseWidget) + label.setText(QtGui.QApplication.translate("Arch", value, None)) + return label + + def createLineEdit(self, name): + lineEdit = QtGui.QLineEdit(self.baseWidget) + lineEdit.setObjectName(name) + self.lineEditObjects.append(lineEdit) + return lineEdit diff --git a/src/Mod/Arch/ArchProject.py b/src/Mod/Arch/ArchProject.py new file mode 100644 index 0000000000..8e838721e5 --- /dev/null +++ b/src/Mod/Arch/ArchProject.py @@ -0,0 +1,126 @@ +# -*- coding: utf8 -*- + +#*************************************************************************** +#* * +#* Copyright (c) 2011 * +#* Yorik van Havre * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +import FreeCAD,Draft,ArchComponent,ArchCommands,math,re,datetime,ArchIFC,ArchIFCView +if FreeCAD.GuiUp: + import FreeCADGui + from PySide import QtCore, QtGui + from DraftTools import translate + from PySide.QtCore import QT_TRANSLATE_NOOP +else: + def translate(ctxt,txt): + return txt + def QT_TRANSLATE_NOOP(ctxt,txt): + return txt + +## @package ArchProject +# \ingroup ARCH +# \brief The Project object and tools +# +# This module provides tools to build Project objects. + +__title__="FreeCAD Project" +__author__ = "Yorik van Havre" +__url__ = "http://www.freecadweb.org" + +def makeProject(sites=None, name="Project"): + + '''makeProject(sites): creates a project aggregating the list of sites.''' + + if not FreeCAD.ActiveDocument: + return FreeCAD.Console.PrintError("No active document. Aborting\n") + + import Part + obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "Project") + obj.Label = translate("Arch", name) + _Project(obj) + if FreeCAD.GuiUp: + _ViewProviderProject(obj.ViewObject) + if sites: + obj.Group = sites + return obj + +class _CommandProject: + + "the Arch Project command definition" + + def GetResources(self): + return {'Pixmap' : 'Arch_Project', + 'MenuText': QT_TRANSLATE_NOOP("Arch_Project", "Project"), + 'Accel': "P, O", + 'ToolTip': QT_TRANSLATE_NOOP("Arch_Project", "Creates a project entity aggregating the selected sites.")} + + def IsActive(self): + return not FreeCAD.ActiveDocument is None + + def Activated(self): + selection = FreeCADGui.Selection.getSelection() + siteobj = [] + + for obj in selection: + if hasattr(obj, "IfcType") and obj.IfcType == "Site": + siteobj.append(obj) + + ss = "[ " + for o in siteobj: + ss += "FreeCAD.ActiveDocument." + o.Name + ", " + ss += "]" + FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Project")) + FreeCADGui.addModule("Arch") + FreeCADGui.doCommand("obj = Arch.makeProject("+ss+")") + FreeCADGui.addModule("Draft") + FreeCADGui.doCommand("Draft.autogroup(obj)") + FreeCAD.ActiveDocument.commitTransaction() + FreeCAD.ActiveDocument.recompute() + +class _Project(ArchIFC.IfcContext): + + def __init__(self, obj): + obj.Proxy = self + self.setProperties(obj) + obj.IfcType = "Project" + + def setProperties(self, obj): + ArchIFC.IfcContext.setProperties(self, obj) + pl = obj.PropertiesList + if not hasattr(obj,"Group"): + obj.addExtension("App::GroupExtensionPython", self) + self.Type = "Project" + + def onDocumentRestored(self, obj): + self.setProperties(obj) + +class _ViewProviderProject(ArchIFCView.IfcContextView): + + def __init__(self,vobj): + vobj.Proxy = self + vobj.addExtension("Gui::ViewProviderGroupExtensionPython", self) + + def getIcon(self): + import Arch_rc + return ":/icons/Arch_Project_Tree.svg" + +if FreeCAD.GuiUp: + FreeCADGui.addCommand('Arch_Project', _CommandProject()) diff --git a/src/Mod/Arch/ArchSite.py b/src/Mod/Arch/ArchSite.py index f7753dcd5f..c716cd0108 100644 --- a/src/Mod/Arch/ArchSite.py +++ b/src/Mod/Arch/ArchSite.py @@ -521,7 +521,7 @@ Site creation aborted.") + "\n" -class _Site: +class _Site(ArchIFC.IfcProduct): "The Site object" @@ -533,8 +533,7 @@ class _Site: def setProperties(self,obj): - import ArchIFC - ArchIFC.setProperties(obj) + ArchIFC.IfcProduct.setProperties(self, obj) pl = obj.PropertiesList if not "Terrain" in pl: @@ -638,7 +637,7 @@ class _Site: def onChanged(self,obj,prop): - ArchIFC.onChanged(obj, prop) + ArchIFC.IfcProduct.onChanged(self, obj, prop) if prop == "Terrain": if obj.Terrain: if FreeCAD.GuiUp: diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 88b3551bf9..e553676aba 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -118,7 +118,7 @@ def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structur obj.Length = h if not height and not length: - obj.IfcType = "Undefined" + obj.IfcType = "Building Element Proxy" elif obj.Length > obj.Height: obj.IfcType = "Beam" obj.Label = translate("Arch","Beam") diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index e05b62b2e3..324ce68b19 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -521,13 +521,13 @@ class _Wall(ArchComponent.Component): "The Wall object" - def __init__(self,obj): + def __init__(self, obj): - ArchComponent.Component.__init__(self,obj) + ArchComponent.Component.__init__(self, obj) self.setProperties(obj) obj.IfcType = "Wall" - def setProperties(self,obj): + def setProperties(self, obj): lp = obj.PropertiesList if not "Length" in lp: @@ -750,12 +750,10 @@ class _Wall(ArchComponent.Component): obj.Area = obj.Length.Value * obj.Height.Value def onBeforeChange(self,obj,prop): - if prop == "Length": self.oldLength = obj.Length.Value - def onChanged(self,obj,prop): - + def onChanged(self, obj, prop): if prop == "Length": if obj.Base and obj.Length.Value and hasattr(self,"oldLength") and (self.oldLength != None) and (self.oldLength != obj.Length.Value): if obj.Base.isDerivedFrom("Part::Feature"): diff --git a/src/Mod/Arch/CMakeLists.txt b/src/Mod/Arch/CMakeLists.txt index cd9b753cf6..e317fb00ec 100644 --- a/src/Mod/Arch/CMakeLists.txt +++ b/src/Mod/Arch/CMakeLists.txt @@ -7,10 +7,14 @@ SET(Arch_SRCS InitGui.py ArchComponent.py ArchIFC.py + ArchIFCView.py ArchIFCSchema.py + ArchProject.py ArchWall.py importIFC.py importIFClegacy.py + importIFCHelper.py + exportIFCHelper.py Arch.py ArchBuilding.py ArchFloor.py @@ -62,6 +66,7 @@ SET(Arch_presets Presets/ifc_products_IFC4.json Presets/ifc_types_IFC2X3.json Presets/ifc_types_IFC4.json + Presets/ifc_contexts_IFC4.json ) SOURCE_GROUP("" FILES ${Arch_SRCS}) diff --git a/src/Mod/Arch/InitGui.py b/src/Mod/Arch/InitGui.py index 012385f9e9..653c5e6719 100644 --- a/src/Mod/Arch/InitGui.py +++ b/src/Mod/Arch/InitGui.py @@ -34,7 +34,7 @@ class ArchWorkbench(Workbench): # arch tools self.archtools = ["Arch_Wall","Arch_Structure","Arch_Rebar","Arch_BuildingPart", - "Arch_Floor","Arch_Building","Arch_Site","Arch_Reference", + "Arch_Project", "Arch_Site", "Arch_Building", "Arch_Floor", "Arch_Reference", "Arch_Window","Arch_Roof","Arch_AxisTools", "Arch_SectionPlane","Arch_Space","Arch_Stairs", "Arch_PanelTools","Arch_Equipment", diff --git a/src/Mod/Arch/Presets/ifc_contexts_IFC4.json b/src/Mod/Arch/Presets/ifc_contexts_IFC4.json new file mode 100644 index 0000000000..3585bb57a3 --- /dev/null +++ b/src/Mod/Arch/Presets/ifc_contexts_IFC4.json @@ -0,0 +1,146 @@ +{ + "IfcProject": { + "is_abstract": false, + "parent": "IfcContext", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Phase", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "RepresentationContexts", + "type": "IfcRepresentationContext" + }, + { + "name": "UnitsInContext", + "type": "IfcUnitAssignment" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "Declares", + "type": "IfcRelDeclares" + } + ] + }, + "IfcProjectLibrary": { + "is_abstract": false, + "parent": "IfcContext", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Phase", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "RepresentationContexts", + "type": "IfcRepresentationContext" + }, + { + "name": "UnitsInContext", + "type": "IfcUnitAssignment" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "Declares", + "type": "IfcRelDeclares" + } + ] + } +} \ No newline at end of file diff --git a/src/Mod/Arch/Presets/ifc_products_IFC4.json b/src/Mod/Arch/Presets/ifc_products_IFC4.json index 5202ba2dc3..2e2edecde3 100644 --- a/src/Mod/Arch/Presets/ifc_products_IFC4.json +++ b/src/Mod/Arch/Presets/ifc_products_IFC4.json @@ -3,6 +3,36 @@ "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcActuatorTypeEnum", @@ -16,12 +46,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -29,6 +79,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcAirTerminalTypeEnum", @@ -41,12 +121,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -54,6 +154,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcAirTerminalBoxTypeEnum", @@ -65,12 +195,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -78,6 +228,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcAirToAirHeatRecoveryTypeEnum", @@ -95,12 +275,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -108,6 +308,36 @@ "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcAlarmTypeEnum", @@ -122,24 +352,125 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, "IfcAnnotation": { "is_abstract": false, "parent": "IfcProduct", - "attributes": [] + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] }, "IfcAudioVisualAppliance": { "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcAudioVisualApplianceTypeEnum", @@ -159,12 +490,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -172,6 +523,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcBeamTypeEnum", @@ -186,12 +567,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -199,6 +600,36 @@ "is_abstract": false, "parent": "IfcBeam", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcBeamTypeEnum", @@ -213,12 +644,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -226,6 +677,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcBoilerTypeEnum", @@ -236,12 +717,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -249,6 +750,46 @@ "is_abstract": false, "parent": "IfcSpatialStructureElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "CompositionType", + "type": "IfcElementCompositionEnum", + "is_enum": true, + "enum_values": [ + "COMPLEX", + "ELEMENT", + "PARTIAL" + ] + }, { "name": "ElevationOfRefHeight", "type": "IfcLengthMeasure", @@ -260,22 +801,102 @@ "type": "IfcLengthMeasure", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "CompositionType", - "type": "IfcElementCompositionEnum", - "is_enum": true, - "enum_values": [ - "COMPLEX", - "ELEMENT", - "PARTIAL" - ] + "name": "IsNestedBy", + "type": "IfcRelNests" }, { - "name": "LongName", + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" + }, + { + "name": "BuildingAddress", + "type": "IfcPostalAddress" + } + ] + }, + "IfcBuildingElement": { + "is_abstract": true, + "parent": "IfcElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", "type": "IfcLabel", "is_enum": false, "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -283,6 +904,36 @@ "is_abstract": false, "parent": "IfcElementComponent", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcBuildingElementPartTypeEnum", @@ -293,12 +944,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -306,6 +977,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcBuildingElementProxyTypeEnum", @@ -315,16 +1016,35 @@ "ELEMENT", "PARTIAL", "PROVISIONFORVOID", - "PROVISIONFORSPACE", "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -333,8 +1053,32 @@ "parent": "IfcSpatialStructureElement", "attributes": [ { - "name": "Elevation", - "type": "IfcLengthMeasure", + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", "is_enum": false, "enum_values": [] }, @@ -349,17 +1093,77 @@ ] }, { - "name": "LongName", - "type": "IfcLabel", + "name": "Elevation", + "type": "IfcLengthMeasure", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" + } ] }, "IfcBurner": { "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcBurnerTypeEnum", @@ -368,12 +1172,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -381,6 +1205,36 @@ "is_abstract": false, "parent": "IfcFlowFitting", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCableCarrierFittingTypeEnum", @@ -393,12 +1247,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -406,6 +1280,36 @@ "is_abstract": false, "parent": "IfcFlowSegment", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCableCarrierSegmentTypeEnum", @@ -418,12 +1322,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -431,6 +1355,36 @@ "is_abstract": false, "parent": "IfcFlowFitting", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCableFittingTypeEnum", @@ -444,12 +1398,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -457,6 +1431,36 @@ "is_abstract": false, "parent": "IfcFlowSegment", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCableSegmentTypeEnum", @@ -469,12 +1473,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -482,6 +1506,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcChillerTypeEnum", @@ -493,12 +1547,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -506,6 +1580,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcChimneyTypeEnum", @@ -514,12 +1618,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -527,18 +1651,98 @@ "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcCoil": { "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCoilTypeEnum", @@ -554,12 +1758,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -567,6 +1791,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcColumnTypeEnum", @@ -577,12 +1831,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -590,6 +1864,36 @@ "is_abstract": false, "parent": "IfcColumn", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcColumnTypeEnum", @@ -600,12 +1904,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -613,6 +1937,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCommunicationsApplianceTypeEnum", @@ -633,12 +1987,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -646,6 +2020,36 @@ "is_abstract": false, "parent": "IfcFlowMovingDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCompressorTypeEnum", @@ -669,12 +2073,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -682,6 +2106,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCondenserTypeEnum", @@ -697,12 +2151,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -710,6 +2184,36 @@ "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcControllerTypeEnum", @@ -723,12 +2227,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -736,6 +2260,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCooledBeamTypeEnum", @@ -746,12 +2300,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -759,6 +2333,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCoolingTowerTypeEnum", @@ -770,12 +2374,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -783,6 +2407,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCoveringTypeEnum", @@ -801,12 +2455,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -814,6 +2488,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcCurtainWallTypeEnum", @@ -822,12 +2526,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -835,6 +2559,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcDamperTypeEnum", @@ -854,12 +2608,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -867,6 +2641,36 @@ "is_abstract": false, "parent": "IfcElementComponent", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcDiscreteAccessoryTypeEnum", @@ -878,12 +2682,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -891,6 +2715,36 @@ "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcDistributionChamberElementTypeEnum", @@ -907,12 +2761,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -920,42 +2794,216 @@ "is_abstract": false, "parent": "IfcDistributionElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcDistributionElement": { "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcDistributionFlowElement": { "is_abstract": false, "parent": "IfcDistributionElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcDistributionPort": { "is_abstract": false, "parent": "IfcPort", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "FlowDirection", "type": "IfcFlowDirectionEnum", @@ -1031,12 +3079,68 @@ "NOTDEFINED" ] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcDoor": { "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "OverallHeight", "type": "IfcPositiveLengthMeasure", @@ -1093,12 +3197,32 @@ "type": "IfcLabel", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1106,6 +3230,36 @@ "is_abstract": false, "parent": "IfcDoor", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "OverallHeight", "type": "IfcPositiveLengthMeasure", @@ -1162,12 +3316,32 @@ "type": "IfcLabel", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1175,6 +3349,36 @@ "is_abstract": false, "parent": "IfcFlowFitting", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcDuctFittingTypeEnum", @@ -1190,12 +3394,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1203,6 +3427,36 @@ "is_abstract": false, "parent": "IfcFlowSegment", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcDuctSegmentTypeEnum", @@ -1213,12 +3467,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1226,6 +3500,36 @@ "is_abstract": false, "parent": "IfcFlowTreatmentDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcDuctSilencerTypeEnum", @@ -1237,12 +3541,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1250,6 +3574,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcElectricApplianceTypeEnum", @@ -1274,12 +3628,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1287,6 +3661,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcElectricDistributionBoardTypeEnum", @@ -1299,12 +3703,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1312,6 +3736,36 @@ "is_abstract": false, "parent": "IfcFlowStorageDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcElectricFlowStorageDeviceTypeEnum", @@ -1325,12 +3779,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1338,6 +3812,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcElectricGeneratorTypeEnum", @@ -1349,12 +3853,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1362,6 +3886,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcElectricMotorTypeEnum", @@ -1375,12 +3929,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1388,6 +3962,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcElectricTimeControlTypeEnum", @@ -1399,6 +4003,62 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcElement": { + "is_abstract": true, + "parent": "IfcProduct", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] }, { "name": "Tag", @@ -1406,12 +4066,68 @@ "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcElementAssembly": { "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "AssemblyPlace", "type": "IfcAssemblyPlaceEnum", @@ -1439,6 +4155,62 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcElementComponent": { + "is_abstract": true, + "parent": "IfcElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] }, { "name": "Tag", @@ -1446,24 +4218,130 @@ "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcEnergyConversionDevice": { "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcEngine": { "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcEngineTypeEnum", @@ -1474,12 +4352,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1487,6 +4385,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcEvaporativeCoolerTypeEnum", @@ -1504,12 +4432,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1517,6 +4465,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcEvaporatorTypeEnum", @@ -1531,12 +4509,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1544,6 +4542,36 @@ "is_abstract": false, "parent": "IfcExternalSpatialStructureElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcExternalSpatialElementTypeEnum", @@ -1554,8 +4582,68 @@ "EXTERNAL_WATER", "EXTERNAL_FIRE", "USERDEFINED", - "NOTDEFINED" + "NOTDEFIEND" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" + } + ] + }, + "IfcExternalSpatialStructureElement": { + "is_abstract": true, + "parent": "IfcSpatialElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] }, { "name": "LongName", @@ -1563,12 +4651,72 @@ "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" + } ] }, "IfcFan": { "is_abstract": false, "parent": "IfcFlowMovingDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFanTypeEnum", @@ -1584,12 +4732,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1597,6 +4765,36 @@ "is_abstract": false, "parent": "IfcElementComponent", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFastenerTypeEnum", @@ -1608,6 +4806,62 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcFeatureElement": { + "is_abstract": true, + "parent": "IfcElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] }, { "name": "Tag", @@ -1615,12 +4869,192 @@ "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcFeatureElementAddition": { + "is_abstract": true, + "parent": "IfcFeatureElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcFeatureElementSubtraction": { + "is_abstract": true, + "parent": "IfcFeatureElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFilter": { "is_abstract": false, "parent": "IfcFlowTreatmentDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFilterTypeEnum", @@ -1635,12 +5069,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1648,6 +5102,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFireSuppressionTerminalTypeEnum", @@ -1661,12 +5145,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1674,30 +5178,160 @@ "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFlowFitting": { "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFlowInstrument": { "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFlowInstrumentTypeEnum", @@ -1714,12 +5348,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1727,6 +5381,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFlowMeterTypeEnum", @@ -1739,12 +5423,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1752,66 +5456,346 @@ "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFlowSegment": { "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFlowStorageDevice": { "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFlowTerminal": { "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFlowTreatmentDevice": { "is_abstract": false, "parent": "IfcDistributionFlowElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFooting": { "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFootingTypeEnum", @@ -1825,12 +5809,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1838,18 +5842,98 @@ "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcFurniture": { "is_abstract": false, "parent": "IfcFurnishingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcFurnitureTypeEnum", @@ -1865,12 +5949,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1878,6 +5982,36 @@ "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcGeographicElementTypeEnum", @@ -1887,12 +6021,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1900,6 +6054,30 @@ "is_abstract": false, "parent": "IfcProduct", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcGridTypeEnum", @@ -1913,12 +6091,80 @@ "NOTDEFINED" ] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "UAxes", + "type": "IfcGridAxis" + }, + { + "name": "VAxes", + "type": "IfcGridAxis" + }, + { + "name": "WAxes", + "type": "IfcGridAxis" + } ] }, "IfcHeatExchanger": { "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcHeatExchangerTypeEnum", @@ -1929,12 +6175,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1942,6 +6208,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcHumidifierTypeEnum", @@ -1963,12 +6259,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -1976,6 +6292,36 @@ "is_abstract": false, "parent": "IfcFlowTreatmentDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcInterceptorTypeEnum", @@ -1988,12 +6334,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2001,6 +6367,36 @@ "is_abstract": false, "parent": "IfcFlowFitting", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcJunctionBoxTypeEnum", @@ -2011,12 +6407,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2024,6 +6440,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcLampTypeEnum", @@ -2041,12 +6487,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2054,6 +6520,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcLightFixtureTypeEnum", @@ -2065,12 +6561,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2078,6 +6594,36 @@ "is_abstract": false, "parent": "IfcElementComponent", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "NominalDiameter", "type": "IfcPositiveLengthMeasure", @@ -2108,12 +6654,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2121,6 +6687,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcMedicalDeviceTypeEnum", @@ -2134,12 +6730,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2147,6 +6763,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcMemberTypeEnum", @@ -2167,12 +6813,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2180,6 +6846,36 @@ "is_abstract": false, "parent": "IfcMember", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcMemberTypeEnum", @@ -2200,12 +6896,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2213,6 +6929,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcMotorConnectionTypeEnum", @@ -2224,12 +6970,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2237,6 +7003,36 @@ "is_abstract": false, "parent": "IfcFeatureElementSubtraction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcOpeningElementTypeEnum", @@ -2247,12 +7043,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2260,6 +7076,36 @@ "is_abstract": false, "parent": "IfcOpeningElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcOpeningElementTypeEnum", @@ -2270,12 +7116,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2283,6 +7149,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcOutletTypeEnum", @@ -2296,12 +7192,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2309,6 +7225,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcPileTypeEnum", @@ -2336,12 +7282,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2349,6 +7315,36 @@ "is_abstract": false, "parent": "IfcFlowFitting", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcPipeFittingTypeEnum", @@ -2364,12 +7360,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2377,6 +7393,36 @@ "is_abstract": false, "parent": "IfcFlowSegment", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcPipeSegmentTypeEnum", @@ -2390,12 +7436,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2403,6 +7469,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcPlateTypeEnum", @@ -2413,12 +7509,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2426,6 +7542,36 @@ "is_abstract": false, "parent": "IfcPlate", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcPlateTypeEnum", @@ -2436,12 +7582,88 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcPort": { + "is_abstract": true, + "parent": "IfcProduct", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", "is_enum": false, "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2449,6 +7671,36 @@ "is_abstract": false, "parent": "IfcFeatureElementAddition", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcProjectionElementTypeEnum", @@ -2457,12 +7709,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2470,6 +7742,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcProtectiveDeviceTypeEnum", @@ -2485,12 +7787,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2498,6 +7820,36 @@ "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcProtectiveDeviceTrippingUnitTypeEnum", @@ -2510,12 +7862,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2523,6 +7895,30 @@ "is_abstract": false, "parent": "IfcProduct", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "ProxyType", "type": "IfcObjectTypeEnum", @@ -2544,12 +7940,68 @@ "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcPump": { "is_abstract": false, "parent": "IfcFlowMovingDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcPumpTypeEnum", @@ -2565,12 +8017,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2578,6 +8050,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcRailingTypeEnum", @@ -2589,12 +8091,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2602,6 +8124,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcRampTypeEnum", @@ -2616,12 +8168,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2629,6 +8201,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcRampFlightTypeEnum", @@ -2639,12 +8241,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2652,6 +8274,42 @@ "is_abstract": false, "parent": "IfcReinforcingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "SteelGrade", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "NominalDiameter", "type": "IfcPositiveLengthMeasure", @@ -2695,9 +8353,59 @@ "PLAIN", "TEXTURED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "SteelGrade", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcReinforcingElement": { + "is_abstract": true, + "parent": "IfcElementComponent", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", "type": "IfcLabel", "is_enum": false, "enum_values": [] @@ -2707,6 +8415,38 @@ "type": "IfcIdentifier", "is_enum": false, "enum_values": [] + }, + { + "name": "SteelGrade", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2714,6 +8454,42 @@ "is_abstract": false, "parent": "IfcReinforcingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "SteelGrade", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "MeshLength", "type": "IfcPositiveLengthMeasure", @@ -2770,9 +8546,59 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "SteelGrade", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcRoof": { + "is_abstract": false, + "parent": "IfcBuildingElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", "type": "IfcLabel", "is_enum": false, "enum_values": [] @@ -2782,13 +8608,7 @@ "type": "IfcIdentifier", "is_enum": false, "enum_values": [] - } - ] - }, - "IfcRoof": { - "is_abstract": false, - "parent": "IfcBuildingElement", - "attributes": [ + }, { "name": "PredefinedType", "type": "IfcRoofTypeEnum", @@ -2810,12 +8630,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2823,6 +8663,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSanitaryTerminalTypeEnum", @@ -2841,12 +8711,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2854,12 +8744,41 @@ "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSensorTypeEnum", "is_enum": true, "enum_values": [ - "COSENSOR", "CO2SENSOR", "CONDUCTANCESENSOR", "CONTACTSENSOR", @@ -2886,12 +8805,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2899,6 +8838,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcShadingDeviceTypeEnum", @@ -2910,12 +8879,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -2923,6 +8912,46 @@ "is_abstract": false, "parent": "IfcSpatialStructureElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "CompositionType", + "type": "IfcElementCompositionEnum", + "is_enum": true, + "enum_values": [ + "COMPLEX", + "ELEMENT", + "PARTIAL" + ] + }, { "name": "RefLatitude", "type": "List-IfcCompoundPlaneAngleMeasure", @@ -2946,6 +8975,374 @@ "type": "IfcLabel", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" + }, + { + "name": "SiteAddress", + "type": "IfcPostalAddress" + } + ] + }, + "IfcSlab": { + "is_abstract": false, + "parent": "IfcBuildingElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "PredefinedType", + "type": "IfcSlabTypeEnum", + "is_enum": true, + "enum_values": [ + "FLOOR", + "ROOF", + "LANDING", + "BASESLAB", + "USERDEFINED", + "NOTDEFINED" + ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcSlabElementedCase": { + "is_abstract": false, + "parent": "IfcSlab", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "PredefinedType", + "type": "IfcSlabTypeEnum", + "is_enum": true, + "enum_values": [ + "FLOOR", + "ROOF", + "LANDING", + "BASESLAB", + "USERDEFINED", + "NOTDEFINED" + ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcSlabStandardCase": { + "is_abstract": false, + "parent": "IfcSlab", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "PredefinedType", + "type": "IfcSlabTypeEnum", + "is_enum": true, + "enum_values": [ + "FLOOR", + "ROOF", + "LANDING", + "BASESLAB", + "USERDEFINED", + "NOTDEFINED" + ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcSolarDevice": { + "is_abstract": false, + "parent": "IfcEnergyConversionDevice", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "PredefinedType", + "type": "IfcSolarDeviceTypeEnum", + "is_enum": true, + "enum_values": [ + "SOLARCOLLECTOR", + "SOLARPANEL", + "USERDEFINED", + "NOTDEFINED" + ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcSpace": { + "is_abstract": false, + "parent": "IfcSpatialStructureElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] }, { "name": "CompositionType", @@ -2957,116 +9354,6 @@ "PARTIAL" ] }, - { - "name": "LongName", - "type": "IfcLabel", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcSlab": { - "is_abstract": false, - "parent": "IfcBuildingElement", - "attributes": [ - { - "name": "PredefinedType", - "type": "IfcSlabTypeEnum", - "is_enum": true, - "enum_values": [ - "FLOOR", - "ROOF", - "LANDING", - "BASESLAB", - "USERDEFINED", - "NOTDEFINED" - ] - }, - { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcSlabElementedCase": { - "is_abstract": false, - "parent": "IfcSlab", - "attributes": [ - { - "name": "PredefinedType", - "type": "IfcSlabTypeEnum", - "is_enum": true, - "enum_values": [ - "FLOOR", - "ROOF", - "LANDING", - "BASESLAB", - "USERDEFINED", - "NOTDEFINED" - ] - }, - { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcSlabStandardCase": { - "is_abstract": false, - "parent": "IfcSlab", - "attributes": [ - { - "name": "PredefinedType", - "type": "IfcSlabTypeEnum", - "is_enum": true, - "enum_values": [ - "FLOOR", - "ROOF", - "LANDING", - "BASESLAB", - "USERDEFINED", - "NOTDEFINED" - ] - }, - { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcSolarDevice": { - "is_abstract": false, - "parent": "IfcEnergyConversionDevice", - "attributes": [ - { - "name": "PredefinedType", - "type": "IfcSolarDeviceTypeEnum", - "is_enum": true, - "enum_values": [ - "SOLARCOLLECTOR", - "SOLARPANEL", - "USERDEFINED", - "NOTDEFINED" - ] - }, - { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcSpace": { - "is_abstract": false, - "parent": "IfcSpatialStructureElement", - "attributes": [ { "name": "PredefinedType", "type": "IfcSpaceTypeEnum", @@ -3086,22 +9373,36 @@ "type": "IfcLengthMeasure", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "CompositionType", - "type": "IfcElementCompositionEnum", - "is_enum": true, - "enum_values": [ - "COMPLEX", - "ELEMENT", - "PARTIAL" - ] + "name": "IsNestedBy", + "type": "IfcRelNests" }, { - "name": "LongName", - "type": "IfcLabel", - "is_enum": false, - "enum_values": [] + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" } ] }, @@ -3109,6 +9410,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSpaceHeaterTypeEnum", @@ -3119,12 +9450,174 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcSpatialElement": { + "is_abstract": true, + "parent": "IfcProduct", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", "is_enum": false, "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" + } + ] + }, + "IfcSpatialStructureElement": { + "is_abstract": true, + "parent": "IfcSpatialElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "CompositionType", + "type": "IfcElementCompositionEnum", + "is_enum": true, + "enum_values": [ + "COMPLEX", + "ELEMENT", + "PARTIAL" + ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" } ] }, @@ -3132,6 +9625,36 @@ "is_abstract": false, "parent": "IfcSpatialElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "LongName", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSpatialZoneTypeEnum", @@ -3148,12 +9671,36 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "LongName", - "type": "IfcLabel", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "ContainsElements", + "type": "IfcRelContainedInSpatialStructure" } ] }, @@ -3161,6 +9708,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcStackTerminalTypeEnum", @@ -3172,12 +9749,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3185,6 +9782,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcStairTypeEnum", @@ -3207,12 +9834,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3220,6 +9867,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "NumberOfRisers", "type": "IfcInteger", @@ -3257,12 +9934,236 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcStructuralAction": { + "is_abstract": true, + "parent": "IfcStructuralActivity", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", "is_enum": false, "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, + { + "name": "DestabilizingLoad", + "type": "IfcBoolean", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } + ] + }, + "IfcStructuralActivity": { + "is_abstract": true, + "parent": "IfcProduct", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } + ] + }, + "IfcStructuralConnection": { + "is_abstract": true, + "parent": "IfcStructuralItem", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedCondition", + "type": "IfcBoundaryCondition" } ] }, @@ -3270,6 +10171,45 @@ "is_abstract": false, "parent": "IfcStructuralAction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, + { + "name": "DestabilizingLoad", + "type": "IfcBoolean", + "is_enum": false, + "enum_values": [] + }, { "name": "ProjectedOrTrue", "type": "IfcProjectedOrTrueLengthEnum", @@ -3294,33 +10234,131 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "DestabilizingLoad", - "type": "IfcBoolean", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" }, { - "name": "GlobalOrLocal", - "type": "IfcGlobalOrLocalEnum", - "is_enum": true, - "enum_values": [ - "GLOBAL_COORDS", - "LOCAL_COORDS" - ] + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" } ] }, "IfcStructuralCurveConnection": { "is_abstract": false, "parent": "IfcStructuralConnection", - "attributes": [] + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedCondition", + "type": "IfcBoundaryCondition" + }, + { + "name": "Axis", + "type": "IfcDirection" + } + ] }, "IfcStructuralCurveMember": { "is_abstract": false, "parent": "IfcStructuralMember", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcStructuralCurveMemberTypeEnum", @@ -3335,12 +10373,66 @@ "NOTDEFINED" ] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "Axis", + "type": "IfcDirection" + } ] }, "IfcStructuralCurveMemberVarying": { "is_abstract": false, "parent": "IfcStructuralCurveMember", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcStructuralCurveMemberTypeEnum", @@ -3355,12 +10447,75 @@ "NOTDEFINED" ] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "Axis", + "type": "IfcDirection" + } ] }, "IfcStructuralCurveReaction": { "is_abstract": false, "parent": "IfcStructuralReaction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, { "name": "PredefinedType", "type": "IfcStructuralCurveActivityTypeEnum", @@ -3376,15 +10531,92 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "GlobalOrLocal", - "type": "IfcGlobalOrLocalEnum", - "is_enum": true, - "enum_values": [ - "GLOBAL_COORDS", - "LOCAL_COORDS" - ] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } + ] + }, + "IfcStructuralItem": { + "is_abstract": true, + "parent": "IfcProduct", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3392,6 +10624,45 @@ "is_abstract": false, "parent": "IfcStructuralCurveAction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, + { + "name": "DestabilizingLoad", + "type": "IfcBoolean", + "is_enum": false, + "enum_values": [] + }, { "name": "ProjectedOrTrue", "type": "IfcProjectedOrTrueLengthEnum", @@ -3416,21 +10687,92 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "DestabilizingLoad", - "type": "IfcBoolean", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } + ] + }, + "IfcStructuralMember": { + "is_abstract": true, + "parent": "IfcStructuralItem", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", "is_enum": false, "enum_values": [] }, { - "name": "GlobalOrLocal", - "type": "IfcGlobalOrLocalEnum", - "is_enum": true, - "enum_values": [ - "GLOBAL_COORDS", - "LOCAL_COORDS" - ] + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3438,6 +10780,45 @@ "is_abstract": false, "parent": "IfcStructuralSurfaceAction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, + { + "name": "DestabilizingLoad", + "type": "IfcBoolean", + "is_enum": false, + "enum_values": [] + }, { "name": "ProjectedOrTrue", "type": "IfcProjectedOrTrueLengthEnum", @@ -3459,21 +10840,36 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "DestabilizingLoad", - "type": "IfcBoolean", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" }, { - "name": "GlobalOrLocal", - "type": "IfcGlobalOrLocalEnum", - "is_enum": true, - "enum_values": [ - "GLOBAL_COORDS", - "LOCAL_COORDS" - ] + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" } ] }, @@ -3481,11 +10877,168 @@ "is_abstract": false, "parent": "IfcStructuralAction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, { "name": "DestabilizingLoad", "type": "IfcBoolean", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } + ] + }, + "IfcStructuralPointConnection": { + "is_abstract": false, + "parent": "IfcStructuralConnection", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedCondition", + "type": "IfcBoundaryCondition" + }, + { + "name": "ConditionCoordinateSystem", + "type": "IfcAxis2Placement3D" + } + ] + }, + "IfcStructuralPointReaction": { + "is_abstract": false, + "parent": "IfcStructuralReaction", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] }, { "name": "GlobalOrLocal", @@ -3496,17 +11049,66 @@ "LOCAL_COORDS" ] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } ] }, - "IfcStructuralPointConnection": { - "is_abstract": false, - "parent": "IfcStructuralConnection", - "attributes": [] - }, - "IfcStructuralPointReaction": { - "is_abstract": false, - "parent": "IfcStructuralReaction", + "IfcStructuralReaction": { + "is_abstract": true, + "parent": "IfcStructuralActivity", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "GlobalOrLocal", "type": "IfcGlobalOrLocalEnum", @@ -3516,12 +11118,81 @@ "LOCAL_COORDS" ] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } ] }, "IfcStructuralSurfaceAction": { "is_abstract": false, "parent": "IfcStructuralAction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "GlobalOrLocal", + "type": "IfcGlobalOrLocalEnum", + "is_enum": true, + "enum_values": [ + "GLOBAL_COORDS", + "LOCAL_COORDS" + ] + }, + { + "name": "DestabilizingLoad", + "type": "IfcBoolean", + "is_enum": false, + "enum_values": [] + }, { "name": "ProjectedOrTrue", "type": "IfcProjectedOrTrueLengthEnum", @@ -3543,10 +11214,272 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "DestabilizingLoad", - "type": "IfcBoolean", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" + } + ] + }, + "IfcStructuralSurfaceConnection": { + "is_abstract": false, + "parent": "IfcStructuralConnection", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedCondition", + "type": "IfcBoundaryCondition" + } + ] + }, + "IfcStructuralSurfaceMember": { + "is_abstract": false, + "parent": "IfcStructuralMember", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "PredefinedType", + "type": "IfcStructuralSurfaceMemberTypeEnum", + "is_enum": true, + "enum_values": [ + "BENDING_ELEMENT", + "MEMBRANE_ELEMENT", + "SHELL", + "USERDEFINED", + "NOTDEFINED" + ] + }, + { + "name": "Thickness", + "type": "IfcPositiveLengthMeasure", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcStructuralSurfaceMemberVarying": { + "is_abstract": false, + "parent": "IfcStructuralSurfaceMember", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "PredefinedType", + "type": "IfcStructuralSurfaceMemberTypeEnum", + "is_enum": true, + "enum_values": [ + "BENDING_ELEMENT", + "MEMBRANE_ELEMENT", + "SHELL", + "USERDEFINED", + "NOTDEFINED" + ] + }, + { + "name": "Thickness", + "type": "IfcPositiveLengthMeasure", + "is_enum": false, + "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcStructuralSurfaceReaction": { + "is_abstract": false, + "parent": "IfcStructuralReaction", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", "is_enum": false, "enum_values": [] }, @@ -3558,66 +11491,7 @@ "GLOBAL_COORDS", "LOCAL_COORDS" ] - } - ] - }, - "IfcStructuralSurfaceConnection": { - "is_abstract": false, - "parent": "IfcStructuralConnection", - "attributes": [] - }, - "IfcStructuralSurfaceMember": { - "is_abstract": false, - "parent": "IfcStructuralMember", - "attributes": [ - { - "name": "PredefinedType", - "type": "IfcStructuralSurfaceMemberTypeEnum", - "is_enum": true, - "enum_values": [ - "BENDING_ELEMENT", - "MEMBRANE_ELEMENT", - "SHELL", - "USERDEFINED", - "NOTDEFINED" - ] }, - { - "name": "Thickness", - "type": "IfcPositiveLengthMeasure", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcStructuralSurfaceMemberVarying": { - "is_abstract": false, - "parent": "IfcStructuralSurfaceMember", - "attributes": [ - { - "name": "PredefinedType", - "type": "IfcStructuralSurfaceMemberTypeEnum", - "is_enum": true, - "enum_values": [ - "BENDING_ELEMENT", - "MEMBRANE_ELEMENT", - "SHELL", - "USERDEFINED", - "NOTDEFINED" - ] - }, - { - "name": "Thickness", - "type": "IfcPositiveLengthMeasure", - "is_enum": false, - "enum_values": [] - } - ] - }, - "IfcStructuralSurfaceReaction": { - "is_abstract": false, - "parent": "IfcStructuralReaction", - "attributes": [ { "name": "PredefinedType", "type": "IfcStructuralSurfaceActivityTypeEnum", @@ -3630,15 +11504,36 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "GlobalOrLocal", - "type": "IfcGlobalOrLocalEnum", - "is_enum": true, - "enum_values": [ - "GLOBAL_COORDS", - "LOCAL_COORDS" - ] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + }, + { + "name": "AppliedLoad", + "type": "IfcStructuralLoad" } ] }, @@ -3646,6 +11541,36 @@ "is_abstract": false, "parent": "IfcFeatureElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSurfaceFeatureTypeEnum", @@ -3657,12 +11582,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3670,6 +11615,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSwitchingDeviceTypeEnum", @@ -3687,12 +11662,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3700,6 +11695,36 @@ "is_abstract": false, "parent": "IfcFurnishingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcSystemFurnitureElementTypeEnum", @@ -3710,12 +11735,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3723,6 +11768,36 @@ "is_abstract": false, "parent": "IfcFlowStorageDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcTankTypeEnum", @@ -3738,12 +11813,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3751,6 +11846,42 @@ "is_abstract": false, "parent": "IfcReinforcingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, + { + "name": "SteelGrade", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcTendonTypeEnum", @@ -3805,9 +11936,59 @@ "type": "IfcPositiveLengthMeasure", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "SteelGrade", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcTendonAnchor": { + "is_abstract": false, + "parent": "IfcReinforcingElement", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", "type": "IfcLabel", "is_enum": false, "enum_values": [] @@ -3817,13 +11998,13 @@ "type": "IfcIdentifier", "is_enum": false, "enum_values": [] - } - ] - }, - "IfcTendonAnchor": { - "is_abstract": false, - "parent": "IfcReinforcingElement", - "attributes": [ + }, + { + "name": "SteelGrade", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcTendonAnchorTypeEnum", @@ -3835,9 +12016,59 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "SteelGrade", + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } + ] + }, + "IfcTransformer": { + "is_abstract": false, + "parent": "IfcEnergyConversionDevice", + "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", "type": "IfcLabel", "is_enum": false, "enum_values": [] @@ -3847,13 +12078,7 @@ "type": "IfcIdentifier", "is_enum": false, "enum_values": [] - } - ] - }, - "IfcTransformer": { - "is_abstract": false, - "parent": "IfcEnergyConversionDevice", - "attributes": [ + }, { "name": "PredefinedType", "type": "IfcTransformerTypeEnum", @@ -3867,12 +12092,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3880,6 +12125,36 @@ "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcTransportElementTypeEnum", @@ -3893,12 +12168,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3906,6 +12201,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcTubeBundleTypeEnum", @@ -3915,12 +12240,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3928,6 +12273,36 @@ "is_abstract": false, "parent": "IfcDistributionControlElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcUnitaryControlElementTypeEnum", @@ -3944,12 +12319,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3957,6 +12352,36 @@ "is_abstract": false, "parent": "IfcEnergyConversionDevice", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcUnitaryEquipmentTypeEnum", @@ -3970,12 +12395,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -3983,6 +12428,36 @@ "is_abstract": false, "parent": "IfcFlowController", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcValveTypeEnum", @@ -4012,12 +12487,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4025,6 +12520,36 @@ "is_abstract": false, "parent": "IfcElementComponent", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcVibrationIsolatorTypeEnum", @@ -4035,12 +12560,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4048,18 +12593,98 @@ "is_abstract": false, "parent": "IfcElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, { "name": "Tag", "type": "IfcIdentifier", "is_enum": false, "enum_values": [] } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" + }, + { + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" + } ] }, "IfcVoidingFeature": { "is_abstract": false, "parent": "IfcFeatureElementSubtraction", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcVoidingFeatureTypeEnum", @@ -4074,12 +12699,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4087,6 +12732,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcWallTypeEnum", @@ -4104,12 +12779,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4117,6 +12812,36 @@ "is_abstract": false, "parent": "IfcWall", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcWallTypeEnum", @@ -4134,12 +12859,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4147,6 +12892,36 @@ "is_abstract": false, "parent": "IfcWall", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcWallTypeEnum", @@ -4164,12 +12939,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4177,6 +12972,36 @@ "is_abstract": false, "parent": "IfcFlowTerminal", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "PredefinedType", "type": "IfcWasteTerminalTypeEnum", @@ -4192,12 +13017,32 @@ "USERDEFINED", "NOTDEFINED" ] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4205,6 +13050,36 @@ "is_abstract": false, "parent": "IfcBuildingElement", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "OverallHeight", "type": "IfcPositiveLengthMeasure", @@ -4252,12 +13127,32 @@ "type": "IfcLabel", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] }, @@ -4265,6 +13160,36 @@ "is_abstract": false, "parent": "IfcWindow", "attributes": [ + { + "name": "GlobalId", + "type": "IfcGloballyUniqueId", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Name", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Description", + "type": "IfcText", + "is_enum": false, + "enum_values": [] + }, + { + "name": "ObjectType", + "type": "IfcLabel", + "is_enum": false, + "enum_values": [] + }, + { + "name": "Tag", + "type": "IfcIdentifier", + "is_enum": false, + "enum_values": [] + }, { "name": "OverallHeight", "type": "IfcPositiveLengthMeasure", @@ -4312,12 +13237,32 @@ "type": "IfcLabel", "is_enum": false, "enum_values": [] + } + ], + "complex_attributes": [ + { + "name": "OwnerHistory", + "type": "IfcOwnerHistory" }, { - "name": "Tag", - "type": "IfcIdentifier", - "is_enum": false, - "enum_values": [] + "name": "IsNestedBy", + "type": "IfcRelNests" + }, + { + "name": "IsDecomposedBy", + "type": "IfcRelAggregates" + }, + { + "name": "IsDefinedBy", + "type": "IfcRelDefinesByProperties" + }, + { + "name": "ObjectPlacement", + "type": "IfcObjectPlacement" + }, + { + "name": "Representation", + "type": "IfcProductRepresentation" } ] } diff --git a/src/Mod/Arch/Resources/Arch.qrc b/src/Mod/Arch/Resources/Arch.qrc index a1be237a83..bd79c2736b 100644 --- a/src/Mod/Arch/Resources/Arch.qrc +++ b/src/Mod/Arch/Resources/Arch.qrc @@ -5,6 +5,7 @@ icons/Arch_Cell.svg icons/Arch_Wall.svg icons/Arch_Site.svg + icons/Arch_Project.svg icons/Arch_Structure.svg icons/Arch_Add.svg icons/Arch_Remove.svg @@ -21,6 +22,7 @@ icons/Arch_Floor_Tree.svg icons/Arch_SectionPlane_Tree.svg icons/Arch_Site_Tree.svg + icons/Arch_Project_Tree.svg icons/Arch_Structure_Tree.svg icons/Arch_Structure_Clone.svg icons/Arch_Window_Tree.svg diff --git a/src/Mod/Arch/Resources/icons/Arch_Project.svg b/src/Mod/Arch/Resources/icons/Arch_Project.svg new file mode 100644 index 0000000000..5232532448 --- /dev/null +++ b/src/Mod/Arch/Resources/icons/Arch_Project.svg @@ -0,0 +1,423 @@ + + + + + ifc_project_icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + ifc_project_icon + + + [bitacovir] Rafael Moya + + + Part_Box + 2019-06-16 + + + + FreeCAD + + + + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Arch/Resources/icons/Arch_Project_Tree.svg b/src/Mod/Arch/Resources/icons/Arch_Project_Tree.svg new file mode 100644 index 0000000000..ea74529e3c --- /dev/null +++ b/src/Mod/Arch/Resources/icons/Arch_Project_Tree.svg @@ -0,0 +1,435 @@ + + + + + ifc_project_tree + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + ifc_project_tree + + + [bitacovir] Rafael Moya + + + Part_Box + 2019-06-16 + + + + FreeCAD + + + + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 4dabbb9cef..2b54871078 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -43,6 +43,7 @@ from DraftGeomUtils import vec from importIFC import recycler from importIFC import dd2dms from importIFC import decode +import exportIFCHelper ## @package exportIFC @@ -94,7 +95,6 @@ DATA; #8=IFCCARTESIANPOINT((0.,0.,0.)); #9=IFCAXIS2PLACEMENT3D(#8,#7,#6); #10=IFCDIRECTION((0.,1.,0.)); -#11=IFCGEOMETRICREPRESENTATIONCONTEXT('Plan','Model',3,1.E-05,#9,#10); #12=IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0); #13=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.); #14=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); @@ -103,7 +103,6 @@ DATA; #17=IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017453292519943295),#16); #18=IFCCONVERSIONBASEDUNIT(#12,.PLANEANGLEUNIT.,'DEGREE',#17); #19=IFCUNITASSIGNMENT((#13,#14,#15,#18)); -#20=IFCPROJECT('$projectid',#5,'$project',$,$,$,$,(#11),#19); ENDSEC; END-ISO-10303-21; """ @@ -196,8 +195,6 @@ def export(exportList,filename,colors=None): template = template.replace("$company",FreeCAD.ActiveDocument.Company) template = template.replace("$email",email) template = template.replace("$now",str(int(time.time()))) - template = template.replace("$projectid",FreeCAD.ActiveDocument.Uid[:22].replace("-","_")) - template = template.replace("$project",FreeCAD.ActiveDocument.Name) template = template.replace("$filename",os.path.basename(filename)) template = template.replace("$timestamp",str(time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime()))) if hasattr(ifcopenshell,"version"): @@ -212,12 +209,7 @@ def export(exportList,filename,colors=None): global ifcfile, surfstyles, clones, sharedobjects, profiledefs, shapedefs ifcfile = ifcopenshell.open(templatefile) history = ifcfile.by_type("IfcOwnerHistory")[0] - context = ifcfile.by_type("IfcGeometricRepresentationContext")[0] - project = ifcfile.by_type("IfcProject")[0] objectslist = Draft.getGroupContents(exportList,walls=True,addgroups=True) - if(Draft.getObjectsOfType(objectslist, "Site")): # we assume one site and one representation context only - trueNorthX = math.tan(-Draft.getObjectsOfType(objectslist, "Site")[0].Declination.getValueAs(FreeCAD.Units.Radian)) - context.TrueNorth.DirectionRatios = (trueNorthX, 1., 1.) annotations = [] for obj in objectslist: if obj.isDerivedFrom("Part::Part2DObject"): @@ -234,6 +226,16 @@ def export(exportList,filename,colors=None): objectslist = [obj for obj in objectslist if Draft.getType(obj) not in ["Dimension","Material","MaterialContainer","WorkingPlaneProxy"]] if FULL_PARAMETRIC: objectslist = Arch.getAllChildren(objectslist) + + contextCreator = exportIFCHelper.ContextCreator(ifcfile, objectslist) + context = contextCreator.model_view_subcontext + project = contextCreator.project + objectslist = [obj for obj in objectslist if obj != contextCreator.project_object] + + if Draft.getObjectsOfType(objectslist, "Site"): # we assume one site and one representation context only + trueNorthX = math.tan(-Draft.getObjectsOfType(objectslist, "Site")[0].Declination.getValueAs(FreeCAD.Units.Radian)) + contextCreator.model_context.TrueNorth.DirectionRatios = (trueNorthX, 1., 1.) + products = {} # { Name: IfcEntity, ... } subproducts = {} # { Name: IfcEntity, ... } for storing additions/subtractions and other types of subcomponents of a product surfstyles = {} # { (r,g,b): IfcEntity, ... } @@ -262,6 +264,7 @@ def export(exportList,filename,colors=None): #print(objectslist) # testing if more than one site selected (forbidden in IFC) + # TODO: Moult: This is not forbidden in IFC. if len(Draft.getObjectsOfType(objectslist,"Site")) > 1: FreeCAD.Console.PrintError("More than one site is selected, which is forbidden by IFC standards. Please export only one site by IFC file.\n") @@ -593,7 +596,7 @@ def export(exportList,filename,colors=None): #if DEBUG : print(" adding ifc attributes") props = [] for key in obj.IfcData: - if not (key in ["attributes","IfcUID","FlagForceBrep"]): + if not (key in ["attributes", "complex_attributes", "IfcUID", "FlagForceBrep"]): # (deprecated) properties in IfcData dict are stored as "key":"type(value)" @@ -872,7 +875,7 @@ def export(exportList,filename,colors=None): # sites - for site in Draft.getObjectsOfType(objectslist,"Site"): + for site in exportIFCHelper.getObjectsOfIfcType(objectslist, "Site"): objs = Draft.getGroupContents(site,walls=True,addgroups=True) objs = Arch.pruneIncluded(objs) children = [] diff --git a/src/Mod/Arch/exportIFCHelper.py b/src/Mod/Arch/exportIFCHelper.py new file mode 100644 index 0000000000..65dc6a3a5f --- /dev/null +++ b/src/Mod/Arch/exportIFCHelper.py @@ -0,0 +1,140 @@ +import FreeCAD, Draft, json, ifcopenshell, math + +def getObjectsOfIfcType(objects, ifcType): + results = [] + for object in objects: + if object.IfcType == ifcType: + results.append(object) + return results + +class SIUnitCreator: + def __init__(self, file, text, type): + self.prefixes = ["EXA", "PETA", "TERA", "GIGA", "MEGA", "KILO", "HECTO", + "DECA", "DECI", "CENTI", "MILLI", "MICRO", "NANO", "PICO", "FEMTO", + "ATTO"] + self.unitNames = ["AMPERE", "BECQUEREL", "CANDELA", "COULOMB", + "CUBIC_METRE", "DEGREE CELSIUS", "FARAD", "GRAM", "GRAY", "HENRY", + "HERTZ", "JOULE", "KELVIN", "LUMEN", "LUX", "MOLE", "NEWTON", "OHM", + "PASCAL", "RADIAN", "SECOND", "SIEMENS", "SIEVERT", "SQUARE METRE", + "METRE", "STERADIAN", "TESLA", "VOLT", "WATT", "WEBER"] + self.text = text + self.SIUnit = file.createIfcSIUnit(None, type, self.getSIPrefix(), self.getSIUnitName()) + + def getSIPrefix(self): + for prefix in self.prefixes: + if prefix in self.text.upper(): + return prefix + return None + + def getSIUnitName(self): + for unitName in self.unitNames: + if unitName in self.text.upper(): + return unitName + return None + +class ContextCreator: + def __init__(self, file, objects): + self.file = file + self.objects = objects + self.project_object = self.getProjectObject() + self.project_data = self.getProjectObjectData() + self.model_context = self.createGeometricRepresentationContext() + self.model_view_subcontext = self.createGeometricRepresentationSubContext() + self.target_crs = self.createTargetCRS() + self.map_conversion = self.createMapConversion() + self.project = self.createProject() + + def createGeometricRepresentationContext(self): + return self.file.createIfcGeometricRepresentationContext( + None, "Model", + 3, 1.0E-05, + self.file.by_type("IfcAxis2Placement3D")[0], + self.createTrueNorth()) + + def createGeometricRepresentationSubContext(self): + return self.file.createIfcGeometricRepresentationSubContext( + "Body", "Model", + None, None, None, None, + self.model_context, None, "MODEL_VIEW", None) + + def createTargetCRS(self): + try: + SIUnit = SIUnitCreator(self.file, self.project_data["map_unit"], "LENGTHUNIT") + return self.file.createIfcProjectedCRS( + self.project_data["name"], + self.project_data["description"], + self.project_data["geodetic_datum"], + self.project_data["vertical_datum"], + self.project_data["map_projection"], + self.project_data["map_zone"], + SIUnit.SIUnit + ) + except: + return None + + def createMapConversion(self): + try: + return self.file.createIfcMapConversion( + self.model_context, self.target_crs, + float(self.project_data["eastings"]), + float(self.project_data["northings"]), + float(self.project_data["orthogonal_height"]), + self.calculateXAxisAbscissa(), + self.calculateXAxisOrdinate(), + float(self.project_data["scale"]) + ) + except: + return None + + def createTrueNorth(self): + return self.file.createIfcDirection( + (self.calculateXAxisAbscissa(), self.calculateXAxisOrdinate(), 0.)) + + def calculateXAxisAbscissa(self): + if "true_north" in self.project_data: + return math.cos(math.radians(float(self.project_data["true_north"]) + 90)) + return 0. + + def calculateXAxisOrdinate(self): + if "true_north" in self.project_data: + return math.sin(math.radians(float(self.project_data["true_north"]) + 90)) + return 1. + + def createProject(self): + if not self.project_object: + return self.createAutomaticProject() + return self.createCustomProject() + + def createAutomaticProject(self): + return self.file.createIfcProject( + self.getProjectGUID(), + self.file.by_type("IfcOwnerHistory")[0], + FreeCAD.ActiveDocument.Name, None, + None, None, None, [self.model_context], + self.file.by_type("IfcUnitAssignment")[0]) + + def createCustomProject(self): + return self.file.createIfcProject( + self.getProjectGUID(), + self.file.by_type("IfcOwnerHistory")[0], + self.project_object.Label, self.project_object.Description, + self.project_object.ObjectType, self.project_object.LongName, + self.project_object.Phase, + [self.model_context], + self.file.by_type("IfcUnitAssignment")[0]) + + def getProjectGUID(self): + # TODO: Do not generate a new one each time, but at least this one + # conforms to the community consensus on how a GUID is generated. + return ifcopenshell.guid.new() + + def getProjectObject(self): + try: + return getObjectsOfIfcType(self.objects, "Project")[0] + except: + return None + + def getProjectObjectData(self): + if not self.project_object: + return {} + return json.loads(self.project_object.IfcData['complex_attributes'])["RepresentationContexts"] diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 5f0840674f..f2a25d5009 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -38,6 +38,7 @@ import Draft import Arch import DraftVecUtils import ArchIFCSchema +import importIFCHelper ## @package importIFC # \ingroup ARCH @@ -403,6 +404,9 @@ def insert(filename,docname,skip=[],only=[],root=None): import FreeCADGui FreeCADGui.ActiveDocument.activeView().viewAxonometric() + projectImporter = importIFCHelper.ProjectImporter(ifcfile, objects) + projectImporter.execute() + # handle IFC products for product in products: @@ -623,53 +627,55 @@ def insert(filename,docname,skip=[],only=[],root=None): # full Arch objects for freecadtype,ifctypes in typesmap.items(): - if ptype in ifctypes: - if clone: - obj = getattr(Arch,"make"+freecadtype)(name=name) - obj.CloneOf = clone - if shape: - if shape.Solids: - s1 = shape.Solids[0] - else: - s1 = shape - if clone.Shape.Solids: - s2 = clone.Shape.Solids[0] - else: - s1 = clone.Shape - if hasattr(s1,"CenterOfMass") and hasattr(s2,"CenterOfMass"): - v = s1.CenterOfMass.sub(s2.CenterOfMass) - if product.Representation: - r = getRotation(product.Representation.Representations[0].Items[0].MappingTarget) - if not r.isNull(): - v = v.add(s2.CenterOfMass) - v = v.add(r.multVec(s2.CenterOfMass.negative())) - obj.Placement.Rotation = r - obj.Placement.move(v) - else: - print("failed to compute placement ",) - else: - obj = getattr(Arch,"make"+freecadtype)(baseobj=baseobj,name=name) - if freecadtype in ["Wall","Structure"] and baseobj and baseobj.isDerivedFrom("Part::Extrusion"): - # remove intermediary extrusion for types that can extrude themselves - obj.Base = baseobj.Base - obj.Placement = obj.Placement.multiply(baseobj.Placement) - obj.Height = baseobj.Dir.Length - obj.Normal = FreeCAD.Vector(baseobj.Dir).normalize() - bn = baseobj.Name - FreeCAD.ActiveDocument.removeObject(bn) - if (freecadtype in ["Structure","Wall"]) and not baseobj: - # remove sizes to prevent auto shape creation for types that don't require a base object - obj.Height = 0 - obj.Width = 0 - obj.Length = 0 - if store: - sharedobjects[store] = obj - if ptype == "IfcBuildingStorey": - if product.Elevation: - obj.Placement.Base.z = product.Elevation * getScaling(ifcfile) + if ptype not in ifctypes: + continue + if clone: + obj = getattr(Arch,"make"+freecadtype)(name=name) + obj.CloneOf = clone + if shape: + if shape.Solids: + s1 = shape.Solids[0] + else: + s1 = shape + if clone.Shape.Solids: + s2 = clone.Shape.Solids[0] + else: + s1 = clone.Shape + if hasattr(s1,"CenterOfMass") and hasattr(s2,"CenterOfMass"): + v = s1.CenterOfMass.sub(s2.CenterOfMass) + if product.Representation: + r = getRotation(product.Representation.Representations[0].Items[0].MappingTarget) + if not r.isNull(): + v = v.add(s2.CenterOfMass) + v = v.add(r.multVec(s2.CenterOfMass.negative())) + obj.Placement.Rotation = r + obj.Placement.move(v) + else: + print("failed to compute placement ",) + else: + obj = getattr(Arch,"make"+freecadtype)(baseobj=baseobj,name=name) + if freecadtype in ["Wall","Structure"] and baseobj and baseobj.isDerivedFrom("Part::Extrusion"): + # remove intermediary extrusion for types that can extrude themselves + obj.Base = baseobj.Base + obj.Placement = obj.Placement.multiply(baseobj.Placement) + obj.Height = baseobj.Dir.Length + obj.Normal = FreeCAD.Vector(baseobj.Dir).normalize() + bn = baseobj.Name + FreeCAD.ActiveDocument.removeObject(bn) + if (freecadtype in ["Structure","Wall"]) and not baseobj: + # remove sizes to prevent auto shape creation for types that don't require a base object + obj.Height = 0 + obj.Width = 0 + obj.Length = 0 + if store: + sharedobjects[store] = obj - break + if ptype == "IfcBuildingStorey": + if product.Elevation: + obj.Placement.Base.z = product.Elevation * getScaling(ifcfile) + + break if not obj: obj = Arch.makeComponent(baseobj,name=name) @@ -704,6 +710,8 @@ def insert(filename,docname,skip=[],only=[],root=None): # setting IFC attributes for attribute in ArchIFCSchema.IfcProducts[product.is_a()]["attributes"]: + if attribute["name"] == "Name": + continue #print("attribute:",attribute["name"]) if hasattr(product, attribute["name"]) and getattr(product, attribute["name"]) and hasattr(obj,attribute["name"]): #print("Setting attribute",attribute["name"],"to",getattr(product, attribute["name"])) @@ -1025,23 +1033,25 @@ def insert(filename,docname,skip=[],only=[],root=None): # additions for host,children in additions.items(): - if host in objects.keys(): - cobs = [] - for child in children: - if child in objects.keys(): - if child not in swallowed: # don't add objects already in groups - cobs.append(objects[child]) - if cobs: - if DEBUG and first: - print("") - first = False - if DEBUG and (len(cobs) > 10) and (not(Draft.getType(objects[host]) in ["Site","Building","Floor","BuildingPart"])): - # avoid huge fusions - print("more than 10 shapes to add: skipping.") - else: - if DEBUG: print(" adding",len(cobs), "object(s) to", objects[host].Label) - Arch.addComponents(cobs,objects[host]) - if DEBUG: FreeCAD.ActiveDocument.recompute() + if host not in objects.keys(): + continue + cobs = [] + for child in children: + if child in objects.keys() \ + and child not in swallowed: # don't add objects already in groups + cobs.append(objects[child]) + if not cobs: + continue + if DEBUG and first: + print("") + first = False + if DEBUG and (len(cobs) > 10) and (not(Draft.getType(objects[host]) in ["Site","Building","Floor","BuildingPart","Project"])): + # avoid huge fusions + print("more than 10 shapes to add: skipping.") + else: + if DEBUG: print(" adding",len(cobs), "object(s) to", objects[host].Label) + Arch.addComponents(cobs,objects[host]) + if DEBUG: FreeCAD.ActiveDocument.recompute() if DEBUG and first: print("done.") @@ -1051,7 +1061,7 @@ def insert(filename,docname,skip=[],only=[],root=None): for obj in objects.values(): if obj.isDerivedFrom("Part::Feature"): - if obj.Shape.isNull() and not(Draft.getType(obj) in ["Site"]): + if obj.Shape.isNull() and not(Draft.getType(obj) in ["Site","Project"]): Arch.rebuildArchShape(obj) FreeCAD.ActiveDocument.recompute() @@ -1673,7 +1683,7 @@ class recycler: else: if isinstance(pvalue,float) and pvalue < 0.000000001: # remove the exp notation that some bim apps hate pvalue = 0 - c = self.ifcfile.createIfcPropertySingleValue(name,None,ifcfile.create_entity(ptype,pvalue),None) + c = self.ifcfile.createIfcPropertySingleValue(name,None,self.ifcfile.create_entity(ptype,pvalue),None) if self.compress: self.propertysinglevalues[key] = c return c diff --git a/src/Mod/Arch/importIFCHelper.py b/src/Mod/Arch/importIFCHelper.py new file mode 100644 index 0000000000..058a802c4a --- /dev/null +++ b/src/Mod/Arch/importIFCHelper.py @@ -0,0 +1,70 @@ +import Arch, ArchIFC, math + +class ProjectImporter: + def __init__(self, file, objects): + self.file = file + self.objects = objects + + def execute(self): + self.project = self.file.by_type("IfcProject")[0] + self.object = Arch.makeProject() + self.objects[self.project.id()] = self.object + self.setAttributes() + self.setComplexAttributes() + + def setAttributes(self): + for property in self.object.PropertiesList: + if hasattr(self.project, property) and getattr(self.project, property): + setattr(self.object, property, getattr(self.project, property)) + + def setComplexAttributes(self): + try: + mapConversion = self.project.RepresentationContexts[0].HasCoordinateOperation[0] + + data = self.extractTargetCRSData(mapConversion.TargetCRS) + data.update(self.extractMapConversionData(mapConversion)) + ArchIFC.IfcRoot.setObjIfcComplexAttributeValue(self, self.object, "RepresentationContexts", data) + except: + # This scenario occurs validly in IFC2X3, as the mapConversion does + # not exist + return + + def extractTargetCRSData(self, targetCRS): + mappings = { + "name": "Name", + "description": "Description", + "geodetic_datum": "GeodeticDatum", + "vertical_datum": "VerticalDatum", + "map_projection": "MapProjection", + "map_zone": "MapZone" + } + data = {} + for attributeName, ifcName in mappings.items(): + data[attributeName] = str(getattr(targetCRS, ifcName)) + + if targetCRS.MapUnit.Prefix: + data["map_unit"] = targetCRS.MapUnit.Prefix.title() + targetCRS.MapUnit.Name.lower() + else: + data["map_unit"] = targetCRS.MapUnit.Name.title() + + return data + + def extractMapConversionData(self, mapConversion): + mappings = { + "eastings": "Eastings", + "northings": "Northings", + "orthogonal_height": "OrthogonalHeight", + "x_axis_abscissa": "XAxisAbscissa", + "x_axis_ordinate": "XAxisOrdinate", + "scale": "Scale" + } + data = {} + for attributeName, ifcName in mappings.items(): + data[attributeName] = str(getattr(mapConversion, ifcName)) + + data["true_north"] = str(self.calculateTrueNorthAngle( + mapConversion.XAxisAbscissa, mapConversion.XAxisOrdinate)) + return data + + def calculateTrueNorthAngle(self, x, y): + return round(math.degrees(math.atan2(y, x)) - 90, 6) From 36d418349e0a2e4690a1e84461bb97ebf2620d7b Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 14 Aug 2019 21:39:52 +0200 Subject: [PATCH 30/39] Arch: make new property to use shape color instead of material color working for all Arch objs --- src/Mod/Arch/ArchFence.py | 3 +++ src/Mod/Arch/ArchPanel.py | 10 ++++++++++ src/Mod/Arch/ArchStructure.py | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/src/Mod/Arch/ArchFence.py b/src/Mod/Arch/ArchFence.py index be27634656..932fbc97a1 100644 --- a/src/Mod/Arch/ArchFence.py +++ b/src/Mod/Arch/ArchFence.py @@ -231,6 +231,9 @@ class _ViewProviderFence(ArchComponent.ViewProviderComponent): def __init__(self, vobj): ArchComponent.ViewProviderComponent.__init__(self, vobj) + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) self.setProperties(vobj) def setProperties(self, vobj): diff --git a/src/Mod/Arch/ArchPanel.py b/src/Mod/Arch/ArchPanel.py index 0fd10f0792..69ad150f24 100644 --- a/src/Mod/Arch/ArchPanel.py +++ b/src/Mod/Arch/ArchPanel.py @@ -825,6 +825,11 @@ class PanelView: def __init__(self, obj): obj.Proxy = self + + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) + self.setProperties(obj) obj.X = 10 obj.Y = 10 @@ -924,6 +929,11 @@ class PanelCut(Draft._DraftObject): def __init__(self, obj): Draft._DraftObject.__init__(self,obj) obj.Proxy = self + + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) + self.setProperties(obj) def setProperties(self,obj): diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index e553676aba..722ddedccd 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -896,6 +896,11 @@ class _ViewProviderStructure(ArchComponent.ViewProviderComponent): def __init__(self,vobj): ArchComponent.ViewProviderComponent.__init__(self,vobj) + + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) + self.setProperties(vobj) vobj.ShapeColor = ArchCommands.getDefaultColor("Structure") From 46a1d1d254cbec3f2e75e01bb99b3b816fcd2c59 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 14 Aug 2019 17:56:15 -0300 Subject: [PATCH 31/39] Arch: Minor fixes to IFC export --- src/Mod/Arch/ArchStructure.py | 2 +- src/Mod/Arch/exportIFCHelper.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 722ddedccd..051993977f 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -118,7 +118,7 @@ def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structur obj.Length = h if not height and not length: - obj.IfcType = "Building Element Proxy" + obj.IfcType = "Undefined" elif obj.Length > obj.Height: obj.IfcType = "Beam" obj.Label = translate("Arch","Beam") diff --git a/src/Mod/Arch/exportIFCHelper.py b/src/Mod/Arch/exportIFCHelper.py index 65dc6a3a5f..8f52783be7 100644 --- a/src/Mod/Arch/exportIFCHelper.py +++ b/src/Mod/Arch/exportIFCHelper.py @@ -3,8 +3,9 @@ import FreeCAD, Draft, json, ifcopenshell, math def getObjectsOfIfcType(objects, ifcType): results = [] for object in objects: - if object.IfcType == ifcType: - results.append(object) + if hasattr(object,"IfcType"): + if object.IfcType == ifcType: + results.append(object) return results class SIUnitCreator: From be45c2496452b134730038d6ce1b641c21e5d671 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Thu, 15 Aug 2019 00:20:24 -0300 Subject: [PATCH 32/39] Arch: Reorganized view properties of buildingParts --- src/Mod/Arch/ArchBuildingPart.py | 38 ++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index 7eb2105a8b..b2214bdf02 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -483,13 +483,10 @@ class ViewProviderBuildingPart: vobj.ShowLevel = True if not "ShowUnit" in pl: vobj.addProperty("App::PropertyBool","ShowUnit","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, show the unit on the level tag")) - if not "SetWorkingPlane" in pl: - vobj.addProperty("App::PropertyBool","SetWorkingPlane","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, when activated, the working plane will automatically adapt to this level")) - vobj.SetWorkingPlane = True if not "OriginOffset" in pl: - vobj.addProperty("App::PropertyBool","OriginOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, when activated, Display offset will affect the origin mark too")) + vobj.addProperty("App::PropertyBool","OriginOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, display offset will affect the origin mark too")) if not "ShowLabel" in pl: - vobj.addProperty("App::PropertyBool","ShowLabel","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, when activated, the object's label is displayed")) + vobj.addProperty("App::PropertyBool","ShowLabel","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, the object's label is displayed")) vobj.ShowLabel = True if not "FontName" in pl: vobj.addProperty("App::PropertyFont","FontName","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The font to be used for texts")) @@ -497,14 +494,31 @@ class ViewProviderBuildingPart: if not "FontSize" in pl: vobj.addProperty("App::PropertyLength","FontSize","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The font size of texts")) vobj.FontSize = Draft.getParam("textheight",2.0) - if not "ViewData" in pl: - vobj.addProperty("App::PropertyFloatList","ViewData","BuildingPart",QT_TRANSLATE_NOOP("App::Property","Camera position data associated with this object")) - if not "RestoreView" in pl: - vobj.addProperty("App::PropertyBool","RestoreView","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If set, the view stored in this object will be restored on double-click")) if not "DiffuseColor" in pl: vobj.addProperty("App::PropertyColorList","DiffuseColor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The individual face colors")) + + # Interaction properties + if not "SetWorkingPlane" in pl: + vobj.addProperty("App::PropertyBool","SetWorkingPlane","Interaction",QT_TRANSLATE_NOOP("App::Property","If true, when activated, the working plane will automatically adapt to this level")) + vobj.SetWorkingPlane = True if not "AutoWorkingPlane" in pl: - vobj.addProperty("App::PropertyBool","AutoWorkingPlane","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If set to True, the working plane will be kept on Auto mode")) + vobj.addProperty("App::PropertyBool","AutoWorkingPlane","Interaction",QT_TRANSLATE_NOOP("App::Property","If set to True, the working plane will be kept on Auto mode")) + if not "ViewData" in pl: + vobj.addProperty("App::PropertyFloatList","ViewData","Interaction",QT_TRANSLATE_NOOP("App::Property","Camera position data associated with this object")) + vobj.setEditorMode("ViewData",2) + if not "RestoreView" in pl: + vobj.addProperty("App::PropertyBool","RestoreView","Interaction",QT_TRANSLATE_NOOP("App::Property","If set, the view stored in this object will be restored on double-click")) + if not "DoubleClickActivates" in pl: + vobj.addProperty("App::PropertyBool","DoubleClickActivates","Interaction",QT_TRANSLATE_NOOP("App::Property","If True, double-clicking this object in the tree turns it active")) + + # inventor saving + if not "SaveInventor" in pl: + vobj.addProperty("App::PropertyBool","SaveInventor","Interaction",QT_TRANSLATE_NOOP("App::Property","If this is enabled, the inventor representation of this object will be saved in the FreeCAD file, allowing to reference it in other file sin lightweight mode.")) + if not "SavedInventor" in pl: + vobj.addProperty("App::PropertyFileIncluded","SavedInventor","Interaction",QT_TRANSLATE_NOOP("App::Property","A slot to save the inventor representation of this object, if enabled")) + vobj.setEditorMode("SavedInventor",2) + + # children properties if not "ChildrenOverride" in pl: vobj.addProperty("App::PropertyBool","ChildrenOverride","Children",QT_TRANSLATE_NOOP("App::Property","If true, show the objects contained in this Building Part will adopt these line, color and transparency settings")) if not "ChildrenLineWidth" in pl: @@ -520,6 +534,8 @@ class ViewProviderBuildingPart: vobj.ChildrenLineColor = (float((c>>24)&0xFF)/255.0,float((c>>16)&0xFF)/255.0,float((c>>8)&0xFF)/255.0,0.0) if not "ChildrenTransparency" in pl: vobj.addProperty("App::PropertyPercent","ChildrenTransparency","Children",QT_TRANSLATE_NOOP("App::Property","The transparency of child objects")) + + # clip properties if not "CutView" in pl: vobj.addProperty("App::PropertyBool","CutView","Clip",QT_TRANSLATE_NOOP("App::Property","Cut the view above this level")) if not "CutMargin" in pl: @@ -527,8 +543,6 @@ class ViewProviderBuildingPart: vobj.CutMargin = 1600 if not "AutoCutView" in pl: vobj.addProperty("App::PropertyBool","AutoCutView","Clip",QT_TRANSLATE_NOOP("App::Property","Turn cutting on when activating this level")) - if not "SaveInventor" in pl: - vobj.addProperty("App::PropertyBool","SaveInventor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If this is enabled, the inventor representation of this object will be saved in the FreeCAD file, allowing to reference it in other file sin lightweight mode.")) def onDocumentRestored(self,vobj): From 03b4fe50ed2238dd9e3d9eec5921812b83e13e0e Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Thu, 15 Aug 2019 00:20:59 -0300 Subject: [PATCH 33/39] Gui: Added viewer.setName() python method --- src/Gui/View3DPy.cpp | 22 ++++++++++++++++++++++ src/Gui/View3DPy.h | 1 + 2 files changed, 23 insertions(+) diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index e3271b14f5..d0292e2423 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -182,6 +182,7 @@ void View3DInventorPy::init_type() add_varargs_method("getActiveObject", &View3DInventorPy::getActiveObject, "getActiveObject(name)\nreturns the active object for the given type"); add_varargs_method("getViewProvidersOfType", &View3DInventorPy::getViewProvidersOfType, "getViewProvidersOfType(name)\nreturns a list of view providers for the given type"); add_varargs_method("redraw", &View3DInventorPy::redraw, "redraw(): renders the scene on screen (useful for animations)"); + add_varargs_method("setName",&View3DInventorPy::setName,"setName(str): sets a name to this viewer\nThe name sets the widget's windowTitle and appears on the viewer tab"); } @@ -2451,3 +2452,24 @@ Py::Object View3DInventorPy::redraw(const Py::Tuple& args) _view->getViewer()->redraw(); return Py::None(); } + +Py::Object View3DInventorPy::setName(const Py::Tuple& args) +{ + char* buffer; + if (!PyArg_ParseTuple(args.ptr(), "s", &buffer)) + throw Py::Exception(); + + try { + _view->setWindowTitle(QString::fromUtf8(buffer)); + return Py::None(); + } + catch (const Base::Exception& e) { + throw Py::RuntimeError(e.what()); + } + catch (const std::exception& e) { + throw Py::RuntimeError(e.what()); + } + catch(...) { + throw Py::RuntimeError("Unknown C++ exception"); + } +} diff --git a/src/Gui/View3DPy.h b/src/Gui/View3DPy.h index 2cd7cacfa9..67198e7643 100644 --- a/src/Gui/View3DPy.h +++ b/src/Gui/View3DPy.h @@ -129,6 +129,7 @@ public: Py::Object getActiveObject(const Py::Tuple&); Py::Object getViewProvidersOfType(const Py::Tuple&); Py::Object redraw(const Py::Tuple&); + Py::Object setName(const Py::Tuple&); private: static void eventCallback(void * ud, SoEventCallback * n); From 4bb32ae8d26cf67c57c2340eaea5215f28b07349 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 15 Aug 2019 08:39:12 +0200 Subject: [PATCH 34/39] FEM: ccx tools, small indent code formating --- src/Mod/Fem/femtools/ccxtools.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/Mod/Fem/femtools/ccxtools.py b/src/Mod/Fem/femtools/ccxtools.py index ed5cb23cee..a2936904a4 100644 --- a/src/Mod/Fem/femtools/ccxtools.py +++ b/src/Mod/Fem/femtools/ccxtools.py @@ -803,9 +803,13 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): ccx_stdout = None ccx_stderr = None try: - p = subprocess.Popen([self.ccx_binary], stdout=subprocess.PIPE, - stderr=subprocess.PIPE, shell=False, - startupinfo=startup_info) + p = subprocess.Popen( + [self.ccx_binary], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=False, + startupinfo=startup_info + ) ccx_stdout, ccx_stderr = p.communicate() if ccx_binary_sig in str(ccx_stdout): self.ccx_binary_present = True @@ -861,9 +865,13 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): cwd = QtCore.QDir.currentPath() f = QtCore.QFileInfo(self.inp_file_name) QtCore.QDir.setCurrent(f.path()) - p = subprocess.Popen([self.ccx_binary, "-i ", f.baseName()], - stdout=subprocess.PIPE, stderr=subprocess.PIPE, - shell=False, env=_env) + p = subprocess.Popen( + [self.ccx_binary, "-i ", f.baseName()], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=False, + env=_env + ) self.ccx_stdout, self.ccx_stderr = p.communicate() if sys.version_info.major >= 3: self.ccx_stdout = self.ccx_stdout.decode() @@ -884,9 +892,13 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): ccx_stdout = None ccx_stderr = None # Now extract the version number - p = subprocess.Popen([self.ccx_binary, '-v'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE, shell=False, - startupinfo=startup_info) + p = subprocess.Popen( + [self.ccx_binary, '-v'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=False, + startupinfo=startup_info + ) ccx_stdout, ccx_stderr = p.communicate() if sys.version_info.major >= 3: ccx_stdout = ccx_stdout.decode() From fbba0bbd38fd12d5252c009eead4ab45b5fc0712 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 16 Aug 2019 07:41:36 +0200 Subject: [PATCH 35/39] FEM: code formating, small ones --- src/Mod/Fem/Init.py | 2 +- src/Mod/Fem/InitGui.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Fem/Init.py b/src/Mod/Fem/Init.py index d0b465b44a..684a432a11 100644 --- a/src/Mod/Fem/Init.py +++ b/src/Mod/Fem/Init.py @@ -51,7 +51,7 @@ FreeCAD.addExportType("FEM mesh Z88 (*i1.txt)", "feminout.importZ88Mesh") FreeCAD.addImportType("FEM result Z88 displacements (*o2.txt)", "feminout.importZ88O2Results") -if("BUILD_FEM_VTK" in FreeCAD.__cmake__): +if "BUILD_FEM_VTK" in FreeCAD.__cmake__: FreeCAD.addImportType("FEM result VTK (*.vtk *.vtu)", "feminout.importVTKResults") FreeCAD.addExportType("FEM result VTK (*.vtk *.vtu)", "feminout.importVTKResults") diff --git a/src/Mod/Fem/InitGui.py b/src/Mod/Fem/InitGui.py index d15db05f19..8a0456ae0f 100644 --- a/src/Mod/Fem/InitGui.py +++ b/src/Mod/Fem/InitGui.py @@ -33,8 +33,9 @@ import FreeCAD import FreeCADGui -class FemWorkbench (Workbench): +class FemWorkbench(Workbench): "Fem workbench object" + def __init__(self): self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Fem/Resources/icons/FemWorkbench.svg" self.__class__.MenuText = "FEM" From 2ed7936c1129b0ba197e04a9e6528f1616934df3 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 16 Aug 2019 07:58:34 +0200 Subject: [PATCH 36/39] FEM: code formating, commands, use double quotes instead of single ones --- src/Mod/Fem/ObjectsFem.py | 220 +++++++------- src/Mod/Fem/TestFem.py | 4 +- src/Mod/Fem/femcommands/commands.py | 450 ++++++++++++++-------------- src/Mod/Fem/femcommands/manager.py | 44 +-- 4 files changed, 359 insertions(+), 359 deletions(-) diff --git a/src/Mod/Fem/ObjectsFem.py b/src/Mod/Fem/ObjectsFem.py index 711f968251..06170930ed 100644 --- a/src/Mod/Fem/ObjectsFem.py +++ b/src/Mod/Fem/ObjectsFem.py @@ -35,8 +35,8 @@ def makeAnalysis( doc, name="Analysis" ): - '''makeAnalysis(document, [name]): - makes a Fem Analysis object''' + """makeAnalysis(document, [name]): + makes a Fem Analysis object""" obj = doc.addObject("Fem::FemAnalysis", name) return obj @@ -46,8 +46,8 @@ def makeConstraintBearing( doc, name="ConstraintBearing" ): - '''makeConstraintBearing(document, [name]): - makes a Fem ConstraintBearing object''' + """makeConstraintBearing(document, [name]): + makes a Fem ConstraintBearing object""" obj = doc.addObject("Fem::ConstraintBearing", name) return obj @@ -56,8 +56,8 @@ def makeConstraintBodyHeatSource( doc, name="ConstraintBodyHeatSource" ): - '''makeConstraintBodyHeatSource(document, [name]): - makes a Fem ConstraintBodyHeatSource object''' + """makeConstraintBodyHeatSource(document, [name]): + makes a Fem ConstraintBodyHeatSource object""" obj = doc.addObject("Fem::ConstraintPython", name) from femobjects import _FemConstraintBodyHeatSource _FemConstraintBodyHeatSource.Proxy(obj) @@ -71,8 +71,8 @@ def makeConstraintContact( doc, name="ConstraintContact" ): - '''makeConstraintContact(document, [name]): - makes a Fem ConstraintContact object''' + """makeConstraintContact(document, [name]): + makes a Fem ConstraintContact object""" obj = doc.addObject("Fem::ConstraintContact", name) return obj @@ -81,8 +81,8 @@ def makeConstraintDisplacement( doc, name="ConstraintDisplacement" ): - '''makeConstraintDisplacement(document, [name]): - makes a Fem ConstraintDisplacement object''' + """makeConstraintDisplacement(document, [name]): + makes a Fem ConstraintDisplacement object""" obj = doc.addObject("Fem::ConstraintDisplacement", name) return obj @@ -91,8 +91,8 @@ def makeConstraintElectrostaticPotential( doc, name="ConstraintElectrostaticPotential" ): - '''makeConstraintElectrostaticPotential(document, [name]): - makes a Fem ElectrostaticPotential object''' + """makeConstraintElectrostaticPotential(document, [name]): + makes a Fem ElectrostaticPotential object""" obj = doc.addObject("Fem::ConstraintPython", name) from femobjects import _FemConstraintElectrostaticPotential _FemConstraintElectrostaticPotential.Proxy(obj) @@ -106,8 +106,8 @@ def makeConstraintFixed( doc, name="ConstraintFixed" ): - '''makeConstraintFixed(document, [name]): - makes a Fem ConstraintFixed object''' + """makeConstraintFixed(document, [name]): + makes a Fem ConstraintFixed object""" obj = doc.addObject("Fem::ConstraintFixed", name) return obj @@ -116,8 +116,8 @@ def makeConstraintFlowVelocity( doc, name="ConstraintFlowVelocity" ): - '''makeConstraintFlowVelocity(document, [name]): - makes a Fem ConstraintFlowVelocity object''' + """makeConstraintFlowVelocity(document, [name]): + makes a Fem ConstraintFlowVelocity object""" obj = doc.addObject("Fem::ConstraintPython", name) from femobjects import _FemConstraintFlowVelocity _FemConstraintFlowVelocity.Proxy(obj) @@ -131,8 +131,8 @@ def makeConstraintFluidBoundary( doc, name="ConstraintFluidBoundary" ): - '''makeConstraintFluidBoundary(document, name): - makes a Fem ConstraintFluidBoundary object''' + """makeConstraintFluidBoundary(document, name): + makes a Fem ConstraintFluidBoundary object""" obj = doc.addObject("Fem::ConstraintFluidBoundary", name) return obj @@ -141,8 +141,8 @@ def makeConstraintForce( doc, name="ConstraintForce" ): - '''makeConstraintForce(document, [name]): - makes a Fem ConstraintForce object''' + """makeConstraintForce(document, [name]): + makes a Fem ConstraintForce object""" obj = doc.addObject("Fem::ConstraintForce", name) return obj @@ -151,8 +151,8 @@ def makeConstraintGear( doc, name="ConstraintGear" ): - '''makeConstraintGear(document, [name]): - makes a Fem ConstraintGear object''' + """makeConstraintGear(document, [name]): + makes a Fem ConstraintGear object""" obj = doc.addObject("Fem::ConstraintGear", name) return obj @@ -161,8 +161,8 @@ def makeConstraintHeatflux( doc, name="ConstraintHeatflux" ): - '''makeConstraintHeatflux(document, [name]): - makes a Fem ConstraintHeatflux object''' + """makeConstraintHeatflux(document, [name]): + makes a Fem ConstraintHeatflux object""" obj = doc.addObject("Fem::ConstraintHeatflux", name) return obj @@ -171,8 +171,8 @@ def makeConstraintInitialFlowVelocity( doc, name="ConstraintInitialFlowVelocity" ): - '''makeConstraintInitialFlowVelocity(document, [name]): - makes a Fem ConstraintInitialFlowVelocity object''' + """makeConstraintInitialFlowVelocity(document, [name]): + makes a Fem ConstraintInitialFlowVelocity object""" obj = doc.addObject("Fem::ConstraintPython", name) from femobjects import _FemConstraintInitialFlowVelocity _FemConstraintInitialFlowVelocity.Proxy(obj) @@ -186,8 +186,8 @@ def makeConstraintInitialTemperature( doc, name="ConstraintInitialTemperature" ): - '''makeConstraintInitialTemperature(document, name): - makes a Fem ConstraintInitialTemperature object''' + """makeConstraintInitialTemperature(document, name): + makes a Fem ConstraintInitialTemperature object""" obj = doc.addObject("Fem::ConstraintInitialTemperature", name) return obj @@ -196,8 +196,8 @@ def makeConstraintPlaneRotation( doc, name="ConstraintPlaneRotation" ): - '''makeConstraintPlaneRotation(document, [name]): - makes a Fem ConstraintPlaneRotation object''' + """makeConstraintPlaneRotation(document, [name]): + makes a Fem ConstraintPlaneRotation object""" obj = doc.addObject("Fem::ConstraintPlaneRotation", name) return obj @@ -206,8 +206,8 @@ def makeConstraintPressure( doc, name="ConstraintPressure" ): - '''makeConstraintPressure(document, [name]): - makes a Fem ConstraintPressure object''' + """makeConstraintPressure(document, [name]): + makes a Fem ConstraintPressure object""" obj = doc.addObject("Fem::ConstraintPressure", name) return obj @@ -216,8 +216,8 @@ def makeConstraintPulley( doc, name="ConstraintPulley" ): - '''makeConstraintPulley(document, [name]): - makes a Fem ConstraintPulley object''' + """makeConstraintPulley(document, [name]): + makes a Fem ConstraintPulley object""" obj = doc.addObject("Fem::ConstraintPulley", name) return obj @@ -226,8 +226,8 @@ def makeConstraintSelfWeight( doc, name="ConstraintSelfWeight" ): - '''makeConstraintSelfWeight(document, [name]): - creates an self weight object to define a gravity load''' + """makeConstraintSelfWeight(document, [name]): + creates an self weight object to define a gravity load""" obj = doc.addObject("Fem::ConstraintPython", name) from femobjects import _FemConstraintSelfWeight _FemConstraintSelfWeight._FemConstraintSelfWeight(obj) @@ -243,8 +243,8 @@ def makeConstraintTemperature( doc, name="ConstraintTemperature" ): - '''makeConstraintTemperature(document, [name]): - makes a Fem ConstraintTemperature object''' + """makeConstraintTemperature(document, [name]): + makes a Fem ConstraintTemperature object""" obj = doc.addObject("Fem::ConstraintTemperature", name) return obj @@ -253,8 +253,8 @@ def makeConstraintTransform( doc, name="ConstraintTransform" ): - '''makeConstraintTransform(document, [name]): - makes a Fem ConstraintTransform object''' + """makeConstraintTransform(document, [name]): + makes a Fem ConstraintTransform object""" obj = doc.addObject("Fem::ConstraintTransform", name) return obj @@ -264,8 +264,8 @@ def makeElementFluid1D( doc, name="ElementFluid1D" ): - '''makeElementFluid1D(document, [name]): - creates an 1D fluid element object to define 1D flow''' + """makeElementFluid1D(document, [name]): + creates an 1D fluid element object to define 1D flow""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemElementFluid1D _FemElementFluid1D._FemElementFluid1D(obj) @@ -277,13 +277,13 @@ def makeElementFluid1D( def makeElementGeometry1D( doc, - sectiontype='Rectangular', + sectiontype="Rectangular", width=10.0, height=25.0, name="ElementGeometry1D" ): - '''makeElementGeometry1D(document, [width], [height], [name]): - creates an 1D geometry element object to define a cross section''' + """makeElementGeometry1D(document, [width], [height], [name]): + creates an 1D geometry element object to define a cross section""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemElementGeometry1D _FemElementGeometry1D._FemElementGeometry1D(obj) @@ -309,8 +309,8 @@ def makeElementGeometry2D( thickness=20.0, name="ElementGeometry2D" ): - '''makeElementGeometry2D(document, [thickness], [name]): - creates an 2D geometry element object to define a plate thickness''' + """makeElementGeometry2D(document, [thickness], [name]): + creates an 2D geometry element object to define a plate thickness""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemElementGeometry2D _FemElementGeometry2D._FemElementGeometry2D(obj) @@ -325,8 +325,8 @@ def makeElementRotation1D( doc, name="ElementRotation1D" ): - '''makeElementRotation1D(document, [name]): - creates an 1D geometry rotation element object to rotate a 1D cross section''' + """makeElementRotation1D(document, [name]): + creates an 1D geometry rotation element object to rotate a 1D cross section""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemElementRotation1D _FemElementRotation1D._FemElementRotation1D(obj) @@ -341,12 +341,12 @@ def makeMaterialFluid( doc, name="FluidMaterial" ): - '''makeMaterialFluid(document, [name]): - makes a FEM Material for fluid''' + """makeMaterialFluid(document, [name]): + makes a FEM Material for fluid""" obj = doc.addObject("App::MaterialObjectPython", name) from femobjects import _FemMaterial _FemMaterial._FemMaterial(obj) - obj.Category = 'Fluid' + obj.Category = "Fluid" if FreeCAD.GuiUp: from femguiobjects import _ViewProviderFemMaterial _ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject) @@ -358,8 +358,8 @@ def makeMaterialMechanicalNonlinear( base_material, name="MechanicalMaterialNonlinear" ): - '''makeMaterialMechanicalNonlinear(document, base_material, [name]): - creates a nonlinear material object''' + """makeMaterialMechanicalNonlinear(document, base_material, [name]): + creates a nonlinear material object""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemMaterialMechanicalNonlinear _FemMaterialMechanicalNonlinear._FemMaterialMechanicalNonlinear(obj) @@ -376,8 +376,8 @@ def makeMaterialReinforced( doc, name="MaterialReinforced" ): - '''makeMaterialReinforced(document, [matrix_material], [reinforcement_material], [name]): - creates a reinforced material object''' + """makeMaterialReinforced(document, [matrix_material], [reinforcement_material], [name]): + creates a reinforced material object""" obj = doc.addObject("App::MaterialObjectPython", name) from femobjects import _FemMaterialReinforced _FemMaterialReinforced._FemMaterialReinforced(obj) @@ -391,12 +391,12 @@ def makeMaterialSolid( doc, name="MechanicalSolidMaterial" ): - '''makeMaterialSolid(document, [name]): - makes a FEM Material for solid''' + """makeMaterialSolid(document, [name]): + makes a FEM Material for solid""" obj = doc.addObject("App::MaterialObjectPython", name) from femobjects import _FemMaterial _FemMaterial._FemMaterial(obj) - obj.Category = 'Solid' + obj.Category = "Solid" if FreeCAD.GuiUp: from femguiobjects import _ViewProviderFemMaterial _ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject) @@ -409,8 +409,8 @@ def makeMeshBoundaryLayer( base_mesh, name="MeshBoundaryLayer" ): - '''makeMeshBoundaryLayer(document, base_mesh, [name]): - creates a FEM mesh BoundaryLayer object to define boundary layer properties''' + """makeMeshBoundaryLayer(document, base_mesh, [name]): + creates a FEM mesh BoundaryLayer object to define boundary layer properties""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemMeshBoundaryLayer _FemMeshBoundaryLayer._FemMeshBoundaryLayer(obj) @@ -430,8 +430,8 @@ def makeMeshGmsh( doc, name="MeshGmsh" ): - '''makeMeshGmsh(document, [name]): - makes a Gmsh FEM mesh object''' + """makeMeshGmsh(document, [name]): + makes a Gmsh FEM mesh object""" obj = doc.addObject("Fem::FemMeshObjectPython", name) from femobjects import _FemMeshGmsh _FemMeshGmsh._FemMeshGmsh(obj) @@ -447,8 +447,8 @@ def makeMeshGroup( use_label=False, name="MeshGroup" ): - '''makeMeshGroup(document, base_mesh, [use_label], [name]): - creates a FEM mesh region object to define properties for a region of a FEM mesh''' + """makeMeshGroup(document, base_mesh, [use_label], [name]): + creates a FEM mesh region object to define properties for a region of a FEM mesh""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemMeshGroup _FemMeshGroup._FemMeshGroup(obj) @@ -469,8 +469,8 @@ def makeMeshNetgen( doc, name="MeshNetgen" ): - '''makeMeshNetgen(document, [name]): - makes a Fem MeshShapeNetgenObject object''' + """makeMeshNetgen(document, [name]): + makes a Fem MeshShapeNetgenObject object""" obj = doc.addObject("Fem::FemMeshShapeNetgenObject", name) return obj @@ -481,8 +481,8 @@ def makeMeshRegion( element_length=0.0, name="MeshRegion" ): - '''makeMeshRegion(document, base_mesh, [element_length], [name]): - creates a FEM mesh region object to define properties for a region of a FEM mesh''' + """makeMeshRegion(document, base_mesh, [element_length], [name]): + creates a FEM mesh region object to define properties for a region of a FEM mesh""" obj = doc.addObject("Fem::FeaturePython", name) from femobjects import _FemMeshRegion _FemMeshRegion._FemMeshRegion(obj) @@ -503,7 +503,7 @@ def makeMeshResult( doc, name="MeshResult" ): - '''makeMeshResult(document, name): makes a Fem MeshResult object''' + """makeMeshResult(document, name): makes a Fem MeshResult object""" obj = doc.addObject("Fem::FemMeshObjectPython", name) from femobjects import _FemMeshResult _FemMeshResult._FemMeshResult(obj) @@ -518,9 +518,9 @@ def makeResultMechanical( doc, name="MechanicalResult" ): - '''makeResultMechanical(document, [name]): - creates an mechanical result object to hold FEM results''' - obj = doc.addObject('Fem::FemResultObjectPython', name) + """makeResultMechanical(document, [name]): + creates an mechanical result object to hold FEM results""" + obj = doc.addObject("Fem::FemResultObjectPython", name) from femobjects import _FemResultMechanical _FemResultMechanical._FemResultMechanical(obj) if FreeCAD.GuiUp: @@ -534,8 +534,8 @@ def makePostVtkFilterClipRegion( base_vtk_result, name="VtkFilterClipRegion" ): - '''makePostVtkFilterClipRegion(document, base_vtk_result, [name]): - creates an FEM post processing region clip filter object (vtk based)''' + """makePostVtkFilterClipRegion(document, base_vtk_result, [name]): + creates an FEM post processing region clip filter object (vtk based)""" obj = doc.addObject("Fem::FemPostClipFilter", name) tmp_filter_list = base_vtk_result.Filter tmp_filter_list.append(obj) @@ -549,8 +549,8 @@ def makePostVtkFilterClipScalar( base_vtk_result, name="VtkFilterClipScalar" ): - '''makePostVtkFilterClipScalar(document, base_vtk_result, [name]): - creates an FEM post processing scalar clip filter object (vtk based)''' + """makePostVtkFilterClipScalar(document, base_vtk_result, [name]): + creates an FEM post processing scalar clip filter object (vtk based)""" obj = doc.addObject("Fem::FemPostScalarClipFilter", name) tmp_filter_list = base_vtk_result.Filter tmp_filter_list.append(obj) @@ -564,8 +564,8 @@ def makePostVtkFilterCutFunction( base_vtk_result, name="VtkFilterCutFunction" ): - '''makePostVtkFilterCutFunction(document, base_vtk_result, [name]): - creates an FEM post processing cut function filter object (vtk based)''' + """makePostVtkFilterCutFunction(document, base_vtk_result, [name]): + creates an FEM post processing cut function filter object (vtk based)""" obj = doc.addObject("Fem::FemPostClipFilter", name) tmp_filter_list = base_vtk_result.Filter tmp_filter_list.append(obj) @@ -579,8 +579,8 @@ def makePostVtkFilterWarp( base_vtk_result, name="VtkFilterWarp" ): - '''makePostVtkFilterWarp(document, base_vtk_result, [name]): - creates an FEM post processing warp filter object (vtk based)''' + """makePostVtkFilterWarp(document, base_vtk_result, [name]): + creates an FEM post processing warp filter object (vtk based)""" obj = doc.addObject("Fem::FemPostWarpVectorFilter", name) tmp_filter_list = base_vtk_result.Filter tmp_filter_list.append(obj) @@ -593,8 +593,8 @@ def makePostVtkResult( doc, base_result, name="VtkResult" ): - '''makePostVtkResult(document, base_result [name]): - creates an FEM post processing result object (vtk based) to hold FEM results''' + """makePostVtkResult(document, base_result [name]): + creates an FEM post processing result object (vtk based) to hold FEM results""" obj = doc.addObject("Fem::FemPostPipeline", name) obj.load(base_result) return obj @@ -605,10 +605,10 @@ def makeEquationElasticity( doc, base_solver ): - '''makeEquationElasticity(document, base_solver): - creates a FEM elasticity equation for a solver''' + """makeEquationElasticity(document, base_solver): + creates a FEM elasticity equation for a solver""" obj = doc.SolverElmer.addObject( - doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, 'Elasticity') + doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, "Elasticity") )[0] return obj @@ -617,10 +617,10 @@ def makeEquationElectrostatic( doc, base_solver ): - '''makeEquationElectrostatic(document, base_solver): - creates a FEM electrostatic equation for a solver''' + """makeEquationElectrostatic(document, base_solver): + creates a FEM electrostatic equation for a solver""" obj = doc.SolverElmer.addObject( - doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, 'Electrostatic') + doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, "Electrostatic") )[0] return obj @@ -629,10 +629,10 @@ def makeEquationFlow( doc, base_solver ): - '''makeEquationFlow(document, base_solver): - creates a FEM flow equation for a solver''' + """makeEquationFlow(document, base_solver): + creates a FEM flow equation for a solver""" obj = doc.SolverElmer.addObject( - doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, 'Flow') + doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, "Flow") )[0] return obj @@ -641,10 +641,10 @@ def makeEquationFluxsolver( doc, base_solver ): - '''makeEquationFluxsolver(document, base_solver): - creates a FEM fluxsolver equation for a solver''' + """makeEquationFluxsolver(document, base_solver): + creates a FEM fluxsolver equation for a solver""" obj = doc.SolverElmer.addObject( - doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, 'Fluxsolver') + doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, "Fluxsolver") )[0] return obj @@ -653,10 +653,10 @@ def makeEquationHeat( doc, base_solver ): - '''makeEquationHeat(document, base_solver): - creates a FEM heat equation for a solver''' + """makeEquationHeat(document, base_solver): + creates a FEM heat equation for a solver""" obj = doc.SolverElmer.addObject( - doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, 'Heat') + doc.SolverElmer.Proxy.createEquation(doc.SolverElmer.Document, "Heat") )[0] return obj @@ -665,8 +665,8 @@ def makeSolverCalculixCcxTools( doc, name="CalculiXccxTools" ): - '''makeSolverCalculixCcxTools(document, [name]): - makes a Calculix solver object for the ccx tools module''' + """makeSolverCalculixCcxTools(document, [name]): + makes a Calculix solver object for the ccx tools module""" obj = doc.addObject("Fem::FemSolverObjectPython", name) from femobjects import _FemSolverCalculix _FemSolverCalculix._FemSolverCalculix(obj) @@ -680,8 +680,8 @@ def makeSolverCalculix( doc, name="SolverCalculiX" ): - '''makeSolverCalculix(document, [name]): - makes a Calculix solver object''' + """makeSolverCalculix(document, [name]): + makes a Calculix solver object""" import femsolver.calculix.solver obj = femsolver.calculix.solver.create(doc, name) return obj @@ -691,8 +691,8 @@ def makeSolverElmer( doc, name="SolverElmer" ): - '''makeSolverElmer(document, [name]): - makes a Elmer solver object''' + """makeSolverElmer(document, [name]): + makes a Elmer solver object""" import femsolver.elmer.solver obj = femsolver.elmer.solver.create(doc, name) return obj @@ -702,21 +702,21 @@ def makeSolverZ88( doc, name="SolverZ88" ): - '''makeSolverZ88(document, [name]): - makes a Z88 solver object''' + """makeSolverZ88(document, [name]): + makes a Z88 solver object""" import femsolver.z88.solver obj = femsolver.z88.solver.create(doc, name) return obj -''' +""" # get the supportedTypes App.newDocument() -module = 'Fem' -FreeCADGui.doCommand('import ' + module) +module = "Fem" +FreeCADGui.doCommand("import " + module) for s in sorted(App.ActiveDocument.supportedTypes()): if s.startswith(module): print(s) -''' +""" ## @} diff --git a/src/Mod/Fem/TestFem.py b/src/Mod/Fem/TestFem.py index e110cf37d6..524ebec7ec 100644 --- a/src/Mod/Fem/TestFem.py +++ b/src/Mod/Fem/TestFem.py @@ -58,7 +58,7 @@ False if TestSolverFrameWork.__name__ else True # in tearDown method to not close the document -''' +""" # examples from within FreeCAD: # all FEM tests import Test, TestFem @@ -277,4 +277,4 @@ doc = FreeCAD.open(app_home + 'data/examples/FemCalculixCantilever3D_newSolver.F doc = FreeCAD.open(app_home + 'data/examples/Fem.FCStd') doc = FreeCAD.open(app_home + 'data/examples/Fem2.FCStd') -''' +""" diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 79c2ec6415..1b89afcf0c 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -35,18 +35,18 @@ class _Analysis(CommandManager): def __init__(self): super(_Analysis, self).__init__() self.resources = { - 'Pixmap': 'fem-analysis', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-analysis", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_Analysis", "Analysis container" ), - 'Accel': "N, A", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "N, A", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_Analysis", "Creates an analysis container with standard solver CalculiX" ) } - self.is_active = 'with_document' + self.is_active = "with_document" def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create Analysis") @@ -68,18 +68,18 @@ class _ClippingPlaneAdd(CommandManager): def __init__(self): super(_ClippingPlaneAdd, self).__init__() self.resources = { - 'Pixmap': 'fem-clipping-plane-add', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-clipping-plane-add", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ClippingPlaneAdd", "Clipping plane on face" ), - # 'Accel': "Z, Z", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + # "Accel": "Z, Z", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ClippingPlaneAdd", "Add a clipping plane on a selected face" ) } - self.is_active = 'with_document' + self.is_active = "with_document" def Activated(self): from femtools import femutils @@ -120,23 +120,23 @@ class _ClippingPlaneRemoveAll(CommandManager): def __init__(self): super(_ClippingPlaneRemoveAll, self).__init__() self.resources = { - 'Pixmap': 'fem-clipping-plane-remove-all', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-clipping-plane-remove-all", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ClippingPlaneRemoveAll", "Remove all clipping planes" ), - # 'Accel': "Z, Z", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + # "Accel": "Z, Z", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ClippingPlaneRemoveAll", "Remove all clipping planes" ) } - self.is_active = 'with_document' + self.is_active = "with_document" def Activated(self): - line1 = 'for node in list(sg.getChildren()):\n' - line2 = ' if isinstance(node, coin.SoClipPlane):\n' - line3 = ' sg.removeChild(node)' + line1 = "for node in list(sg.getChildren()):\n" + line2 = " if isinstance(node, coin.SoClipPlane):\n" + line3 = " sg.removeChild(node)" FreeCADGui.doCommand("from pivy import coin") FreeCADGui.doCommand("sg = Gui.ActiveDocument.ActiveView.getSceneGraph()") FreeCADGui.doCommand("nodes = sg.getChildren()") @@ -148,14 +148,14 @@ class _ConstraintBodyHeatSource(CommandManager): def __init__(self): super(_ConstraintBodyHeatSource, self).__init__() self.resources = { - 'Pixmap': 'fem-constraint-heatflux', # the heatflux icon is used - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-constraint-heatflux", # the heatflux icon is used + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintBodyHeatSource", "Constraint body heat source"), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintBodyHeatSource", "Creates a FEM constraint body heat source")} - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_noset_edit(self.__class__.__name__.lstrip("_")) @@ -166,14 +166,14 @@ class _ConstraintElectrostaticPotential(CommandManager): def __init__(self): super(_ConstraintElectrostaticPotential, self).__init__() self.resources = { - 'Pixmap': 'fem-constraint-electrostatic-potential', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-constraint-electrostatic-potential", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintElectrostaticPotential", "Constraint electrostatic potential"), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintElectrostaticPotential", "Creates a FEM constraint electrostatic potential")} - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -184,14 +184,14 @@ class _ConstraintFlowVelocity(CommandManager): def __init__(self): super(_ConstraintFlowVelocity, self).__init__() self.resources = { - 'Pixmap': 'fem-constraint-flow-velocity', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-constraint-flow-velocity", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintFlowVelocity", "Constraint flow velocity"), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintFlowVelocity", "Creates a FEM constraint flow velocity")} - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -202,14 +202,14 @@ class _ConstraintInitialFlowVelocity(CommandManager): def __init__(self): super(_ConstraintInitialFlowVelocity, self).__init__() self.resources = { - 'Pixmap': 'fem-constraint-initial-flow-velocity', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-constraint-initial-flow-velocity", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialFlowVelocity", "Constraint initial flow velocity"), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialFlowVelocity", "Creates a FEM constraint initial flow velocity")} - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -220,18 +220,18 @@ class _ConstraintSelfWeight(CommandManager): def __init__(self): super(_ConstraintSelfWeight, self).__init__() self.resources = { - 'Pixmap': 'fem-constraint-selfweight', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-constraint-selfweight", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintSelfWeight", "Constraint self weight" ), - 'Accel': "C, W", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "C, W", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ConstraintSelfWeight", "Creates a FEM constraint self weight" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_noset_edit(self.__class__.__name__.lstrip("_")) @@ -242,18 +242,18 @@ class _ElementFluid1D(CommandManager): def __init__(self): super(_ElementFluid1D, self).__init__() self.resources = { - 'Pixmap': 'fem-element-fluid-1d', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-element-fluid-1d", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementFluid1D", "Fluid section for 1D flow" ), - 'Accel': "C, B", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "C, B", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementFluid1D", "Creates a FEM fluid section for 1D flow" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -264,18 +264,18 @@ class _ElementGeometry1D(CommandManager): def __init__(self): super(_ElementGeometry1D, self).__init__() self.resources = { - 'Pixmap': 'fem-element-geometry-1d', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-element-geometry-1d", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementGeometry1D", "Beam cross section" ), - 'Accel': "C, B", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "C, B", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementGeometry1D", "Creates a FEM beam cross section" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -286,18 +286,18 @@ class _ElementGeometry2D(CommandManager): def __init__(self): super(_ElementGeometry2D, self).__init__() self.resources = { - 'Pixmap': 'fem-element-geometry-2d', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-element-geometry-2d", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementGeometry2D", "Shell plate thickness" ), - 'Accel': "C, S", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "C, S", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementGeometry2D", "Creates a FEM shell plate thickness" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -308,18 +308,18 @@ class _ElementRotation1D(CommandManager): def __init__(self): super(_ElementRotation1D, self).__init__() self.resources = { - 'Pixmap': 'fem-element-rotation-1d', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-element-rotation-1d", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementRotation1D", "Beam rotation" ), - 'Accel': "C, R", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "C, R", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ElementRotation1D", "Creates a FEM beam rotation" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_noset_edit(self.__class__.__name__.lstrip("_")) @@ -330,17 +330,17 @@ class _EquationElectrostatic(CommandManager): def __init__(self): super(_EquationElectrostatic, self).__init__() self.resources = { - 'Pixmap': 'fem-equation-electrostatic', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-equation-electrostatic", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationElectrostatic", "Electrostatic equation" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationElectrostatic", "Creates a FEM equation for electrostatic" ) } - self.is_active = 'with_solver_elmer' + self.is_active = "with_solver_elmer" def Activated(self): self.add_obj_on_gui_selobj_noset_edit(self.__class__.__name__.lstrip("_")) @@ -351,16 +351,16 @@ class _EquationElasticity(CommandManager): def __init__(self): super(_EquationElasticity, self).__init__() self.resources = { - 'Pixmap': 'fem-equation-elasticity', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-equation-elasticity", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationElasticity", "Elasticity equation"), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationElasticity", "Creates a FEM equation for elasticity" ) } - self.is_active = 'with_solver_elmer' + self.is_active = "with_solver_elmer" def Activated(self): self.add_obj_on_gui_selobj_noset_edit(self.__class__.__name__.lstrip("_")) @@ -371,17 +371,17 @@ class _EquationFlow(CommandManager): def __init__(self): super(_EquationFlow, self).__init__() self.resources = { - 'Pixmap': 'fem-equation-flow', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-equation-flow", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationFlow", "Flow equation" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationFlow", "Creates a FEM equation for flow" ) } - self.is_active = 'with_solver_elmer' + self.is_active = "with_solver_elmer" def Activated(self): self.add_obj_on_gui_selobj_noset_edit(self.__class__.__name__.lstrip("_")) @@ -392,17 +392,17 @@ class _EquationFluxsolver(CommandManager): def __init__(self): super(_EquationFluxsolver, self).__init__() self.resources = { - 'Pixmap': 'fem-equation-fluxsolver', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-equation-fluxsolver", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationFluxsolver", "Fluxsolver equation" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationFluxsolver", "Creates a FEM equation for fluxsolver" ) } - self.is_active = 'with_solver_elmer' + self.is_active = "with_solver_elmer" def Activated(self): self.add_obj_on_gui_selobj_noset_edit(self.__class__.__name__.lstrip("_")) @@ -413,17 +413,17 @@ class _EquationHeat(CommandManager): def __init__(self): super(_EquationHeat, self).__init__() self.resources = { - 'Pixmap': 'fem-equation-heat', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-equation-heat", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationHeat", "Fluxsolver heat" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_EquationHeat", "Creates a FEM equation for heat" ) } - self.is_active = 'with_solver_elmer' + self.is_active = "with_solver_elmer" def Activated(self): self.add_obj_on_gui_selobj_noset_edit(self.__class__.__name__.lstrip("_")) @@ -434,18 +434,18 @@ class _MaterialEditor(CommandManager): def __init__(self): super(_MaterialEditor, self).__init__() self.resources = { - 'Pixmap': 'Arch_Material_Group', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "Arch_Material_Group", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "Material_Editor", "Material editor" ), - # 'Accel': "Z, Z", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + # "Accel": "Z, Z", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "Material_Editor", "Opens the FreeCAD material editor" ) } - self.is_active = 'allways' + self.is_active = "allways" def Activated(self): FreeCADGui.addModule("MaterialEditor") @@ -457,18 +457,18 @@ class _MaterialFluid(CommandManager): def __init__(self): super(_MaterialFluid, self).__init__() self.resources = { - 'Pixmap': 'fem-material-fluid', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-material-fluid", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialFluid", "Material for fluid" ), - 'Accel': "M, M", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "M, M", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialFluid", "Creates a FEM material for fluid" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -479,18 +479,18 @@ class _MaterialMechanicalNonlinear(CommandManager): def __init__(self): super(_MaterialMechanicalNonlinear, self).__init__() self.resources = { - 'Pixmap': 'fem-material-nonlinear', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-material-nonlinear", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialMechanicalNonlinear", "Nonlinear mechanical material" ), - 'Accel': "C, W", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "C, W", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialMechanicalNonlinear", "Creates a nonlinear mechanical material" ) } - self.is_active = 'with_material_solid_which_has_no_nonlinear_material' + self.is_active = "with_material_solid_which_has_no_nonlinear_material" def Activated(self): string_lin_mat_obj = "FreeCAD.ActiveDocument.getObject('" + self.selobj.Name + "')" @@ -509,7 +509,7 @@ class _MaterialMechanicalNonlinear(CommandManager): # https://forum.freecadweb.org/viewtopic.php?f=18&t=23101&p=180489#p180489 solver_object = None for m in self.active_analysis.Group: - if m.isDerivedFrom('Fem::FemSolverObjectPython'): + if m.isDerivedFrom("Fem::FemSolverObjectPython"): if not solver_object: solver_object = m else: @@ -522,11 +522,11 @@ class _MaterialMechanicalNonlinear(CommandManager): if solver_object \ and hasattr(solver_object, "Proxy") \ and ( - solver_object.Proxy.Type == 'Fem::FemSolverCalculixCcxTools' - or solver_object.Proxy.Type == 'Fem::FemSolverObjectCalculix' + solver_object.Proxy.Type == "Fem::FemSolverCalculixCcxTools" + or solver_object.Proxy.Type == "Fem::FemSolverObjectCalculix" ): print( - 'Set MaterialNonlinearity and GeometricalNonlinearity to nonlinear for {}' + "Set MaterialNonlinearity and GeometricalNonlinearity to nonlinear for {}" .format(solver_object.Label) ) solver_object.MaterialNonlinearity = "nonlinear" @@ -540,18 +540,18 @@ class _MaterialReinforced(CommandManager): def __init__(self): super(_MaterialReinforced, self).__init__() self.resources = { - 'Pixmap': 'fem-material-reinforced', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-material-reinforced", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialReinforced", "Reinforced material (concrete)" ), - 'Accel': "M, M", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "M, M", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialReinforced", "Creates a material for reinforced matrix material such as concrete" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -562,18 +562,18 @@ class _MaterialSolid(CommandManager): def __init__(self): super(_MaterialSolid, self).__init__() self.resources = { - 'Pixmap': 'fem-material', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-material", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialSolid", "Material for solid" ), - 'Accel': "M, M", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "M, M", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MaterialSolid", "Creates a FEM material for solid" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_set_edit(self.__class__.__name__.lstrip("_")) @@ -584,17 +584,17 @@ class _Mesh2Mesh(CommandManager): def __init__(self): super(_Mesh2Mesh, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-to-mesh', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-to-mesh", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_FEMMesh2Mesh", "FEM mesh to mesh" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_FEMMesh2Mesh", "Convert the surface of a FEM mesh to a mesh" ) } - self.is_active = 'with_femmesh_andor_res' + self.is_active = "with_femmesh_andor_res" def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create Mesh from FEMMesh") @@ -633,18 +633,18 @@ class _MeshBoundaryLayer(CommandManager): def __init__(self): super(_MeshBoundaryLayer, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-boundary-layer', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-boundary-layer", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshBoundaryLayer", "FEM mesh boundary layer" ), - 'Accel': "M, B", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "M, B", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshBoundaryLayer", "Creates a FEM mesh boundary layer" ) } - self.is_active = 'with_gmsh_femmesh' + self.is_active = "with_gmsh_femmesh" def Activated(self): self.add_obj_on_gui_selobj_set_edit(self.__class__.__name__.lstrip("_")) @@ -655,17 +655,17 @@ class _MeshClear(CommandManager): def __init__(self): super(_MeshClear, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-clear-mesh', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-clear-mesh", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshClear", "Clear FEM mesh"), - # 'Accel': "Z, Z", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + # "Accel": "Z, Z", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshClear", "Clear the Mesh of a FEM mesh object" ) } - self.is_active = 'with_femmesh' + self.is_active = "with_femmesh" def Activated(self): FreeCAD.ActiveDocument.openTransaction("Clear FEM mesh") @@ -682,18 +682,18 @@ class _MeshDisplayInfo(CommandManager): def __init__(self): super(_MeshDisplayInfo, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-print-info', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-print-info", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshDisplayInfo", "Display FEM mesh info" ), - # 'Accel': "Z, Z", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + # "Accel": "Z, Z", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshDisplayInfo", "Display FEM mesh info" ) } - self.is_active = 'with_femmesh' + self.is_active = "with_femmesh" def Activated(self): FreeCAD.ActiveDocument.openTransaction("Display FEM mesh info") @@ -714,23 +714,23 @@ class _MeshGmshFromShape(CommandManager): def __init__(self): super(_MeshGmshFromShape, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-gmsh-from-shape', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-gmsh-from-shape", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshGmshFromShape", "FEM mesh from shape by Gmsh" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshGmshFromShape", "Create a FEM mesh from a shape by Gmsh mesher" ) } - self.is_active = 'with_part_feature' + self.is_active = "with_part_feature" def Activated(self): # a mesh could be made with and without an analysis, # we're going to check not for an analysis in command manager module FreeCAD.ActiveDocument.openTransaction("Create FEM mesh by Gmsh") - mesh_obj_name = 'FEMMeshGmsh' + mesh_obj_name = "FEMMeshGmsh" # if requested by some people add Preference for this # mesh_obj_name = self.selobj.Name + "_Mesh" FreeCADGui.addModule("ObjectsFem") @@ -761,18 +761,18 @@ class _MeshGroup(CommandManager): def __init__(self): super(_MeshGroup, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-from-shape', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-from-shape", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshGroup", "FEM mesh group" ), - 'Accel': "M, G", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "M, G", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshGroup", "Creates a FEM mesh group" ) } - self.is_active = 'with_gmsh_femmesh' + self.is_active = "with_gmsh_femmesh" def Activated(self): self.add_obj_on_gui_selobj_set_edit(self.__class__.__name__.lstrip("_")) @@ -783,23 +783,23 @@ class _MeshNetgenFromShape(CommandManager): def __init__(self): super(_MeshNetgenFromShape, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-netgen-from-shape', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-netgen-from-shape", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshNetgenFromShape", "FEM mesh from shape by Netgen" ), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshNetgenFromShape", "Create a FEM volume mesh from a solid or face shape by Netgen internal mesher" ) } - self.is_active = 'with_part_feature' + self.is_active = "with_part_feature" def Activated(self): # a mesh could be made with and without an analysis, # we're going to check not for an analysis in command manager module FreeCAD.ActiveDocument.openTransaction("Create FEM mesh Netgen") - mesh_obj_name = 'FEMMeshNetgen' + mesh_obj_name = "FEMMeshNetgen" # if requested by some people add Preference for this # mesh_obj_name = sel[0].Name + "_Mesh" FreeCADGui.addModule("ObjectsFem") @@ -830,18 +830,18 @@ class _MeshRegion(CommandManager): def __init__(self): super(_MeshRegion, self).__init__() self.resources = { - 'Pixmap': 'fem-femmesh-region', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-femmesh-region", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshRegion", "FEM mesh region" ), - 'Accel': "M, R", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "M, R", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_MeshRegion", "Creates a FEM mesh region" ) } - self.is_active = 'with_gmsh_femmesh' + self.is_active = "with_gmsh_femmesh" def Activated(self): self.add_obj_on_gui_selobj_set_edit(self.__class__.__name__.lstrip("_")) @@ -852,18 +852,18 @@ class _ResultShow(CommandManager): def __init__(self): super(_ResultShow, self).__init__() self.resources = { - 'Pixmap': 'fem-post-result-show', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-post-result-show", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ResultShow", "Show result" ), - 'Accel': "S, R", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, R", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ResultShow", "Shows and visualizes selected result data" ) } - self.is_active = 'with_selresult' + self.is_active = "with_selresult" def Activated(self): self.selobj.ViewObject.Document.setEdit(self.selobj.ViewObject, 0) @@ -874,18 +874,18 @@ class _ResultsPurge(CommandManager): def __init__(self): super(_ResultsPurge, self).__init__() self.resources = { - 'Pixmap': 'fem-post-results-purge', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-post-results-purge", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_ResultsPurge", "Purge results" ), - 'Accel': "S, S", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, S", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_ResultsPurge", "Purges all results from active analysis" ) } - self.is_active = 'with_results' + self.is_active = "with_results" def Activated(self): import femresult.resulttools as resulttools @@ -897,18 +897,18 @@ class _SolverCxxtools(CommandManager): def __init__(self): super(_SolverCxxtools, self).__init__() self.resources = { - 'Pixmap': 'fem-solver-standard', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-solver-standard", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverCalculix", "Solver CalculiX Standard" ), - 'Accel': "S, X", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, X", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverCalculix", "Creates a standard FEM solver CalculiX with ccx tools" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): has_nonlinear_material_obj = False @@ -939,17 +939,17 @@ class _SolverCalculix(CommandManager): def __init__(self): super(_SolverCalculix, self).__init__() self.resources = { - 'Pixmap': 'fem-solver-standard', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-solver-standard", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverCalculiX", "Solver CalculiX (experimental)" ), - 'Accel': "S, C", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, C", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverCalculiX", "Creates a FEM solver CalculiX (experimental)" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_noset_edit(self.__class__.__name__.lstrip("_")) @@ -960,18 +960,18 @@ class _SolverControl(CommandManager): def __init__(self): super(_SolverControl, self).__init__() self.resources = { - 'Pixmap': 'fem-solver-control', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-solver-control", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverControl", "Solver job control" ), - 'Accel': "S, C", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, C", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverControl", "Changes solver attributes and runs the calculations for the selected solver" ) } - self.is_active = 'with_solver' + self.is_active = "with_solver" def Activated(self): FreeCADGui.ActiveDocument.setEdit(self.selobj, 0) @@ -982,18 +982,18 @@ class _SolverElmer(CommandManager): def __init__(self): super(_SolverElmer, self).__init__() self.resources = { - 'Pixmap': 'fem-solver-elmer', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-solver-elmer", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverElmer", "Solver Elmer" ), - 'Accel': "S, E", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, E", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverElmer", "Creates a FEM solver Elmer" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_noset_edit(self.__class__.__name__.lstrip("_")) @@ -1004,18 +1004,18 @@ class _SolverRun(CommandManager): def __init__(self): super(_SolverRun, self).__init__() self.resources = { - 'Pixmap': 'fem-solver-run', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-solver-run", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverRun", "Run solver calculations" ), - 'Accel': "R, C", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "R, C", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverRun", "Runs the calculations for the selected solver" ) } - self.is_active = 'with_solver' + self.is_active = "with_solver" def Activated(self): from femsolver.run import run_fem_solver @@ -1029,18 +1029,18 @@ class _SolverZ88(CommandManager): def __init__(self): super(_SolverZ88, self).__init__() self.resources = { - 'Pixmap': 'fem-solver-standard', - 'MenuText': QtCore.QT_TRANSLATE_NOOP( + "Pixmap": "fem-solver-standard", + "MenuText": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverZ88", "Solver Z88" ), - 'Accel': "S, Z", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP( + "Accel": "S, Z", + "ToolTip": QtCore.QT_TRANSLATE_NOOP( "FEM_SolverZ88", "Creates a FEM solver Z88" ) } - self.is_active = 'with_analysis' + self.is_active = "with_analysis" def Activated(self): self.add_obj_on_gui_noset_edit(self.__class__.__name__.lstrip("_")) @@ -1048,154 +1048,154 @@ class _SolverZ88(CommandManager): # the string in add command will be the page name on FreeCAD wiki FreeCADGui.addCommand( - 'FEM_Analysis', + "FEM_Analysis", _Analysis() ) FreeCADGui.addCommand( - 'FEM_ClippingPlaneAdd', + "FEM_ClippingPlaneAdd", _ClippingPlaneAdd() ) FreeCADGui.addCommand( - 'FEM_ClippingPlaneRemoveAll', + "FEM_ClippingPlaneRemoveAll", _ClippingPlaneRemoveAll() ) FreeCADGui.addCommand( - 'FEM_ConstraintBodyHeatSource', + "FEM_ConstraintBodyHeatSource", _ConstraintBodyHeatSource() ) FreeCADGui.addCommand( - 'FEM_ConstraintElectrostaticPotential', + "FEM_ConstraintElectrostaticPotential", _ConstraintElectrostaticPotential() ) FreeCADGui.addCommand( - 'FEM_ConstraintFlowVelocity', + "FEM_ConstraintFlowVelocity", _ConstraintFlowVelocity() ) FreeCADGui.addCommand( - 'FEM_ConstraintInitialFlowVelocity', + "FEM_ConstraintInitialFlowVelocity", _ConstraintInitialFlowVelocity() ) FreeCADGui.addCommand( - 'FEM_ConstraintSelfWeight', + "FEM_ConstraintSelfWeight", _ConstraintSelfWeight() ) FreeCADGui.addCommand( - 'FEM_ElementFluid1D', + "FEM_ElementFluid1D", _ElementFluid1D() ) FreeCADGui.addCommand( - 'FEM_ElementGeometry1D', + "FEM_ElementGeometry1D", _ElementGeometry1D() ) FreeCADGui.addCommand( - 'FEM_ElementGeometry2D', + "FEM_ElementGeometry2D", _ElementGeometry2D() ) FreeCADGui.addCommand( - 'FEM_ElementRotation1D', + "FEM_ElementRotation1D", _ElementRotation1D() ) FreeCADGui.addCommand( - 'FEM_EquationElectrostatic', + "FEM_EquationElectrostatic", _EquationElectrostatic() ) FreeCADGui.addCommand( - 'FEM_EquationElasticity', + "FEM_EquationElasticity", _EquationElasticity() ) FreeCADGui.addCommand( - 'FEM_EquationFlow', + "FEM_EquationFlow", _EquationFlow() ) FreeCADGui.addCommand( - 'FEM_EquationFluxsolver', + "FEM_EquationFluxsolver", _EquationFluxsolver() ) FreeCADGui.addCommand( - 'FEM_EquationHeat', + "FEM_EquationHeat", _EquationHeat() ) FreeCADGui.addCommand( - 'FEM_MaterialEditor', + "FEM_MaterialEditor", _MaterialEditor() ) FreeCADGui.addCommand( - 'FEM_MaterialFluid', + "FEM_MaterialFluid", _MaterialFluid() ) FreeCADGui.addCommand( - 'FEM_MaterialMechanicalNonlinear', + "FEM_MaterialMechanicalNonlinear", _MaterialMechanicalNonlinear() ) FreeCADGui.addCommand( - 'FEM_MaterialReinforced', + "FEM_MaterialReinforced", _MaterialReinforced() ) FreeCADGui.addCommand( - 'FEM_MaterialSolid', + "FEM_MaterialSolid", _MaterialSolid() ) FreeCADGui.addCommand( - 'FEM_FEMMesh2Mesh', + "FEM_FEMMesh2Mesh", _Mesh2Mesh() ) FreeCADGui.addCommand( - 'FEM_MeshBoundaryLayer', + "FEM_MeshBoundaryLayer", _MeshBoundaryLayer() ) FreeCADGui.addCommand( - 'FEM_MeshClear', + "FEM_MeshClear", _MeshClear() ) FreeCADGui.addCommand( - 'FEM_MeshDisplayInfo', + "FEM_MeshDisplayInfo", _MeshDisplayInfo() ) FreeCADGui.addCommand( - 'FEM_MeshGmshFromShape', + "FEM_MeshGmshFromShape", _MeshGmshFromShape() ) FreeCADGui.addCommand( - 'FEM_MeshGroup', + "FEM_MeshGroup", _MeshGroup() ) FreeCADGui.addCommand( - 'FEM_MeshNetgenFromShape', + "FEM_MeshNetgenFromShape", _MeshNetgenFromShape() ) FreeCADGui.addCommand( - 'FEM_MeshRegion', + "FEM_MeshRegion", _MeshRegion() ) FreeCADGui.addCommand( - 'FEM_ResultShow', + "FEM_ResultShow", _ResultShow() ) FreeCADGui.addCommand( - 'FEM_ResultsPurge', + "FEM_ResultsPurge", _ResultsPurge() ) FreeCADGui.addCommand( - 'FEM_SolverCalculixCxxtools', + "FEM_SolverCalculixCxxtools", _SolverCxxtools() ) FreeCADGui.addCommand( - 'FEM_SolverCalculiX', + "FEM_SolverCalculiX", _SolverCalculix() ) FreeCADGui.addCommand( - 'FEM_SolverControl', + "FEM_SolverControl", _SolverControl() ) FreeCADGui.addCommand( - 'FEM_SolverElmer', + "FEM_SolverElmer", _SolverElmer() ) FreeCADGui.addCommand( - 'FEM_SolverRun', + "FEM_SolverRun", _SolverRun() ) FreeCADGui.addCommand( - 'FEM_SolverZ88', + "FEM_SolverZ88", _SolverZ88() ) diff --git a/src/Mod/Fem/femcommands/manager.py b/src/Mod/Fem/femcommands/manager.py index ada698b121..53aeb7f1ea 100644 --- a/src/Mod/Fem/femcommands/manager.py +++ b/src/Mod/Fem/femcommands/manager.py @@ -39,10 +39,10 @@ if FreeCAD.GuiUp: class CommandManager(object): def __init__(self): self.resources = { - 'Pixmap': 'FemWorkbench', - 'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command MenuText"), - 'Accel': "", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command ToolTip") + "Pixmap": "FemWorkbench", + "MenuText": QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command MenuText"), + "Accel": "", + "ToolTip": QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command ToolTip") } # FIXME add option description self.is_active = None @@ -56,51 +56,51 @@ class CommandManager(object): def IsActive(self): if not self.is_active: active = False - elif self.is_active == 'allways': + elif self.is_active == "allways": active = True - elif self.is_active == 'with_document': + elif self.is_active == "with_document": active = FreeCADGui.ActiveDocument is not None - elif self.is_active == 'with_analysis': + elif self.is_active == "with_analysis": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() - elif self.is_active == 'with_results': + elif self.is_active == "with_results": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and (self.results_present() or self.result_mesh_present()) - elif self.is_active == 'with_selresult': + elif self.is_active == "with_selresult": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and self.result_selected() - elif self.is_active == 'with_part_feature': + elif self.is_active == "with_part_feature": active = FreeCADGui.ActiveDocument is not None \ and self.part_feature_selected() - elif self.is_active == 'with_femmesh': + elif self.is_active == "with_femmesh": active = FreeCADGui.ActiveDocument is not None \ and self.femmesh_selected() - elif self.is_active == 'with_gmsh_femmesh': + elif self.is_active == "with_gmsh_femmesh": active = FreeCADGui.ActiveDocument is not None \ and self.gmsh_femmesh_selected() - elif self.is_active == 'with_femmesh_andor_res': + elif self.is_active == "with_femmesh_andor_res": active = FreeCADGui.ActiveDocument is not None \ and self.with_femmesh_andor_res_selected() - elif self.is_active == 'with_material': + elif self.is_active == "with_material": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and self.material_selected() - elif self.is_active == 'with_material_solid_which_has_no_nonlinear_material': + elif self.is_active == "with_material_solid_which_has_no_nonlinear_material": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and self.material_solid_selected() \ and self.has_no_nonlinear_material() - elif self.is_active == 'with_solver': + elif self.is_active == "with_solver": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and self.solver_selected() - elif self.is_active == 'with_solver_elmer': + elif self.is_active == "with_solver_elmer": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and self.solver_elmer_selected() - elif self.is_active == 'with_analysis_without_solver': + elif self.is_active == "with_analysis_without_solver": active = FemGui.getActiveAnalysis() is not None \ and self.active_analysis_in_active_doc() \ and not self.analysis_has_solver() @@ -110,7 +110,7 @@ class CommandManager(object): results = False analysis_members = FemGui.getActiveAnalysis().Group for o in analysis_members: - if o.isDerivedFrom('Fem::FemResultObject'): + if o.isDerivedFrom("Fem::FemResultObject"): results = True return results @@ -118,7 +118,7 @@ class CommandManager(object): result_mesh = False analysis_members = FemGui.getActiveAnalysis().Group for o in analysis_members: - if femutils.is_of_type(o, 'Fem::FemMeshResult'): + if femutils.is_of_type(o, "Fem::FemMeshResult"): result_mesh = True return result_mesh @@ -183,8 +183,8 @@ class CommandManager(object): and o.Proxy.Type == "Fem::MaterialMechanicalNonlinear" \ and o.LinearBaseMaterial == self.selobj: FreeCAD.Console.PrintError( - '{} is based on the selected material: {}. ' - 'Only one nonlinear object for each material allowed.\n' + "{} is based on the selected material: {}. " + "Only one nonlinear object for each material allowed.\n" .format(o.Name, self.selobj) ) return False From 3970ba04ded0fa87646330c3802f42dbe62361e4 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 16 Aug 2019 08:04:00 +0200 Subject: [PATCH 37/39] FEM: code formating, commands, some new lines --- src/Mod/Fem/femcommands/commands.py | 39 +++++++++++++++++++++++++++++ src/Mod/Fem/femcommands/manager.py | 2 ++ 2 files changed, 41 insertions(+) diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 1b89afcf0c..7898f8a978 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -30,8 +30,10 @@ from PySide import QtCore # Python command definitions # for C++ command definitions see src/Mod/Fem/Command.cpp + class _Analysis(CommandManager): "The FEM_Analysis command definition" + def __init__(self): super(_Analysis, self).__init__() self.resources = { @@ -65,6 +67,7 @@ class _Analysis(CommandManager): class _ClippingPlaneAdd(CommandManager): "The FEM_ClippingPlaneAdd command definition" + def __init__(self): super(_ClippingPlaneAdd, self).__init__() self.resources = { @@ -117,6 +120,7 @@ class _ClippingPlaneAdd(CommandManager): class _ClippingPlaneRemoveAll(CommandManager): "The FEM_ClippingPlaneemoveAll command definition" + def __init__(self): super(_ClippingPlaneRemoveAll, self).__init__() self.resources = { @@ -145,6 +149,7 @@ class _ClippingPlaneRemoveAll(CommandManager): class _ConstraintBodyHeatSource(CommandManager): "The FEM_ConstraintBodyHeatSource command definition" + def __init__(self): super(_ConstraintBodyHeatSource, self).__init__() self.resources = { @@ -163,6 +168,7 @@ class _ConstraintBodyHeatSource(CommandManager): class _ConstraintElectrostaticPotential(CommandManager): "The FEM_ConstraintElectrostaticPotential command definition" + def __init__(self): super(_ConstraintElectrostaticPotential, self).__init__() self.resources = { @@ -181,6 +187,7 @@ class _ConstraintElectrostaticPotential(CommandManager): class _ConstraintFlowVelocity(CommandManager): "The FEM_ConstraintFlowVelocity command definition" + def __init__(self): super(_ConstraintFlowVelocity, self).__init__() self.resources = { @@ -199,6 +206,7 @@ class _ConstraintFlowVelocity(CommandManager): class _ConstraintInitialFlowVelocity(CommandManager): "The FEM_ConstraintInitialFlowVelocity command definition" + def __init__(self): super(_ConstraintInitialFlowVelocity, self).__init__() self.resources = { @@ -217,6 +225,7 @@ class _ConstraintInitialFlowVelocity(CommandManager): class _ConstraintSelfWeight(CommandManager): "The FEM_ConstraintSelfWeight command definition" + def __init__(self): super(_ConstraintSelfWeight, self).__init__() self.resources = { @@ -239,6 +248,7 @@ class _ConstraintSelfWeight(CommandManager): class _ElementFluid1D(CommandManager): "The FEM_ElementFluid1D command definition" + def __init__(self): super(_ElementFluid1D, self).__init__() self.resources = { @@ -261,6 +271,7 @@ class _ElementFluid1D(CommandManager): class _ElementGeometry1D(CommandManager): "The Fem_ElementGeometry1D command definition" + def __init__(self): super(_ElementGeometry1D, self).__init__() self.resources = { @@ -283,6 +294,7 @@ class _ElementGeometry1D(CommandManager): class _ElementGeometry2D(CommandManager): "The FEM_ElementGeometry2D command definition" + def __init__(self): super(_ElementGeometry2D, self).__init__() self.resources = { @@ -305,6 +317,7 @@ class _ElementGeometry2D(CommandManager): class _ElementRotation1D(CommandManager): "The Fem_ElementRotation1D command definition" + def __init__(self): super(_ElementRotation1D, self).__init__() self.resources = { @@ -327,6 +340,7 @@ class _ElementRotation1D(CommandManager): class _EquationElectrostatic(CommandManager): "The FEM_EquationElectrostatic command definition" + def __init__(self): super(_EquationElectrostatic, self).__init__() self.resources = { @@ -348,6 +362,7 @@ class _EquationElectrostatic(CommandManager): class _EquationElasticity(CommandManager): "The FEM_EquationElasticity command definition" + def __init__(self): super(_EquationElasticity, self).__init__() self.resources = { @@ -368,6 +383,7 @@ class _EquationElasticity(CommandManager): class _EquationFlow(CommandManager): "The FEM_EquationFlow command definition" + def __init__(self): super(_EquationFlow, self).__init__() self.resources = { @@ -389,6 +405,7 @@ class _EquationFlow(CommandManager): class _EquationFluxsolver(CommandManager): "The FEM_EquationFluxsolver command definition" + def __init__(self): super(_EquationFluxsolver, self).__init__() self.resources = { @@ -410,6 +427,7 @@ class _EquationFluxsolver(CommandManager): class _EquationHeat(CommandManager): "The FEM_EquationHeat command definition" + def __init__(self): super(_EquationHeat, self).__init__() self.resources = { @@ -431,6 +449,7 @@ class _EquationHeat(CommandManager): class _MaterialEditor(CommandManager): "The FEM_MaterialEditor command definition" + def __init__(self): super(_MaterialEditor, self).__init__() self.resources = { @@ -454,6 +473,7 @@ class _MaterialEditor(CommandManager): class _MaterialFluid(CommandManager): "The FEM_MaterialFluid command definition" + def __init__(self): super(_MaterialFluid, self).__init__() self.resources = { @@ -476,6 +496,7 @@ class _MaterialFluid(CommandManager): class _MaterialMechanicalNonlinear(CommandManager): "The FEM_MaterialMechanicalNonlinear command definition" + def __init__(self): super(_MaterialMechanicalNonlinear, self).__init__() self.resources = { @@ -537,6 +558,7 @@ class _MaterialMechanicalNonlinear(CommandManager): class _MaterialReinforced(CommandManager): "The FEM_MaterialReinforced command definition" + def __init__(self): super(_MaterialReinforced, self).__init__() self.resources = { @@ -559,6 +581,7 @@ class _MaterialReinforced(CommandManager): class _MaterialSolid(CommandManager): "The FEM_MaterialSolid command definition" + def __init__(self): super(_MaterialSolid, self).__init__() self.resources = { @@ -581,6 +604,7 @@ class _MaterialSolid(CommandManager): class _Mesh2Mesh(CommandManager): "The FEM_FemMesh2Mesh command definition" + def __init__(self): super(_Mesh2Mesh, self).__init__() self.resources = { @@ -630,6 +654,7 @@ class _Mesh2Mesh(CommandManager): class _MeshBoundaryLayer(CommandManager): "The FEM_MeshBoundaryLayer command definition" + def __init__(self): super(_MeshBoundaryLayer, self).__init__() self.resources = { @@ -652,6 +677,7 @@ class _MeshBoundaryLayer(CommandManager): class _MeshClear(CommandManager): "The FEM_MeshClear command definition" + def __init__(self): super(_MeshClear, self).__init__() self.resources = { @@ -679,6 +705,7 @@ class _MeshClear(CommandManager): class _MeshDisplayInfo(CommandManager): "The FEM_MeshDisplayInfo command definition" + def __init__(self): super(_MeshDisplayInfo, self).__init__() self.resources = { @@ -711,6 +738,7 @@ class _MeshDisplayInfo(CommandManager): class _MeshGmshFromShape(CommandManager): "The FEM_MeshGmshFromShape command definition" + def __init__(self): super(_MeshGmshFromShape, self).__init__() self.resources = { @@ -758,6 +786,7 @@ class _MeshGmshFromShape(CommandManager): class _MeshGroup(CommandManager): "The FEM_MeshGroup command definition" + def __init__(self): super(_MeshGroup, self).__init__() self.resources = { @@ -780,6 +809,7 @@ class _MeshGroup(CommandManager): class _MeshNetgenFromShape(CommandManager): "The FEM_MeshNetgenFromShape command definition" + def __init__(self): super(_MeshNetgenFromShape, self).__init__() self.resources = { @@ -827,6 +857,7 @@ class _MeshNetgenFromShape(CommandManager): class _MeshRegion(CommandManager): "The FEM_MeshRegion command definition" + def __init__(self): super(_MeshRegion, self).__init__() self.resources = { @@ -849,6 +880,7 @@ class _MeshRegion(CommandManager): class _ResultShow(CommandManager): "The FEM_ResultShow command definition" + def __init__(self): super(_ResultShow, self).__init__() self.resources = { @@ -871,6 +903,7 @@ class _ResultShow(CommandManager): class _ResultsPurge(CommandManager): "The FEM_ResultsPurge command definition" + def __init__(self): super(_ResultsPurge, self).__init__() self.resources = { @@ -894,6 +927,7 @@ class _ResultsPurge(CommandManager): class _SolverCxxtools(CommandManager): "The FEM_SolverCalculix ccx tools command definition" + def __init__(self): super(_SolverCxxtools, self).__init__() self.resources = { @@ -936,6 +970,7 @@ class _SolverCxxtools(CommandManager): class _SolverCalculix(CommandManager): "The FEM_SolverCalculix command definition" + def __init__(self): super(_SolverCalculix, self).__init__() self.resources = { @@ -957,6 +992,7 @@ class _SolverCalculix(CommandManager): class _SolverControl(CommandManager): "The FEM_SolverControl command definition" + def __init__(self): super(_SolverControl, self).__init__() self.resources = { @@ -979,6 +1015,7 @@ class _SolverControl(CommandManager): class _SolverElmer(CommandManager): "The FEM_SolverElmer command definition" + def __init__(self): super(_SolverElmer, self).__init__() self.resources = { @@ -1001,6 +1038,7 @@ class _SolverElmer(CommandManager): class _SolverRun(CommandManager): "The FEM_SolverRun command definition" + def __init__(self): super(_SolverRun, self).__init__() self.resources = { @@ -1026,6 +1064,7 @@ class _SolverRun(CommandManager): class _SolverZ88(CommandManager): "The FEM_SolverZ88 command definition" + def __init__(self): super(_SolverZ88, self).__init__() self.resources = { diff --git a/src/Mod/Fem/femcommands/manager.py b/src/Mod/Fem/femcommands/manager.py index 53aeb7f1ea..d3bbfe0d3e 100644 --- a/src/Mod/Fem/femcommands/manager.py +++ b/src/Mod/Fem/femcommands/manager.py @@ -30,6 +30,7 @@ __url__ = "http://www.freecadweb.org" import FreeCAD import femtools.femutils as femutils + if FreeCAD.GuiUp: import FreeCADGui import FemGui @@ -37,6 +38,7 @@ if FreeCAD.GuiUp: class CommandManager(object): + def __init__(self): self.resources = { "Pixmap": "FemWorkbench", From 008f9a63c585c8c65ea71c7d1a24709bfa512709 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 16 Aug 2019 08:10:38 +0200 Subject: [PATCH 38/39] FEM: code formating, command manager, fix indents --- src/Mod/Fem/femcommands/manager.py | 552 ++++++++++++++--------------- 1 file changed, 276 insertions(+), 276 deletions(-) diff --git a/src/Mod/Fem/femcommands/manager.py b/src/Mod/Fem/femcommands/manager.py index d3bbfe0d3e..ab979877ba 100644 --- a/src/Mod/Fem/femcommands/manager.py +++ b/src/Mod/Fem/femcommands/manager.py @@ -39,304 +39,304 @@ if FreeCAD.GuiUp: class CommandManager(object): - def __init__(self): - self.resources = { - "Pixmap": "FemWorkbench", - "MenuText": QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command MenuText"), - "Accel": "", - "ToolTip": QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command ToolTip") - } - # FIXME add option description - self.is_active = None - self.selobj = None - self.selobj2 = None - self.active_analysis = None + def __init__(self): + self.resources = { + "Pixmap": "FemWorkbench", + "MenuText": QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command MenuText"), + "Accel": "", + "ToolTip": QtCore.QT_TRANSLATE_NOOP("Fem_Command", "Default Fem Command ToolTip") + } + # FIXME add option description + self.is_active = None + self.selobj = None + self.selobj2 = None + self.active_analysis = None - def GetResources(self): - return self.resources + def GetResources(self): + return self.resources - def IsActive(self): - if not self.is_active: - active = False - elif self.is_active == "allways": - active = True - elif self.is_active == "with_document": - active = FreeCADGui.ActiveDocument is not None - elif self.is_active == "with_analysis": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() - elif self.is_active == "with_results": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and (self.results_present() or self.result_mesh_present()) - elif self.is_active == "with_selresult": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and self.result_selected() - elif self.is_active == "with_part_feature": - active = FreeCADGui.ActiveDocument is not None \ - and self.part_feature_selected() - elif self.is_active == "with_femmesh": - active = FreeCADGui.ActiveDocument is not None \ - and self.femmesh_selected() - elif self.is_active == "with_gmsh_femmesh": - active = FreeCADGui.ActiveDocument is not None \ - and self.gmsh_femmesh_selected() - elif self.is_active == "with_femmesh_andor_res": - active = FreeCADGui.ActiveDocument is not None \ - and self.with_femmesh_andor_res_selected() - elif self.is_active == "with_material": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and self.material_selected() - elif self.is_active == "with_material_solid_which_has_no_nonlinear_material": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and self.material_solid_selected() \ - and self.has_no_nonlinear_material() - elif self.is_active == "with_solver": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and self.solver_selected() - elif self.is_active == "with_solver_elmer": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and self.solver_elmer_selected() - elif self.is_active == "with_analysis_without_solver": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and not self.analysis_has_solver() - return active + def IsActive(self): + if not self.is_active: + active = False + elif self.is_active == "allways": + active = True + elif self.is_active == "with_document": + active = FreeCADGui.ActiveDocument is not None + elif self.is_active == "with_analysis": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() + elif self.is_active == "with_results": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and (self.results_present() or self.result_mesh_present()) + elif self.is_active == "with_selresult": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and self.result_selected() + elif self.is_active == "with_part_feature": + active = FreeCADGui.ActiveDocument is not None \ + and self.part_feature_selected() + elif self.is_active == "with_femmesh": + active = FreeCADGui.ActiveDocument is not None \ + and self.femmesh_selected() + elif self.is_active == "with_gmsh_femmesh": + active = FreeCADGui.ActiveDocument is not None \ + and self.gmsh_femmesh_selected() + elif self.is_active == "with_femmesh_andor_res": + active = FreeCADGui.ActiveDocument is not None \ + and self.with_femmesh_andor_res_selected() + elif self.is_active == "with_material": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and self.material_selected() + elif self.is_active == "with_material_solid_which_has_no_nonlinear_material": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and self.material_solid_selected() \ + and self.has_no_nonlinear_material() + elif self.is_active == "with_solver": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and self.solver_selected() + elif self.is_active == "with_solver_elmer": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and self.solver_elmer_selected() + elif self.is_active == "with_analysis_without_solver": + active = FemGui.getActiveAnalysis() is not None \ + and self.active_analysis_in_active_doc() \ + and not self.analysis_has_solver() + return active - def results_present(self): - results = False - analysis_members = FemGui.getActiveAnalysis().Group - for o in analysis_members: - if o.isDerivedFrom("Fem::FemResultObject"): - results = True - return results + def results_present(self): + results = False + analysis_members = FemGui.getActiveAnalysis().Group + for o in analysis_members: + if o.isDerivedFrom("Fem::FemResultObject"): + results = True + return results - def result_mesh_present(self): - result_mesh = False - analysis_members = FemGui.getActiveAnalysis().Group - for o in analysis_members: - if femutils.is_of_type(o, "Fem::FemMeshResult"): - result_mesh = True - return result_mesh + def result_mesh_present(self): + result_mesh = False + analysis_members = FemGui.getActiveAnalysis().Group + for o in analysis_members: + if femutils.is_of_type(o, "Fem::FemMeshResult"): + result_mesh = True + return result_mesh - def result_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemResultObject"): - for o in FemGui.getActiveAnalysis().Group: - if o == sel[0]: - self.selobj = o - return True + def result_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemResultObject"): + for o in FemGui.getActiveAnalysis().Group: + if o == sel[0]: + self.selobj = o + return True + return False + + def part_feature_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 and sel[0].isDerivedFrom("Part::Feature"): + self.selobj = sel[0] + return True + else: return False - def part_feature_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 and sel[0].isDerivedFrom("Part::Feature"): - self.selobj = sel[0] - return True - else: - return False - - def femmesh_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemMeshObject"): - self.selobj = sel[0] - return True - else: - return False - - def gmsh_femmesh_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 \ - and hasattr(sel[0], "Proxy") \ - and sel[0].Proxy.Type == "Fem::FemMeshGmsh": - self.selobj = sel[0] - return True - else: - return False - - def material_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 and sel[0].isDerivedFrom("App::MaterialObjectPython"): - return True - else: - return False - - def material_solid_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 \ - and sel[0].isDerivedFrom("App::MaterialObjectPython") \ - and hasattr(sel[0], "Category") \ - and sel[0].Category == "Solid": - self.selobj = sel[0] - return True - else: - return False - - def has_no_nonlinear_material(self): - "check if an nonlinear material exists which is already based on the selected material" - for o in FreeCAD.ActiveDocument.Objects: - if hasattr(o, "Proxy") \ - and o.Proxy is not None \ - and o.Proxy.Type == "Fem::MaterialMechanicalNonlinear" \ - and o.LinearBaseMaterial == self.selobj: - FreeCAD.Console.PrintError( - "{} is based on the selected material: {}. " - "Only one nonlinear object for each material allowed.\n" - .format(o.Name, self.selobj) - ) - return False + def femmesh_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemMeshObject"): + self.selobj = sel[0] return True + else: + return False - def with_femmesh_andor_res_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemMeshObject"): - self.selobj = sel[0] - return True - elif len(sel) == 2: - if(sel[0].isDerivedFrom("Fem::FemMeshObject")): - if(sel[1].isDerivedFrom("Fem::FemResultObject")): - self.selobj = sel[0] # mesh - self.selobj2 = sel[1] # res - return True - else: - return False - elif(sel[1].isDerivedFrom("Fem::FemMeshObject")): - if(sel[0].isDerivedFrom("Fem::FemResultObject")): - self.selobj = sel[1] # mesh - self.selobj2 = sel[0] # res - return True - else: - return False + def gmsh_femmesh_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 \ + and hasattr(sel[0], "Proxy") \ + and sel[0].Proxy.Type == "Fem::FemMeshGmsh": + self.selobj = sel[0] + return True + else: + return False + + def material_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 and sel[0].isDerivedFrom("App::MaterialObjectPython"): + return True + else: + return False + + def material_solid_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 \ + and sel[0].isDerivedFrom("App::MaterialObjectPython") \ + and hasattr(sel[0], "Category") \ + and sel[0].Category == "Solid": + self.selobj = sel[0] + return True + else: + return False + + def has_no_nonlinear_material(self): + "check if an nonlinear material exists which is already based on the selected material" + for o in FreeCAD.ActiveDocument.Objects: + if hasattr(o, "Proxy") \ + and o.Proxy is not None \ + and o.Proxy.Type == "Fem::MaterialMechanicalNonlinear" \ + and o.LinearBaseMaterial == self.selobj: + FreeCAD.Console.PrintError( + "{} is based on the selected material: {}. " + "Only one nonlinear object for each material allowed.\n" + .format(o.Name, self.selobj) + ) + return False + return True + + def with_femmesh_andor_res_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemMeshObject"): + self.selobj = sel[0] + return True + elif len(sel) == 2: + if(sel[0].isDerivedFrom("Fem::FemMeshObject")): + if(sel[1].isDerivedFrom("Fem::FemResultObject")): + self.selobj = sel[0] # mesh + self.selobj2 = sel[1] # res + return True + else: + return False + elif(sel[1].isDerivedFrom("Fem::FemMeshObject")): + if(sel[0].isDerivedFrom("Fem::FemResultObject")): + self.selobj = sel[1] # mesh + self.selobj2 = sel[0] # res + return True else: return False else: return False + else: + return False - def active_analysis_in_active_doc(self): - analysis = FemGui.getActiveAnalysis() - if analysis.Document is FreeCAD.ActiveDocument: - self.active_analysis = analysis - return True - else: - return False + def active_analysis_in_active_doc(self): + analysis = FemGui.getActiveAnalysis() + if analysis.Document is FreeCAD.ActiveDocument: + self.active_analysis = analysis + return True + else: + return False - def solver_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemSolverObjectPython"): - self.selobj = sel[0] - return True - else: - return False + def solver_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 and sel[0].isDerivedFrom("Fem::FemSolverObjectPython"): + self.selobj = sel[0] + return True + else: + return False - def solver_elmer_selected(self): - sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 \ - and hasattr(sel[0], "Proxy") \ - and sel[0].Proxy.Type == "Fem::FemSolverObjectElmer": - self.selobj = sel[0] - return True - else: - return False + def solver_elmer_selected(self): + sel = FreeCADGui.Selection.getSelection() + if len(sel) == 1 \ + and hasattr(sel[0], "Proxy") \ + and sel[0].Proxy.Type == "Fem::FemSolverObjectElmer": + self.selobj = sel[0] + return True + else: + return False - def analysis_has_solver(self): - solver = False - analysis_members = FemGui.getActiveAnalysis().Group - for o in analysis_members: - if o.isDerivedFrom("Fem::FemSolverObjectPython"): - solver = True - if solver is True: - return True - else: - return False + def analysis_has_solver(self): + solver = False + analysis_members = FemGui.getActiveAnalysis().Group + for o in analysis_members: + if o.isDerivedFrom("Fem::FemSolverObjectPython"): + solver = True + if solver is True: + return True + else: + return False - def hide_meshes_show_parts_constraints(self): - if FreeCAD.GuiUp: - for acnstrmesh in FemGui.getActiveAnalysis().Group: - if "Constraint" in acnstrmesh.TypeId: - acnstrmesh.ViewObject.Visibility = True - if "Mesh" in acnstrmesh.TypeId: - # OvG: Hide meshes and show constraints and meshed part - # e.g. on purging results - acnstrmesh.ViewObject.Visibility = False + def hide_meshes_show_parts_constraints(self): + if FreeCAD.GuiUp: + for acnstrmesh in FemGui.getActiveAnalysis().Group: + if "Constraint" in acnstrmesh.TypeId: + acnstrmesh.ViewObject.Visibility = True + if "Mesh" in acnstrmesh.TypeId: + # OvG: Hide meshes and show constraints and meshed part + # e.g. on purging results + acnstrmesh.ViewObject.Visibility = False - # **************************************************************************************** - # methods to add the objects to the document in FreeCADGui mode + # **************************************************************************************** + # methods to add the objects to the document in FreeCADGui mode - def add_obj_on_gui_set_edit(self, objtype): - FreeCAD.ActiveDocument.openTransaction( - "Create Fem{}" - .format(objtype) - ) - FreeCADGui.addModule( - "ObjectsFem" - ) - FreeCADGui.doCommand( - "FemGui.getActiveAnalysis().addObject(ObjectsFem." - "make{}(FreeCAD.ActiveDocument))" - .format(objtype) - ) - # no other obj should be selected if we go in task panel - FreeCADGui.Selection.clearSelection() - FreeCADGui.doCommand( - "FreeCADGui.ActiveDocument.setEdit(FreeCAD.ActiveDocument.ActiveObject.Name)" - ) - FreeCAD.ActiveDocument.recompute() + def add_obj_on_gui_set_edit(self, objtype): + FreeCAD.ActiveDocument.openTransaction( + "Create Fem{}" + .format(objtype) + ) + FreeCADGui.addModule( + "ObjectsFem" + ) + FreeCADGui.doCommand( + "FemGui.getActiveAnalysis().addObject(ObjectsFem." + "make{}(FreeCAD.ActiveDocument))" + .format(objtype) + ) + # no other obj should be selected if we go in task panel + FreeCADGui.Selection.clearSelection() + FreeCADGui.doCommand( + "FreeCADGui.ActiveDocument.setEdit(FreeCAD.ActiveDocument.ActiveObject.Name)" + ) + FreeCAD.ActiveDocument.recompute() - def add_obj_on_gui_noset_edit(self, objtype): - FreeCAD.ActiveDocument.openTransaction( - "Create Fem{}" - .format(objtype) - ) - FreeCADGui.addModule( - "ObjectsFem" - ) - FreeCADGui.doCommand( - "FemGui.getActiveAnalysis().addObject(ObjectsFem." - "make{}(FreeCAD.ActiveDocument))" - .format(objtype) - ) - # FreeCAD.ActiveDocument.commitTransaction() # solver command class had this line - # no clear selection is done - FreeCAD.ActiveDocument.recompute() + def add_obj_on_gui_noset_edit(self, objtype): + FreeCAD.ActiveDocument.openTransaction( + "Create Fem{}" + .format(objtype) + ) + FreeCADGui.addModule( + "ObjectsFem" + ) + FreeCADGui.doCommand( + "FemGui.getActiveAnalysis().addObject(ObjectsFem." + "make{}(FreeCAD.ActiveDocument))" + .format(objtype) + ) + # FreeCAD.ActiveDocument.commitTransaction() # solver command class had this line + # no clear selection is done + FreeCAD.ActiveDocument.recompute() - def add_obj_on_gui_selobj_set_edit(self, objtype): - FreeCAD.ActiveDocument.openTransaction( - "Create Fem{}" - .format(objtype) - ) - FreeCADGui.addModule( - "ObjectsFem" - ) - FreeCADGui.doCommand( - "ObjectsFem.make{}(" - "FreeCAD.ActiveDocument, FreeCAD.ActiveDocument.{})" - .format(objtype, self.selobj.Name) - ) - FreeCADGui.Selection.clearSelection() - FreeCADGui.doCommand( - "FreeCADGui.ActiveDocument.setEdit(FreeCAD.ActiveDocument.ActiveObject.Name)" - ) - FreeCAD.ActiveDocument.recompute() + def add_obj_on_gui_selobj_set_edit(self, objtype): + FreeCAD.ActiveDocument.openTransaction( + "Create Fem{}" + .format(objtype) + ) + FreeCADGui.addModule( + "ObjectsFem" + ) + FreeCADGui.doCommand( + "ObjectsFem.make{}(" + "FreeCAD.ActiveDocument, FreeCAD.ActiveDocument.{})" + .format(objtype, self.selobj.Name) + ) + FreeCADGui.Selection.clearSelection() + FreeCADGui.doCommand( + "FreeCADGui.ActiveDocument.setEdit(FreeCAD.ActiveDocument.ActiveObject.Name)" + ) + FreeCAD.ActiveDocument.recompute() - def add_obj_on_gui_selobj_noset_edit(self, objtype): - FreeCAD.ActiveDocument.openTransaction( - "Create Fem{}" - .format(objtype) - ) - FreeCADGui.addModule( - "ObjectsFem" - ) - FreeCADGui.doCommand( - "ObjectsFem.make{}(" - "FreeCAD.ActiveDocument, FreeCAD.ActiveDocument.{})" - .format(objtype, self.selobj.Name) - ) - FreeCADGui.Selection.clearSelection() - FreeCAD.ActiveDocument.recompute() + def add_obj_on_gui_selobj_noset_edit(self, objtype): + FreeCAD.ActiveDocument.openTransaction( + "Create Fem{}" + .format(objtype) + ) + FreeCADGui.addModule( + "ObjectsFem" + ) + FreeCADGui.doCommand( + "ObjectsFem.make{}(" + "FreeCAD.ActiveDocument, FreeCAD.ActiveDocument.{})" + .format(objtype, self.selobj.Name) + ) + FreeCADGui.Selection.clearSelection() + FreeCAD.ActiveDocument.recompute() ## @} From e94af7ff5e873f263cac51d7d47df68eca183250 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 16 Aug 2019 08:23:27 +0200 Subject: [PATCH 39/39] FEM: code formating, command manager, more formating --- src/Mod/Fem/femcommands/manager.py | 109 +++++++++++++++++++---------- 1 file changed, 71 insertions(+), 38 deletions(-) diff --git a/src/Mod/Fem/femcommands/manager.py b/src/Mod/Fem/femcommands/manager.py index ab979877ba..75937cf5ce 100644 --- a/src/Mod/Fem/femcommands/manager.py +++ b/src/Mod/Fem/femcommands/manager.py @@ -63,49 +63,73 @@ class CommandManager(object): elif self.is_active == "with_document": active = FreeCADGui.ActiveDocument is not None elif self.is_active == "with_analysis": - active = FemGui.getActiveAnalysis() is not None \ + active = ( + FemGui.getActiveAnalysis() is not None and self.active_analysis_in_active_doc() + ) elif self.is_active == "with_results": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() and (self.results_present() or self.result_mesh_present()) + ) elif self.is_active == "with_selresult": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() and self.result_selected() + ) elif self.is_active == "with_part_feature": - active = FreeCADGui.ActiveDocument is not None \ + active = ( + FreeCADGui.ActiveDocument is not None and self.part_feature_selected() + ) elif self.is_active == "with_femmesh": - active = FreeCADGui.ActiveDocument is not None \ + active = ( + FreeCADGui.ActiveDocument is not None and self.femmesh_selected() + ) elif self.is_active == "with_gmsh_femmesh": - active = FreeCADGui.ActiveDocument is not None \ + active = ( + FreeCADGui.ActiveDocument is not None and self.gmsh_femmesh_selected() + ) elif self.is_active == "with_femmesh_andor_res": - active = FreeCADGui.ActiveDocument is not None \ + active = ( + FreeCADGui.ActiveDocument is not None and self.with_femmesh_andor_res_selected() + ) elif self.is_active == "with_material": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() and self.material_selected() + ) elif self.is_active == "with_material_solid_which_has_no_nonlinear_material": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ - and self.material_solid_selected() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() + and self.material_solid_selected() and self.has_no_nonlinear_material() + ) elif self.is_active == "with_solver": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() and self.solver_selected() + ) elif self.is_active == "with_solver_elmer": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() and self.solver_elmer_selected() + ) elif self.is_active == "with_analysis_without_solver": - active = FemGui.getActiveAnalysis() is not None \ - and self.active_analysis_in_active_doc() \ + active = ( + FemGui.getActiveAnalysis() is not None + and self.active_analysis_in_active_doc() and not self.analysis_has_solver() + ) return active def results_present(self): @@ -151,9 +175,11 @@ class CommandManager(object): def gmsh_femmesh_selected(self): sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 \ - and hasattr(sel[0], "Proxy") \ - and sel[0].Proxy.Type == "Fem::FemMeshGmsh": + if ( + len(sel) == 1 + and hasattr(sel[0], "Proxy") + and sel[0].Proxy.Type == "Fem::FemMeshGmsh" + ): self.selobj = sel[0] return True else: @@ -168,10 +194,12 @@ class CommandManager(object): def material_solid_selected(self): sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 \ - and sel[0].isDerivedFrom("App::MaterialObjectPython") \ - and hasattr(sel[0], "Category") \ - and sel[0].Category == "Solid": + if ( + len(sel) == 1 + and sel[0].isDerivedFrom("App::MaterialObjectPython") + and hasattr(sel[0], "Category") + and sel[0].Category == "Solid" + ): self.selobj = sel[0] return True else: @@ -180,10 +208,12 @@ class CommandManager(object): def has_no_nonlinear_material(self): "check if an nonlinear material exists which is already based on the selected material" for o in FreeCAD.ActiveDocument.Objects: - if hasattr(o, "Proxy") \ - and o.Proxy is not None \ - and o.Proxy.Type == "Fem::MaterialMechanicalNonlinear" \ - and o.LinearBaseMaterial == self.selobj: + if ( + hasattr(o, "Proxy") + and o.Proxy is not None + and o.Proxy.Type == "Fem::MaterialMechanicalNonlinear" + and o.LinearBaseMaterial == self.selobj + ): FreeCAD.Console.PrintError( "{} is based on the selected material: {}. " "Only one nonlinear object for each material allowed.\n" @@ -198,15 +228,15 @@ class CommandManager(object): self.selobj = sel[0] return True elif len(sel) == 2: - if(sel[0].isDerivedFrom("Fem::FemMeshObject")): - if(sel[1].isDerivedFrom("Fem::FemResultObject")): + if sel[0].isDerivedFrom("Fem::FemMeshObject"): + if sel[1].isDerivedFrom("Fem::FemResultObject"): self.selobj = sel[0] # mesh self.selobj2 = sel[1] # res return True else: return False - elif(sel[1].isDerivedFrom("Fem::FemMeshObject")): - if(sel[0].isDerivedFrom("Fem::FemResultObject")): + elif sel[1].isDerivedFrom("Fem::FemMeshObject"): + if sel[0].isDerivedFrom("Fem::FemResultObject"): self.selobj = sel[1] # mesh self.selobj2 = sel[0] # res return True @@ -235,9 +265,11 @@ class CommandManager(object): def solver_elmer_selected(self): sel = FreeCADGui.Selection.getSelection() - if len(sel) == 1 \ - and hasattr(sel[0], "Proxy") \ - and sel[0].Proxy.Type == "Fem::FemSolverObjectElmer": + if ( + len(sel) == 1 + and hasattr(sel[0], "Proxy") + and sel[0].Proxy.Type == "Fem::FemSolverObjectElmer" + ): self.selobj = sel[0] return True else: @@ -339,4 +371,5 @@ class CommandManager(object): FreeCADGui.Selection.clearSelection() FreeCAD.ActiveDocument.recompute() + ## @}