mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Export an axis representation for beveled curves. Related to #756.
This commit is contained in:
@@ -1619,8 +1619,16 @@ class IfcExporter():
|
||||
return self.file.createIfcRepresentationMap(self.origin,
|
||||
self.create_geometric_curve_set_representation(representation))
|
||||
elif representation['is_curve']:
|
||||
return self.file.createIfcRepresentationMap(self.origin,
|
||||
self.create_curve_representation(representation))
|
||||
self.file.createIfcRepresentationMap(self.origin,
|
||||
self.create_curve_representation(representation))
|
||||
if 'Model' in self.ifc_rep_context \
|
||||
and 'Axis' in self.ifc_rep_context['Model'] \
|
||||
and 'GRAPH_VIEW' in self.ifc_rep_context['Model']['Axis']:
|
||||
representation['subcontext'] = 'Axis'
|
||||
representation['target_view'] = 'GRAPH_VIEW'
|
||||
self.file.createIfcRepresentationMap(
|
||||
self.origin, self.create_axis_representation(representation))
|
||||
return
|
||||
elif representation['is_swept_solid']:
|
||||
return self.file.createIfcRepresentationMap(self.origin,
|
||||
self.create_swept_solid_representation(representation))
|
||||
@@ -1708,6 +1716,13 @@ class IfcExporter():
|
||||
# Find tangent and return.
|
||||
return (pt1 - pt0) * usq3 + (pt2 - pt1) * ut6 + (pt3 - pt2) * tsq3
|
||||
|
||||
def create_axis_representation(self, representation):
|
||||
return self.file.createIfcShapeRepresentation(
|
||||
self.ifc_rep_context[representation['context']][representation['subcontext']][
|
||||
representation['target_view']]['ifc'],
|
||||
representation['subcontext'], 'Curve3D',
|
||||
[self.create_curve(representation['raw'])])
|
||||
|
||||
def create_curve_representation(self, representation):
|
||||
# TODO: support unclosed surfaces
|
||||
swept_area = self.file.createIfcArbitraryClosedProfileDef('AREA', None,
|
||||
|
||||
Reference in New Issue
Block a user