Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 10, 2023
2 parents a7e0dba + e1a2fe3 commit 9dae7f0
Show file tree
Hide file tree
Showing 56 changed files with 12 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python: ['3.8', '3.9', '3.10']

steps:
- uses: compas-dev/compas-actions.build@v2
- uses: compas-dev/compas-actions.build@v3
with:
python: ${{ matrix.python }}
test_lint: true
invoke_lint: true
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
python: ['3.8', '3.9', '3.10']

steps:
- uses: compas-dev/compas-actions.build@v2
- uses: compas-dev/compas-actions.build@v3
with:
python: ${{ matrix.python }}
test_lint: true
invoke_lint: true

Publish:
needs: build
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/artists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

@plugin(category="factories", requires=["Rhino"])
def register_artists():

Artist.register(FormDiagram, RhinoFormArtist, context="Rhino")
Artist.register(ForceDiagram, RhinoForceArtist, context="Rhino")

Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/conduits/forceinspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def DrawForeground(self, e):
D = length_vector(cross_vectors(subtract_vectors(a, c), subtract_vectors(b, c)))

if D / L < self.tol:

point = Point3d(*c)
draw_dot(point, str(index), self.dotcolor, self.textcolor)

Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/conduits/forminspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def DrawForeground(self, e):
D = length_vector(cross_vectors(subtract_vectors(a, c), subtract_vectors(b, c)))

if D / L < self.tol:

point = Point3d(*c)
draw_dot(point, str(index), self.dotcolor, self.textcolor)

Expand Down
17 changes: 8 additions & 9 deletions src/compas_igs2/rhino/forms/attributesform.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def create_force_table(cls, sceneNode, dual=[]):
attributes = filter(lambda attr: attr in Allowed, attributes)

for attr in attributes:
checkbox = type(datastructure.default_edge_attributes[attr]) == bool
checkbox = type(datastructure.default_edge_attributes[attr]) is bool
attr = attr.replace("_", "-")
table.add_column(attr, Editable=False, checkbox=checkbox)

Expand Down Expand Up @@ -146,7 +146,7 @@ def create_constraint_edge_table(cls, sceneNode, dual=[]):
attributes = filter(lambda attr: attr in Allowed, attributes)

for attr in attributes:
checkbox = type(datastructure.default_edge_attributes[attr]) == bool
checkbox = type(datastructure.default_edge_attributes[attr]) is bool
attr = attr.replace("_", "-")
table.add_column(attr, Editable=False, checkbox=checkbox)

Expand Down Expand Up @@ -184,7 +184,7 @@ def create_constraint_formvertex_table(cls, sceneNode, dual=[]):

for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_vertex_attributes[attr]) == bool
checkbox = type(datastructure.default_vertex_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=False, checkbox=checkbox)
Expand Down Expand Up @@ -215,7 +215,7 @@ def create_constraint_forcevertex_table(cls, sceneNode, dual=[]):

for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_vertex_attributes[attr]) == bool
checkbox = type(datastructure.default_vertex_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=False, checkbox=checkbox)
Expand All @@ -240,7 +240,7 @@ def create_vertices_table(cls, sceneNode):
attributes = table.sort_attributes(attributes)
for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_vertex_attributes[attr]) == bool
checkbox = type(datastructure.default_vertex_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=editable, checkbox=checkbox)
Expand All @@ -266,7 +266,7 @@ def create_edges_table(cls, sceneNode):

for attr in attributes:
editable = attr[0] != "_"
checkbox = type(datastructure.default_edge_attributes[attr]) == bool
checkbox = type(datastructure.default_edge_attributes[attr]) is bool
if not editable:
attr = attr[1:]
table.add_column(attr, Editable=editable, checkbox=checkbox)
Expand Down Expand Up @@ -365,10 +365,10 @@ def on_edited(sender, event):

original_value = get_set_attributes(key, attr)

if type(original_value) == float and type(new_value) == int:
if type(original_value) is float and type(new_value) is int:
new_value = float(new_value)
if new_value != original_value:
if type(new_value) == type(original_value):
if type(new_value) is type(original_value):
print("will update key: %s, attr: %s, value: %s" % (key, attr, new_value))
self.to_update[(key, attr)] = (get_set_attributes, new_value)
else:
Expand Down Expand Up @@ -524,7 +524,6 @@ def on_close(self, sender, event):


if __name__ == "__main__":

scene = get_scene()
form = scene.get("FormDiagram")[0]
force = scene.get("ForceDiagram")[0]
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ def installable_rhino_packages():


if __name__ == "__main__":

print("This installation procedure is deprecated.")
print("Use `python -m compas_rhino.install` instead.")
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

@plugin(category="ui")
def register(ui):

plugin_name = "IGS2"
plugin_path = os.path.join(HERE, "ui", plugin_name)
if not os.path.isdir(plugin_path):
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/ui/IGS2/dev/IGS2__toolbar_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI() # noqa: F841

config = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


def RunCommand(is_interactive):

IGS2_form_select_ind_cmd.RunCommand(True)
IGS2_form_assign_forces_cmd.RunCommand(True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


def RunCommand(is_interactive):

options = ["FromObj", "FromLines", "FromLayer"]
option = compas_rhino.rs.GetString("Create Form:", strings=options)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


def RunCommand(is_interactive):

options = ["ForceMagnitude", "Orientation"]
option = compas_rhino.rs.GetString("Constraint Edge:", strings=options)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


def RunCommand(is_interactive):

options = ["FormDiagram", "ForceDiagram"]
option = compas_rhino.rs.GetString("Constraint Vertex in the:", strings=options)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


def RunCommand(is_interactive):

options = [
"EdgesTable",
"EdgeInformation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/ui/IGS2/dev/IGS2_docs_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI() # noqa: F841

webbrowser.open("https://blockresearchgroup.github.io/compas_ags/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/ui/IGS2/dev/IGS2_edges_table_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/ui/IGS2/dev/IGS2_force_move_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down Expand Up @@ -51,7 +50,6 @@ def RunCommand(is_interactive):

# Start interactive loop
while True:

# Ask to select vertices
# and abort if there are none
vertices = force.select_vertices("Select vertices (Press ESC to exit)")
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/ui/IGS2/dev/IGS2_force_scale_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
1 change: 0 additions & 1 deletion src/compas_igs2/rhino/ui/IGS2/dev/IGS2_force_update_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down Expand Up @@ -52,7 +51,6 @@ def RunCommand(is_interactive):

# Start an interaction loop
while True:

# Update the scene
ui.scene.update()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

@UI.error()
def RunCommand(is_interactive):

ui = UI()

# Get the FormDiagram from the scene
Expand Down
Loading

0 comments on commit 9dae7f0

Please sign in to comment.