TheSwamp

CAD Forums => CAD General => Topic started by: Andrea on May 17, 2005, 04:57:15 PM

Title: variable blank,,!
Post by: Andrea on May 17, 2005, 04:57:15 PM
Sorry all...I have a blank....and can't find this variable..

I have a closed Polyline, but in each end....the polyline seem to close streaght...i mean without merging each other...

do i am clear !??...hmmm...i think i need to take some english course.

 :oops:
Title: variable blank,,!
Post by: whdjr on May 17, 2005, 05:00:35 PM
Not reall clear!?!?!?

If you are trying to get the enpoints to match without joining the two lines, then just grip one and drag it towards the other one.  As you draw type in "end" and press "enter", then the line will snap to the endpoint when you pick on the second line.
Title: variable blank,,!
Post by: hudster on May 18, 2005, 04:11:25 AM
I get the same problem, the only way I can find to get round this is to close the polyline as your drawing it, if you do it after you get a wee notch at the end.
Title: Re: variable blank,,!
Post by: jonesy on May 18, 2005, 07:02:25 AM
Quote from: Andrea
Sorry all...I have a blank....and can't find this variable..

I have a closed Polyline, but in each end....the polyline seem to close streaght...i mean without merging each other...

do i am clear !??...hmmm...i think i need to take some english course.

 :oops:


Can you post a picture of what you're trying to do...
A picture speaks a thousand words
Title: variable blank,,!
Post by: Andrea on May 18, 2005, 08:35:44 AM
sure...but how to post a picture here ?? :shock:
Title: variable blank,,!
Post by: Andrea on May 18, 2005, 09:41:16 AM
ok there it is...

http://andrealisp.site.voila.fr/3.bmp
Title: variable blank,,!
Post by: M-dub on May 18, 2005, 09:56:45 AM
Does a REGEN do anything to change this?

The only way I can reproduce that is to draw 4 individual plines.  Are you certain that they're joined and closed?
Title: variable blank,,!
Post by: MP on May 18, 2005, 10:35:19 AM
I'm going to guess the linetype is not continuous, but the ltscale is such that it appears continuous, except of course at vertices.
Title: variable blank,,!
Post by: M-dub on May 18, 2005, 10:42:45 AM
That makes sense too!  Good thought, MP
Title: variable blank,,!
Post by: daron on May 18, 2005, 11:18:44 AM
Don't forget here that for a few releases now, if you take a pline and snap the end to the beginning, it closes automatically. I don't believe this was the case with 2000, but I could be wrong. Are you trying to keep it open? That is what I understand from your post. And yes, you probably could benefit with some English courses. Do so and don't forget to speak English with English speaking people. It'll help you see where you struggle with it.
Title: variable blank,,!
Post by: Russ on May 18, 2005, 11:24:22 AM
If I understand the problem then by joining them should solve it.
Title: variable blank,,!
Post by: Andrea on May 18, 2005, 03:34:38 PM
oh...

thanks all.

But the Linetype is continuous, and the LTSCALE set to 1.
this is a CLOSED polyline created with the "PLINE" command and finished with "C" (Close).

Created from AutoCAD 2002, exported to 2004 2005 and also 2006..
but still the same thing.

Thanks to pushing me to lurn my English....I'll try to do better next time.
Title: variable blank,,!
Post by: whdjr on May 18, 2005, 04:04:32 PM
Let me get this straight...you have a "closed" pline that does not meet at the ends?  Is that right?

Try this:

Explode the plines so they are all seperate lines then select them and look in properties to see how many you have.  If you more that the number of line segments you can see then you have duplicates and that is why your "closed" pline doesn't look closed.

Remedy:

Erase all the duplicates, fillet the lines together, and then use either pljoin or the pedit command to join these lines to make a closed pline.
Title: variable blank,,!
Post by: hudster on May 19, 2005, 04:04:09 AM
The way to replicate the problem is as follows.

Draw a polyline that is 1mm wide, and has four equal sides 5mm long at right angles to each other, but don't close it.
Now if you use the pedit command to close the polyline the last corner doesn't close up.
Title: variable blank,,!
Post by: whdjr on May 19, 2005, 07:52:57 AM
I have AutoCAD 2000 and when I did it like your instructions it closed completely on all 4 corners.
Title: variable blank,,!
Post by: hudster on May 19, 2005, 07:54:28 AM
strange, I have 2000 and mine doesn't.

I wonder if there is a variable which controls this?
Title: variable blank,,!
Post by: whdjr on May 19, 2005, 08:44:34 AM
Run this and post the results so we can compare:

Code: [Select]
(entget (car (entsel)))
Title: variable blank,,!
Post by: whdjr on May 19, 2005, 08:49:19 AM
This is one segment before joining:
Code: [Select]
Command:(entget (car (entsel)))

Select object:
((-1 . <Entity name: 24f59a8>)
  (0 . "LWPOLYLINE")
  (330 . <Entity name: 24f58f8>)
  (5 . "4D")
  (100 . "AcDbEntity")
  (67 . 0)
  (410 . "Model")
  (8 . "0")
  (100 . "AcDbPolyline")
  (90 . 2)
  (70 . 0)
  (43 . 1.0)
  (38 . 0.0)
  (39 . 0.0)
  (10 12.9965 9.4425)
  (40 . 1.0)
  (41 . 1.0)
  (42 . 0.0)
  (10 12.9965 4.4425)
  (40 . 1.0)
  (41 . 1.0)
  (42 . 0.0)
  (210 0.0 0.0 1.0)
)

and this is after I joined them using pedit->join:
Code: [Select]
Command:(entget (car (entsel)))

Select object:
((-1 . <Entity name: 24f59a8>)
  (0 . "LWPOLYLINE")
  (330 . <Entity name: 24f58f8>)
  (5 . "4D")
  (100 . "AcDbEntity")
  (67 . 0)
  (410 . "Model")
  (8 . "0")
  (100 . "AcDbPolyline")
  (90 . 4)
  (70 . 1)
  (43 . 1.0)
  (38 . 0.0)
  (39 . 0.0)
  (10 12.9965 9.4425)
  (40 . 1.0)
  (41 . 1.0)
  (42 . 0.0)
  (10 12.9965 4.4425)
  (40 . 1.0)
  (41 . 1.0)
  (42 . 0.0)
  (10 7.99653 4.4425)
  (40 . 1.0)
  (41 . 1.0)
  (42 . 0.0)
  (10 7.99653 9.4425)
  (40 . 1.0)
  (41 . 1.0)
  (42 . 0.0)
  (210 0.0 0.0 1.0)
)
Title: variable blank,,!
Post by: hudster on May 19, 2005, 09:20:29 AM
Unclosed
Code: [Select]
((-1 . <Entity name: 7ef83088>)
(0 . "LWPOLYLINE")
(330 . <Entity name: 7ef81cf8>)
(5 . "891")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbPolyline")
(90 . 5)
(70 . 128)
(43 . 1.0)
(38 . 0.0)
(39 . 0.0)
(10 119.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 119.496 67.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 124.496 67.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 124.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 119.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(210 0.0 0.0 1.0))


after closing
Code: [Select]
((-1 . <Entity name: 7ef83088>)
(0 . "LWPOLYLINE")
(330 . <Entity name: 7ef81cf8>)
(5 . "891")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbPolyline")
(90 . 5)
(70 . 129)
(43 . 1.0)
(38 . 0.0)
(39 . 0.0)
(10 119.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 119.496 67.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 124.496 67.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 124.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 119.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(210 0.0 0.0 1.0))


Drawn Closed
Code: [Select]
((-1 . <Entity name: 7ef830a0>)
(0 . "LWPOLYLINE")
(330 . <Entity name: 7ef81cf8>)
(5 . "894")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbPolyline")
(90 . 4)
(70 . 129)
(43 . 1.0)
(38 . 0.0)
(39 . 0.0)
(10 119.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 119.496 67.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 124.496 67.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(10 124.496 62.0295)
(40 . 1.0)
(41 . 1.0)
(42 . 0.0)
(210 0.0 0.0 1.0))
Title: variable blank,,!
Post by: whdjr on May 19, 2005, 09:39:15 AM
The only thing I can see different is the number of vertices and the pline generation, assoc. codes 90 and 70 respectfully.  I am at a loss here.

Sorry,
Title: variable blank,,!
Post by: daron on May 19, 2005, 09:54:07 AM
see if this one exposes anything a bit more:
Code: [Select]
(vlax-dump-object (vlax-ename->vla-object (car (entsel))))
Title: variable blank,,!
Post by: hudster on May 19, 2005, 10:29:34 AM
unclosed
Code: [Select]

; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00b9b5e4>
;   Area (RO) = 25.0
;   Closed = 0
;   ConstantWidth = 1.0
;   Coordinate = ...Indexed contents not shown...
;   Coordinates = (11.1578 5.62949 11.1578 10.6295 16.1578 10.6295 ... )
;   Document (RO) = #<VLA-OBJECT IAcadDocument 0ab485c0>
;   Elevation = 0.0
;   Handle (RO) = "892"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 096c3674>
;   Layer = "0"
;   Length (RO) = 20.0
;   Linetype = "ByLayer"
;   LinetypeGeneration = -1
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 2130243728
;   ObjectName (RO) = "AcDbPolyline"
;   OwnerID (RO) = 2130238712
;   PlotStyleName = "ByLayer"
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 096c0bc0>
;   Visible = -1
T


closed
Code: [Select]
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00b9b5e4>
;   Area (RO) = 25.0
;   Closed = -1
;   ConstantWidth = 1.0
;   Coordinate = ...Indexed contents not shown...
;   Coordinates = (11.1578 5.62949 11.1578 10.6295 16.1578 10.6295 ... )
;   Document (RO) = #<VLA-OBJECT IAcadDocument 0ab485c0>
;   Elevation = 0.0
;   Handle (RO) = "892"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0969d1d4>
;   Layer = "0"
;   Length (RO) = 20.0
;   Linetype = "ByLayer"
;   LinetypeGeneration = -1
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 2130243728
;   ObjectName (RO) = "AcDbPolyline"
;   OwnerID (RO) = 2130238712
;   PlotStyleName = "ByLayer"
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 096bbc80>
;   Visible = -1
T


drawn closed
Code: [Select]
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00b9b5e4>
;   Area (RO) = 25.0
;   Closed = -1
;   ConstantWidth = 1.0
;   Coordinate = ...Indexed contents not shown...
;   Coordinates = (11.1578 5.62949 11.1578 10.6295 16.1578 10.6295 ... )
;   Document (RO) = #<VLA-OBJECT IAcadDocument 0ab485c0>
;   Elevation = 0.0
;   Handle (RO) = "893"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 096c0e64>
;   Layer = "0"
;   Length (RO) = 20.0
;   Linetype = "ByLayer"
;   LinetypeGeneration = -1
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 2130243736
;   ObjectName (RO) = "AcDbPolyline"
;   OwnerID (RO) = 2130238712
;   PlotStyleName = "ByLayer"
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 096c06f0>
;   Visible = -1
T
Title: variable blank,,!
Post by: whdjr on May 19, 2005, 11:22:34 AM
Ok Hudster,

I think I figured this out.  I think we're using two different versions of ACAD here.  Your returning a length prop. and a True color prop. which I don't have in A2K.  I started A2k6 and drew the pline without closing it and it looked like the one you showed with the one missing corner.  Even after filleting and joining it, it still did not work.  I listed the "unclosed" and the "closed" pline and this is what I get:
Code: [Select]
Command: LIST

Select objects: Specify opposite corner: 2 found

Select objects:

                  LWPOLYLINE  Layer: "0"
                            Space: Model space
                   Handle = 1cbc
            Closed
    Constant width   1.00000
              area   25.00000
         perimeter   20.00000

          at point  X=798.62500  Y=965.37500  Z=  0.00000
          at point  X=803.62500  Y=965.37500  Z=  0.00000
          at point  X=803.62500  Y=960.37500  Z=  0.00000
          at point  X=798.62500  Y=960.37500  Z=  0.00000

                  LWPOLYLINE  Layer: "0"
                            Space: Model space
                   Handle = 1cac
            Closed
    Constant width   1.00000
              area   25.00000
         perimeter   20.00000

          at point  X=808.43750  Y=960.37500  Z=  0.00000
          at point  X=808.43750  Y=965.37500  Z=  0.00000
          at point  X=813.43750  Y=965.37500  Z=  0.00000
          at point  X=813.43750  Y=960.37500  Z=  0.00000
          at point  X=808.43750  Y=960.37500  Z=  0.00000

It appears that when you draw a pline and don't close it, but return it to the original start point AutoCAD adds an extra 0 length line for some reason. :roll:

I did get it to work however; but it's not pretty.  
Explode your pline.  Find the one that is a 0 length and delete it.  Then use the pedit command and choose the multiple option and select your 4 lines.  Then choose the join option and then the close option (don't miss the close option or it won't work).  Then choose the width option to set your width and you should be done.

Code: [Select]
Command: e
ERASE 1 found

Command: pedit
Select polyline or [Multiple]: m

Select objects: Specify opposite corner: 4 found

Select objects:

Convert Lines and Arcs to polylines [Yes/No]? <Y> y

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Undo]: j

Join Type = Extend
Enter fuzz distance or [Jointype] <0.00000>:

3 segments added to polyline

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Undo]: c

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Undo]: w

Specify new width for all segments: 1

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Undo]:

There are better options such as erase and redraw it closed or us the pljoin command from the expresstools if you have it.

I hope this helps everyone,
Title: variable blank,,!
Post by: hudster on May 19, 2005, 11:37:36 AM
We use 2000 and Lt2000, and it draws these OK on some machines but not on others, I just wondered why, and if there was a variable which controlled this.

edit.

if I draw the last segment as 4mm rather than 5mm and then close it using pedit, it adds a 1mm segment, and doesn't have the notch out the corner.

Now the question is, why does it draw that last segment rather than just extending the last one.
Title: variable blank,,!
Post by: whdjr on May 19, 2005, 11:44:55 AM
Ok, this is strange.  I just tried it again in A2K and it did not work correctly; however I tried this routine (http://www.theswamp.org/phpBB2/viewtopic.php?p=63868#63868) by Kerry Brown on it and presto all was good.  It will remove the extra vertex if you select the "bad" corner.