Jump to content

DomC

Member
  • Posts

    604
  • Joined

  • Last visited

Everything posted by DomC

  1. Hi Use "Print Debug" to see, what's coming in the "Create Layer" Node. If you have always the same layer name (input) or the same layer handle (output), all your viewports will created on the same sheet layer.
  2. Sure The Script needed a little Updates for 2019. Cause the Path Handling in 2019 is better than in 2017/2018 I had to delete some lines. Halftoning Farbige Punkte.vwx
  3. I worked on a node the last weeks over holiday season. The Node calculates all perpendicular distances from vertexes to edges and all distances from edges to edges. It filters some distances and returns the wanted number of small distances. 70% of the work was to separate the polygons (handling of the sequences), 20% was to synchronize and handle calculated values (1.987456879136870 identical with 1.987456879136869 or not)digits of the values of different measure lines. I hope it can help to solve the real task. https://forum.vectorworks.net/index.php?/files/file/193-polygon-survey/ The next step would be to evaluate a kind of "walking" line. So separate important and non important distances. Also it maybe would be an other good approach to "move" a circle or a square trough the polygon to evaluate distances. Hole also not implemented yet in my node.
  4. Hi This seems to be a very old thread 🙂 I did not found something newer. There seems to be a way to read plist on mac (not yet tried registry on win). Is there a more direct way? import plistlib file = 'Users/username/Library/Preferences/net.nemetschek.vectorworks.2019.plist' pl = {} with open(file, 'rb') as fp: pl = plistlib.load(fp) vs.AlrtDialog(str(pl.get("NNA Workgroup Folders")))
  5. Version 0.9.5

    73 downloads

    A Node which creates Measure Lines in Polygons (Line from every vetex point to every other vertex point). 1. p2p Lines: 2. Perpentidular Lines (Perpentidular Line from every poly vertex on every poly edge): To sort out needless lines, there are several filters integrated: 1. Double Lines automatically filtered with an epsilon (p2p is not the same as perpenticular if you look all 15 digits) 2. Measure Lines, which are identical with poly edges 3. Measure Lines, which are outside of the polygon 4. Overlapping lines. If two lines are parallel and both points of the smaller lines are on the bigger line, the bigger line is filtered 5. Filter Lines over and lower than min max values 6. An Option, to return a number of length (Return first x values). As example if there are measure lines with the length (1.2, 1.2, 1.25, 1.5,) and the value is 1, two lines with 1.2 will be returned. This value is holding on perpendicular and p2p lines. Summary: Turn off Debug options like "Show Edge", "show Outside Poly", Filter small length (niches) and set "Return first x values" on 1 or 2 to get optimal results. So a normal result will look like this: Attached there are three examples. An Example with spaces, An examples just with polys and an example as PlugIn. PlugIn is good for playing with the options to see changes prompt.
  6. I would do it like this 1. copy to not loose your original circles. 2. get list length and repeat one of the random numbers to get as many random numbers as your number of circles are All nodes are in the default library
  7. Version 0.9.6

    101 downloads

    This Network ist not very flexible (world based values, just one row) but still useful. You can insert and and ungroup for individual layout etc. Note! 1. First delete all classes and replace to "none" or "keine" 2. copy the object on your file 3. If you do not delete classes on the original, you will paste the classes from the example in your file
  8. If you don't have a Spotlight Serial (If you don't need Vision), you could delete (zip and delete the original) the Vision Folter in your Vectorworks Program Folder, this will prevent error message (at least till the next Update). I don't know how to get those Library other than get it from the installer or from another Computer which has installed Vectorworks. If you don't want to over-install your existing installation (whyever), you could install a second Vectorworks (rename the installation folder) and delete this folder after that. Then also your existing installation will find the libraries. Also you could copy the Libraries (see above Path) from another Mac. Hope that can help. P.S. I also had this Issue because I copy/paste the installation from another Mac (which worked the past 20 Years).
  9. @Benedick_Miller Thanks for Feedback. Certainly you are right. Maybe I edited this in the old forum and after conversion the edited intention was wrong. Or I just pasted wrong code (which is more probable), sorry for taken you busy by posting wrong code 🙂
  10. @STERNontwerp In your example you add 1 to last poly point (29) and check poly for index vertex 30. This returns 0 on my machine. Did I miss something? 1. Measure strategies We need two measure strategies. Perpendicular from every vertex point on every edge and from every point to every point 2. Filter strategies (We need several filter strategies) a. Filter results which measure outside the poly. Can be done with the "Nortwerp" Method. Check for intersection with this parallel poly. b. Filter results which measure end, hits a vertex point. c. Filter results, which are infinite or 0 I made an example which uses "vertex-point-perpenticular-on-edges" method. which solves orthogonal spaces. The point diagonal measures I did not implemented here yet. But now, what makes a break now. The issue, if I want to check several spaces. with a script like this. I think some list absorber nodes, will not be able to handle more than one poly input. The easiest and fastest solution maybe would be, to just make one node for this. To be truth I can't see another solution at the moment for this task. By the way, it would not be dumb, to have one node for this. 3. Visualisation: One of the next questions will be, how to visualize the result. There could be: a. Shortest distance, shortext x distances b. Distances less than x c. Colors d. .... The strategy I think is OK. The actual (attached) Version will solve ONE orthogonal, non rectangular space. With checking the points, the rectangular bound will solve automatically, also edge distances will be combined. I used colors. Red are short distances, green are long distances. Colors seems not the right way to mark small passages, but I tried out. smallest distance beta 0.8.3.vwx
  11. Hello If you have a Truetype Font, it has always two curves. Even it it called single line font. So direct converting a truetype font will result in two curves. What you could do, is to produce a font map like the above script in a software which integrates real vector fonts and export it to dxf/dwg. Import it in Vectorworks and modify it to the structure the marionette script needs to catch the characters. I use that for exporting it to my little milling machine.
  12. DomC

    Set Layer Node

    Hi Marissa Thank for that quick reply. Aha, now I understand the additional parent check.
  13. DomC

    Set Layer Node

    Hello I used my own "set layer" node in past. More recently the default library has a node "Set Layer". Did I understand it wrong or do this node just nothing? # The code in the node of default library l = self.Params.layer.value o = self.Params.object.value #script layer = vs.GetObject(l) #get layer handle of input layer name obj = vs.GetParent(o) #get parent of object input (obj = existing layer) vs.SetParent(obj, layer)#set existing layer to new layer that works? #outputs self.Params.obj.value = o As I understand, this code set the new layer as the parent of the existing layer. I think something like this, would be better, or not? #script layer = vs.GetObject(l) #obj = vs.GetParent(o) vs.SetParent(o, layer) Test Set Layer.vwx
  14. Hi I think this error is related to MacHD/Library/Application Support/Vectorworks .... If I zip and delete there the Vectorworks 2019 Folder I have the same issues as above so it is obvious this could have a coherence with the described issue. If this Folder does not exists or have unsufficient permission, this message can appear. This Files seems to be created only if the installer was used for installing Vectorworks (copy/paste of Program Folder and pref reset in user Folder will not resolve that issue). A new Installation will create this Folders.
  15. Attached an Example with Spaces (Name "Flur"). The original Example has the limitation, that some values of viewport position (function node and vector input) of are in mm instead of document units. I corrected this in the attached VWX example with spaces. The rotation task is not implemented. But the rest works for your scenario I think. Automated Layout Spaces.vwx
  16. Hello I try to push this somewhere between. As far as the criteria is matching (search for every space with Flur in the name or similar) It will push all such Spaces into the script. It would need the following adjustments: 1. Read Layer name of Space to make this layer visible in the viewport (easy task) 2. Read Room Infos to name layout with the room number, room and layer name etc. (easy task) 3. The project seems to be directed to north. So maybe you want to turn the viewports by this angle (maybe all the same angle?) or by the angle of the text label? (medium task, could take some hours to implement the angle) 4. In the existing Example the room would be marked with a rectangle around the bounding box of the room. For your scenario it would be better, to use a parallel polygon to the room polygon (particularly it the room is rotated as yours) (medium task) So it could take some hours to fit the example for your explicit usecase. Always this scripts have to perfect from experience. More perfect than any other tools because users can see, that every little limitation can be eleminated by a custom workflow script. Have all parts of the building the same angle? So what is about beeing the boss in the project and make your own angle of the building? It is a common workflow to not north the building and not use a international origin. You could layer-link the building in a georefered overview plan if it is necessary. Just a stupid idea. It is not possible to command a project angle and project origin in every project. But it would save time.
  17. Incredible clever to use an offset poly to detect inner corners! This can kill seven with one strike. Smallest distances would result on a combination of perpendicular lines from corners on edges on the right side of a cw polygon. And distances between inner corners which do not cross outer poly offset (still excited about that creative offset poly method). @STERNontwerp Great contribution
  18. The Idea was yours. Some good Scripts resulted of Ideas of real-existing exercises. I did not had that idea, because it is costly and the benefit may be low. I could give you an plan for the methode: 1. Make Polygon Clockwise (because you minimize number of solutions) 2. Define Vectors on every Polygon Edge which are perpendicular (let's call them measure lines) 3. Intersect measure lines with every line of the bounding polygon. Filter shortest intersection lines for every line 4. Draw perpendicular line from vertexes on every edge of the polygon and filter shortest lines 5. Filter measure lines of concave parts of the space polygon for getting out polygon out of space and refer to correct coordinates, just get object path node (which do not exists yet) use entity matrix on it (to refer to correct coordinates and angle) Maybe there was a pan-ready solution with shapely, numpy or other python packages. You will feel free, if you accomplish that by yourself ... 🙂 I did some work for that question. But I have to pause that until next year. Main issue (I would have to start new with perpendicular on edge method but I consumed my time for this with the perpendicular on vertex method). Which would do the job but is not the best solution. As you can see, this Script Version produces some measure lines, which we don't want do have (the concave parts). Also Diagolan Distances are not measured. Also perpendicular distances on edges are not measured (which is not necessary, if spaces are orthogonal) This Method will fail for non-orthogonal spaces. Which bother me now. The perpendicular on edge methode would be much bether. Also the concave parts for non-orthogonal shapes could be very tricky. For orthogonal parts i think it can be done for just delete parts, which have a continuation line with same direction (At least it looks like this). Maybe this all can be solved with the perpendicular measure on edge method (which looks now like a propper solution but maybe could be the wrong direction) Screenshot, where you can see, why this do not work on non-orthogonal spaces I hope, you unterstand what I did in the script and are able to continue your work on this. Some of the biggest puzzle already solved. The rest is routine peace of work 🙂 I used some custom nodes for that: 1. Rotate point (an existing custom node which is the same like rotate line, but I do not like to draw lines bevor all Points are calculated). I prefer the math way 2. Line Intersection Dir nearest. It calculates of a line1 the nearest collision with the lines input in input line2. The Standard intersection do not check direction so i desided to modify standard node. also the minimum line distance was hard to sort out. 3. Sort nested list (an existing one. Hard so sort several objects and values all by one type without that) smallest distance beta 0.8.0.vwx
  19. Fantastic, Now it works! I swared, I tried this ... 🙂
  20. Hi Anyone has experience with this function? sym_list, numItems = vs.BuildResourceList(16, 0, 0) for sym in range(numItems): s = vs.GetResourceFromList(sym_list, sym+1) name = vs.GetName(s) #vs.SetResourceTags(s, 'Tag1','Tag2') ot = vs.GetResourceTags(s) vs.AlrtDialog(str(ot)) If I tag manually with Tag1 and Tag2 the vsGetResourceTags(s) returns ,('Tag1','Tag2'). I am not able to find the array format to tag the symbol Any Ideas? Maybe I am to stupid. I think somewhere I have to give the index of the Tag or something like this. Thanks
  21. For sure, this is possible. But not an easy chase. It looks really interesting to solve that kind of task. Regardless the question if this would be a time-saving script. I see a lot of spaces in my life and most of them are much more simpler than that and a space contour like this maybe exists for less than 5% of the spaces. OK, in a big project with 3500 spaces, there could be still 150 spaces like this (corridors etc.) with critical minimum space. But what I know, just the initial question for every time consuming Project. OK, the possible procedere for this: 1. Find an algorithm, to check the distances. If the spaces could have every form and angles, the solution would result in a much higher complexity. 2. If the spaces are at 90° angles, it could be a simple strategy like draw a (two in both directions but just use the one, which do not hit a space bound line) perpendicular line on every edge and check where it collide with another boundary line. It would fail with freeform (or inaccurate) spaces but is relatively simple: If the strategy matches, you will have further hurdles. 3. How to extract polygon from space 4. How to check intersection of perpendicular lines 5. How to check which direction line has to be checked 6. how to mark at least the smallest passage (I think in the middle of the line from which the edge line was generated the smallest distance) Interesting. A Script which detects smallest passage in a space. But if you will transport bigger objects and check if they stuck somewhere this is maybe not exact enough because you have to turn things around the edges (We know that from apartment relocation :-)
  22. Version 1.0.0

    217 downloads

    Example of a 2D/3D Marionette PIO with a Custom Wall hole. The Geometry of the Window and the embrasure is based on a symbol. Also the 2D Drawing is based on a symbol. The Geometry is reshaped by the 2D and 3D Reshape node. So the Script itself is relatively slim. Replace the Geometry with everything else you can draw. Generic solids are recommended. Also you could script some additional geometry for window division while frame is parametrized by reshape node. This will go on. It took about 2 hours to draw the geometry and 2 hours to parametrize it. Impressive, how quick we can produce PIOs with Marionette based on that workflow.
  23. Version 1.0.0

    69 downloads

    Show Size of the active Document
  24. Version 1.0.1

    93 downloads

    This Wrapper contains two Marionette Nodes: 1. GetActFile -> Returns the Path of the Active Document 2. OpenDocFolder -> Starts a Subprocess of Finder (Macintosh) or Explorer (Windows) to show a Window from the input Path Just Test by executing Wrapper. If you like it, add it to your Marionette menu commands.
  25. Version 1.0.1

    123 downloads

    If you often have objects like imported pictures or imported PDFs with many objects or pages, this Marionette Menu Command can be handy. It aligns objects to the bounding box buttom and stick it together to the bounding box width.
×
×
  • Create New...