[NodeEditor] How i can Filet / Chamfer Points (corners) from a Rectangle Node ?
 1-20  21-39

Next
 From:  Smoluck
9666.1 
Hi everyone.

First post here, for me.

I’ve been looking at MOI for years from time to time, but started to fell in love with it since few days.

My friend Mark Tomlinson, shown some amazing renders of mOI models he’ve done over the last year. I’m also know Frenchy Pilou as i’m a french artist.
I was more interested last days when i’ve discovered that a Nodal Editor was available. It looks really nice to me as i’m a fan of Procedural Modeling.

I’ve done a lot of Proced work in Modo MeshOps and with MeshFusion as well, but the ease of use and the clean shape result of MOI really catch my eyes.

I’ve made a lot of MeshOps in Modo and i’m looking to do same kind of things in MOI via Nodals.


-----------------------------------------------------------------------------------

So here is my first question:

[NodeEditor] How i can Filet / Chamfer Points (corners) from a Rectangle Node ?

-----------------------------------------------------------------------------------



Down below have a look at my Youtube Channel and Twitter feed:

https://m.youtube.com/channel/UCptRCOJUx-kNBWWQ4SkCL2w/videos

http://twitter.com/sm0luck



Best regards, Franck
  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:  Frenchy Pilou (PILOU)
9666.2 In reply to 9666.1 
For simple curve not sure...
Nobody has asked yet this !

Surrely simulate Arc circle at the angle, Diff etc...for fillets
Line on the edge Diff etc... for the chamfers

(donc un peu galère pour le moment : personne n'a encore demandé ce genre de chose! ;)

For a volume yes! It's a little tricky for Fillets! (Chamfers not yet directly)

http://moiscript.weebly.com/construct2.html#fillet (in English)

So make first a volume from your rectangle, Fillet the volume and take a slice! ;)
This should be possible in nodes! ;)

EDITED: 31 Jan 2020 by PILOU

  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:  Frenchy Pilou (PILOU)
9666.3 
Else from zero for 4 similar Fillets! :)

EDITED: 31 Jan 2020 by PILOU

  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
9666.4 In reply to 9666.1 
After several unsuccessful node attempts:
It seems like the Out of the rectangle node is not compatible with the bref (boundary representation) Inputs of several other nodes, like the two fillet nodes ???

Was unable to locate a node which would convert an Out of another node to a bref...

nodes "GetbyName" and "GetbyStlyle of a rectangle did not work with fillet node either.

- Brian

EDITED: 31 Jan 2020 by BEMFARMER

  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
9666.5 In reply to 9666.4 
Hi Brian, well a brep is a surface/solid type object, a curve like one output from rectangle is not a brep. Sounds like maybe the fillet node currently only takes breps as inputs and not curves.

It might be that the fillet command on curves is not easy to automate right now because it has a "pick which points to fillet" stage in it.

- 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:  bemfarmer
9666.6 In reply to 9666.5 
:-) Thank you 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:  bemfarmer
9666.7 
I do not see a chamfer node.
- Brian

EDITED: 31 Jan 2020 by BEMFARMER

  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:  Frenchy Pilou (PILOU)
9666.8 
@ Smoluck
Il y a ici normalement tous les "Nodes" existants et "presque" toutes les descriptions de leurs fonctionnements! :)

En français et en "English" ;) http://moiscript.weebly.com/biblio-elephant.html

Bonne lecture!

​For the moment we don't have control over the normal selection of objects after an Elephant session!
It is therefore necessary to add this Script as a shortcut before it will be integrated directly into the output of a node!
script: var objs = me.geometryDatabase.getObjects(); for ( var i = 0; i < objs.length; ++i) { var obj = objs.item(i); obj.setHitTest( true); }

EDITED: 31 Jan 2020 by PILOU

  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:  Frenchy Pilou (PILOU)
9666.9 In reply to 9666.7 
@ Bem
Yes and funny result when you take some other parameters ( Continuity G3 & Bulge >1 )
"bunny ears" :)
Calculate realtime is few slowdown of course! Curious: Bulge is not inside the Node itself! Only in Box's Parameters!

EDITED: 31 Jan 2020 by PILOU

  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
9666.10 
If someone wants to make a node for curve filleting, this is some script that will put fillets on sharp corners:

code:
function FilletCurve( crv )
{
	var factory = moi.command.createFactory( 'fillet' );

	var objs = moi.geometryDatabase.createObjectList();
	objs.addObject( crv );

	// Make a list with one boolean entry for each sharp corner in the curve. Right now this assumes all corners are sharp.
	var corners = moi.createList();
	var segs = crv.getSubObjects();
	for ( var i = 0; i < segs.length; ++i )
		corners.add( true );

	factory.setInput( 0, objs );       // Object list - objects to fillet
	factory.setInput( 1, false );      // True = do straight corners (for brep filleting only).
	factory.setInput( 2, corners );    // If filleting a single multi-segment curve, list of corners. true = fillet this corner.
	factory.setInput( 3, 1.0  );       // Fillet radius
	factory.setInput( 4, 'Circular' ); // Fillet shape, one of: 'Circular', 'ConstantDistance', 'G1', 'G2', 'G3'.
	factory.setInput( 5, 1.0 );        // Scale factor for G1-3 blend shapes.

	var res = factory.calculate();

	if ( res.length != 1 )
		return null;
	
	return res.item(0);
}


- 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:  Michael Gibson
9666.11 
And if someone wants to make a chamfer node, the fillet factory inputs are like this:


0: object list - Objects to fillet.
1: boolean - Straight corners, true = Do straight corners (only applies to brep filleting)
2: list of bool - Corners - If filleting a single multi-segment curve, list of corners true = fillet this corner.
3: number - Radius - Fillet radius or distance for ConstantDistance mode.
4: string - Shape, one of 'Circular', 'ConstantDistance', 'G1', 'G2', 'G3' .
5: number - Blend scale - Scale factor for G1-3 blend shapes.
For variable radius fillet, there can be additional inputs following consisting of a point list, radius number value, and string options group.


Chamfer factory has these inputs:


0: object list - Objects to fillet.
1: boolean - Straight corners, true = Do straight corners (only applies to brep filleting)
2: list of bool - Corners - If filleting a single multi-segment curve, list of corners true = fillet this corner.
3: number - Chamfer distance 1
4: number - Chamfer distance 2


- 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:  bemfarmer
9666.12 In reply to 9666.11 
Thank you Michael for the curve and chamfer information.

To further define fillet node and/or new chamfer node.
I had a look at Fillet node, (maybe Karsten made it?) under the construct2 menu, which has 269 lines, including about 30 commented out, and has the curve fillet factory input commented out.
The Fillet2 node under the r2d3 menu has only 47 lines, appears to have been derived from fillet node, and also has the curve fillet factory input commented out.
So these two nodes seem to be incomplete with regard to curves. One node for breps, another node for edges, no node yet for curves?

I think that a chamfer node or chamfer2 node can be created from the corresponding fillet or fillet2 nodes, once updated.
The coding must take quite a bit of effort.

- Brian
  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:  Smoluck
9666.13 
thanks everyone for your reply.

I ended up with a solution based on Pilou observation via a trim node and few other math nodes, but it still miss the Chamfer node as bemfarmer says.

Edit:
To create the same behavior as a Chamfer node, i used the Filet2 node in Continuity Mode: G2 and a Bulge at 0

EDITED: 31 Jan 2020 by SMOLUCK

  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)
9666.14 
Hello,

under Curves2 is a curveFillet node. It takes 2 curves as input and gives the trimmed curves and the radius to the output. Making fillets for joined curves needs a more complex node - I'm not sure if it is possible or useful to integrate that in the existing node.

A nice day to all
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:  James (JFH)
9666.15 In reply to 9666.14 
Karsten,

It is good to hear from you; I hope you are well.

Regarding the curve filleting: The points that appear when applying "Fillet" UI tool to a selected polyline, are point objects, That is to say, the points appear in the "Types" Menu of Scene Browser.

This is not the case with points displayed when applying "ShowPts" to the same polyline.
AFAIK, being point objects should mean that they are addressable to NE (unlike ShowPts artefacts).

In my node wishlist proposal: http://moi3d.com/forum/index.php?webtag=MOI&msg=9581.145 I suggested that all points be selected and the "Radi" input accept a numArray, so that each corner would be rounded by the corresponding radius to number in numArray.

Perhaps the Fillet factory does not have this multi-processing capability. If the node can only accept a single number input radius, it should nevertheless be able to be applied to a pattern selection of points, much like as in my node wishlist proposal: http://moi3d.com/forum/index.php?webtag=MOI&msg=9581.142

Although, I think it would be best if the selection and split operations of points to be coded within the "Fillet"node itself, but to make the procedure explicit I have shown them here as precursors nodes.

James
https://www.instagram.com/nodeology/

EDITED: 3 Feb 2020 by JFH

Attachments:

  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
9666.16 In reply to 9666.15 
James, I like your suggestions.

I spent a couple of hours trying to modify curveFillet, using Michaels code, but the crvFillet.js would not work.

Here is a (non-functional) crvFillet.js node, (to be placed in the nodeeditor extensions folder, which adds a node to curves2 menu.

I did not try yet to implement the sel (selection) mask input.
I have confusion between Michael's objs, crv, and c1...

- Brian

EDITED: 8 Feb 2020 by BEMFARMER

  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:  James (JFH)
9666.17 In reply to 9666.16 
Brian,

It's a good start!

Rather than extracting points from the profile, Michael's fillet.js code does this automatically. Is there a way of selecting by index from this point object list; effectively similar to manual selection ("pointPicker")?

Boolean (1s & 0s) input for pattern selection would be better, but index selection may be easier. and a good first step.

I know that none of this is not easy!
Thanks for your efforts.

James
https://www.instagram.com/nodeology/


EDITED: 4 Feb 2020 by JFH

Attachments:

  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
9666.18 In reply to 9666.17 
After many mistakes, here is another test version of crvFillet for curves that actually works.
It uses Karsten's code modified, with Michaels fillet/Chamfer code.

Nothing has been done for a point selection mask or boolean yet.
It is just a test version, with very limited testing.

I figure that a Chamfer version would be very similar...
My programming play time is limited by too many other projects, and too little quality clear thinking time:-)

- Brian

p.s., place crvFillet.js in the Extensions folder of nodeeditor. (I use the AppData structure)
The test node will show up in the Curves2 menu.

EDITED: 8 Feb 2020 by BEMFARMER


  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
9666.19 In reply to 9666.18 
For the 6 people who downloaded older version, cleaned up code, and restored fillet type, radius adjust, previous post.

What is the content of the corners list of Michaels code? corners.add( true );
How does the "true" fit in.
Is corners a list of corner points, with a different method of true (do fillet)?, or false (do not fillet this corner)?

Would masking the corners list entail going through the corner list one by one and applying boolean 1 to place the point in a corners2 list, or boolean 0 to not keep the point?

- B

EDITED: 8 Feb 2020 by BEMFARMER

  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
9666.20 In reply to 9666.19 
Hi Brian,

> What is the content of the corners list of Michaels code? corners.add( true );
> How does the "true" fit in.

It's a list of boolean (true/false) values, it needs to have one entry for each corner and value of true means that corner will be filleted and false means it won't be filleted.

The part that's a little tricky is making the list the right length so that it has one entry in it for each possible fillet location. I've put in a .numVertices property on the fillet factory for the next beta release to make it easier to know how many entries should be in that boolean list.

- 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:  1-20  21-39