Skip to content

Arc geometry mismatch after block explode in version 3.4.2 #971

@SRajapandi7

Description

@SRajapandi7

Hi @DomCR,

When I create a block from entities in a drawing and later explode the block back into the drawing, the ARC entities are not restored correctly. The exploded arcs do not match the original source geometry.

I have attached:

  1. Code snippet used for block creation/explosion
  2. Input/source drawing file
  3. Output drawing file after explosion

Kindly review and let me know if this is a known issue or if any fix/workaround is available. Please advise if additional logs or files are required for debugging.

string TEMPpath = @"D:\Tools Development\ACAD\Arc Issues\EMPTY.dwg";
String Docpath = @"D:\Tools Development\ACAD\Arc Issues\Layout_Of_Electronic.dwg";
String outpath1 = @"D:\Tools Development\ACAD\Arc Issues\OUTPUT.dwg";

CadDocument template = DwgReader.Read(TEMPpath, onNotification);

var insertpoint = new XYZ(25, 250, 0.0);

var blockInsert = InsertBlock(Docpath, insertpoint);

//var base2 = new XYZ();
Insert InsertBlock(string path, XYZ insertpoint)
{
CadDocument doc = DwgReader.Read(Docpath, onNotification);
BlockRecord newBlock = doc.ModelSpace.Clone() as BlockRecord;
newBlock.Name = "NEW BLOCK";

var blockInsert = new ACadSharp.Entities.Insert(newBlock)
{

    InsertPoint = insertpoint // Set the insertion point
};

return blockInsert;

}

template.Entities.Add(blockInsert);
var blockent = blockInsert.Explode();

foreach (var ent in blockent)
{
var clone = ent.Clone() as Entity;

template.ModelSpace.Entities.Add(clone);

}

template.BlockRecords.Remove(blockInsert.Block.Name);

DwgWriter.Write(outpath1, template);

Arc Issues.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions