Problem to name subobjects in js/nodeeditor
All  1-4  5-12

Previous
Next
 From:  Karsten (KMRQUS)
7899.5 In reply to 7899.3 
Hello Michael,
thanks for your reply. I will try to find a workaround:-)

Have a nice day
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7899.6 In reply to 7899.1 
Hi Karsten, here's what I did to test clone on edges - I made a plane and named its edges A, B, C, D.

Then I pasted in this script to the XYZ control:

script: var breps = moi.geometryDatabase.getSelectedObjects().getBReps(); for ( var i = 0; i < breps.length; ++i ) { var edges = breps.item(i).getNakedEdges(); for ( var j = 0; j < edges.length; ++j ) { var newcrv = edges.item(j).clone(); moi.geometryDatabase.addObject( newcrv ); } }

The edges are cloned into separate curve and those curves seem to have inherited the name of the edge ok...

Are you using .clone() somewhere else on a brep instead of a curve possibly?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
7899.7 In reply to 7899.4 
Hello Michael,
the output node uses clone and after an Apply the edges are unnamed - name of the brep is ok.

The tempobjects are only for preselections in a running nodeeditor for creating new nodes - I want only
evaluate the names and store them in the node. After connecting the brep data I want to
select the naked edges by the stored names for e.g. blend-nodes.
I will send You the complete code
next friday, because I am not at home.
And I have to investigate the input/output functions -
maybe the names are still present in the direct following node, but first I have to create a testnode.

Thanks in advance
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
7899.8 In reply to 7899.7 
Hi Karsten,

re:
> the output node uses clone and after an Apply the edges are
> unnamed - name of the brep is ok.

Ok yeah if it's a Brep being cloned then I think there is a problem in there with sub-object atttributes not coming through. I've got it fixed for v4 but for now try using the copy factory from above to duplicate the Brep instead of clone().

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
7899.9 In reply to 7899.8 
Hello Michael,
I have made a testnode to check the chain "this.setOutputDatata"-> "this.getInputData" from one node to another. The inputdata are complete available - including named subobjects. So I can use this method to select named subelements for a blendnode:-)
When I have finished the node, I will post it to the forum.
By the way: What is the index 1 -|>Orientations in the blend factory for? And what are the parameters? I didn't find something in the blend.js that helps me.

Thank You very much for your help!

Have a nice day
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
7899.10 In reply to 7899.9 
Datata has an extra ta ?
-B
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
7899.11 In reply to 7899.10 
Hello Brian,

it is only the increase form of data;-) -> datata -> datataest

Have a nice day
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
7899.12 In reply to 7899.9 
Hi Karsten,

> By the way: What is the index 1 -|>Orientations in the blend factory for? And what
> are the parameters? I didn't find something in the blend.js that helps me.

When you do a blend, the blend factory will fill that in itself, it stores 2 flags for each blend side, a "flipped" flag for whether the side should be flipped from its natural orientation, and a seam parameter for where the seam point should be located on a closed blend.

Those are then stored in the factory input so they will get serialized into history data and a history update will use any customized seam locations that were set by the user inside the Blend command.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-4  5-12