Jump to content

RDS Casa

Member
  • Content count

    114
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About RDS Casa

  • Rank
    Journeyman

Personal Information

  • Occupation
    Architect
  • Location
    United Kingdom

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. RDS Casa

    Boolean tick for further inputs

    Thanks as always.
  2. RDS Casa

    Boolean tick for further inputs

    Hello all, I fear the answer to this is no.... But is there any way that a Boolean tick box input can launch/activate/or grey out additional input variables in the OIP? Like, include top member? tick, which un-greys a slider or user input box? or something Thanks Rob
  3. RDS Casa

    Arcs to circles.

    Thanks everyone. I got the script working for what I need. I had not noticed the undo bug identified. I hope you swat it!
  4. RDS Casa

    Extending line length

    far too curious so tried it this morning. It works, thanks. So very helpful. I'm trying to improve my script further, so have tried to add a DoMenuTextByName command to put in "Combine in To Surface". I've ripped this from @Marissa Farrell compose node in another discussion. Which activates the tool, but also (because I grabbed it from a compose node) duplicates the objects and puts them in a group, which means I can't click inside the polygon. I tried taking out the bits I don't need, or at least I thought were bits I don't need, and the tool no longer activates. What am I missing? Thanks again.
  5. RDS Casa

    Extending line length

    awesome. I think this might work, I'll try it tonight. Thanks again, you have been a great help.
  6. RDS Casa

    Extending line length

    Hello, I need a script that take a lot of lines, and extends their length slightly. I'm not that far away I think. I hope there would be a set line length node... i.e just like if you select a single line, go to the OIP, put it on the polar display, keep the centre line fixed and put + 10 or whatever in the length. This keeps the centre in the same place, keeps the angle the same, but extends the length. So I can find a get line angel node, get line centre node, But the set line node is based on an start point and and point. I guess its possible to set the new points based on a trigonometric function from the centre point and the angle? but it must very close to 20 years since I did trigonometry!!! any simpler suggestions gratefully received. The reason I'm doing this is I need to tidy up a messy output drawing where hundreds of shapes are made up of lines and arcs BUT some of the lines don't quite touch (.0001mm) so I can't use compose. My plan is to make the arc sweeps longer (I've got this working thanks to some fantastic help from @Kevin McAllister on a different but similar problem) and make the lines 1% longer (keeping their centres and angles), and then create a closed polygon using the combine into surface paint bucket tool. The last stem is manual, but that's not the end of the world. If I'm missing any tricks, do please let me know. Thanks Rob
  7. RDS Casa

    selected objects node

    Answering my own questions again. I just found this Hopefully this will be useful to other searching in the forum. Thanks
  8. RDS Casa

    Arcs to circles.

    ah, visible!!! I think it means visible! Perfect thanks
  9. RDS Casa

    selected objects node

    Hello, Easy one I think... I have a script that works, I need it to run on a range of selected objects. Whats my node? Thanks
  10. RDS Casa

    Arcs to circles.

    Thanks so much. Can you explain the & (V) bit in the criteria?
  11. RDS Casa

    Arcs to circles.

    mmm, bit trickier than I thought! This is the code in the "get layer visibility" node @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "Get Layer Visibility" ) this.SetDescription( 'Returns the visibility of the referenced layer' ) #Input Ports obj = Marionette.PortIn( vs.Handle(0), 'hLayer' ) obj.SetDescription( "The input layer object" ) #OIP Controls #Output Ports visibility = Marionette.PortOut('iVisibility') visibility.SetDescription( "The visibility index value. Normal - 0, Inivisble - 1, Grayed - 2" ) #BEHAVIOR def RunNode(self): #inputs h = self.Params.obj.value #script vis = vs.GetLVis( h ) #outputs self.Params.visibility.value = vis This is the code for the "Objects by Crit" node @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Objs by Crit' ) this.SetDescription( 'Returns a list of objects meeting the input criteria' ) #Input Ports #OIP Controls crit = Marionette.OIPControl( 'Criteria', Marionette.WidgetType.Text, '') crit.SetDescription('A text string defining the criteria, entered in the OIP') #Output Ports obj = Marionette.PortOut('h') obj.SetDescription('The list of objects in the document that match the criteria') #BEHAVIOR def RunNode(self): #inputs crit_ = self.Params.crit.value #script out_list = [] def Add_Handle(obj): out_list.append(obj) vs.ForEachObject(Add_Handle,crit_) wordTofind = "SEL=TRUE" searchInlist = crit_ searchInlist = searchInlist.replace(" ", "") if wordTofind.lower() in searchInlist.lower(): new_list = [] parents_list = [] for e in out_list: p = vs.GetParent(e) if vs.GetType(p) == 11 and p in out_list: parents_list.append(p) pass else: new_list.append(e) for g in parents_list: if g in new_list: new_list.remove(g) #outputs self.Params.obj.value = new_list else: #outputs self.Params.obj.value = out_list It feels like I should be able to adapt the latter to be, ONLY get objects specified in the OIP controls which are also on the layers which are visible in the organise dialogue??? How do I start? via multiple marionette nodes, or adapt the code in the crit node? Thanks
  12. RDS Casa

    Arcs to circles.

    Very helpful, thank you. The drawings are cutting patterns which have come out another piece of software, and are going to a CNC workshop. They need circles because of the way their machine software distinguishes drill holes from pockets or routs. So the circle thing is technical, not aesthetic. One marionette problem I did have is "applying the script to selected objects" node???, which I know is simple but I can't find the solution. I've seen it done before but can't find the example. Hence I used the Object by Crit node to get the arcs as handles for the script. I'll try hacking the script in the node next, ideally I'd like it to apply to all visible Layers only, this way I can use it with the most flexibility. I should have thought of the purge command! simple Thanks so much
  13. RDS Casa

    Arcs to circles.

    Hello, I have some files which are apparently full of circles on different layers and different classes... but actually the circles are made from 2 or more arcs I need these to be actual circles - fully closed circles with a centre point. A first search of the forums bought up this with more brilliant contribution by @Pat Stanford Which almost does what I need, but to be honest I could not get it to work at all, maybe it needs a certain type of data? but it did not work on my arcs. So I've turned to marionette. So far, I have a simple script, it works on a basic level, but raises some marionette question I can't answer. Please see attached. Problems: 1. : It applies it to all the arcs in the drawing, across all layers and across all classes, even if I restrict to show/snap only etc, even if the layers are turned off. I introduced a >get class >set class chain, and this at least keeps the new circles in the same class. But I really need to restrict which classes the script runs on. Is there an easy way to do this? if it only applied to the active class, I could work with that, but ideally I could input the classes which it would be applicable to in the OIP? The same is kind of true to layers... It applies it to all layers, then dumps the new objects in to a group on the current layer? I made a modified "set layer V2" node" which does not seem to work... because I hacked it and I think I'm missing a step. please take a look. Ideally, just like the Set class chain of nodes, it would keep the layers as per parent object? but even if this does work, it throws everything into a group in the current layer, Can this be stopped? Alternatively, how do I restrict the the script to only the active layer, as this would be ok. Can you add multiple criteria to the "Object by Crit" node? T must mean type? i.e. T=arc picks the arcs, but is there list of other selection criteria? These other questions below are less important for my current task, but I'd still like to know how? 2. The class >get class>set class works fine, but is there an short hand node that gets all the class attributes, and sets them all to the new object, with out going through line colour, fill colour etc opacity etc in individual nodes? to be honest this is not as important as problem 1. But I was interested in the answer. 3. Even when this is working, because the original file has circles made from 2 arcs, it will place two circles in the same place. Is there an easy way to delete the same geometry which lies on top of each other in the same layer and class? Again, this is a nice to have options for neatness. Problem one is the urgent one. 4. Finally, the file contains a number of shapes I need as closed polylines. Currently they are all lines and more arcs. which when I modify>compose almost joins them together. Sometimes it does, but most times they are 2 or 3 ploylines. I suspect that this is because if I were to zoom right right right in, they might not touch... Any easy solutions or suggestions here? Thanks everyone. Rob arcs to circles.vwx
  14. RDS Casa

    Automating title block text

    ah, just found it. Sorry. Its in Document options, the last menu, Thanks
  15. RDS Casa

    Automating title block text

    Hello, could I ask how did you get the revisions to be P1, C1 etc? its automating to A, B, C for me.... is there an automate tick box I am missing? Thanks
×