Message 1 of 22
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello friends,
How can we turn the clicked Closed area into a 3Dface?
Thanks in advance to the helpful friend.
Solved! Go to Solution.
Hello friends,
How can we turn the clicked Closed area into a 3Dface?
Thanks in advance to the helpful friend.
Solved! Go to Solution.
There is a difference in height
Can you elaborate?
Yes. There is a height difference.
This height will be used as the highest level. That is, a surface must be created according to the 3D length.
* I updated the attachment. The previous one was wrong.
TRY
(defun c:Test (/ CUR ED EN I INT LIT PREV PTNEWLST SEL SLEN SS)
(princ "\nSelect LINES objects to Convert 3DFACE : ")
(setq ss (ssget '((0 . "LINE"))))
(IF (= 3 (sslength ss))
(PROGN
(setq i (sslength ss)
slen i)
(while (not (minusp (setq i (1- i))))
(setq en (ssname ss (fix i))
ed (entget en)
LIT (CONS (cdr (assoc 10 ed)) LIT)
LIT (CONS (cdr (assoc 11 ed)) LIT)
)
)
;;; komondormrex
;**********************************************************************************************************************************************************
(defun remove_duplicates (_list / duplicateless_list)
(while _list
(if (not (equal (car (setq list_element (car _list))) (caar (setq _list (cdr _list)))))
(setq duplicateless_list (append duplicateless_list (list list_element)))
)
)
)
(setq ptnewlst (remove_duplicates LIT))
;**********************************************************************************************************************************************************
(entmake (list (cons 0 "3DFACE")
(cons 8 "00")
(cons 10 (CAR ptnewlst))
(cons 11 (CADR ptnewlst))
(cons 12 (CADDR ptnewlst))
(cons 13 (CADDDR ptnewlst))
(cons 62 256)
(cons 62 4)
(cons 70 0)))
))
(princ)
)
Thank you very much for the answer.
- Instead of selecting the lines, I want to click inside the closed area and perform this operation.
The closed area also meets at a Point (Z). Therefore, this area should be translated...
You could pick a point but how do you find other objects ? You could use a ssget "F" with an expanding shape till it finds 3 items, a good time for you to have a go, you post a lot. Use (repeat 10 would be used to make a 10 sided object, using polar for each point into a list, note add last to list so its closed. Just keep changing the offset distance.
I thought it should have a logic similar to the Area command for other objects.
What do you mean by sharing too much? We are the explainers.
Are there ever more than 3 edges? If always only 3 or 4, and with the updated sample drawing in which endpoints meet, JOIN could be used to make a 3DPolyline, then 3DFACE used with the resulting vertices. But if there could be more than 4 edges, more than one 3DFACE would be needed, so there would need to be some figuring out of which edges to use for which 3DFACE, and you would need to consider whether you want any Invisible edge(s), and if so, which one(s).
@hosneyalaa FWIW, If you check for the existence of the points within your loop you can eliminate the remove duplicates sub.
(while (not (minusp (setq i (1- i))))
(setq en (ssname ss (fix i))
ed (entget en)
)
(foreach dxf '(10 11) (or (member (setq p (cdr (assoc dxf ed))) lit) (setq lit (cons p lit))))
)
More than three... I'm actually going to use this to calculate the surface area of a roof. I wanted
I add another prefix. roof plan
You could use master ElpanovEvgeniy's triangulate lisp to place the 3dfaces. I've put two functions up top 'foo' which generates the TIN using a selection of lines and 'AAREA' which calculates the total area of selected 3d faces.
Just a cooment I have a draw roofs function it uses Pface for each roof plane so could use all those points to work out surface area. Marko-ribar has a nice do roofs lisp that may be useful for drawing the roof in the 1st place. Do a google.
Another issue is when looking at the Ronjonp image it may have an error in the roof shape, roofs are normally planes so the right side is made up of 2 - 3dfaces rather than a true plane answer which would be more 3dfaces.
Yes, it is planar. But I use 3D face to find the actual value of Surface area - Coverage area. Otherwise, when we look at it as a plan, incorrect or incomplete results will appear.
Ribar? I'm hearing this for the first time. If you add the function I will test it.
Thanks.
I do apoligise Marko-Ribar has some roof stuff so does Gilles Chanteau. Same I have a house drafting package that includes roofs.
@Sea-Haven wrote:
...
Another issue is when looking at the Ronjonp image it may have an error in the roof shape, roofs are normally planes so the right side is made up of 2 - 3dfaces rather than a true plane answer which would be more 3dfaces.
This scenario was in the sample drawing and the triangulation is correct.
For Marko's ridge line code, it's HERE. I don't know if this is the latest version because there are 20 pages in that thread.
@ronjonp if the original line work is wrong then yes the 3dfaces will not be correct. We can only work with what we are given. Note having spent like 40 years playing with TIN's an improvement to a TIN is to always add breaklines.
Note that if you have hipped roof like you/others presented in pictures, to get area of roof, you just have to divide area of object in floor plan with cosine of pitch angle...