diff --git a/ea-scripts/Boolean Operations.md b/ea-scripts/Boolean Operations.md index 5ae1368..4c734e5 100644 --- a/ea-scripts/Boolean Operations.md +++ b/ea-scripts/Boolean Operations.md @@ -1,5 +1,10 @@ /* -With This Script it is possible to make boolean Operations on Shapes. +With This Script it is possible to make boolean Operations on Shapes. +The style of the resulting shape will be the style of the highest ranking Element that was used. +The ranking of the elemtns is based on their background. The "denser" the background, the higher the ranking (the order of backgroundstyles is shown below). If they have the same background the opacity will decide. If thats also the same its decided by the order they were created. +The ranking is also important for the diffrence operation, so a tranparent object for example will cut a hole into a solid object. +![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-boolean-operations-showcase.png) +![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-boolean-operations-element-ranking.png) See documentation for more details: diff --git a/ea-scripts/README.md b/ea-scripts/README.md index 2ee0fe9..b058eec 100644 --- a/ea-scripts/README.md +++ b/ea-scripts/README.md @@ -33,6 +33,7 @@ Open the script you are interested in and save it to your Obsidian Vault includi |[Add Link to Existing File and Open](Add%20Link%20to%20Existing%20File%20and%20Open.md)|Prompts for a file from the vault. Adds a link to the selected element pointing to the selected file. You can control in settings to open the file in the current active pane or an adjacent pane.|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-add-link-and-open.jpg)|[@zsviczian](https://github.com/zsviczian)| |[Add Link to New Page and Open](Add%20Link%20and%20Open%20Page.md)|Prompts for filename. Offers option to create and open a new Markdown or Excalidraw document. Adds link pointing to the new file, to the selected objects in the drawing. You can control in settings to open the file in the current active pane or an adjacent pane.|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-add-link-to-new-page-and-pen.jpg)|[@zsviczian](https://github.com/zsviczian)| |[Add Next Step in Process](Add%20Link%20to%20New%20Page%20and%20Open.md)|This script will prompt you for the title of the process step, then will create a stick note with the text. If an element is selected then the script will connect this new step with an arrow to the previous step (the selected element). If no element is selected, then the script assumes this is the first step in the process and will only output the sticky note with the text that was entered.|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-add-process-step.jpg)|[@zsviczian](https://github.com/zsviczian)| +|[Split Ellipse](Boolean%20Operations.md)|With This Script it is possible to make boolean Operations on Shapes.|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-boolean-operations-showcase.png)|[@GColoy](https://github.com/GColoy)| |[Box Each Selected Groups](Box%20Each%20Selected%20Groups.md)|This script will add encapsulating boxes around each of the currently selected groups in Excalidraw.|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-box-each-selected-groups.png)|[@1-2-3](https://github.com/1-2-3)| |[Box Selected Elements](Box%20Selected%20Elements.md)|This script will add an encapsulating box around the currently selected elements in Excalidraw.|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-box-elements.jpg)|[@zsviczian](https://github.com/zsviczian)| |[Change shape of selected elements](Change%20shape%20of%20selected%20elements.md)|The script allows you to change the shape of selected Rectangles, Diamonds and Ellipses|![](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/scripts-change-shape.jpg)|[@zsviczian](https://github.com/zsviczian)| diff --git a/ea-scripts/index-new.md b/ea-scripts/index-new.md index 10b5e83..ab730c7 100644 --- a/ea-scripts/index-new.md +++ b/ea-scripts/index-new.md @@ -112,6 +112,7 @@ I would love to include your contribution in the script library. If you have a s | | | |----|-----| |
|[[#Auto Draw for Pen]]| +|
|[[#Boolean Operations]]| |
|[[#Copy Selected Element Styles to Global]]| |
|[[#Hardware Eraser Support]]| |
|[[#Palette Loader]]| @@ -179,6 +180,13 @@ https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea ```
Author@1-2-3
SourceFile on GitHub
DescriptionThis script performs automatic layout for the selected top-level grouping objects. It is powered by elkjs and needs to be connected to the Internet.
+## Boolean Operations +```excalidraw-script-install +https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/Boolean%20Operations.md +``` +
Author@GColoy
SourceFile on GitHub
DescriptionWith This Script it is possible to make boolean Operations on Shapes.
The style of the resulting shape will be the style of the highest ranking Element that was used.
The ranking of the elemtns is based on their background. The "denser" the background, the higher the ranking (the order of backgroundstyles is shown below). If they have the same background the opacity will decide. If thats also the same its decided by the order they were created.
The ranking is also important for the diffrence operation, so a tranparent object for example will cut a hole into a solid object.

+ + ## Box Each Selected Groups ```excalidraw-script-install https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/Box%20Each%20Selected%20Groups.md diff --git a/images/scripts-boolean-operations-element-ranking.png b/images/scripts-boolean-operations-element-ranking.png new file mode 100644 index 0000000..139c028 Binary files /dev/null and b/images/scripts-boolean-operations-element-ranking.png differ diff --git a/images/scripts-boolean-operations-showcase.png b/images/scripts-boolean-operations-showcase.png new file mode 100644 index 0000000..3e397b3 Binary files /dev/null and b/images/scripts-boolean-operations-showcase.png differ