Show messages: All
1-2
3-6
From: Frenchy Pilou (PILOU)
For the moment that is running but no result visible! :)
Maybe I made an error! Or more Banana! :)
I use the Beta V5 , and the commands inside Roaming folder for save the makearch.js file
Banana explanation seems good but it's application seems to have a glitch! :)
Maybe because inside Moi a Blend needs Curves or Edges ?
From: Frenchy Pilou (PILOU)
Hum Hum :°
Hello seems Moid 3D needs curves or edges for the Blend function!
That you propose is for other progs like Rhino not Moi3D!
------
You are absolutely right to point that out. In MoI3D, the native blend factory is strictly designed to work with Curves or Edges, and it often fails if you feed it a list of multiple edges (like a square face's 4 edges) without joining them first.
To make this work reliably for Faces (whether they are circles, rectangles, or complex polygons), the script must first Join the edges of each face into a single composite curve in the background, and then Blend those two curves.
Here is the corrected and robust plugin code.
The Improved Script (MakeArch.js)
This version creates a temporary "joined curve" for each face in memory, ensuring the Blend tool receives exactly one clean input per side.
/* MakeArch.js
Creates a Blended Arch between 2 selected Faces.
Improvements:
- Automatically gathers all edges of a face.
- JOINS them into a single curve (essential for non-circular faces).
- Runs the Blend command on these joined curves.
*/
function MakeArch() {
var gd = moi.geometryDatabase;
var faces = gd.getSelectedObjects().getFaces();
// 1. Validate Selection
if ( faces.length !== 2 ) {
moi.ui.alert( "Error: Please select exactly 2 faces." );
return;
}
// Helper: Join a Face's edges into a single Curve object
function getJoinedCurve( face ) {
var joinFactory = moi.command.createFactory( 'join' );
joinFactory.setInput( 0, face.getEdges() );
// .calculate() creates the object in memory without adding to the scene yet
var resultList = joinFactory.calculate();
joinFactory.cancel();
return resultList;
}
// 2. Create joined curves for both faces
// This handles cases where a face is made of 4 edges (rectangle)
// by turning them into 1 joined loop for the Blend tool.
var curveListA = getJoinedCurve( faces.item(0) );
var curveListB = getJoinedCurve( faces.item(1) );
// 3. Setup the Blend Factory
var blendFactory = moi.command.createFactory( 'blend' );
blendFactory.setInput( 0, curveListA );
blendFactory.setInput( 1, curveListB );
// Optional: Set Bulge (Default is 1.0).
// Increase to ~2.0 for a higher arch, decrease to ~0.5 for a flatter one.
blendFactory.setInput( 2, 1.0 );
// 4. Create the final geometry
blendFactory.commit();
// Cleanup selection
gd.deselectAll();
}
MakeArch();
Why this works better
Rectangles/Polygons: A rectangular face has 4 edges. If you send them directly to Blend, MoI gets confused about which edge connects to which. This script runs Join first, so Blend sees only one continuous loop per side.
Cylinders: A cylinder top is 1 edge. The script still works (joining 1 edge results in 1 curve) so it is universal.
Memory Management: It uses calculate() for the intermediate step, so it doesn't leave messy "temp curves" floating in your scene; it only creates the final Arch.
Installation Check
Save as MakeArch.js in your \commands\ folder.
Restart MoI3D (or reload scripts).
Select 2 faces -> Press Tab -> Type MakeArch.
This approach mimics the manual workflow of "Select Edges -> Join -> Select Other Edges -> Join -> Blend" in a single click.
From: Frenchy Pilou (PILOU)
Alas not better... always nothing on the screen between 2 faces selected! :)
Always a little glitch somewhere!
From: Frenchy Pilou (PILOU)
For the moment after hundred of answers / questions! :)
Wanted this
I have this! :) beauty but not exactly the same! :)
Show messages: All
1-2
3-6