mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 08:33:10 +00:00
More work on isolating into plug-ins
This commit is contained in:
@@ -93,11 +93,179 @@ inline namespace settings {
|
||||
static constexpr const char* const description = "Introduce a separate Z-Up node into the GlTF hierarchy instead of multiplying the transform into the root node matrices";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgBounds : public SettingBase<SvgBounds, std::string> {
|
||||
static constexpr const char* const name = "bounds";
|
||||
static constexpr const char* const description = "Specifies the bounding rectangle, for example 512x512, to which the output will be scaled. Only used when converting to SVG.";
|
||||
};
|
||||
|
||||
struct SvgScale : public SettingBase<SvgScale, std::string> {
|
||||
static constexpr const char* const name = "scale";
|
||||
static constexpr const char* const description = "Interprets SVG bounds in mm, centers layout and draw elements to scale. Only used when converting to SVG. Example 1:100.";
|
||||
};
|
||||
|
||||
struct SvgCenter : public SettingBase<SvgCenter, std::string> {
|
||||
static constexpr const char* const name = "center";
|
||||
static constexpr const char* const description = "When using --scale, specifies the location in the range [0 1]x[0 1] around which to center the drawings. Example 0.5x0.5.";
|
||||
};
|
||||
|
||||
struct SvgSectionRef : public SettingBase<SvgSectionRef, std::string> {
|
||||
static constexpr const char* const name = "section-ref";
|
||||
static constexpr const char* const description = "Element at which cross sections should be created.";
|
||||
};
|
||||
|
||||
struct SvgElevationRef : public SettingBase<SvgElevationRef, std::string> {
|
||||
static constexpr const char* const name = "elevation-ref";
|
||||
static constexpr const char* const description = "Element at which drawings should be created.";
|
||||
};
|
||||
|
||||
struct SvgElevationRefGuid : public SettingBase<SvgElevationRefGuid, std::string> {
|
||||
static constexpr const char* const name = "elevation-ref-guid";
|
||||
static constexpr const char* const description = "Element guids at which drawings should be created.";
|
||||
};
|
||||
|
||||
struct SvgAutoSection : public SettingBase<SvgAutoSection, bool> {
|
||||
static constexpr const char* const name = "auto-section";
|
||||
static constexpr const char* const description = "Creates SVG cross section drawings automatically based on model extents.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgAutoElevation : public SettingBase<SvgAutoElevation, bool> {
|
||||
static constexpr const char* const name = "auto-elevation";
|
||||
static constexpr const char* const description = "Creates SVG elevation drawings automatically based on model extents.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgDrawStoreyHeights : public SettingBase<SvgDrawStoreyHeights, std::string> {
|
||||
static constexpr const char* const name = "draw-storey-heights";
|
||||
static constexpr const char* const description = "Draws a horizontal line at the height of building storeys in vertical drawings. Accepted values are none, full, and left.";
|
||||
};
|
||||
|
||||
struct SvgStoreyHeightLineLength : public SettingBase<SvgStoreyHeightLineLength, double> {
|
||||
static constexpr const char* const name = "storey-height-line-length";
|
||||
static constexpr const char* const description = "Length of the line when --draw-storey-heights=left.";
|
||||
};
|
||||
|
||||
struct SvgUseNamespace : public SettingBase<SvgUseNamespace, bool> {
|
||||
static constexpr const char* const name = "svg-xmlns";
|
||||
static constexpr const char* const description = "Stores name and guid in a separate namespace as opposed to data-name, data-guid.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgUseHlrPoly : public SettingBase<SvgUseHlrPoly, bool> {
|
||||
static constexpr const char* const name = "svg-poly";
|
||||
static constexpr const char* const description = "Uses the polygonal algorithm for hidden line rendering.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgUsePrefiltering : public SettingBase<SvgUsePrefiltering, bool> {
|
||||
static constexpr const char* const name = "svg-prefilter";
|
||||
static constexpr const char* const description = "Prefilter faces and shapes before feeding to the hidden-line algorithm.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgSegmentProjection : public SettingBase<SvgSegmentProjection, bool> {
|
||||
static constexpr const char* const name = "svg-segment-projection";
|
||||
static constexpr const char* const description = "Segment result of projection with respect to original products.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgPolygonal : public SettingBase<SvgPolygonal, bool> {
|
||||
static constexpr const char* const name = "svg-write-poly";
|
||||
static constexpr const char* const description = "Approximate every curve as polygonal in SVG output.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgAlwaysProject : public SettingBase<SvgAlwaysProject, bool> {
|
||||
static constexpr const char* const name = "svg-project";
|
||||
static constexpr const char* const description = "Always enable hidden line rendering instead of only on elevations.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgWithoutStoreys : public SettingBase<SvgWithoutStoreys, bool> {
|
||||
static constexpr const char* const name = "svg-without-storeys";
|
||||
static constexpr const char* const description = "Do not emit drawings for building storeys.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgNoCss : public SettingBase<SvgNoCss, bool> {
|
||||
static constexpr const char* const name = "svg-no-css";
|
||||
static constexpr const char* const description = "Do not emit CSS style declarations.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgDoorArcs : public SettingBase<SvgDoorArcs, bool> {
|
||||
static constexpr const char* const name = "door-arcs";
|
||||
static constexpr const char* const description = "Draw door opening arcs for IfcDoor elements.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgSectionHeight : public SettingBase<SvgSectionHeight, double> {
|
||||
static constexpr const char* const name = "section-height";
|
||||
static constexpr const char* const description = "Specifies the cut section height for SVG 2D geometry.";
|
||||
};
|
||||
|
||||
struct SvgSectionHeightFromStoreys : public SettingBase<SvgSectionHeightFromStoreys, bool> {
|
||||
static constexpr const char* const name = "section-height-from-storeys";
|
||||
static constexpr const char* const description = "Derives section height from storey elevation. Use --section-height to override the default offset of 1.2.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgPrintSpaceNames : public SettingBase<SvgPrintSpaceNames, bool> {
|
||||
static constexpr const char* const name = "print-space-names";
|
||||
static constexpr const char* const description = "Prints IfcSpace LongName and Name in the geometry output. Applicable for SVG output.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgPrintSpaceAreas : public SettingBase<SvgPrintSpaceAreas, bool> {
|
||||
static constexpr const char* const name = "print-space-areas";
|
||||
static constexpr const char* const description = "Prints calculated IfcSpace areas in square meters. Applicable for SVG output.";
|
||||
static constexpr bool defaultvalue = false;
|
||||
};
|
||||
|
||||
struct SvgSpaceNameTransform : public SettingBase<SvgSpaceNameTransform, std::string> {
|
||||
static constexpr const char* const name = "space-name-transform";
|
||||
static constexpr const char* const description = "Additional transform to the space labels in SVG.";
|
||||
};
|
||||
}
|
||||
|
||||
class SerializerSettings : public SettingsContainer <
|
||||
// @todo should we use tuple_cat here to unify the settings into a single class?
|
||||
std::tuple<UseElementNames, UseElementGuids, UseElementStepIds, UseElementTypes, UseYUp, WriteGltfEcef, FloatingPointDigits, BaseUri, WktUseSection, SeparateZUpNode>>
|
||||
std::tuple<
|
||||
UseElementNames,
|
||||
UseElementGuids,
|
||||
UseElementStepIds,
|
||||
UseElementTypes,
|
||||
UseYUp,
|
||||
WriteGltfEcef,
|
||||
FloatingPointDigits,
|
||||
BaseUri,
|
||||
WktUseSection,
|
||||
SeparateZUpNode,
|
||||
SvgBounds,
|
||||
SvgScale,
|
||||
SvgCenter,
|
||||
SvgSectionRef,
|
||||
SvgElevationRef,
|
||||
SvgElevationRefGuid,
|
||||
SvgAutoSection,
|
||||
SvgAutoElevation,
|
||||
SvgDrawStoreyHeights,
|
||||
SvgStoreyHeightLineLength,
|
||||
SvgUseNamespace,
|
||||
SvgUseHlrPoly,
|
||||
SvgUsePrefiltering,
|
||||
SvgSegmentProjection,
|
||||
SvgPolygonal,
|
||||
SvgAlwaysProject,
|
||||
SvgWithoutStoreys,
|
||||
SvgNoCss,
|
||||
SvgDoorArcs,
|
||||
SvgSectionHeight,
|
||||
SvgSectionHeightFromStoreys,
|
||||
SvgPrintSpaceNames,
|
||||
SvgPrintSpaceAreas,
|
||||
SvgSpaceNameTransform>>
|
||||
{};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user