-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlockModel from_barrel_vault #54
Closed
Closed
Conversation
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
petrasvestartas
force-pushed
the
barrel_vault_elements
branch
from
January 12, 2025 11:19
63ab4c6
to
6297181
Compare
There is a lot going on here, but mainly I would like to ask for slicer modifier review: def slice(geometry: Union[Brep, Mesh], slice_plane: Plane) -> Union[Brep, Mesh]:
"""Slice the target geometry by the slice plane.
NOTE: Original geometry is returned if slicing is not successful.
Parameters
----------
geometry : :class:`compas.geometry.Brep` | :class:`compas.datastructures.Mesh`
The geometry to be affected. The same geometry can be modified multiple times.
slice_plane : :class:`compas.geometry.Plane`
The plane to slice the geometry.
Returns
-------
:class:`compas.geometry.Brep` | :class:`compas.datastructures.Mesh`
The sliced geometry.
"""
# print(geometry.copy().aabb()) <- not implemented on OCC
if isinstance(geometry, Brep):
try:
size: float = 1000 # TODO: compute bounding box and take diagonal length instead, but there is no bounding box method in Brep
splitter = Brep.from_plane(slice_plane, domain_u=(-size, size), domain_v=(-size, size))
split_breps: Optional[list] = geometry.split(splitter)
return split_breps[0] if split_breps else geometry
except Exception:
print("SlicerModifier is not successful.")
return geometry
else:
try:
split_meshes: Optional[list] = geometry.slice(slice_plane)
return split_meshes[0] if split_meshes else geometry
except Exception:
print("SlicerModifier is not successful.")
return geometry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Development of Barrel Vault Model.
During the process spotted COMPAS issues:
libscip.so.9.1: cannot open shared object file: No such file or directory
, for some reason conda installs scip=9.2, afterconda install -c conda-forge scip=9.1
cgal works.Barrel vault has is_support set for the boundary elements:
BeamTProfileElement
:Model before interactions, the beam is transformed on Y-Axis by half of its height, to match ceiling surfaces:
compute_contact
based onboolean_modifier
implemented in beam class:Cable:
TODO:
What type of change is this?
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
).invoke test
).invoke lint
).compas.datastructures.Mesh
.