Jump to content

DomC

Member
  • Posts

    604
  • Joined

  • Last visited

Everything posted by DomC

  1. Hi Matt Thanks for interesting in this theme. I think you need another (more simple :-) script to make that regular circle stacking. Idea to solve that 1. We can think in hexagons to draw the circles 2. Create all radius of your point and sort them. from small to big 3. So you have your parameter n-circles (if ever needed) 4. Or checking distance from every circle to the center to have a radial- and not a hexagonal border 5. attach numbers and data to them 6. Labeling them I try to give you a start ... The rest is routine peace of work :-) Edit: New Version (Repeat instead of mix2 node) circle stacking v3.vwx
  2. Can an Vectorscript solve this problem? The answer is yes. If you ask for a Vectorscript function for that: The answer is no. And the task is not really clear. You want to find the widest rectangle with the height x? Or you want the have the rectangle with the largest area? Or the widest Rectangle which height is minimum 20% (or some kind like this) of the width? I think the simplest way would be, to make a grid over your polygon. Then you have rows and columns. With that, you could generate the biggest, the widest and the highest recangle. Not sure, but I think this could be a possible approach. I would do that with python script. There seems to be solutions available on the net. As example here: https://gist.github.com/zed/776423 This code for that looks quite simple. Maybe that script has to be adjusted. As example store the start endpoint of the rectangle inside the script. At the moment this just returns max area, width and height not the position. Interesting and useful task ...
  3. This looks as a part of the Marionette method to automatically install a used python module.
  4. Hi Im am not sure, what you are planing exactly. To be clear: I have no Idea, but I would like to help you. As far as I can see: 1. You loop all selected Objects in the Layer-Name 'Layer' and apply the function rename(). 2. The function rename shows a dialog Box with the handle value (which is a good test to show, if your script works -as far as we don't select hundreds of objects to test) If you want to use data of those objects you can pull them in your function. like a.E. 'vs.GetName(h)' to get the Name of the object. Or other vs-methods which gets other kind of data. Then the next step would be, to handle the "other objects in the same layer." to populate them with this data. Maybe with the criteria "((L='Layer') & (SEL=FALSE))" to get all other objects in the same layer? If you want to delete objects or change stacking order (or other things, that affects the criterial or the order) you should write your handles in a list variable and change them in a second loop (for item in ..... as Example)
  5. Hi I agree, I also wish we had some kind of report Window or Message Window. Which can show more than a few characters and which could add the messages. This would be grate. "Useless" is a hard word :-) vs.Message shows the last Message Window called in a Script. This could make quite sense but makes it useless to report several happenings during runtime of the script (See, how values change etc. -> this also just would work if we slow-down script). I Think you are searching for a "debug" function, which do not exists at the moment for python scripts inside the script editor. Maybe "vs.AlrtDialog()", could be an alternative to show messages. I use this, if I have only a few values I want to debug. Also we can switch on the Program Option "run script in debug modus" and use the print() command. I often use this, to check values in a loop. Where vs.AlrtDialog() would open endless dialogs. Example: for i in range(10): print(str(i)+' Line4 '+str(i+i)) print(str(i)+' Line5 '+str(i*i)) print(str(i)+' Line6 '+str(i**i)) Besides that ... cool, we have colored python code now in the forum! This code returns values in an "Error-Window"
  6. Accidentally, we all try to solve the same problem at the same time :-) My solution: SollWinkel = 45 def DoSomething(h): if vs.GetType(h) == 15: #Symbol in Drawing x,y = vs.GetSymLoc(h) #vs.Locus(x,y) #Test Symbol insertion Point IstWinkel = vs.GetSymRot(h) Winkel = SollWinkel-IstWinkel vs.HRotate(h, x,y, Winkel) return() vs.ForEachObject(DoSomething, "SEL=TRUE") Always most difficult to find the right script commands.
  7. @Patrick Very useful node for different use cases. Dragged in my Node-Library ... Thanks for sharing.
  8. Version 1.0.0

    125 downloads

    An Example which shows, how to collect objects on one or more circular area(s) and modify them. It could be use for gravity or suction effects.
  9. Version 1.1.1

    438 downloads

    Places a Marionette object, which contains symbols from a specific symbol folder. Offset and rows, can be defined. Handy for a quick and printable preview of symbols in a specific folder.
  10. Version 1.0.0

    232 downloads

    A Text-Script based Marionette Object. Technical Info: About 30 Options in the Object Info palette. And many if then combinations, which results in drawing/not drawing a part of the cabinet. I did this first with a graphical script network. But there was no possibility to NOT execute part of a graphical script because of an option. It is just possible to execute/draw everything and then delete objects. Which results in a disadvantage of speed. So I decided to write code instead. Anyway, this is also something, marionette can be used for. Youtube Link: https://www.youtube.com/watch?v=lUmXE-3ONlE
  11. Version 1.0.0

    119 downloads

    This Marionette PIO draws a brochure holder with various settings. Parameters over Info Palette. Profiles and brochure (Brochure Textures, brochure Format) over control geometry. Enter and edit control geometry in top plan view (correct bounding box). Special: Use of a custom Node, which automatically aligns an object by its bounding box to a referenced place.
  12. Version 1.1.1

    320 downloads

    This is one of the files used in the Marionette launch video. It was created by Dominique Corpataux at Computerworks.
  13. Version 1.0.0

    17 downloads

    This example shows, how to list filenames and foldernames of a folder on your disk. Contains the following Custom Nodes: 1. "GetActFile" --> The Path of the active Vectorworks document. 2. "ListDir" --> Folder- and Filenames of a directory 3. "GetNextObject" --> Handy to grab objects directly out of the script short movie documentation: FileAndFolderList.vwx
  14. Version 1.0.0

    16 downloads

    In this Example there are used some custom Nodes: 1. "GetSubstring" --> Search for a string inside another string and returns Position and count. This will be necessary to set them to a Text Style Resource. 2. "GetInsideChar" --> Returns strings which are inside specified characters (normally quote or double quote) 3. "GetSubstringExcludeQuote" --> Same as the first one, but it to not return text inside quotes 4. "GetNumberFromString" --> Search for Numbers inside a String. 5. "GetNextObj" --> Put This in a Wrapper and it will return the next object after this node. This is a great one!! Can be used also for input geometry inside a script network. Without naming or other smut. This could be improved by further code (find standalone or text in word, find integer, find float, etc.) But It works for most cases perfectly.
  15. Version 1.0.0

    41 downloads

    A collection of some custom nodes for file and system actions. 1. "OpenDocFolder" --> Open a finder or explorer window. As example the folder of the open document. 2. "ListDir" --> Lists Files and Folders of a specific path. 3. "FileInfo" --> A detailed list with file infos like file size, path, permission, last edit etc. 4. "DateTime" --> Returns the actual date and time. 5. "PlayMP3" --> I nice one, which presents the potential by controlling external apps like an mp3 player etc. 6. "FetFilesInFolder" --> Returns files of a specific type (by suffix) from a specific folder 7. "DialogFolder" --> A dialow window to choose a folder
  16. Version 1.0.0

    128 downloads

    This Marionette network uses a custom node, which implemented the pixel-based try and error code (I think there is no other way to create voronoi, is it?) from here https://en.wikipedia.org/wiki/Rosetta_Code Instead of Pixels it uses rectangles which were extruded in random height (ground height is different in every voronoi cell). And different full spectrum random colours (which would look much better with adapted colour design). Carefull playing around with values. Do not enter to high or to low values. Creating 843'135'013 extrudes, could take a while :-)
  17. This Marionette Object Shows its layer name (last word) and the layer stacking order as a label. I often create documentation inside Vectorworks and do not want to use other applications for that. All we need is Vectorworks! Contains some custom nodes: 1. "GetAllLayer" A List of Design Layers and a List of Sheet Layers 2. "Backward" A node to send an object in background (did not fount a native node for that ..?) 3. "GetLastWord" split the last word from a string 4. "GetObject" Wrapper to grab a Text Object with a Text Style and to transport this Textstil by copy/paste the script Nothing spectacular but could be handy and really helps saving time compared to manually texting or stamping a counter on every layer. Also with the "GetLastWord" node, the layer can contain the chapter in his name. page_numbering.vwx
  18. Lilith Happy to see you pulled some launch assistance out of my workshop and are on the way to speed up some workflows :-) I think your script will work fine. By the way, if you want to exclude all sheet layers (If you create a New Sheet, your script had to be adjusted) in your "object-collecting-function", you can do this as follows: def DoSomething(h): t = vs.GetObjectVariableInt(h,154) if t == 1: #Vectorscript Appendix 1-> Design Layer, 2-> Sheet layer GefundeneObjekte.append(h)
  19. I Think changing dynamically the Node definition is not possible because of different reasons. Anyway we should not hack the internal name without rerun the node definition process properly, because this is stored (cached, compiled, don't know) somewhere unknown when you exit node editor. this = Marionette.Node('ThisMustNotBeChanged','ThisCantBeChanged') What could be changed is the node Name in the Info-Palette. Which is stored in a normal record format. Then you could implement the following code in the RunNode method: def RunNode(self): calcType = self.Params.calcType.value a = self.Params.a.value b = self.Params.b.value if calcType == 0: vs.SetRField(self.Handle, 'MarionetteNode', 'NodeName', 'Add') self.Params.c.value = Marionette.TupleMap(operator.add, a, b) elif calcType == 1: self.Params.c.value = Marionette.TupleMap(operator.sub, a, b) vs.SetRField(self.Handle, 'MarionetteNode', 'NodeName', 'Substract') vs.ResetObject(self.Handle) So after running the node (the script) the name changes. Better than nothing? DynamicName.mp4
  20. Very nice, thanks for figuring out that ...
  21. @Alan Woodwellthanks for posting them. Those are outdated versions of the included nodes. Except the "Schlitz"-Node I used for the slot pipe (I hope this is nothing obscene in english :-) example. Passing through my mind, I never posted that. Movie and example of that "Schlitzrohr". schlitzrohr.vwx Schlitzrohr.mp4
  22. The Descreption was all right for the first version of the Get Bounding Box Node. Because the Script-Command does exactly this and returns wrong results in wrong views. The Marionette engine I think, newly run the script in a Top Plan view. So the Descreption should be changed. From a isolated view, the desception is matching exactly for the RunNode() Methode. But the Node runs in the Marionette class, which changes to TopPlanView.
  23. Pretty well documented directly in the file with example input and outputs. 1. Object Creation: Enhanced Rectangle (great), PointToMesh (good), collect on Area (unfinished) 2. Object Info Nodes: BoundingBoxEnhanced (great), CountTypeByCriteria (useful), GetPlugInPosition (very specific), GetResourceByName (useful), ObjectTypePopup(clever), ObjectTypeToString(useful), SetPage (very specific) 3. Operation Nodes PutByRefPoint(great, powerful), LinearArea(good), ConvertToGroup (very specific) 4. Record Nodes GetRNames(good), RecToTable(powerfull), GetMultiRecValues (specific usecase) 5. TextAndStringNodes 10 cool nodes for text and string. Replacing, separating, coloring, Dimension Text Size, 6. WorksheetNodes 4 good nodes and Wrappers to pull worksheet data. 7. Import, Export Nodes Great nodes to use in real money making projects. PDF, SketchUp, Import csv, import ini 8. Data Flow Nodes CreateDict (Dict is a special form of list Data (every value has a name in simple words)), GetDict, DeleteDuplicates(Delete Duplicate Points as example), ItemsToList (convert single values to list data), Looser, Shuffler, RepeatList 9. BIM Nodes IsObjectOnSpace(very powerfull node), SetSymbolScale (handy), SetWallHole, Symbol3D, SymbolInFolderOrFile BIM Nodes.vwx Data Flow Nodes.vwx Import, Export Nodes.vwx Object Creation Nodes.vwx Object Info Nodes.vwx Operation Nodes.vwx Records Nodes.vwx Text and String Nodes.vwx Worksheet Nodes.vwx
  24. Hello I putted some of my geometry-math-point nodes (resource-browser-ready) together on a single file. I started to clean up all my marionette stuff, so I think here is a more secure place to store, as on my desktop :-) Point_Nodes.vwx
  25. A collection of some custom nodes for file and system actions. 1. "OpenDocFolder" --> Open a finder or explorer window. As example the folder of the open document. 2. "ListDir" --> Lists Files and Folders of a specific path. 3. "FileInfo" --> A detailed list with file infos like file size, path, permission, last edit etc. 4. "DateTime" --> Returns the actual date and time. 5. "PlayMP3" --> I nice one, which presents the potential by controlling external apps like an mp3 player etc. 6. "FetFilesInFolder" --> Returns files of a specific type (by suffix) from a specific folder 7. "DialogFolder" --> A dialow window to choose a folder System Info and Action Node.vwx
×
×
  • Create New...