Walls with dimensions name?

I spend a lot of time creating walls, measuring and renaming. I just wanted to create lines in top view and execute a command that adds 10 Outline 320 extrude mesuare the length of the line i created and rename object:
"Wall X, 10, 320" are the values that I use most.
(if there is a text box that I could imput all value and create, would be perfect, but it would probably be hard to create, I think)
thanks guys

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

code for delete single wall

	on btn_delete_one pressed do
	(
		if selection.count != 1 then messagebox "Select a single Wall..." title:"Warning" beep:off else
		(
			if isKindOf selection[1] GeometryClass and isKindOf selection[1].baseobject Shape do delete selection[1]
		)
	)

barigazy

barigazy's picture

...

And Yes why do you want to convert shapes to spline shapes?
I allready filtered this for reverse knots operation(see filterSpl fn at the top).

barigazy

Michele71's picture

I've noticed that in the

I've noticed that in the previus script, if there is a shape (not editable spline)in the scene, the script does not create the wall on it...

barigazy's picture

...

Because of filterSpl fn. Give me a half hour to correct the tool

barigazy

Michele71's picture

In fact, I've noticed the

In fact, I've noticed the filter, but I thought it would go so well :)

barigazy's picture

...

Added :
-- wirecolor option (solid or random color)
-- option for unique name

try (destroyDialog ::create_wall) catch()
rollout create_wall "Create Quick Wall"
(
	local walls = #()
	fn filterShape shape = isKindOf shape SplineShape or isKindOf shape Line 
 
	group "Wall Name ..." 
	(
		edittext et_wallname "" pos:[5,25] width:135 height:17 text:"Wall"
		colorPicker cp_wire "" color:[61,135,6] pos:[138,25] width:15 height:17
		checkbox cb_unique "Use Unique Name" pos:[10,45]
		checkbox cb_random "Randomize Each Color" pos:[10,65]
	)
	group "Wall Params ..." 
	(
		radiobuttons rb_mode "Mode:" labels:#("Outline-Extrude", "Extrude-Shell") pos:[10,110]
		spinner spn_outline "Outline   =  " range:[-1e5,1e5,10] type:#worldunits pos:[11,160] fieldwidth:70
		spinner spn_extrude "Extrude  =  " range:[-1e5, 1e5,320] type:#worldunits pos:[10,180] fieldwidth:70
		checkbox cb_extrude "Instance Extrude Modifier" checked:on pos:[10,200]
		spinner spn_shellin "Shell In   =  " range:[0,1e5,5] type:#worldunits pos:[10,220] fieldwidth:70 enabled:off
		spinner spn_shellout "Shell Out = " range:[0,1e5,5] type:#worldunits pos:[11,240] fieldwidth:70 enabled:off
		checkbox cb_shell "Instance Shell Modifier" checked:on pos:[10,260] enabled:off
		button btn_reverse "Reverse Knots Order" pos:[10,280] width:140 height:18
		button btn_delete "Delete Walls" pos:[10,300] width:140 height:18
	)
	group "Create Wall ..." 
	(
		button btn_create "G O !" pos:[10,345] width:140 height:18
	)
	on rb_mode changed state do 
	(
		if state == 1 then 
		(
			spn_outline.enabled = on
			spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = off
		)
		else 
		(
			spn_outline.enabled = off
			spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = on
		)
	)
 
	on btn_delete pressed do 
	(
		delete (for node in walls where isValidNode node collect node) ; free walls
	)
 
	on btn_reverse pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
	(
		with redraw off
		(
			for sp in selection where filterShape sp do 
			(
				integer = numSplines sp
				number = if (e = getSplineSelection sp).count == 0 then (#{1..numsplines sp} as array) else e
				for n in number do reverse sp n
			)
		)
	)
 
	on btn_create pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
	(
		if et_wallname.text == "" then messagebox "Enter Some Name" title:"Warning" beep:off else
		(
			if GetCommandPanelTaskMode() != #create do setCommandPanelTaskMode #create
			node = (Extrude amount:spn_extrude.value)
			modifier = if rb_mode.state == 2 do (Shell innerAmount:spn_shellin.value outerAmount:spn_shellout.value straightenCorners:on)
			with redraw off
			(
				for sp in selection where filterShape sp do 
				(
					shape = copy sp name:(if cb_unique.checked then uniquename et_wallname.text else et_wallname.text) \
					wirecolor:(if cb_random.checked then (random black white) else cp_wire.color)
					append walls shape
					if spn_outline.value != 0 and rb_mode.state == 1 do applyOffset shape spn_outline.value
					if spn_extrude.value != 0 do
					(
						if not cb_extrude.checked then addmodifier shape (copy node) else addmodifier shape node
					)
					if rb_mode.state == 2 do
					(
						if not (spn_shellin.value == 0 and spn_shellout.value == 0) do
						(
							if not cb_shell.checked then addmodifier shape (copy modifier) else addmodifier shape modifier
						)				
					)
				)
			)
		)
	)
)
createDialog create_wall 160 370 10 110 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

barigazy

Michele71's picture

heheheheh at this point, I

heheheheh at this point, I also use it :D Thanks for thanks for having improved the script base barigazy :)

barigazy's picture

...

You welcome guys!

;)

Here you can add more features like:
- control height segments of extrusion
- control thickness segments
- maybe replace extrude modifier with bevel modifier
- override Mat ID for inner and outer side of the walls
- adding more modes (combos) by using sweep, bevel profile etc.
- more controls for base spline (welding, changing knots type etc.)
But I left this to you guys :)

Michele you can post this tool in the script section of this forum.

barigazy

Gabriel Corazza's picture

:]

I spend a lot of time working, do one project per day (Exhibit Design). But with my new scripts daily working time is decreasing, when all the shortcuts are ready I will have much more time to study MAXScript and be part of this team. I'm going to make these improvements! I just need time.

barigazy's picture

...

We all need the time to do what we like :)
I'm also glad that this tool enables you to work faster

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.