View Full Version : Help - Trim roof lines
topomav
2022-12-27, 04:01 PM
Hi, I use this code to draw 2D and 3d roof . After last update add a Double Offset ROOF-AXIS 0.08 to LAYER ROOF. The problem is that after double offset the lines didnt trim. Can any one help?
Tom Beauford
2022-12-27, 07:17 PM
Extrim (https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-06651AD3-F159-430E-81E5-AEB8E775C19E) took care of the outside corners and used fillet (https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-64F8B700-23B3-4BD6-8C03-66121AA13E8F) while holding shift down to toggle radius to 0 to get the inside ones pretty quick.
topomav
2022-12-27, 09:15 PM
Hi, Tom Beauford. I did that ,but is any way to trim trim lines automatic. By the way extrim didn't trim the lines and I don't know why !!!
Thanks
topomav
2022-12-28, 07:49 AM
Here is more complicated example. Need a lot of filet0 , extrend and extrim. Is any way to fix this code?
Thanks
topomav
2022-12-28, 05:50 PM
I find a way to do this but i need some help.
This code create boundaries and delete the old ROOF lines. Now I am trying to explode the boundaries , and overkill them. Can any one help me to fix the code.
(defun c:CleanRoof (/ ss1 ss2)
(command "layer" "off" "ROOF-AXIS" "")
(princ "\nObjects to be removed, ")
(if (setq ss1 (ssget '((0 . "LINE") (8 . "ROOF"))))
(progn
(sssetfirst nil nil)
(command "_layer" "_m" "ROOF" "_c" "90" "" "")
(command-s "_.-BOUNDARY")
(command "_.erase" ss1 "")
) ; end progn
) ; end if
(if (setq ss2 (ssget "X" '((8 . "ROOF"))))
(progn
(sssetfirst nil nil)
(command "_.explode" ss2 "") ;explode ROOF boundaries
(command "_.overkill" "l" "" "") ; overkill layer
) ; end progn
) ; end if
(command "layer" "on" "ROOF-AXIS" "")
(princ)
) ; end defun
Thansk
topomav
2022-12-29, 05:52 PM
Any ideas?
Thanks
Bruno.Valsecchi
2022-12-30, 01:51 PM
For "explode" make loop for explode entities one by one.
(defun c:CleanRoof (/ ss1 ss2 n ent)
(command "_.-layer" "_off" "ROOF-AXIS" "")
(princ "\nObjects to be removed, ")
(if (setq ss1 (ssget '((0 . "LINE") (8 . "ROOF"))))
(progn
(sssetfirst nil nil)
(command "_layer" "_m" "ROOF" "_c" "90" "" "")
(command-s "_.-BOUNDARY")
(command "_.erase" ss1 "")
) ; end progn
) ; end if
(if (setq ss2 (ssget "_X" '((8 . "ROOF"))))
(progn
(sssetfirst nil nil)
(repeat (setq n (sslength ss2))
(setq ent (ssname ss2 (setq n (1- n))))
(command "_.explode" ent) ;explode ROOF boundaries
)
(command "_.overkill" "_l" "" "") ; overkill layer
) ; end progn
) ; end if
(command "_.-layer" "_on" "ROOF-AXIS" "")
(princ)
)
BIG-AL
2023-01-15, 11:18 AM
The external trim should work whether using Extrim or a custom trim that uses a offset pline a very small offset, then get the vertices and use a fence option, the internal and the "Y" intersects should be able to be worked out by using again Fence option with ssget, you can then work out the matching pairs of line work. need some time to think about it.
topomav
2023-01-15, 03:15 PM
Hi BIG-AL. This is the lisp I use for roof and Clean roof with hatch for cleaning and add hatch.
I don't know any faster way to do it. Some things in lisp is complicated for me, every day learn learn new things from the experience of you in this forum.
I don't know if you can check the two codes and fix roof lisp to trim and hatch.
Roof lisp create 2d and 3d roofs. This extra lines is only in 2d roof. (I don't need hatch or extra line in 3d roof)
Thanks
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.