Skip to content
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
wants to merge 17 commits into from
Closed

Conversation

petrasvestartas
Copy link
Collaborator

@petrasvestartas petrasvestartas commented Jan 11, 2025

Development of Barrel Vault Model.

During the process spotted COMPAS issues:

  • cgal is complaining again about this: libscip.so.9.1: cannot open shared object file: No such file or directory, for some reason conda installs scip=9.2, after conda install -c conda-forge scip=9.1 cgal works.
  • unify cycles often fails when wrong mesh is provided.
  • viewer must have mesh face winding display...

Barrel vault has is_support set for the boundary elements:
image

BeamTProfileElement:

image

Model before interactions, the beam is transformed on Y-Axis by half of its height, to match ceiling surfaces:

image

compute_contact based on boolean_modifier implemented in beam class:

image

Cable:

image

TODO:

  • cable
  • documentation

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

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.

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas.datastructures.Mesh.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

@petrasvestartas
Copy link
Collaborator Author

petrasvestartas commented Jan 14, 2025

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant