Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set OCCT_VER = "8.0.0" %}
{% set OCP_TWEAK = "0" %}
{% set OCP_TWEAK = "1" %}

package:
name: ocp
Expand Down
4 changes: 2 additions & 2 deletions ocp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ class OpenGl_ShaderProgram;

module_mapping = "lambda x: Path(x).splitpath()[-1].split('.')[0].split('_')[0]"

byref_types = ["Standard_Real","Standard_Integer","Standard_Boolean","int","double","bool"]
byref_types = ["Standard_Real","Standard_Integer","Standard_Boolean","int","double","bool","float"]
byref_types_smart_ptr = ["opencascade::handle", "handle", "Handle"]

parsing_header = '''#pragma clang diagnostic ignored "-Wmacro-redefined"
Expand Down Expand Up @@ -1449,7 +1449,7 @@ class Adaptor3d_Surface;

[Attributes]

__version__ = "8.0.0.0"
__version__ = "8.0.0.1"

[Modules]

Expand Down
18 changes: 18 additions & 0 deletions tests/test_ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,21 @@ def test_bounds(surf):
u2 == approx(2.0 * math.pi)
v1 == approx(-0.5 * math.pi)
v2 == approx(0.5 * math.pi)


# %% attributes based on from OCP.XCAFDoc import XCAFDoc_VisMaterialPBR

from OCP.XCAFDoc import XCAFDoc_VisMaterialPBR
from OCP.Quantity import Quantity_ColorRGBA


def test_attributes():

pbr = XCAFDoc_VisMaterialPBR()

assert isinstance(pbr.BaseColor, Quantity_ColorRGBA)
assert isinstance(pbr.Metallic, float)

assert pbr.Metallic == 1.0
pbr.Metallic = 0.0
assert pbr.Metallic == 0.0