File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,8 +363,13 @@ IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_process
363363}
364364
365365IfcGeom::BRepElement* ifcopenshell::geometry::Converter::create_brep_for_representation_and_product (const IfcUtil::IfcBaseEntity* representation, const IfcUtil::IfcBaseEntity* product) {
366+ auto interpreted_representation = mapping_->map (representation);
367+ if (!interpreted_representation) {
368+ interpreted_representation = taxonomy::make<taxonomy::collection>();
369+ interpreted_representation->instance = representation;
370+ }
366371 return create_brep_for_representation_and_product (
367- mapping_-> map (representation) ,
372+ interpreted_representation ,
368373 product,
369374 taxonomy::cast<taxonomy::geom_item>(mapping_->map (product))->matrix
370375 );
Original file line number Diff line number Diff line change @@ -724,7 +724,7 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
724724
725725 typename Schema::IfcProductRepresentation* prodrep = product->Representation ();
726726 typename Schema::IfcRepresentation::list::ptr reps = prodrep->Representations ();
727- typename Schema::IfcRepresentation* ifc_representation = ( typename Schema::IfcRepresentation*) representation ;
727+ typename Schema::IfcRepresentation* ifc_representation = representation-> as < typename Schema::IfcRepresentation>() ;
728728
729729 if (!ifc_representation) {
730730 // First, try to find a representation based on the settings
You can’t perform that action at this time.
0 commit comments