Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

How to convert Editable Spline to a Line

How to convert Editable Spline to a Line

revel68
Advocate Advocate
908 Views
2 Replies
Message 1 of 3

How to convert Editable Spline to a Line

revel68
Advocate
Advocate

How can I convert an Editable Spline to a Line.

 

Reason being that I am making an edge selectin that is very complex and then using "Create Shape From Selection" which creates an Editable Spline.

 

This is great except that I have issues with exporting them as .dwg files for things like Fusion 360. But if I trace it using the Line tool (which creates a "Line") all is well. 

 

Editable Splines and Lines both create good .SWG files. But editable Splines (atleast mine I made from selections) are not working for .DFW.

 

0 Likes
909 Views
2 Replies
Replies (2)
Message 2 of 3

wernienst
Collaborator
Collaborator

Hmm, I am able to export lines as .dwg files and re-importing them to 3dsmax (they come in as Editable Splines with corner vertices). I can also import them to Cinema4D. So the importer of your other software may be the problem.

0 Likes
Message 3 of 3

A娘
Advocate
Advocate

there was no built-in method to do this
you should recreate a line matching with what you want to convert

run script below , all shapes not line you had selected will be converted to line
this was a simple example , without keep instance

mapped fn ConvertToLine o =
(
	if classof o == TextPlus do
	(
		format ("Ignore geometryshape : " + o as string + "\r\n")
			return false
	)
	if finditem #(SplineShape,line) (classof o) == 0 do
	(	
		if canconvertto o SplineShape then
			convertto o SplineShape
		else
		(
			format ("Not shape : " + o as string + "\r\n")
			return false
		)
	)
	if classof o == line do
	(
		format ("Line allready : " + o as string + "\r\n")
		return true
	)
	l = line transform:o.transform
	for i = 1 to numSplines o do
	(
		addNewSpline l
		for j = 1 to numKnots o i do
			addKnot l i (getKnotType o i j) (if j == numKnots o i then getSegmentType o i (j-1) else getSegmentType o i j) (getKnotPoint o i j) (getInVec o i j) (getOutVec o i j)
		if isClosed o i do
			close l i
	)
	o.baseobject = l.baseobject
	delete l
	format ("Converted : " + o as string + "\r\n")
)
ConvertToLine $


 

0 Likes