CurveTools

Plugins linking to this thread: (hide)

keyvis Curve ToolsAuthor: Eugen Sares
V1.4. A set of curve-related tools with the recent addition of a curve tool panel PPG. From the download page:

This addon adds the most needed Curve Operators to Softimage, bringing it to a level of flexibility comparable to 3ds max. It does not make Softimage an »industrial strength« Curve modeller, like e.g. Rhino, but in many scenarios you won't need another application for Curve editing any more. Tools included: Attach Curves: attach one or many Curve(Lists) to the first in the selection. Blend Subcurves: connect Subcurves with a Segment (bridge) between every selected Curve Boundary pair. Delete Subcurves: delete one or many Subcurves. Duplicate Subcurves: duplicate one or many Subcurves, with Translate x, y, z parameters. Extract All Subcurves: »explode« a CurveList - every Subcurve becomes a Curve object. Invert (Sub)Curves: change curve direction. Like the factory tool, but with Subcurve support. Log Curve Data: for debugging purposes. Logs (Sub)Curve details in a Script Editor. Points, Knot vector, degree, etc. Merge Subcurves: connect Subcurves by »welding« selected Boundary pairs (2 endpoints -> 1 midpoint). Offset (Sub)Curves: draw an outline around selected (Sub)Curves. Open/Close (Sub)Curves: like the factory tool, but with a few more options and with Subcurve support. Scissor Knots/Isopoints: cut Subcurve(s) in two or more pieces at selected Knots or Isopoints. Curve Tools Panel: Custom PPG containing all Curve Tools plus options for Isopoint selection: Intersections and Subdivisions. Curve trims and booleans can be realized with it (although maybe not as comfortable as in 3ds max).

After installation, all operators can be found under Model > Modify > Curve, except »Extract All Subcurves«, which is in Model > Create > Curve


Related plugins: Power Extrude, TinyCurveExtrude, MX Loft, Custom Loft, KP CurveTools, ICE Rope Rig

local backup: keyvisCurveTools v1.4.xsiaddon

Discussions concerning plugins for SOFTIMAGE©
User avatar
bottleofram
Posts: 355
Joined: 17 Aug 2010, 11:21

Re: CurveTools

Post by bottleofram » 26 Apr 2011, 21:16

SreckoM wrote:Can someone confirm that this works in SI 2012?

I am constantly getting Warning:Object error.
Did couple of quick tests. Everything seems to be working.

SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

Re: CurveTools

Post by SreckoM » 09 May 2011, 19:49

Hmmm, unfortunately nothing works for me except Duplicate subcurves ...

BTW does anyone by any chance have Offset curve script from Helgee?
- H -

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: CurveTools

Post by Hirazi Blue » 09 May 2011, 22:05

Do you get any error messages, when executing the commands that don't work?
A little more info as to what's going wrong might help us to attempt to figure out how to possibly fix it...
;)
Stay safe, sane & healthy!

SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

Re: CurveTools

Post by SreckoM » 09 May 2011, 22:12

As I said several posts above I am getting only this message - 'Warning:Object error.'
- H -

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: CurveTools

Post by Hirazi Blue » 09 May 2011, 22:17

Sorry, I forgot... :ymblushing:
Is that the full text of the error?
I will have to get back to you...

BTW - I did a search for the curveoffset tool,
but haven't been able to locate any working download/mirror...
(will check my own archives tomorrow!)
Stay safe, sane & healthy!

SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

Re: CurveTools

Post by SreckoM » 09 May 2011, 22:20

Thanks, I was searching all over but couldn't find it either....
- H -

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: CurveTools

Post by Mathaeus » 09 May 2011, 22:58

here it is

Code: Select all


'   +-------------------------------------------------+
'   |              Curve-Offset-Script                |
'   |                                                 |
'   |  @AUTHOR: HELGE MATHEE                          |
'   |  @VERSION: 1.0, 07-05-2003                      |
'   |                                                 |
'   |             www.mindthink.de/ohm                |
'   |        copyright by Helge Mathee 2003           |
'   +-------------------------------------------------+
'
'   never change the lines above, because they are
'   generated automatically.
'======================================================
'   To read the code in a well-formatted way, use a
'   screen resolution of 1280x1024 mininum and 
'   Code Edit (http://jimmy_reumuth.tripod.com/)

'=====================================================
' MAIN PART

ActivateObjectSelTool

for each sel in selection
	set obj = sel
	if sel.type = "crvlist" then
		set objgeo = obj.activeprimitive.geometry
		set points = objgeo.points
		set p = xsimath.createvector3
		set ve = xsimath.createvector3
		normals = points.normalarray
		dim amount,linear,merge,close,valid
		closed = objgeo.closed
		
		if closed then
			GetParams2 amount,linear,valid
			close = true
			merge = false
		else
			GetParams amount,linear,merge,close,valid
		end if

		if valid then
			if not merge then
			
				on error resume next
					DeleteObj obj.name&"_offset_"&int(amount)
				on error goto 0 
		
				if linear then
					SICreateCurve obj.name&"_offset_"&int(amount), 1, 1
				else
					SICreateCurve obj.name&"_offset_"&int(amount), 3, 1
				end if
				curvename = obj.name&"_offset_"&int(amount)
			else
				curvename = obj.name
			end if
	
			for i = 0 to points.count-1
				set ve = getNormal(i,points,normals,amount,closed)
				if i>0 then
					set ve = correctNormal(points.item(i-1).position,oldve,points.item(i).position,ve)
					if ve.length = 0 then
						set ve = oldve
					end if
				end if
				set oldve = ve
				p.add points.item(i).position,ve
				SIAddPointOnCurveAtStart curvename,p.x,p.y,p.z, False
			next
		
			if close then
				ApplyTopoOp "CrvOpenClose", curvename, 3, siPersistentOperation
			end if

		end if
	else
		logmessage "Select a crvlist"
	end if
next
'=================================================

function getNormal(i,points,normals,amount,closed)
	dim ve,p,p1,p2
	set ve = xsimath.createvector3
	
	if i = 0 then
		if closed then
			set p = points.item(i).position
			set p1 = points.item(points.count-1).position
			set p2 = points.item(i+1).position
			p1.sub p,p1
			p2.sub p,p2
			p1.normalize p1
			p2.normalize p2
			ve.add p1,p2
			ve.normalize ve
			ve.scale amount/(sin(p1.angle(p2)/2)),ve
		else
			ve.x = normals(0,0)
			ve.y = normals(1,0)
			ve.z = normals(2,0)
			ve.scale amount,ve
		end if
	elseif i = points.count-1 then
		if closed then
			set p = points.item(i).position
			set p1 = points.item(i-1).position
			set p2 = points.item(0).position
			p1.sub p1,p
			p2.sub p2,p
			p1.normalize p1
			p2.normalize p2
			ve.add p1,p2
			ve.normalize ve
			ve.scale amount/(sin(p1.angle(p2)/2)),ve
		else
			ve.x = normals(0,points.count-1)
			ve.y = normals(1,points.count-1)
			ve.z = normals(2,points.count-1)
			ve.scale amount,ve
		end if
	else
		set p = points.item(i).position
		set p1 = points.item(i-1).position
		set p2 = points.item(i+1).position
		p1.sub p,p1
		p2.sub p,p2
		p1.normalize p1
		p2.normalize p2
		ve.add p1,p2
		ve.normalize ve
		ve.scale amount/(sin(p1.angle(p2)/2)),ve
	end if
	
	set getNormal = ve
end function

function correctNormal(p1,r1,p2,r2)

	dim vp,vt,t1,t2,v,tolerance
	tolerance = 0.001

	set t1 = xsimath.createvector3
	set t2 = xsimath.createvector3
	set vp = xsimath.createvector3
	set vt = xsimath.createvector3
	set v  = xsimath.createvector3

	t1.add p1,r1
	t2.add p2,r2
	vp.sub p2,p1
	vt.sub t2,t1
	
	vp.normalize vp
	vt.normalize vt
	
	if abs(abs(vp.x)-abs(vt.x))<tolerance and _ 
	   abs(abs(vp.y)-abs(vt.y))<tolerance and _ 
	   abs(abs(vp.z)-abs(vt.z))<tolerance then
		v.copy r2
	else
		v.negate r2
	end if	

	set correctNormal = v
end function

Function GetParams(amount,linear,merge,close,valid)

	Dim oDial, OptionSliders
	Valid = False
	
	set oRoot = application.activeproject.activescene.root

	Set oDial = AddProp("Custom_parameter_list", oRoot, , "CurveOffSet_Options").Value("Value")
	OptionSliders = oRoot & "." & oDial

	SIAddCustomParameter OptionSliders, "offset", siFloat, 1, -100, 100,, siPersistable+siSilent  , -5, 5,, "offset"
	SIAddCustomParameter OptionSliders, "linear", siBool, 1, 0.000, 1.000,, siPersistable+siSilent, 0.000, 1.000,, "Linear"
	SIAddCustomParameter OptionSliders, "merge", siBool, 0, 0.000, 1.000,, siPersistable+siSilent, 0.000, 1.000,, "Merge"
	SIAddCustomParameter OptionSliders, "close", siBool, 0, 0.000, 1.000,, siPersistable+siSilent, 0.000, 1.000,, "Close"

	On Error Resume Next
	InspectObj OptionSliders ,,"CurveOffset, copyright by Helge Mathee 2003",SIModal

	If Err.Number <> 0 Then
		DeleteObj OptionSliders
		Exit Function
	End If
	
	amount = GetValue(OptionSliders & ".offset")
	linear = GetValue(OptionSliders & ".linear")
	merge = GetValue(OptionSliders & ".merge")
	close = GetValue(OptionSliders & ".close")

	DeleteObj OptionSliders
	Valid = True

End Function

Function GetParams2(amount,linear,valid)

	Dim oDial, OptionSliders
	Valid = False
	
	set oRoot = application.activeproject.activescene.root

	Set oDial = AddProp("Custom_parameter_list", oRoot, , "CurveOffSet_Options").Value("Value")
	OptionSliders = oRoot & "." & oDial

	SIAddCustomParameter OptionSliders, "offset", siFloat, 1, -100, 100,, siPersistable+siSilent  , -5, 5,, "offset"
	SIAddCustomParameter OptionSliders, "linear", siBool, 1, 0.000, 1.000,, siPersistable+siSilent, 0.000, 1.000,, "Linear"

	On Error Resume Next
	InspectObj OptionSliders ,,"CurveOffset, copyright by Helge Mathee 2003",SIModal

	If Err.Number <> 0 Then
		DeleteObj OptionSliders
		Exit Function
	End If
	
	amount = GetValue(OptionSliders & ".offset")
	linear = GetValue(OptionSliders & ".linear")
	merge = GetValue(OptionSliders & ".merge")

	DeleteObj OptionSliders
	Valid = True

End Function





SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

Re: CurveTools

Post by SreckoM » 09 May 2011, 23:05

Hvala puno!

Thank you very much!
- H -

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: CurveTools

Post by Hirazi Blue » 10 May 2011, 12:26

I've spent some time trying to reproduce your error message and at one point I did. This was something however I myself could not reproduce afterwards, so it isn't really helpful, sorry. My guess would be that it has something to do with (the lack of documentation on) the selection criteria. Or it could be the object you're throwing at it.
But again, I can't say anything conclusive.
Maybe someone else can step up and provide some further insight...
;)
Stay safe, sane & healthy!

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: CurveTools

Post by Hirazi Blue » 10 Jun 2011, 12:07

There has been an update to the CurveTools (now at version 1.1)

Quick and dirty translation of the only specifically mentioned change
(from the announcement @the German Softimage Community)
New: SplitSubcurves not only accepts knots but also isopoints as inputs. One can now cut at any desired position.
Note: obviously one can select as many knots/isopoints as one likes (but only either knots or isopoints at one time)
Video is apparently on its way (still...)
;)
Stay safe, sane & healthy!

Theht
Posts: 6
Joined: 10 Jun 2009, 01:15

Re: CurveTools

Post by Theht » 03 Aug 2011, 14:50

for all getting the object error warining. turning on and off the Immed mode will fix the problem. Softimage has to set a prefernece value for this. if you never used the script cant find this value and gives you an error.

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: CurveTools

Post by Hirazi Blue » 23 Nov 2011, 20:02

Just noticed, version 1.31 has been uploaded today: product page
;)
Stay safe, sane & healthy!

User avatar
ActionArt
Posts: 853
Joined: 25 Nov 2010, 18:23
Location: Canada

Re: CurveTools

Post by ActionArt » 23 Nov 2011, 20:57

Thanks for the notice! I love these tools.

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: CurveTools

Post by Hirazi Blue » 16 Jan 2012, 16:55

Version 1.4 has been uploaded: get it here
From the changelog:
v1.4:
Fixed: Bug in CurveToolsPanel – names of Curves inside Models are correctly stored now.
Added: NurbsRectangle Primitive. Params: Length, Width, Subdivs U, Subdivs V, Degree, Centered.
Added: NurbsNGon Primitive. Params: Radius, Sides, Initial Angle, Inscribed/Circumscribed.
;)
Stay safe, sane & healthy!

User avatar
gaboraa
Posts: 314
Joined: 16 Apr 2010, 23:14

Re: CurveTools

Post by gaboraa » 31 Jan 2012, 18:50

This is really awesome! All the necessary tools are there and I wish all of these were built in but as long as they are working, there is no problem:)

prosss
Posts: 1
Joined: 21 Jan 2012, 18:12

Re: CurveTools

Post by prosss » 14 Feb 2012, 07:03

Thank you for the work

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests