Jump to content

Hatch at top surface of 3d solid


Recommended Posts

Posted

Is there an easy way to make hatches at the top face of 3D solid. 

 

I have a drawing that contains steel platform areas as 3D solids with various thickness, The solids are at different levels. 

 

I want to have hatching at the top face (to show grating). What iam am doing now is exploding all solids to get lines/arcs, then switch to front/side view and delete the "thickness" lines. Afrer that i switch to top view and make polylines for all the platform. Then i create hacthes and then move it to the correct level.

But all this takes alot of time. Is there any way to expedite it?

 

 

Posted

You could try using a 3DFACE then hatch that.

Posted

Have you tried moving the hatch a tiny amount off the surface say a top is at elev 10 then create hatch and move 0.001 vertical. Soild object remains as created.

Posted (edited)

Making 3dface is same amount of work as making polylines.

 

The main time consuming factors in my method are

 

1. After exploding solids, i have to switch to side and elevation view and delete all the lines which were formally side and bottom faces of the solids. This takes alot of time as the original solids at different levels and have different thickness.  The only way to shorten this time is if we had a solprof or flatten command that draws the lines on the top face of solids instead of 0 elevation. Any suggestion to achieve this?

 

2. The second most time consuming part is when i draw hatches, it draws them on 0 elevation. I then have to move all hatches (via property pane) to match the elevation of polylines. Iam thinking of writing a lisp to achieve that. i will give it a shot.

 

so i have an idea how to solve the second part, its the first part iam struggling to find a way.

 

Edited by PrimeTimeAction
Posted
20 hours ago, PrimeTimeAction said:

I want to have hatching at the top face (to show grating). What iam am doing now is exploding all solids to get lines/arcs, then switch to front/side view and delete the "thickness" lines. Afrer that i switch to top view and make polylines for all the platform. Then i create hacthes and then move it to the correct level.

But all this takes alot of time. Is there any way to expedite it?

 

 

What version of AutoCAD do you have? I'm on 2019 and there is a command to copy faces which would drastically improve your workflow.

image.png.d05f6619720be43bedbc063e029ec5af.png

Posted

Iam on Autocad 2016.  With copyfaces i will have to select one solid at a time. I have nearly 100s of small island of 3d solid. Its easier to explode and delete the bottom and side surface then use PE command to get polyline. 

Posted (edited)

Move the origin of your UCS before hatching to the new elevation.

I've always created my grating in 3D but then I had a computer that could handle it.  I also put the grating on its own layer and only had that layer thawed when needed (frozen when not needed).

Edited by ReMark
Posted (edited)

This simple code seems to work fairly well ( not much error checking ).

(defun c:foo (/ a e p)
  (while (setq p (getpoint "\nPick a point in a face: "))
    (setq a (entlast))
    (command "_.Solidedit" "_Face" "_Copy" p "" '(0 0 0) '(0 0 0) "" "")
    (cond ((not (eq a (setq e (entlast))))
	   (redraw e 3)
	   (command "_.ucs" "_Ob" pause)
	   (command "_.bhatch" "_S" e "" "")
	  )
    )
  )
  (princ)
)

 

 

2019-01-30_14-21-03.gif

Edited by ronjonp
Posted (edited)

This one removes the second pick :) .. will still STB if the point is not within a face though.

(defun c:foo (/ a b e p)
  ;; RJP » 2019-01-30
  (while (setq p (getpoint "\nPick a point in a face: "))
    (setq a (entlast))
    (vl-cmdf "_.Solidedit" "_Face" "_Copy" p "" '(0 0 0) '(0 0 0) "" "")
    (cond ((eq a (setq e (entlast))) (print "Boundary not created.."))
	  ((/= "REGION" (cdr (assoc 0 (entget e)))) (entdel e) "Boundary created not valid..")
	  ((setq b (vlax-invoke (vlax-ename->vla-object e) 'explode))
	   (command "_.ucs" "_OB" (vlax-vla-object->ename (car b)))
	   (mapcar 'vla-delete b)
	   (command "_.bhatch" "_S" e "" "")
	   (entdel e)
	  )
    )
  )
  (princ)
)

 

2019-01-30_15-11-43.gif

Edited by ronjonp
Posted

Nice one ronjonp, did a hide solid hatch will be removed  but ansi etc is ok not sure why. Seems to be linked with doing a regen prior to hide.

Posted

Nice work ronjomp.  I recently made a routine with similar functionality.  My .NET variant, though, did require several (4 or 5) dozen more lines of code - god help my weary hunt and peck fingers.

 

The hatching routine  is part of a broader effort/workflow.  I'm trying to incorporate hatches, pattern and solids, along with more traditional line rendering techniques to produce stylized vector based renders such as the attached. The process may not have a particularly broad appeal, but the renders do look cool as heck when printed from a laser B&W. 

PoolHouise.pdf

Posted
4 hours ago, SEANT said:

Nice work ronjomp.  I recently made a routine with similar functionality.  My .NET variant, though, did require several (4 or 5) dozen more lines of code - god help my weary hunt and peck fingers.

 

The hatching routine  is part of a broader effort/workflow.  I'm trying to incorporate hatches, pattern and solids, along with more traditional line rendering techniques to produce stylized vector based renders such as the attached. The process may not have a particularly broad appeal, but the renders do look cool as heck when printed from a laser B&W. 

PoolHouise.pdf

Thanks! That rendering does look very cool. 👍

Posted

Thank you guys. This lisp looks really useful. I will definitely use it. But for my issue, its not ideal to select each solid separately as there a alot of solids in teh drawing. However now i think i have a way forward. 

Thanks again for your valuable information.

  • 6 years later...
Posted

Wow, this lisp really is amazing! So useful to me. I use plant3D a lot, and when I use the ortographic drawing generator, 3d solids become simple lines. this lisp saves me loads of time, but I'd like to make it even better but I know nothing about coding.
I'd like to suggest to the creators if it would be possible to hatch all external faces of a 3D solid by just selecting the solid, and not each face at a time. So with only one selection, all faces would be hatched at once.

Thanks a lot.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...