MoI discussion forum
MoI discussion forum

Full Version: Batch filleting

Show messages:  1-15  16-22

From: Axel
12 Feb 2023   [#16] In reply to [#15]
Hi Michael,

fantastic, what a help.

Thank you!

Best regards, Axel
From: AlexPolo
12 Feb 2023   [#17]
Hi Michael,

Great script is it possible to add to this select circles by size rad or diameter so if you a group of circles of varying sizes you can select 1 size and change those only.

regards
Alex.
From: Michael Gibson
12 Feb 2023   [#18] In reply to [#17]
Hi Alex,

re:
> is it possible to add to this select circles by size rad or diameter so if you a group
> of circles of varying sizes you can select 1 size and change those only.

Yes you could modify the script to do that.

Maybe something like this - currently in BatchEditCircles.js on line number 70 it is gathering up the circles, the current code looks like this:

code:
		if ( obj.isCircle )
		{
			circles.addObject( obj );
			var this_radius = obj.conicRadius;
			<...>


You could modify that to only gather up circles of a particular radius value, add something like this (warning untested) - added lines marked with a > at the start of the line, don't put that in the actual code. Oh and also move the line where it calls addObject lower down:

code:
		if ( obj.isCircle )
		{
>			//circles.addObject( obj );       *moved lower*
			var this_radius = obj.conicRadius;

>			// Added code here:
>			var target_radius = 5.0;
>
>			// Don't gather the circle unless it matches the target radius.
>			if ( Math.abs( target_radius - this_radius ) > 1.0e-12 )
>				continue;
>
>			circles.addObject( obj );

			<...>


- Michael
From: AlexPolo
12 Feb 2023   [#19]
as always lightning service many thanks Michael Ill have a play.

regards
Alex.
From: Frenchy Pilou (PILOU)
13 Feb 2023   [#20]
You can also use something like that! ;)
(some more versatile: works with any forms and without edit any codes :)

BoundingBoxCenterMultiple by Michael Gibson https://moiscript.weebly.com/uploads/3/9/3/8/3938813/boundingboxcentermultiple.zip
Can be used to simulate a replacement of objects
By coupling it for example with CopyToPoints or Vclone from MaxSMirnov
http://kyticka.webzdarma.cz/3d/moi/#CopyToPoints
https://moiscript.weebly.com/burman.html (all scripts and commands collected by Burman)

Vclone replaces the vector by the object with size and orientation of the vector!!!



Following with BoundingBoxCenterMultiple & CopyToPoints
Of course a Circle can be used against here a Cylinder! ;)

From: 大道刀 (SUIYAN)
15 Mar   [#21] In reply to [#15]
Hi Michael
batcheditcircles脚本在V3中,无论是否选中圆,一直显示该错误。(The batcheditcircles script in V3 consistently displays this error regardless of whether a circle is selected or not.)

能否通过修改使该脚本能在V3中,能够正常使用?(Can the script be modified to work properly in V3?)

Image Attachments:
1.jpg 


From: Michael Gibson
15 Mar   [#22] In reply to [#21]
Hi SUIYAN,

re:
> (Can the script be modified to work properly in V3?)

The script needs curve properties .isCircle and .conicRadius which were added in V4.

So it requires at least MOI version 4 to run, it would be difficult to make it work in V3, sorry.

- Michael

Show messages:  1-15  16-22