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

Hdm tab #6

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions HdM.tab/VISUALIZATION.panel/AreaHelper.pushbutton/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tooltip: >
Visualize Areas in 3D


How to Use:


1. Select an area scheme and level, then click "Visualize" to begin. This action creates 3D representations of the selected areas.


2. All parameters associated with the selected areas are automatically transferred to the corresponding 3D instances.


3. Upon closing the script, all generated 3D instances are automatically purged to maintain a clean workspace. If you wish to keep any instances, ensure to 'bake' them into the model.


4. To emphasize specific areas, select their 3D instances and activate the script button once more. This highlights the chosen areas for easy identification.


5. Utilize tools like "Color Splasher" or "Colorize Selections" to apply color to the 3D instances, enhancing their visual distinction.


Troubleshooting Tip: If you encounter any areas that cannot be visualized, inspect and clean their boundaries for improved results.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions HdM.tab/VISUALIZATION.panel/Check3D.pushbutton/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tooltip: >-
Create a 3D view directly from the current floor plan, ceiling plan or section view.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def tint(rgb, factor):
newB = rgb[2] + ((255 - rgb[2]) * factor)
return [newR, newG, newB]

count = len(revitron.Selection.get())

if count == 0:
forms.alert('No element selected.', ok=True)
sys.exit()

with revitron.Transaction():
paramValuesDict = compareParameterValues(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tooltip: Colorize selected elements by a parameter. Choose a parameter from selected element and see if other elements of the same category have the same value.
help_url: https://git.herzogdemeuron.com/pyrevit/qualitron/-/blob/master/Revitron.tab/Qualitron.panel/Visualize.pulldown/CompareParameterValues.pushbutton/README.md
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions HdM.tab/VISUALIZATION.panel/Colorize.pulldown/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
layout:
- CompareParameterValues[title:Colorize Selection]
- Warnings[title:Show Warnings]
- ClearColors[title:Clear Colors]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions HdM.tab/VISUALIZATION.panel/RoomHelper.pushbutton/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tooltip: >
Visualize Rooms in 3D


How to Use:


1. Select a level, then click "Visualize" to begin. This action creates 3D representations of the selected rooms.


2. All parameters associated with the selected rooms are automatically transferred to the corresponding 3D instances.


3. Upon closing the script, all generated 3D instances are automatically purged to maintain a clean workspace. If you wish to keep any instances, ensure to 'bake' them into the model.


4. To emphasize specific rooms, select their 3D instances and activate the script button once more. This highlights the chosen rooms for easy identification.


5. Utilize tools like "Color Splasher" or "Colorize Selections" to apply color to the 3D instances, enhancing their visual distinction.


Troubleshooting Tip: If you encounter any rooms that cannot be visualized, inspect and clean their boundaries for improved results.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions HdM.tab/VISUALIZATION.panel/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
layout:
- Check3D[title:Check 3D]
- Colorize
- RoomHelper[title:Room Helper]
- AreaHelper[title:Area Helper]

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions Revitron.tab/Qualitron.panel/Visualize.pulldown/bundle.yaml

This file was deleted.

Binary file not shown.
7 changes: 0 additions & 7 deletions Revitron.tab/Qualitron.panel/bundle.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions Revitron.tab/bundle.yaml

This file was deleted.

12 changes: 9 additions & 3 deletions lib/qualitron/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from revitron import _
from System.Collections.Generic import List
import sys
from pyrevit import forms

class ElementOverrides:
"""
Expand Down Expand Up @@ -313,6 +314,11 @@ def createSectionBbox(view2d, points, plane):
crsm = view2d.GetCropRegionShapeManager()
crop = crsm.GetCropShape()

# check if active view is a sheet
if view2d.ViewType not in (planViewTypes + sectionViewTypes):
forms.alert('Can only create 3D view from plan or section view.', ok=True)
return

recCheck = False
if crop:
crop = crop[0]
Expand All @@ -321,11 +327,11 @@ def createSectionBbox(view2d, points, plane):
if rec:
recCheck = True
else:
print('View Crop is not rectangular.')
forms.alert('View Crop is not rectangular.', ok=True)
else:
print('Please turn on view crop.')
forms.alert('Please activate view crop.', ok=True)
if not recCheck:
sys.exit()
return

cropPts = getCropPoints(crop, plane)
if view2d.ViewType in planViewTypes:
Expand Down
Loading