Message 1 of 20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I joined the rest of the shape but can't join the arc.
Maybe i need to convert the arc to a polyline? how?
Solved! Go to Solution.
I joined the rest of the shape but can't join the arc.
Maybe i need to convert the arc to a polyline? how?
Solved! Go to Solution.
Hi,
see attached CAD file and see if your issue is done.if yes.. all what i do is PEDIT the objects and be aware when select objects.
Command: PEDIT
Select polyline or [Multiple]:
Do you want to turn it into one? <Y>
Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]: j
Select objects: Specify opposite corner:
Select objects:
segments added to polyline
Enter an option [Open/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]:
Imad Habash
The Arc is not quite in the same plane as the Polyline. Its extrusion direction entity-data entry is:
(210 2.22045e-016 1.22465e-016 -1.0)
whereas that of the LWPolyline is what it should be for something drawn in or parallel to the World Coordinate System:
(210 0.0 0.0 1.0)
[that is, the object's Z-axis direction is straight up in the direction of the WCS Z axis -- the 210 is the extrusion-direction identifier, and the rest of the numbers are X, Y & Z coordinates of a WCS unit vector]. FLATTENing it and PEDIT/Joining it to the Polyline worked for me.
How do i get the entity data? the extrusion direction, and what does it mean a 2D arc to have z direction?
Is there a simple command for extracting the extrusion direction or do i have to use LISP?
The LIST command indeed gave z=-1 as extrusion direction but i didn't understand the meaning.
I tried FLATTEN and the JOIN and PEDIT but no
@Karol-Or wrote:
How do i get the entity data? the extrusion direction, and what does it mean a 2D arc to have z direction?
Is there a simple command for extracting the extrusion direction or do i have to use LISP?
The LIST command indeed gave z=-1 as extrusion direction but i didn't understand the meaning.
I tried FLATTEN and the JOIN and PEDIT but no
This will return the entity data:
(entget (car (entsel "\nSelect object to see its entity data: ")))
The extrusion direction entry starting with 210 is [for most object types] at or near the end of the returned list. If you want to see the extrusion direction only :
(cdr (assoc 210 (entget (car (entsel "\nSelect object to see its extrusion direction unit vector: ")))))
For me [Acad2016 here] the LIST command doesn't return an extrusion direction, but the "Normal" XYZ values in the Properties box are equivalent. However, they will be rounded off to whatever your Units precision setting is, so you may not be able to tell from them if it's off by as little as in that sample drawing.
As I said before, FLATTEN and PEDIT/Join in your drawing worked for me. How you answer the "Remove hidden lines?" question in FLATTEN, even though it seems irrelevant a lot of the time, can make a difference in the result -- try it both ways [I forget which way I did it when it worked].
Hi @Karol-Or,
There are a lot of good suggestions here. I made a quick video showing the FLATTEN and PEDIT that I used to get the arcs to join.
I hope this helps.
Please select the Accept as Solution button if my post solves your issue or answers your question.
I just clicked on the arch and the rest of the shape and hit join. It said 2 objects converted to 1 spline. I did nothing else but _join. Using aca 17
Nick DiPietro
Cad Manager/Monkey
@gotphish001 wrote:
I just clicked on the arch and the rest of the shape and hit join. It said 2 objects converted to 1 spline. I did nothing else but _join. ...
That "works," but may not serve certain purposes well, depending on what you want to do with it after JOINing. Because the Arc is not quite in the same plane as the Polyline, even though their endpoints meet, the resulting Spline is not quite flat*, so if whatever else they want to do with it requires that it be flat, it won't work.
And you can't Osnap to the endpoints or midpoints of segments [except for the one start/end point and the one overall-length midpoint], nor to the center points of arc segments, the way you can in the Polyline that results from FLATTENing the Arc first.
Also, in case it matters, it takes over twice as much in terms of entity data to store the information about the Spline result as it does about the Polyline result.
* It's very close to flat, because the Arc's extrusion direction is very close to matching the Polyline's -- its 3D bounding box extends in the Z direction between 31.99999997999996 and 32.0. But if that's far enough from flat to prevent JOINing into a Polyline without FLATTENing the Arc first, it could well prevent other things from working as intended, or perhaps from working at all.
EDIT: In some experimenting, I find that the problem is not merely that one of those objects is flat in the WCS and the other isn't quite. Neither of them is! The Polyline's 3D bounding box extends in the Z direction from 32.00000000999998 to 31.99999998999998, and the Arc's from 31.99999998999997 to 32.00000001000002. That makes it very interesting that FLATTENing only the Arc was enough to be able to JOIN them into a Polyline result....
How to obtain the bounding box, and why is the z elevation about 32? i drew all on the same plane, and projection from above shows one overlapping line for all shpes
@Karol-Or wrote:
How to obtain the bounding box, and why is the z elevation about 32? i drew all on the same plane, and projection from above shows one overlapping line for all shpes
Here's my little command for getting an object's bounding box:
(defun C:BB (/ minpt maxpt); Bounding Box of selected object (vla-getboundingbox (vlax-ename->vla-object (car (entsel))) 'minpt 'maxpt) (prompt "\nBounding Box [in 'box' variable]: ") (setq box (list (vlax-safearray->list minpt) (vlax-safearray->list maxpt))) )
Then I did (rtos (caddar box) 2 16) to get the Z coordinate for the bottom of the selected object's WCS extents, and (rtos (caddr (cadr box)) 2 16) to get it for the top, out to far more decimal places than the BB command itself shows [it uses the current Units precision settings].
You apparently didn't draw all on the same plane, though you may have thought you were doing so, because they didn't end up that way. Could you have Osnapped unintentionally to something that wasn't where you thought it was? Or could anything have happened subsequently, to Move or 3DRotate something? Or could you have been unknowingly in a different UCS, thinking you were in the WCS?
Investigate the OSNAPZ System Variable to ensure everything you draw will be at 0 elevation in the Z-axis direction, even when [for example] you Osnap onto some location that isn't.
But what does it mean, for example, for a polyline or other non regular planar shape, to have z coordinate direction? i can understand that an arc or a circle might have, but also it's not necessary since they're also planar.
And how do i use this information in order to flatten the "intractable" oblects?
I used again FLATTEN on the inner shape but EXTRUDE produced only a surface, not a solid.
I applied the 2 Lisps you sent me: the z direction searcher and the bounding box and they were both O.K. for the 2 shapes-the outer and inner ones, meaning they both have same z direction extrusion vector and the bounding box reports z=32 for both but the inner one doesn't create a solid
Hi,
>> How can you test if it's closed?
Command _LIST (reports "Open" or "Closed" or select the polyline and look at the property window
- alfred -
@Karol-Or wrote:
How can you test if it's closed?
In general, i mean, what's the command or the procedure
Select it with no command active, right-click and pick Properties [near the bottom], and look in the Properties box. Near the bottom, in the Miscellaneous category there's a Closed "slot" which says No for that Polyline in your drawing. You could simply pull that down and change it to Yes, which will add a segment between the start and end, but I think you'd be better off checking the nature of its openness. Often Polylines "look" closed that are not because they were just drawn with their endpoint at the same place as their startpoint, but without using the Close option. But in this case, the start and end are not quite in the same place, so Closing in Properties would will result in a little kink in the shape, which could be apparent in the Solid Extruded from it.
Also in Properties, in the Geometry category, pick in the Current vertex slot, and an X will appear at the start point. Zoom way in there. You would need to decide which end to move to meet the other, or whatever other fix is appropriate.
If you do the following to establish the entity name and entity data list:
(vl-load-com); if needed
(setq
ent (car (entsel "\nSelect object: "))
edata (entget ent)
)
then AutoLisp can determine whether it's closed in several different ways, all of which will return T if it's closed, nil if it's not.:
(= (logand 1 (cdr (assoc 70 edata))) 1)
(vlax-curve-isClosed ent)
or if you convert it to a VLA object with (setq obj (vlax-ename->vla-object ent))
(= (vlax-get obj 'Closed) -1)
(= (vla-get-Closed obj) :vlax-true)
@john.vellek I ran FLATTEN on the arc but it wasn't at elevation 0 afterwards even when ELEVATION is set to 0. When does FLATTEN put elements at elevation 0?
Nancy
Hi @neaton,
I am not quite sure how to answer your question. FLATTEN is supposed to drop everything to 0 but I too have found sometimes that it doesn't always function. I am not sure if this is due to an error in the routine, not enough error-checking in the routine or if the complexity or type of object affects the outcome. You might try to FLATTEN it twice or even on just select items. If you have a drawing to attach I can take a closer look.
HI @Karol-Or,
I am checking back to see if my post or others helped you with your problem. Please add a post with how you decide to proceed and your results so other Community members may benefit.
Please hit the Accept as Solution button if a post or posts solves your issue or answers your question.