Jump to content

DomC

Member
  • Posts

    605
  • Joined

  • Last visited

Everything posted by DomC

  1. Hi 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. Youtube Movie
  2. DomC

    VS in node error

    Hm, It seems, that quotes can't be escaped here in this specific situation. As far as I tested, the behavior is like this: python: escaping of quotes and other controll characters, is with \ vectorscript functions: In a Vectorscript function example vs.AlrtDialog("''''''''Test''''''") or vs.AlrtDialog('"""""""Test"""""""') double and single quote do the trick as well. Also escaping works here. In a Marionette Node, we can use special characters not everywhere. I do not know where exactly not. But there is a solution for that specific problem: https://en.wikipedia.org/wiki/International_System_of_Units :eek:
  3. DomC

    VS in node error

    Hi Rick I think, you have many quotes in quotes. I think you have to escape them. Or maybe use international units ? And this line: OpenFrom = Marionette.OIPControl( 'OpenFrom', Marionette.WidgetType.Popup, Start, ['None', 'Start', 'Center', 'End']) you have Start as a variable or a module name. You have to quote that like 'Start' Dom
  4. DomC

    Get Circle Node

    Thanks, Marissa I Worked with the interiorcad Version Version (3rd Party). Seems they missed updating the default libraries ...
  5. Maybe i just need a break or there is something strange with the "Get Circle" Node. The Radius is not as expected. rads = abs(x1)+abs(y1) hmm that can't work I think :grin: Original Code: points = vs.GetBBox(h) top_left = points[0] bottom_right= points[1] x1 =top_left[0] y1 = top_left[1] x2 = bottom_right[0] y2 = bottom_right[1] final_x = (x1 + x2)/2 final_y = (y1 + y2)/2 rads = abs(x1)+abs(y1) center = (final_x,final_y) self.Params.centerPt.value = center self.Params.radius.value = rads Modified Code: points = vs.GetBBox(h) top_left = points[0] bottom_right= points[1] x1 =top_left[0] y1 = top_left[1] x2 = bottom_right[0] y2 = bottom_right[1] x = (x2 - x1) y = (y1 - y2) rads = x/2 center = (x2-x/2,y1-y/2) self.Params.centerPt.value = center self.Params.radius.value = rads Maybe there is a better solution ... but for now, it seems to work
  6. Hi Nadja Sue It works on my computer as follows: 1. Enter Group 2. Edit Heliodon 3. Exit Group 4. Run Script Maybe the old map is not deleted and the old one. Or maybe try copy paste to a new document. I live in Switzerland. Maybe German IP are blocked :-)
  7. Hi Josh Your statements are perfectly helpful, thanks. I know, that option1 do nothing in my script. I Just evaluates the possibilities :-) I do not loved FEO, but now I understand it, it looks very powerful. As far as I can see, the good way is (as you said), to use FEO to very fast and easy to build handle lists. And then loop through them, to add objects (which is not a good idea inside the FEO loop) Thanks again Dom
  8. Hehe ... Thanks for joining my gimmick nodes and play it back to me, very nice :-) Well, they rotate ... good job.
  9. Hi I am trying to give vs.ForEachObject an additional argument. My Questions: 1. Is it Possible, to somehow use a search criteria example ('SEL=TRUE') for a "manually" created while loop? 2. Is there any chance, to add arguments in the vs.ForEachObject() loop? What I tried: vs.ForEachObject(GetParts, "SEL=TRUE") #This works option1='test' vs.ForEachObject(GetParts(h,option1), "SEL=TRUE") #Do not work (clear: because h is not referenced) option1='test' vs.ForEachObject(GetParts, "SEL=TRUE",option1) #Do not work option1='test' vs.ForEachObject(GetParts, "SEL=TRUE",option1) Is it just, i do not know enough about python or is just not possible because the ForEach-Functions, do not support that? Example Code(Python): sort='xy'#'yx', 'None' ObjList=[] BBoxList=[] ObjList_Sorted=[] width_list=[] height_list=[] def GetParts(h): #h ist handle to the ForEachObject Loop ObjList.append(h) p1,p2= vs.GetBBox(h) width=p2[0]-p1[0] height=p1[1]-p2[1] width_list.append(width) height_list.append(height) BBoxList.append((p1,p2)) h=vs.NextSObj(h) return() option1='test' vs.ForEachObject(GetParts, "SEL=TRUE") vs.AlrtDialog(str(width_list)) #Example while loop. It would be great, to loop objects with search criteria instead of vs.FSActLayer() etc. ObjList=[] BBoxList=[] ObjList_Sorted=[] width_list=[] height_list=[] def GetParts(h,option1): if h==None: #the same like vs.Handle(0) vs.AlrtDialog('please select object(s)') while h!=None: #the same like vs.Handle(0) ObjList.append(h) p1,p2= vs.GetBBox(h) width=p2[0]-p1[0] height=p1[1]-p2[1] width_list.append(width) height_list.append(height) BBoxList.append((p1,p2)) h=vs.NextSObj(h) return() h=vs.FSActLayer() GetParts(h,option1='test') vs.AlrtDialog(str(width_list))
  10. LOOOL Thanks for reporting Alan. Please modify your script with the following bypass. Please really, do it. (Do it, do it ....) It is a task for you. I Just made a special fix personally (it is 4.00 o'clock ->Screenshot why I am awake) for you! :whistle: Cheers
  11. DomC

    Get user info

    # Python Script import os import pwd user=pwd.getpwuid(os.getuid())[0] serial=vs.GetActiveSerialNumber() vs.AlrtDialog(user+' '+serial) Or for Module Informations: module=vs.GetEnabledModules() For Module Number look here: http://developer.vectorworks.net/index.php/VS:GetEnabledModules
  12. Hi There are some nodes, which produces different results in a 3D or a TopPlan View. (Examples: Ungroup 2D/3D Symbol, Get Bounding Box) So the idea was, to make a "GetView" at the start of a script and make a "SetView" at the end of a Marionette network. So far I was able to put that togheter. Existing Problem: At the End of the Network I have a Node, that executes This seems, to set my render-mode to the right value. But it won't re-render my screen. Maybe because there is a conflict to the internal marionette ReDraw system. I tried ReDraw, ReDrawAll Anyone has an idea how to fix that?
  13. Have you tried out to do wall hole with locus points? I think im some cases locus points could maybe do the hole right, without using hole geometry
  14. Have you tried out to do wall hole with locus points? I think im some cases locus points could maybe do the hole right, without using hole geometry
  15. Hi Maybe you could use PtArrayStartEnd for calculation Point between two points. https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=223249#Post223249 And then place your objects with The "PutByRefPoint"-Node https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=221843#Post221843 Also the "PutBy RefPoint" can align existing objects to specific axis. Some instructions to to this:
  16. A little update of the marionette script (can now be edited in 3D view). GetBBox Node had to be modified for this (vs.ResetObject()) Also there is an instruction movie for the randomise symbol example:
  17. Or Maybe this one, of you want to get x,y from an external text file, till Alan finished the get worksheet node :-) https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Main=43618&Number=218882#Post218882
  18. Actual Version v004 How To use: Examples: NURBS Examples exhibition wall
  19. Hi Alan There are nodes for trigonometric function. Is it not that, what you are looking for? this nodes returns radiants. If you want to have angle degrees you can convert them with the "Deg2Rad" Node. But the real challenge is always to find the right triangles in our drawings :-)
  20. Explanation PtArrayStartEnd - Node https://www.youtube.com/watch?v=5Hewxf69NSc And a further example-usecase which can be easy made by that node. The nodes calculates the 3D Vector between two points. The requirement of a 3D direction happens in many possible examples. Thats why I use this node (or a pre-version of it), in many of my examples.
  21. You can finish your stair example as follows: 1. Check if points are part of a cw polygon or not (is cw node) 2. Add 180° degrees to the rotation angle for all cw objects Making stair-step fit to radius, will be the further exercise :-)
  22. Try using this node: It checks triangle polygons of the pointlist if they are cw or ccw. It not finish your example but I think with this node, you can finish your stair example. It it gifs you a list of 0 and 1. 0=False (ccw) 1=True(cw) from every input point list (2D/3D)
  23. Alan, I really love the way you are playing with marionette.
×
×
  • Create New...