Skip to content

Commit

Permalink
IfcDoc 9.4 - formatting, merging, UI expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
timchipman committed Sep 12, 2015
1 parent 06e940b commit d41f25c
Show file tree
Hide file tree
Showing 58 changed files with 6,503 additions and 2,417 deletions.
50 changes: 47 additions & 3 deletions ChangeLogGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,41 @@ public class ChangeLogGenerator
/// <param name="projectCurr">The current project where change log entries are generated.</param>
public static void Generate(DocProject projectPrev, DocProject projectCurr)
{
// copy over any previous change logs
foreach(DocChangeSet prevCS in projectPrev.ChangeSets)
{
DocChangeSet currCS = new DocChangeSet();
currCS.Name = prevCS.Name;
currCS.Documentation = prevCS.Documentation;
currCS.VersionBaseline = prevCS.VersionBaseline;
currCS.VersionCompared = prevCS.VersionCompared;
projectCurr.ChangeSets.Add(currCS);

foreach(DocChangeAction prevCA in prevCS.ChangesEntities)
{
DocChangeAction currCA = prevCA.Copy();
currCS.ChangesEntities.Add(currCA);
}

if (prevCS.ChangesProperties != null)
{
foreach (DocChangeAction prevCA in prevCS.ChangesProperties)
{
DocChangeAction currCA = prevCA.Copy();
currCS.ChangesProperties.Add(currCA);
}
}

if (prevCS.ChangesQuantities != null)
{
foreach (DocChangeAction prevCA in prevCS.ChangesQuantities)
{
DocChangeAction currCA = prevCA.Copy();
currCS.ChangesQuantities.Add(currCA);
}
}
}

// build maps
Dictionary<string, DocObject> mapNew = new Dictionary<string, DocObject>();
foreach (DocSection docSection in projectCurr.Sections)
Expand Down Expand Up @@ -139,12 +174,15 @@ public static void Generate(DocProject projectPrev, DocProject projectCurr)
{
docChangeType.Action = DocChangeActionEnum.MOVED;
docChangeType.Aspects.Add(new DocChangeAspect(DocChangeAspectEnum.SCHEMA, docOtherSchema.Name.ToUpper(), docSchema.Name.ToUpper()));
docTypeBase = docOtherType;
break;
}
}
}
}
}
else

if(docTypeBase != null)
{
// existing type

Expand Down Expand Up @@ -276,6 +314,11 @@ public static void Generate(DocProject projectPrev, DocProject projectCurr)
// compare entities
foreach (DocEntity docEntity in docSchema.Entities)
{
if (docEntity.Name.Equals("IfcWindowLiningProperties"))
{
docEntity.ToString();
}

DocChangeAction docChangeEntity = new DocChangeAction();
docChangeSchema.Changes.Add(docChangeEntity);
docChangeEntity.Name = docEntity.Name;
Expand Down Expand Up @@ -309,6 +352,7 @@ public static void Generate(DocProject projectPrev, DocProject projectCurr)

docChangeEntity.Action = DocChangeActionEnum.MOVED;
docChangeEntity.Aspects.Add(new DocChangeAspect(DocChangeAspectEnum.SCHEMA, docOtherSchema.Name.ToUpper(), docSchema.Name.ToUpper()));
break;
}
}
}
Expand Down Expand Up @@ -480,11 +524,11 @@ public static void Generate(DocProject projectPrev, DocProject projectCurr)
}

//todo: add generic check that traverses multiple levels of defined types; in the interest of hitting deadline, hard-coded hack for now
if (docNew.Name == "IfcPositiveInteger" && docAspect.OldValue == "INTEGER")
if (docNew != null && docNew.Name == "IfcPositiveInteger" && docAspect.OldValue == "INTEGER")
{
impact = false;
}
if (docNew.Name == "IfcBinary" && docAspect.OldValue == "BINARY (32)")
if (docNew != null && docNew.Name == "IfcBinary" && docAspect.OldValue == "BINARY (32)")
{
impact = false;
}
Expand Down
5 changes: 5 additions & 0 deletions CtlExpressG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ public void LayoutDefinition(DocDefinition selection)
docAttr.DiagramLine[1].Y = selection.DiagramRectangle.Y + (selection.DiagramRectangle.Height * (double)each / (double)(count+1));
docAttr.DiagramLine[2].Y = selection.DiagramRectangle.Y + (selection.DiagramRectangle.Height * (double)each / (double)(count+1));
}

if (docAttr.DiagramLabel == null)
{
docAttr.DiagramLabel = new DocRectangle();
}
docAttr.DiagramLabel.X = docAttr.DiagramLine[0].X;
docAttr.DiagramLabel.Y = docAttr.DiagramLine[2].Y - 20.0;
}
Expand Down
Loading

0 comments on commit d41f25c

Please sign in to comment.