Step-Importer: introduce data generation based on config.
parent
d3f1f2337d
commit
78a70baf7c
|
@ -5,7 +5,7 @@
|
||||||
# Open Asset Import Library (ASSIMP)
|
# Open Asset Import Library (ASSIMP)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006-2010, ASSIMP Development Team
|
# Copyright (c) 2006-2018, ASSIMP Development Team
|
||||||
#
|
#
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
|
@ -48,11 +48,21 @@ if sys.version_info < (3, 0):
|
||||||
print("must use python 3.0 or greater")
|
print("must use python 3.0 or greater")
|
||||||
sys.exit(-2)
|
sys.exit(-2)
|
||||||
|
|
||||||
input_template_h = 'IFCReaderGen.h.template'
|
use_ifc_template = False
|
||||||
input_template_cpp = 'IFCReaderGen.cpp.template'
|
|
||||||
|
|
||||||
output_file_h = os.path.join('..','..','code','IFCReaderGen.h')
|
input_step_template_h = 'StepReaderGen.h.template'
|
||||||
output_file_cpp = os.path.join('..','..','code','IFCReaderGen.cpp')
|
input_step_template_cpp = 'StepReaderGen.cpp.template'
|
||||||
|
input_template_h = 'IFCReaderGen.h.template'
|
||||||
|
input_template_cpp = 'IFCReaderGen.cpp.template'
|
||||||
|
|
||||||
|
output_file_h = ""
|
||||||
|
output_file_cpp = ""
|
||||||
|
if (use_ifc_template ):
|
||||||
|
output_file_h = os.path.join('..','..','code','IFCReaderGen.h')
|
||||||
|
output_file_cpp = os.path.join('..','..','code','IFCReaderGen.cpp')
|
||||||
|
else:
|
||||||
|
output_file_h = os.path.join('..','..','code','StepReaderGen.h')
|
||||||
|
output_file_cpp = os.path.join('..','..','code','StepReaderGen.cpp')
|
||||||
|
|
||||||
template_entity_predef = '\tstruct {entity};\n'
|
template_entity_predef = '\tstruct {entity};\n'
|
||||||
template_entity_predef_ni = '\ttypedef NotImplemented {entity}; // (not currently used by Assimp)\n'
|
template_entity_predef_ni = '\ttypedef NotImplemented {entity}; // (not currently used by Assimp)\n'
|
||||||
|
@ -221,7 +231,9 @@ def work(filename):
|
||||||
schema = ExpressReader.read(filename,silent=True)
|
schema = ExpressReader.read(filename,silent=True)
|
||||||
entities, stub_decls, schema_table, converters, typedefs, predefs = '','',[],'','',''
|
entities, stub_decls, schema_table, converters, typedefs, predefs = '','',[],'','',''
|
||||||
|
|
||||||
|
entitylist = 'ifc_entitylist.txt'
|
||||||
|
if not use_ifc_template:
|
||||||
|
entitylist = 'step_entitylist.txt'
|
||||||
whitelist = []
|
whitelist = []
|
||||||
with open('entitylist.txt', 'rt') as inp:
|
with open('entitylist.txt', 'rt') as inp:
|
||||||
whitelist = [n.strip() for n in inp.read().split('\n') if n[:1]!='#' and n.strip()]
|
whitelist = [n.strip() for n in inp.read().split('\n') if n[:1]!='#' and n.strip()]
|
||||||
|
@ -280,8 +292,3 @@ def work(filename):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(work(sys.argv[1] if len(sys.argv)>1 else 'schema.exp'))
|
sys.exit(work(sys.argv[1] if len(sys.argv)>1 else 'schema.exp'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
# ==============================================================================
|
||||||
|
# List of IFC structures needed by Assimp
|
||||||
|
# ==============================================================================
|
||||||
|
# use genentitylist.sh to update this list
|
||||||
|
|
||||||
|
# This machine-generated list is not complete, it lacks many intermediate
|
||||||
|
# classes in the inheritance hierarchy. Those are magically augmented by the
|
||||||
|
# code generator. Also, the names of all used entities need to be present
|
||||||
|
# in the source code for this to work.
|
||||||
|
|
||||||
|
IfcAnnotation
|
||||||
|
IfcArbitraryClosedProfileDef
|
||||||
|
IfcArbitraryOpenProfileDef
|
||||||
|
IfcArbitraryProfileDefWithVoids
|
||||||
|
IfcAxis1Placement
|
||||||
|
IfcAxis2Placement
|
||||||
|
IfcAxis2Placement2D
|
||||||
|
IfcAxis2Placement3D
|
||||||
|
IfcBooleanClippingResult
|
||||||
|
IfcBooleanResult
|
||||||
|
IfcBoundedCurve
|
||||||
|
IfcBoundingBox
|
||||||
|
IfcBSplineCurve
|
||||||
|
IfcBuilding
|
||||||
|
IfcCartesianPoint
|
||||||
|
IfcCartesianTransformationOperator
|
||||||
|
IfcCartesianTransformationOperator3D
|
||||||
|
IfcCartesianTransformationOperator3DnonUniform
|
||||||
|
IfcCircle
|
||||||
|
IfcCircleHollowProfileDef
|
||||||
|
IfcCircleProfileDef
|
||||||
|
IfcClosedShell
|
||||||
|
IfcColourOrFactor
|
||||||
|
IfcColourRgb
|
||||||
|
IfcCompositeCurve
|
||||||
|
IfcCompositeCurveSegment
|
||||||
|
IfcConic
|
||||||
|
IfcConnectedFaceSet
|
||||||
|
IfcConversionBasedUnit
|
||||||
|
IfcCurve
|
||||||
|
IfcDirection
|
||||||
|
IfcDoor
|
||||||
|
IfcEllipse
|
||||||
|
IfcExtrudedAreaSolid
|
||||||
|
IfcFace
|
||||||
|
IfcFaceBasedSurfaceModel
|
||||||
|
IfcFaceBound
|
||||||
|
IfcFaceOuterBound
|
||||||
|
IfcFeatureElementSubtraction
|
||||||
|
IfcGeometricRepresentationContext
|
||||||
|
IfcGeometricRepresentationItem
|
||||||
|
IfcHalfSpaceSolid
|
||||||
|
IfcLine
|
||||||
|
IfcLocalPlacement
|
||||||
|
IfcManifoldSolidBrep
|
||||||
|
IfcMappedItem
|
||||||
|
IfcMeasureWithUnit
|
||||||
|
IfcNamedUnit
|
||||||
|
IfcObjectDefinition
|
||||||
|
IfcObjectPlacement
|
||||||
|
IfcOpeningElement
|
||||||
|
IfcParameterizedProfileDef
|
||||||
|
IfcPlane
|
||||||
|
IfcPolygonalBoundedHalfSpace
|
||||||
|
IfcPolyline
|
||||||
|
IfcPolyLoop
|
||||||
|
IfcPresentationStyleAssignment
|
||||||
|
IfcPresentationStyleSelect
|
||||||
|
IfcProduct
|
||||||
|
IfcProductRepresentation
|
||||||
|
IfcProfileDef
|
||||||
|
IfcProject
|
||||||
|
IfcRectangleProfileDef
|
||||||
|
IfcRelAggregates
|
||||||
|
IfcRelContainedInSpatialStructure
|
||||||
|
IfcRelFillsElement
|
||||||
|
IfcRelVoidsElement
|
||||||
|
IfcRepresentation
|
||||||
|
IfcRepresentationContext
|
||||||
|
IfcRepresentationItem
|
||||||
|
IfcRepresentationMap
|
||||||
|
IfcRevolvedAreaSolid
|
||||||
|
IfcShell
|
||||||
|
IfcShellBasedSurfaceModel
|
||||||
|
IfcSite
|
||||||
|
IfcSIUnit
|
||||||
|
IfcSomething
|
||||||
|
IfcSpace
|
||||||
|
IfcSpatialStructureElement
|
||||||
|
IfcSpatialStructureElements
|
||||||
|
IfcStyledItem
|
||||||
|
IfcSurfaceStyle
|
||||||
|
IfcSurfaceStyleElementSelect
|
||||||
|
IfcSurfaceStyleRendering
|
||||||
|
IfcSurfaceStyleShading
|
||||||
|
IfcSurfaceStyleWithTextures
|
||||||
|
IfcSweptAreaSolid
|
||||||
|
IfcSweptDiskSolid
|
||||||
|
IfcTopologicalRepresentationItem
|
||||||
|
IfcTrimmedCurve
|
||||||
|
IfcUnit
|
||||||
|
IfcUnitAssignment
|
||||||
|
IfcVector
|
||||||
|
IfcIShapeProfileDef
|
||||||
|
IfcPropertyListValue
|
||||||
|
IfcRelDefinesByProperties
|
||||||
|
IfcPropertySet
|
||||||
|
IfcPropertySingleValue
|
||||||
|
IfcProperty
|
||||||
|
IfcComplexProperty
|
||||||
|
IfcElementQuantity
|
Loading…
Reference in New Issue