Skip to content

Commit

Permalink
fix visibility property parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ghackenberg committed Oct 8, 2024
1 parent 9d27667 commit d45e084
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/frontend/src/scripts/loaders/fcstd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class FreeCADObject {

public label: string
public placement: FreeCADPlacement
public visible: boolean
public visibility: boolean

public shape_file: string
public shape_brep: BRep
Expand All @@ -54,7 +54,7 @@ export class FreeCADObject {

hasShapeBRep() {
if (this.shape_file) {
return true
return this.visibility === undefined || this.visibility
} else {
for (const child of this.group || []) {
if (child.hasShapeBRep()) {
Expand Down Expand Up @@ -270,9 +270,9 @@ function parseFCStdDocumentObjectProperty(data: Element, obj: FreeCADObject, doc
} else {
console.log(name, type, data)
}
} else if (name == 'Visible') {
} else if (name == 'Visibility') {
const child = data.getElementsByTagName('Bool')[0]
obj.visible = (child.getAttribute('value') == 'true')
obj.visibility = (child.getAttribute('value') == 'true')
} else if (name == 'Profile') {
if (type == 'App::PropertyLinkSub') {
const child = data.getElementsByTagName('LinkSub')[0]
Expand Down

0 comments on commit d45e084

Please sign in to comment.