Parikon Posted January 4, 2019 Report Posted January 4, 2019 (edited) Mam taki problem. Skompilował dll-kę z tego kodu https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-NET/files/GUID-01A47A4F-9FC5-4DB6-8C3E-B72D75688965-htm.html Po załadowaniu komendą addhatch Zwcad tworzy okrąg ale pusty. VERNUM = "2018.07.26(35476)_x64". Gdy rozciągnę okrąg wypełnia się hatch-em. Gdy zaznaczę hatch i sprawdzę jego właściwości, pod hasłem geometria jest tylko właściwość wzniesienie - brak właściwości pole. Kopiuje sam okrąg i hatch robię pod Zwcad. Tutaj we właściwościach hatcha mamy podane pole. Jak usprawnić kod, aby: - kreskowanie wyświetlało się od razu, a nie po zmianie geometrii okręgu - możliwy był odczyt pola kreskowania W kodzie użyłem kreskowania solid. Edited January 4, 2019 by Parikon Quote
perlon Posted January 4, 2019 Report Posted January 4, 2019 Wygląda na to, że hund begraben jest w kodzie DXF 92. Po wstawieniu hatcha z .NET API kod wynosi 0. Sprawdziłem że dla kodu 1 jest liczona powierzchnia. Dla innych nie sprawdzałem. Wyciąg z dokumentacji kodów DXF Boundary Path Data The boundary of each hatch object is defined by a path (or loop) that consists of one or more segments. Path segment data varies depending on the entity type (or types) that make up the path. Each path segment is defined by its own set of group codes. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 2. Hatch boundary path data group codes Description Group code Boundary path type flag (bit coded): 92 0 = Default; 1 = External; 2 = Polyline 4 = Derived; 8 = Textbox; 16 = Outermost Lekarstwo w lisp'ie. (defun c:hatchfix ( / entity dxfdata old-dxf new-dxf dxfdata ) (setq entity (car (entsel)) dxfdata (entget entity) old-dxf (assoc 92 dxfdata) new-dxf '(92 . 1) dxfdata (subst new-dxf old-dxf dxfdata) ) (entmod dxfdata) ) W C# jeszcze nie znalazłem co i jak trzeba zafiksować żeby DXF 92 był 1. dmatusz3 and kruszynski 1 1 Quote
perlon Posted January 4, 2019 Report Posted January 4, 2019 Znalazłem. hatch.AppendLoop(HatchLoopTypes.External, collection); enum HatchLoopTypes można sumować logicznie hatch.AppendLoop(HatchLoopTypes.External | HatchLoopTypes.Outermost, collection); Parikon 1 Quote
Parikon Posted January 5, 2019 Author Report Posted January 5, 2019 Dzięki. Jest pole we właściwościach. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.