Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Attribute is derived subtype. #863

Open
RyugaRyuzaki opened this issue Jun 14, 2024 · 7 comments
Open

[Bug]: Attribute is derived subtype. #863

RyugaRyuzaki opened this issue Jun 14, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@RyugaRyuzaki
Copy link

What happened?

When i try to create IfcGeometricRepresentationSubContext :

this.IfcGeometricRepresentationSubContext1 =
      new IFC4X3.IfcGeometricRepresentationSubContext(
        new IFC.IfcLabel("Axis"),
        new IFC.IfcLabel("Model"),
        this.IfcAxis2PlacementGlobal3D,
        this.IfcGeometricRepresentationContext,
        new IFC.IfcPositiveRatioMeasure(1e-3),
        IFC.IfcGeometricProjectionEnum.GRAPH_VIEW,
        new IFC.IfcLabel("")
      );

Then i checked from here https://validate.buildingsmart.org/dashboard
It threw this error
image

Version

0.0.54

What browsers are you seeing the problem on?

No response

Relevant log output

null

Anything else?

null

@RyugaRyuzaki RyugaRyuzaki added the bug Something isn't working label Jun 14, 2024
@beachtom beachtom self-assigned this Jun 19, 2024
@RyugaRyuzaki
Copy link
Author

From snippet :

constructor IFC4X3.IfcSIUnit(
Dimensions: (Handle<IFC.IfcDimensionalExponents> | IFC.IfcDimensionalExponents),
 UnitType: IFC.IfcUnitEnum, 
Prefix: IFC.IfcSIPrefix | null, 
Name: IFC.IfcSIUnitName): IFC.IfcSIUnit

So i follow

 IfcDimensionalExponents: IFC.IfcDimensionalExponents =
    new IFC.IfcDimensionalExponents(1, 1, 1, 1, 1, 1, 1);
  IfcLengthUnit: IFC.IfcSIUnit = new IFC.IfcSIUnit(
    this.IfcDimensionalExponents,
    IFC.IfcUnitEnum.LENGTHUNIT,
    "",
    IFC.IfcSIUnitName.METRE
  );

And result

#19= IFCSIUNIT(#18,.LENGTHUNIT.,$,.METRE.);

Expected :

#19= IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);

The problem "*" instead "#18".

@beachtom
Copy link
Collaborator

Can you share the full code for writing it?

@RyugaRyuzaki
Copy link
Author

Can you share the full code for writing it?

@beachtom to define
and to export
and to writeline

beachtom added a commit that referenced this issue Jun 27, 2024
@beachtom
Copy link
Collaborator

This is fixed!

@RyugaRyuzaki
Copy link
Author

This is fixed!

Ops! @beachtom it's still error!
image
Result :

#88=IFCSIUNIT(.LENGTHUNIT.,'',.MILLI.,$);

Expected :

#88=IFCSIUNIT(*,.LENGTHUNIT.,'',.MILLI.,$);

@beachtom
Copy link
Collaborator

Did you test with the code here - new version hasn't been released yet? In any case I will double check

@beachtom beachtom reopened this Jun 29, 2024
@RyugaRyuzaki
Copy link
Author

Did you test with the code here - new version hasn't been released yet? In any case I will double check

yes. i downloaded build.zip then i followed this

    class IfcSIUnit extends IfcNamedUnit {
        UnitType: IfcUnitEnum;
        Prefix: IfcSIPrefix | null;
        Name: IfcSIUnitName;
        type: number;
        constructor(UnitType: IfcUnitEnum, Prefix: IfcSIPrefix | null, Name: IfcSIUnitName);
    }

And output

#88=IFCSIUNIT(.LENGTHUNIT.,'',.MILLI.,$);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants