Node Wish List
 1-13  …  334-353  354-373  374-393  394-413  414-425

Previous
Next
 From:  Barry-H
9581.374 
Hi All,
Just to add to my previous post.
This issue does not happen if done manually with moi fillet tool.
So perhaps Michael can shed some light on the issue.
Anyway Brian’s crvFillet node woks fine with open / closed and 3D curves.

Brian
is it possible to comment out the select input ?
I tried but didn’t work.
Many thanks
Barry
  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:  MO (MO_TE)
9581.375 In reply to 9581.373 
Hi Peer
>> One general potential problem is that the input currently accepts a list of curves, but it seems like the cornersList approach will only work for a single joined curve.

I wanted to keep it simple, this code is supposed to work just on a single curve.
I know I can fillet corner points of a curve, using a list of true/false values.
What I don't understand is why it won't work on for example an open curve with one corner point. (a V shape curve)
It actually needs a list of two (or more?) to work, while the generateVertices() method returns one vertex.
  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
9581.376 In reply to 9581.375 
Also since v4 there is this function on curve segments:

Added CurveSegment.getIsG1ToAdjacentSegment( 0 /* 0 for start, 1 for end */ );
- returns true if the next segment at the start or end is smooth to the current curve segment.

- 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:  MO (MO_TE)
9581.377 In reply to 9581.376 
So, I found my mistake on fillet factory.
I thought the corners list's length should be equal to length of points generated by "generateVertices()" method.
But, It seems it should be equal to segments count.
That's why fillet node generates that curly effect in Barry's screenshots. It tries to fillet all corner points including the "G1" corner points

I just filtered the real "G0" points out of all corner points (segments start points).
code:
script:
var inputs = moi.geometryDatabase.getSelectedObjects().getStandaloneCurves();
var filletFacc = moi.command.createFactory('fillet');
var filletFacToGetCorners = moi.command.createFactory('fillet');
filletFacToGetCorners.setInput(0, inputs);
filletFacToGetCorners.generateVertices();
var corners = filletFacToGetCorners.getCreatedObjects();
var segments = inputs.item(0).getSubObjects();
var startPoints = [];
for(k=0; k<segments.length; k++)
{
	startPoints.push(segments.item(k).getStartPt());
}
filletFacToGetCorners.cancel();
var cornersList = moi.createList();
for ( var i = 0; i < startPoints.length; ++i ) 
{
	if(isG0Connection(startPoints[i],corners)){cornersList.add( true );}
	else{cornersList.add( false );}
}
filletFacc.setInput(0, inputs);
filletFacc.setInput(1, false);
filletFacc.setInput(2, cornersList);
filletFacc.setInput(3, 1);
filletFacc.setInput(4, 'Circular');
filletFacc.setInput(5, 1);
filletFacc.commit();
moi.log("inputs: "+inputs.length+"\n");
moi.log("Corners: "+corners.length+"\n");
moi.log("cornersList: \n");
for ( var i = 0; i < cornersList.length; ++i ) {moi.log(cornersList.item(i)+"\t")};
moi.log("\n");

function isG0Connection(point, G0Points)
{
	var isSamePoint = false;
	for(j=0; j<G0Points.length; j++)
	{
		if(point.x == G0Points.item(j).pt.x && point.y == G0Points.item(j).pt.y && point.z == G0Points.item(j).pt.z)
		{
			isSamePoint = true;
			break;
		}else{isSamePoint = false;}
	}
	return isSamePoint;
}
  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:  Barry-H
9581.378 In reply to 9581.377 
Hi Mo,
can you make a node of your script please
I have very limited coding and will probably take forever.
Cheers
Barry
  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
9581.379 
Link on (various) Fillet node(s), and Chamfer node(s), from 2 and 4 years ago, with good information from Michael:

https://moi3d.com/forum/index.php?webtag=MOI&msg=9666.1

(various Fillet and Chamfer nodes, are located in nodeeditor menus Curves2 and Construct2 menus. Some of them are probably not mature, fully functional nodes, and may need improvements from someone who knows what they are doing. And has understanding (?)) (Like grafting in MO-TE's code ?)

- 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:  Barry-H
9581.380 In reply to 9581.379 
Hi Brian,
I've just removed them from my nodeditor as Mo added new versions of fillet and chamfer edges into the construct menu.
I think a new thread maybe worth starting to filter out some of duplicate nodes and add new developed nodes that people want to share.
Anyway many thanks for your input.
Cheers
Barry
  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
9581.381 In reply to 9581.380 
Thankyou Barry.
It seems that my nodeeditor, for this pc especially, is not up to date, with some "obsolete"/ defective nodes.

- 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:  MO (MO_TE)
9581.382 In reply to 9581.378 
Hi Barry
>> can you make a node of your script please

I was working on a new version of fillet node months ago, with ability to pick corner points directly from the scene, I guess I can add my new findings to it.
It's still buggy and I'm not sure when it'll be ready.

I'm not that skilled too. :)
  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
9581.383 In reply to 9581.382 
Hi MO_TE

Thank you for your hard work. You seem very skilled with the Javascript & Nodes.
I like the way that you break up Max's paragraphs of code into individual code lines. This tends to make them more comprehensible IMHO.
Is this "parsing" done by some editing software?
Notepad++ does not break down these code "paragraphs".

- 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:  Barry-H
9581.384 In reply to 9581.382 
Thanks Mo,
much appreciated.
Would be good to add fillet and chamfer to the curves section if possible.
Cheers
Barry
  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:  MO (MO_TE)
9581.385 In reply to 9581.383 
Hi Brian
>> You seem very skilled

Thanks, I wish I was. ;)

I use notepad++ with language set to JavaScript.
Maybe this helps you to format/beautify your codes:
https://beautifier.io/
  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
9581.386 In reply to 9581.385 
Thank you MO_TE for the JS-beautify link.
  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:  MO (MO_TE)
9581.387 
"FilletCurve" and "ChamferCurve" nodes
Fillet/chamfer multiple curves at once.
You can choose a specific corner point to fillet or chamfer or set a pattern of 01 to fillet/chamfer curves.


How to use it?
Start nodeeditor and connect your curves to the node.
Click on the "FilletCurve" node to open the information panel.
In the "Select" dropdown menu choose the "sharp points" option.
This way you can see and choose the corner points in the scene.
When you finished picking corner points, choose the "Done" option from "Select" dropdown menu.


Also see the attached "FilletCurve_Showcase.nod" for an example.
Address:
Construct/FilletCurve
Construct/ChamferCurve

EDITED: 27 Jan by MO_TE


  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:  Barry-H
9581.388 In reply to 9581.387 
Hi Mo,
Excellent will give them a try.
Many thanks
Barry
  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)
9581.389 
Excellent!
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  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:  Barry-H
9581.390 In reply to 9581.387 
Hi Mo,
quick update.
When filleting a selected object and applying the original object remains and cannot be deselected as normal (mouse click).
Perhaps keeping original is not needed.
Cheers
Barry
  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:  MO (MO_TE)
9581.391 In reply to 9581.390 
Hi Barry
Thanks for the bug report.
I've fixed the lock selection bug. Try updated version.
  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:  Barry-H
9581.392 In reply to 9581.391 
Hi Mo,
works fine many thanks.
Barry
  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)
9581.393 In reply to 9581.387 
In fact we must make our own schema from your example ?
(killing some nodes and save it ) that works fine...
Or there is an original somewhere ?
Or I miss something ?
(here in French for some nodes because i have French enable! :)

EDITED: 27 Jan 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
 

Reply to All Reply to All

 

 
Show messages:  1-13  …  314-333  334-353  354-373  374-393  394-413  414-425