Notifications
Clear all

[Closed] Scripted Plugin Quadrify

hi,

is it possible to have the quadrify function from the graphite modeling tools placed in a scripted plugin?
i only figured out how to run them in maxscript but not if it’s possible to turn them into a modifier.

macros.run "PolyTools" "Quadrify"
PolyToolsModeling.Quadrify false false

i know there is a ‘quadrify mesh’ modifier but it gives very different results.

any help is much appreciated

nick

7 Replies
1 Reply
(@miauu)
Joined: 10 months ago

Posts: 0

Run this script. Then you will find it in “secondplace” category.


macroscript qudrifyAll_customMod
category:"secondplace"
tooltip:"Quadrify All"
buttonText:"Quadrify All"
(
	selObjsArr = selection as array
	if selObjsArr.count != 0 do
	(
		for o in selObjsArr where (isKindOf o geometryClass and canConvertTo o Editable_Mesh) do with redraw off
		(
			epMod = (Edit_Poly())
			epMod.name = "Quadrify All"
			addModifier o epMod
			select o
			PolyToolsModeling.Quadrify false false
		)
	)
	
)

You would have to create a modified Edit_Poly modifier and run the code on that.

-Eric

thank you very much miauu for your script.

PiXeL_MoNKeY, yes i’ve been doing that ever since. i have learned by now to have a interactive solution it would have to be a custom script in TriMesh not PolyMesh (thanks Swordslayer). I have had run into quite a few situation where it would have been nice to have such a modifier. If someone is interested to give it a go i’d be more than happy to pay for it.

thanks again miauu

I have ideas for an MCG to do it, but haven’t had time to implement some of the core functionality I want in it. The biggest issue i have come up with is what is the logic to determine edge removal? Edge length, face angle, something else?

Another cheap trick that is procedural is add a Subdivide with a large size and disable Display Subdivision. Far from perfect, but it will update as the mesh changes. It isn’t great for very curvy surfaces.

-Eric

There is a ‘hidethirdEdge’ node in MCG which might do this… depends on topology…

That node has the same issue as the existing Quadrify and it is based on creation order and not user directable. On top of that the shared edge between 2 faces may not always be the 3rd edge.

In reality the typical edge that people want removed is the hypotenuse or longest edge of the triangle. Of course there are special cases like a pole where you need to create some sort of logic to handle which edge should be removed. To make mine work I need to be able to store edges that have been hidden, and if another triangle shares that edge, then automatically set the shared edge to visible/invisible.

-Eric

I’ve been asking for native edgeReverseEdge compound (just like meshop.getEdgesReverseEdge) for quite a while but it’s still not there, so to identify a matching edge you have to get edges for both edge verts, eliminate the original one and find the common one from both sets, if any.