Giter Site home page Giter Site logo

apc524_directional_clustering's People

Contributors

alexandros101 avatar arpastrana avatar hhhhuiyuan avatar isabelmdo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

apc524_directional_clustering's Issues

Implement abstract base class ClusteringAlgorithm

Feature Request

As a [role], I want [something] so that [benefit].

Details

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Create transformations submodule

Refactor align_vectors and smoothen_vectors into their own functions. These must be contained into their own submodule accessed as directional_clustering.transformations.

An error coming up when trying to get attributes of a face using mesh.face_attribute(s)

Describe the bug
I was trying to get attributes of a face using mesh.face_attribute(fkey) or mesh.face_attributes(fkey), but neither way worked.
mesh.face_attribute(fkey): An error came up missing 1 required positional argument: 'name'
mesh.face_attributes(fkey): returned an empty dictionary

To Reproduce
My code is:

import os
from compas.datastructures import Mesh
from directional_clustering import JSON

name_in = "perimeter_supported_slab.json"
JSON_IN = os.path.abspath(os.path.join(JSON, name_in))

mesh = Mesh.from_json(JSON_IN) 
fkey = mesh.get_any_face()
attr = mesh.face_attributes(fkey)
print(len(attr))

Working on FEASolver()

Currently building a basic code, will look on which parts of the packages I need for which parts. Will push to the developer branch.

Wrap variational kmeans method into VariationalKmeans object

Feature Request

As a [role], I want [something] so that [benefit].

Details

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sphinx - matplotlib

To Reproduce
invoke docs

The error I get is

app.add_directive('plot', plot_directive, True, (0, 2, False), **options)
TypeError: add_directive() got an unexpected keyword argument 'alt'

It is very similar to the one described here: sphinx-doc/sphinx#7659
One of the comments describes exactly the error I copied above.

The solution I found
... was to downgrade sphinx to 2.4, because, for some reason, I can't upgrade matplotlib to anything above 3.0.3. Does anyone have a clue why this is happening?

Bonus problem!
When invoke docs finally works, I can't find any of our documentation in the HTML, only the headers.
For this issue, I believe it is simply because I haven't spent much time yet figuring out how sphinx works. But I thought it would be good to include this part here anyways in case someone already knows what's up with it.

Additional context
I'm running Windows 10, with windows cmd prompt, inside conda env. clusters.

Branch: plotters

Opinion/trial Request

I've added the new plotter to the plotters branch and it would be great if someone could see it (:eyes: @arpastrana) before I continue making progress. My next steps are to add tests and make a PR before continuing to expand the plotting options, or changing it into a class rather than functions.

Details

  1. Install plotly.py with:

    • pip
      $ pip install plotly==4.13.0
    • conda
      $ conda install -c plotly plotly=4.13.0
  2. See if script 01_directional_clustering.py works
    Simply run that script to see if a new tab opens in your browser to show the interactive graph. You can change the plotter flags at the top of the script - there is an added option to draw mesh edges or not.

  3. Overleaf: Plotters
    For curiosity: there is a file inside our Overleaf report folder with a detailed description of why I chose plotly.py package, along with the issues and solutions I found. I made that mainly to organize my own work process, but it may be useful to others since I had to do quite some digging in forums and documentation to find the solutions I was looking for.

Build a StructuralModel()

After wrapping an existing open-source FEA library, create an interface object called StructuralModel() that takes in loads, support conditions, and a Mesh(), and returns a sequence of valid user-defined VectorField() objects.

Variational_clustering not installing

variational_clustering is not being installed with the current version in branch develop.
Error:
ModuleNotFoundError: No module named 'variational_clustering'

Build a StructuralModel() class

After wrapping an existing open-source FEA library, create an interface object called StructuralModel() that takes in loads, support conditions, and a Mesh(), and returns a sequence of valid user-defined VectorField() objects.

Broken draw_vector_field_array

I believe one of the latest commits may have broken the vector field array.
I'm looking into it, and hope to find a solution, but please let me know if you have a hint on where it may have gone wrong!
Thanks :)

When I set draw_vector_fields = True his error happens:

Traceback (most recent call last):
  File "01_directional_clustering.py", line 285, in <module>
    plotter.draw_vector_field_array(va, (50, 50, 50), True, 0.07, 0.5)
  File "c:\users\(...)\apc524_directional_clustering\src\directional_clustering\plotters\cluster_plotter.py", line 39, in draw_vector_field_array
    rows, cols = field.shape
AttributeError: 'VectorField' object has no attribute 'shape'

Implement Mesh()

A mesh object that can host different vector fields. For every vector field, only one vector can be assigned per mesh face. Our Mesh() should be a subclass of compas.datastructures.Mesh.

Implement ClusteringAlgorithmFactory

Write down a factory class that instantiates clustering methods on the fly. The creation part should only consider methods that inherit from the abstract base class. For a reference, we can go back to APC524's assignment 02, where we could select among different integrators

Implement BisectorField() generator

Feature Request

As a [role], I want [something] so that [benefit].

Details

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sphinx - template

To Reproduce
invoke docs

The error I get is
compas_template is not installed.

The solution I found
... was to pip install sphinx-compas-theme .

Question
Should we add it to requirements.txt ?

Implement 3DViewer()

A viewer that displays multiple meshes and multiple vector fields simultaneously in 3d space

Design and implement a CLI based on 01_directional_clustering.py

Check the aforementioned script and create a command-line interface (likeddo.c in assignment 2) which allows a user to run script 01_directional_clustering.py from the terminal (or anaconda prompt on Windows).

We may want to look at things like argparse in Python to make sense to how to pass in arguments to the script directly. A very cool library to do this instead is python-fire. Check it out here: https://github.com/google/python-fire

By implementing the CLI, we will see more clearly what is needed to set up an adequate API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.