Skip to content

Commit

Permalink
FIX bring back beam to column contact.
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasvestartas committed Jan 14, 2025
1 parent 8549ef5 commit 8bf61e8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/compas_model/elements/beam.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import TYPE_CHECKING
from typing import Optional
from typing import Union

Expand All @@ -20,6 +21,9 @@
from compas_model.elements.element import Feature
from compas_model.interactions import BooleanModifier

if TYPE_CHECKING:
from compas_model.elements import BlockElement


class BeamFeature(Feature):
pass
Expand Down Expand Up @@ -226,6 +230,14 @@ def _compute_contact_with_beam(self, target_element: "BeamElement", type: str) -
# A cable applies boolean difference with a block geometry.
return BooleanModifier(self.elementgeometry.transformed(self.modeltransformation))

def _compute_contact_with_block(self, target_element: "BlockElement", type: str) -> Union["BooleanModifier", None]:
# Scenario:
# A beam with a profile applies boolean difference with a block geometry.
if target_element.is_support:
return BooleanModifier(self.elementgeometry.transformed(self.modeltransformation))
else:
return None


class BeamSquareElement(BeamElement):
"""Class representing a beam element with a square section.
Expand Down

0 comments on commit 8bf61e8

Please sign in to comment.