Feature Catalogue
Purpose
This note explains the role of FeatureCatalogue.json in the HAPI PythonNet3/Civil 3D drafting engine.
Source Priority
FeatureCatalogue.json
Feature Catalogue Specification.md
HAPI User Manual.pdf
Old implementation Markdown notes
Definition
FeatureCatalogue.json is the central feature dictionary and rulebook for the HAPI engine. It maps each Feature_Code to its mathematical routing, drafting style, block behaviour, label behaviour, and ECM object availability.
Catalogue Scale
The current catalogue contains 197 feature entries.
Feature Type Count LINEAR79 1POINT70 POLYGON41 2POINT7
Top-Level Structure
Each feature entry is organised into three major sections:
{
"featureMetadata" : { } ,
"symbolConfig" : { } ,
"objectConfig" : { }
}
Field Meaning FeatureCodePrimary feature key, such as KX, TE, or STN. FeatureNameHuman-readable feature name. FeatureTypeMathematical routing channel: 1POINT, 2POINT, LINEAR, or POLYGON. FeatureImageReference image filename. ColourCodeAutoCAD Color Index for drafted outputs. CSWPClassDrafting specification class. RevisionCatalogue revision marker.
symbolConfig
Common Fields
Field Meaning isLevelRequiredDetermines whether visible/default level marker style should be applied. isAnnotationRequiredDetermines whether a specific label style override is required. SymbolLevelTypeMaps to the Datum Dictionary in Global_Configuration . SymbolAnnotationNameSpecific Civil 3D label style when annotation override is active. isSymbolRequiredGlobal gatekeeper for whether standard symbol drafting is required.
1POINT / 2POINT Fields
Field Meaning PointSymbolUseBlkRefIf true, insert a block reference. PointSymbolBlockNameExact AutoCAD block name. PointSymbolAlignToKerbIf true, rotate the block relative to nearby kerb geometry. PointSymbolParameterDynamic block or object parameters to set.
POLYGON Fields
Field Meaning SymbolGroupingLengthsDefault number of points used when no Sizing_Number is supplied. MultiPolySymbolUseBlkRefIf true, route polygon to scalable block mode. MultiPolySymbolBlockNameBlock name for polygon block route. MultiPolySymbolAnnotatedIf true, place polygon annotation. MultiPolySymbolStyleNameFeature Line or polygon style name. MultiPolySymbolLabelNameLabel style name for polygon annotation.
LINEAR Fields
Field Meaning isSymbolAllowCurveSegmentDetermines whether curve indicators should be processed. FeatureLineStyleNameCivil 3D Feature Line style name. FeatureLineAnnotatedWhether line labels should be generated. FeatureLineLabelNameLabel style for line annotation. FeatureFlowAnnotatedWhether flow arrows or flow labels should be generated. FeatureFlowLabelNameFlow label style name.
objectConfig
Field Meaning isObjectAvailableWhether an ECM object profile is available. ObjectDWGFilenameSource object drawing filename. ObjectDefaultStyleTypeDefault Style Type Key. ObjectStyleProfileJSONMapping between Style Type Keys and style profile JSON files.
Example Feature Entries
Feature Code Name Feature Type Key Catalogue Behaviour KXKerb Bottom LINEARCurve segment capable; Feature Line route. CPCatch Pit POLYGONDefault grouping length 3; can use block-reference polygon route. FBFlower Bed POLYGONDefault grouping length 3; polygon annotation route. TETree 1POINTTree object style available. STNControl Station 1POINTSurvey control class and annotation route.
Business Rules
The catalogue is the routing authority for Feature Type.
Do not hard-code block names, Feature Line styles, or label names in drafting logic if they are catalogue fields.
Catalogue fields should be queried on demand by Feature Code.
The catalogue should be treated as configuration, not as procedural code.
Unknown fields should be preserved where possible for forward compatibility.
Implementation Notes
Preferred planned functions:
LoadFeatureCatalogue
QueryFeatureCatalogue
ValidateFeatureCatalogueEntry
ResolveFeatureType
ResolvePointSymbolConfig
ResolveLinearFeatureConfig
ResolvePolygonFeatureConfig
ResolveObjectStyleProfile
Open Questions
Confirm whether compound feature rules should be added directly to FeatureCatalogue.json or maintained in a separate supplementary-suffix catalogue.