-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8456c36
commit bb353eb
Showing
15 changed files
with
207 additions
and
49 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
src/bt_ifcmanager/lib/lib_ifc/IfcBuildingElementProxy_su.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# frozen_string_literal: true | ||
|
||
# IfcBuildingElementProxy_su.rb | ||
# | ||
# Copyright 2024 Jan Brouwer <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
# | ||
# | ||
|
||
module BimTools | ||
module IfcBuildingElementProxy_su | ||
VALID_COMPOSITION_TYPES = %i[COMPLEX ELEMENT PARTIAL].freeze | ||
|
||
attr_reader :compositiontype | ||
|
||
def initialize(ifc_model, sketchup, _total_transformation) | ||
@ifc_version = ifc_model.ifc_version | ||
super | ||
end | ||
|
||
# CompositionType attribute deprecated in IFC4 | ||
def compositiontype=(value) | ||
return unless @ifc_version == 'IFC 2x3' | ||
|
||
enum_value = if value.is_a?(String) | ||
value.upcase.to_sym | ||
elsif value.respond_to?(:value) | ||
value.value.upcase.to_sym | ||
else | ||
value.to_sym | ||
end | ||
|
||
@compositiontype = VALID_COMPOSITION_TYPES.include?(enum_value) ? enum_value : nil | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# frozen_string_literal: true | ||
|
||
# IfcElementAssembly_su.rb | ||
# | ||
# Copyright 2024 Jan Brouwer <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
# | ||
# | ||
|
||
module BimTools | ||
module IfcElementAssembly_su | ||
attr_reader :assemblyplace | ||
|
||
def assemblyplace=(value) | ||
@assemblyplace = if value.is_a?(String) | ||
value.to_sym | ||
elsif value.respond_to?(:value) | ||
value.value.to_sym | ||
else | ||
value.to_sym | ||
end # TODO: hacky fix, should be part of PropertyReader | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# frozen_string_literal: true | ||
|
||
# IfcSpace_su.rb | ||
# | ||
# Copyright 2024 Jan Brouwer <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
# MA 02110-1301, USA. | ||
# | ||
# | ||
|
||
module BimTools | ||
module IfcSpace_su | ||
VALID_ENUM_VALUES = %i[INTERNAL EXTERNAL NOTDEFINED].freeze | ||
|
||
attr_reader :interiororexteriorspace | ||
|
||
def initialize(ifc_model, sketchup, total_transformation) | ||
@ifc_version = ifc_model.ifc_version | ||
super | ||
end | ||
|
||
# InteriorOrExteriorSpace renamed to PredefinedType in IFC4 | ||
def interiororexteriorspace=(value) | ||
return unless @ifc_version == 'IFC 2x3' | ||
|
||
enum_value = if value.is_a?(String) | ||
value.upcase.to_sym | ||
elsif value.respond_to?(:value) | ||
value.value.upcase.to_sym | ||
else | ||
value.to_sym | ||
end | ||
|
||
@interiororexteriorspace = VALID_ENUM_VALUES.include?(enum_value) ? enum_value : :NOTDEFINED | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.