Jump to content

DomC

Member
  • Content Count

    362
  • Joined

  • Last visited

Community Reputation

153 Spectacular

About DomC

  • Rank
    Journeyman

Personal Information

  • Location
    Switzerland

Recent Profile Visitors

2,860 profile views
  1. DomC

    Space dimensions

    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
  2. DomC

    vs.SetResourceTags(handle, tags)

    Fantastic, Now it works! I swared, I tried this ... 🙂
  3. 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
  4. DomC

    Space dimensions

    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 :-)
  5. Version 1.0.0

    10 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.
  6. Version 1.0.0

    4 downloads

    Show Size of the active Document
  7. Version 1.0.1

    8 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.
  8. Version 1.0.0

    14 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.
  9. DomC

    Save-Recall-Memory

    Hi I like the wish of transporting dada without wires. I can see many issues with your approach and would not use that. It maybe would be better to cache data on an external ressource or on the recall wrapper itself. You could name the recall wrapper an send data from the save wrapper to a record format which will be attached to the recall wrapper. I am working on a cache node, which cache everything that is running through a wire. That would be very good for caching data of a big network which need a long time to calculate and would speed up workflows. You could save global variables as well, which would be the technicall solution for wireless data. But if you load a global variable before it was stored it could
  10. DomC

    Marionette Hybrid

    I guess, you have to change the order of object creation in a way, your small objects were created at the end (maybe dummy nodes, groups or something like this). Also you could try to use commands (looks like you know how to create a node) for sending objects backward and forward. vs.HMoveBackward(h, toBack) vs.HMoveForward(h, toBack) could work. But I think it is a problem if you want to send something in front of an uncreated object. You can find a "backward" node in my node collection here:
  11. DomC

    DomC Nodes

    Version 0.0.9

    39 downloads

    Attached a vwx with nodes. Some of them already shared as separate files. Also the list is not complete, not perfect and has no warranty of being up to date. Also some nodes may be outdated, obsolet or buggy. Take note: 1. I tried to track the nodes with an addition record format 2. Marionette Nodes are linked to a record format, this record format contains descreption and Other infos from to the node. 3. Also this Record contains a rating of the node (internal rating for me) like is this node hard to make, will it be useful for many users or just for one special case etc. 4. The Record can be linked manually to a node and then the node's Data can be written by a script. Ration Infos logically has to be attached manually 5. On the document is a worksheet with all nodes listed The Info below is originally from the nodes (included original misspelling etc :-) Node Names Symbol3D ObjOnSpace SymbolPopupSymFolder SetWallHole IsMember_already SortNestedList CreateDictsV Sort RotatePtRoundPt FibonacciSphere Wrapper C_Tangent_to_CC PtPerpendicularOnLine CircCircInters CircleLineInters LineLineIntersec Pt to Circle Center 2CircleCenterLine 2Circle_4Pts Apollonius PCC CCC v1 subPoints addPoints PtTangToCircle Wrapper Wrapper Get Z atXY Grow Radial is cw Wrapper Wrapper Wrapper 2D Pt Shaker v01 HexCircleGrid GetPtVectors GetPolar180 DialogFolder ExportPDF ImportSU function4 GetNextObject PageBased_mm VersionInfo Button MeshFromPoints collectObjectOnArea Any SetPage BBox Overlap GetString GetString GetNumber GetInsideChar Print GetMultiRecValue GetActFile GetNumDatabaseRow GetSubCell GetMultiRecField Backward DupInContainer Solid Intersect List DupOnAcLayer DupOnAcLayer ConvertToGroup Reset Obj BasicSolidReshapeScale NumToRow ObjByClassAndLayer Set Class MinItem If_ SpaceWithObj LocusMS GetPointClusters ConcaveHull Create Viewport Add VP Ann VP Layer Set Mrntt OIP Field Get Mrntt OIP Field Insert Symbol in Folder CreateLayer FilterValues PtArrayStartEnd ValuesToSaldo Vector to Angle PointRectangle Wrapper Eval Eval AttachUnit Color Custom Pulldown EnhRectangle RoundedBoard 2D_BBox_Enhanced TypeToString TypePopup TypeCounter GetRes Get Sym Name Name2Index Text in Lines TextBlockInLines SetDimTextSize SetTextSize ListToLabel TextBlockInLines RecToTable OpenDocFolder GetActFile ListDir FileInfo os_stat DateTime GetActFile DialogFolder PlayMP3 Wrapper Linear Array xyz PutByRefPt SymbolinFolder Link Text GetDictValue Repeat_List shuffle shuffle_dup_true looser itemsToList Remove Duplicate Items UnnestL GetFiles Imp ini Imp txt Solid Boolean GetRNames Concat MergeList Flatten List S LinearDimLight Change Sheet Title Get Sheet Title Get Layer Name Get SheetL Size Get Sheet Page N Manipulate File UTF Custom Pulldown Node Descriptions Descreption Insert a Symbol Returns a List of Objects for every Space Creates a popup of all Symbols in a Folder. You have to edit Script to change Folder Set the input Geometry as a Wall hole of an object Returns isM, if the corresponding object is already in the list Example list1 = [5,10,3,5] list2 = [a,b,c,d] notM = [a,b,c] isM = [d] Sorts the elements in a list Creates a Dictionary from an input key and a input value Sorts the elements in a list Rotate a Point around the center point This node creates points on a sphere surface Draws a parallel line through a specific point Finds the intersection of two circles returns the section point from a point perpendicular on a line Finds the intersection of two circles Finds the intersection of a circle and a Line Returns true if two infinite lines intersect, and if so, provides a point where they intersect. The intersection point can be outside of the line segments Finds the two infinite intersections of a line from center to a point Resurns the intersection of the Line trough the middle of the Circles Calculates Two Circles. The First one passes pt0 and pt1 and the pt2,pt2_alt which has the lowes distance to pt3. The second circle pass the remaining point Returns the tangential Circles which touch the 3 input circles Subtract two Points: c = a - b Add two Points: c = a - b Finds the two tangent points from a point to a circle Returns the Z elevation of a point X,Y on the specified object Grow a radius Value of input Points, till they touch others or with a min offset quecks, if point is part of a cw or ccw direction, needs minimum 3 pts input 2D or 3D Points Deletes Randomly Values of Input List. If density is 100 nothing will be deleted A Hexagonal Circle Stacking lattice Get 2D and 3D Angles of Points related to one center point Return the angle and distance to (0,0) Open a Dialog Box to Choose a Folder Set Origin and height, width of the page File Names or Folder Names of the input Directory Enter your Formula in Input Field Put This in a Wrapper with another Object. This node Returns the next Object (Stacking Ordner) after this node A Real value defined in the OIP in document units An example of how to use the Button widget. When the button is pressed, it will run the script contained in the specified definition. Draws mesh or output polys from a regular rectangular horizontal grid of points collects objects, which middle point is on a circle, poly or recangle Create any value using the python eval function Set Origin and height, width of the page Checks on ever obj1 input, if one or more object from input obj2 overlap bounding box Returns the string between two characters Returns new, string position and length. Prints the incoming items into a text object or the python console. The option 'Run scripts in developer Mode' must be enabled in Vector Works to see the console output. Returns the Data from a Record field. If the Object input is a list values are concat. Path of the Actual Document Gets number of Databese Rows and columns in the referenced Worksheet Gets the numeric or String value of the referenced cell subrow Returns the Data from a Record field. If the Object input is a list values are concat. send to Back Duplicates Objects in a Container or active Layer This node performs a boolean operation between lists of objects. The operation will be performed for each possible combination of objects in the lists supplied. Adds an object to the current layer Adds an object to the current layer Convert Symbol or PIO to group Update the specified object using the current settings and parameter values. This node will Intersect a Solid in 3 Parts. Cap1, Cap2 and Space. Scale middle (space) or scale caps Converts as Example 1 to A and 56 to BD. Creates a Criteria by class and Layer Assigns a class to the referenced object Returns the smallest item in the list If test is true, pass the value to true output otherwise to false output Returns all Spaces which overlap or touch the bounding box of the objs input Creates a 2D or a 3D locus object Detects Clusters of Points Finds the convex hull of points Creates a Viewport Add an Annotation to the Viewport Add an Annotation to the Viewport Sets the value of a OIP Field, It uses a search and replace function for the field Name. If you have more fealds with similar names which match the search name it returns error code. Use Reset node after all changes of the PIOs Get a value from an Marionette Wrapper or PIO Move Symbol in a Symbol Folder. If no symbol name is inputted or the Symbol do not exist, this node just creates the folder Creates a Design or a Sheet Layer (OIP Pupup to change layer type) Extract Values within a specific range Creates Pt array between two points [1,2,3,4,5,6] goes to [1,3,6,10,15,21 Converts a 2D or 3D vector to an angle in degrees Output 4 corner points of a rectangle Enter your Formula in Input Field Enter your Formula in Input Field change input values to right document units gets the Fill Back color of the node and returns it A Dialog with 3 Popups Creates a rectangle with the provided specifications, supports point of reference 3D Quader mit Verrundeten Kanten oder Einfache geometrie Returns the bounding box's coordinates of the projection of an object on the screen plane "Type Counter" collects Objects from an input criteria. It count, how many objects from which type there in this criteria. List of document resources from a specific type Returns the name of the referenced Symbol. Returns "none" if the object has no name assigned. Converts as example a name from a dimension standard or a text style to an index number Creates Text Line by Line, from an Input List Creates Text Line by Line, from an Input List Sets the Text Size of a Text Obj Get Input RowNames and Lines and Attach them to the input text blocks, which have the same name like the row name. Group text objects, which are no fields Creates Text Line by Line, from an Input List Returns the value of a data record field. Open the input Folder in Finder or Windows Explorer. Combine with GetActFile Node to have parent folder of active Document Path of the Actual Document File Names or Folder Names of the input Directory Returns the Value from the Python os stat function OutputActualDateTime Path of the Actual Document Open a Dialog Box to Choose a Folder Creates a duplicate array of objects in x y or z direction Moves a Refered Point from a 2D,3D Object to a specified 3D Point for planar obj works in 2D view Creates a List of all Symbols in a Folder Link a Text Field in a Symbol to a Record Field Returns the value of the input dict key Repeats the complete input n Times Randomize the input list Randomize the input list Deletes Randomly Values of Input List. If density is 100 nothing will be deleted Input [0]value1,[1]value2 ... output [value1,value2 ....] Removes the duplicate items from the input list. Separates a list into its constituent items File Names or Folder Names of the input Directory Import an ini file with sections, keys and values Import a Tab or character separated Text-File This node performs a boolean operation between lists of objects. The operation will be performed for each possible combination of objects in the lists supplied. Returns the Record Names attached to the Input Object Enter your Formula in Input Field Adds an List to the end of a list Flattens a list, or list of lists Creates a linear dimension with standard specifications Changes the Description value of a Sheet Layer Returns the name of the referenced layer Returns the name of the referenced layer Returns the width and height of the sheet layer Returns the Number of pages Open a file at the specified path A Dialog with 3 Popups
  12. DomC

    Automated Layout

    Thank for competent Feedback. for sure, this would be a nice refining. 1:50 / 1:20 step could be made like this: True Thanks. I focussed time investment on getting section Viewports on my layouts (which failed and I dropped this for now) instead of maturing the vp nodes. To have a complete set of VP nodes there also a class visibility would be needed. Updated the File. By the way, thats just a study. Maybe it would more practical to just duplicate a default layout with placeholders for vp and text fields. So it would be scalable on new situations very fast.
  13. DomC

    Two NURBS Sections to Loft

    Hi Looks somehow interesting. Is this just the exercise or did you maybe missed pasting the marionette network of the solution? Regards Dom
  14. DomC

    Automated Layout

    Version 1.0.1

    20 downloads

    Hi This Examples shows, how to automatically create sheet layers and viewports from objects of the design layers. In this example, a sheet layer will be created for every exhibition place available on the design layer. It creates a 1:20 close-up from the specific exhibitor's place and an overview plan with a marker of the exhibitors place. This Network-Template could be used whenever you want to create automatically documentations out of your drawing. As Example: - Put a Viewport of every Space Object in your drawing on SheetLayers - Put Viewports from Building Elements close-ups (Windows, Doors etc.) on sheet layers Also this Network contains some very powerful custom nodes: 1. Enhances BBox, Enhanced Rectangle, PutByRefPoint those are just to save time for calculating width, length and ref point of objects 2. Function Two (like standard function node with two inputs), SetParent (1. and 2. Already available on this forum) 3. CreateLayer 4. CreateViewport 5. VP Layer Visibility 6. Add VP Ann (Annotations in Viewport) 7. Nodes for getting Marionette OIP Data which is not possible with "Get Record Field"
  15. DomC

    Marionette Hybrid

    I think from the Vectorscript Forum i knew, that negative values can be used. But to get it for this was a standard procedure (try and error ) 🙂

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×