ABOUT Pixyz Batch                

Because Pixyz Batch shares the same Python API with Pixyz Studio, all changes below also apply to Pixyz Batch

Release 2020.2.1.9 to 2020.2.2.18

(Released February 17, 2020)


No changes made to the Python API.



Release 2020.2.0.64 to 2020.2.1.9

(Released December 07, 2020)

MODIFIED FUNCTIONS

Module: Algo

decimateEdgeCollapse

decimateEdgeCollapse(occurrences, surfacicTolerance, /, boundaryWeight, normalWeight, UVWeight, sharpNormalWeight, UVSeamWeight, normalMaxDeviation, forbidUVOverlaps, UVMaxDeviation, UVSeamMaxDeviation, protectTopology)

Experimental :reduce the polygon count by collapsing some edges to obtain an simplified mesh

Parameters

----------

occurrences : OccurrenceList

Occurrences of components to process


surfacicTolerance : Distance

Error max between the simplified mesh et the old one


boundaryWeight : Double , optional

(default: 1.)

Boundary importance during the decimation


normalWeight : Double , optional

(default: 1.)

Normal importance during the decimation


UVWeight : Double , optional

(default: 1.)

UV importance during the decimation


sharpNormalWeight : Double , optional

(default: 1.)

Importance of sharp edges during the decimation


UVSeamWeight : Double , optional

(default: 10.)

Importance of UV seams during the decimation


normalMaxDeviation : Angle , optional

(default: -1)

Constraint the normals deviation on decimated model


forbidUVOverlaps : Boolean , optional

(default: true)

Forbid UV to fold over and overlap during the decimation


UVMaxDeviation : Double , optional

(default: -1)

Constraint the uv deviation on decimated model


UVSeamMaxDeviation : Double , optional

(default: -1)

Constraint the uv seams deviation on decimated model


protectTopology : Boolean , optional

(default: false)

If false, the topology of the mesh can change and some edges can become non-manifold. But the visual quality will be better on model with complex topology


decimateTarget

decimateTarget(occurrences, TargetStrategy, /, boundaryWeight, normalWeight, UVWeight, sharpNormalWeight, UVSeamWeight, forbidUVFoldovers, protectTopology)

reduce the polygon count by collapsing some edges to obtain a target triangle count

Parameters

----------

occurrences : OccurrenceList

List of occurrences to process


TargetStrategy : DecimateOptionsSelector

Select between targetCount or ratio to define the number of triangles left after the decimation process


boundaryWeight : Double , optional

(default: 1.)

Defines how important the edges defining the mesh boundaries (free edges) are during the decimation process, to preserve them from distortion


normalWeight : Double , optional

(default: 1.)

Defines how important vertex normals are during the decimation process, to preserve the smoothing of the mesh from being damaged


UVWeight : Double , optional

(default: 1.)

Defines how important UVs (texture coordinates) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs)


sharpNormalWeight : Double , optional

(default: 1.)

Defines how important sharp edges (or hard edges) are during the decimation process, to preserve them from being distorted


UVSeamWeight : Double , optional

(default: 10.)

Defines how important UV seams (UV islands contours) are during the decimation process, to preserve them from being distorted (along with the textures using the UVs)


forbidUVFoldovers : Boolean , optional

(default: true)

Forbids UVs to fold over and overlap each other during the decimation


protectTopology : Boolean , optional

(default: false)

If False, the topology of the mesh can change and some edges can become non-manifold; but the visual quality will be better on model with complex topology


hiddenRemoval

hiddenRemoval(occurrences, level, resolution, sphereCount, /, fovX, considerTransparentOpaque, adjacencyDepth)

Delete parts, patches or polygons not viewed from a sphere around the scene

Parameters

----------

occurrences : OccurrenceList

Occurrences of components to process


level : SelectionLevel

Level of parts to remove : Parts, Patches or Polygons


resolution : Int

Resolution of the visibility viewer


sphereCount : Int

Segmentation of the sphere sphereCount x sphereCount


fovX : Double , optional

(default: 90)

Horizontal field of view (in degree)


considerTransparentOpaque : Boolean , optional

(default: false)

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque


adjacencyDepth : Int , optional

(default: 1)

Mark neighbors polygons as visible


Returns:

-------

viewedOccurrences : BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)


hiddenRemovalViewPoints

hiddenRemovalViewPoints(occurrences, level, cameraPositions, cameraDirections, cameraUps, resolution, /, fovX, considerTransparentOpaque, adjacencyDepth)

Delete parts, patches or polygons not viewed from a set of camera position/orientation

Parameters

----------

occurrences : OccurrenceList

Occurrences of components to process


level : SelectionLevel

Level of parts to remove : Parts, Patches or Polygons


cameraPositions : Point3List

List of camera positions


cameraDirections : Point3List

List of camera directions


cameraUps : Point3List

List of camera up vectors


resolution : Int

Resolution of the visibility viewer


fovX : Double , optional

(default: 90)

Horizontal field of view (in degree)


considerTransparentOpaque : Boolean , optional

(default: false)

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque


adjacencyDepth : Int , optional

(default: 1)

Mark neighbors polygons as visible


Returns:

-------

viewedOccurrences : BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)


hiddenRemovalCamera

hiddenRemovalCamera(occurrences, level, cameraPositions, resolution, sphereCount, /, fovX, considerTransparentOpaque, adjacencyDepth)

Delete parts, patches or polygons not viewed from spheres generated with a set of camera position

Parameters

----------

occurrences : OccurrenceList

Occurrences of components to process


level : SelectionLevel

Level of parts to remove : Parts, Patches or Polygons


cameraPositions : Point3List

List of camera positions


resolution : Int

Resolution of the visibility viewer


sphereCount : Int

Segmentation of the sphere sphereCount x sphereCount


fovX : Double , optional

(default: 90)

Horizontal field of view (in degree)


considerTransparentOpaque : Boolean , optional

(default: false)

If True, Parts, Patches or Polygons with a transparent appearance are considered as opaque


adjacencyDepth : Int , optional

(default: 1)

Mark neighbors polygons as visible


Returns:

-------

viewedOccurrences : BoolList

For each occurrence in occurrences, tell if the occurrence has been viewed (True) or not (True)



Release 2020.1.2.16 to 2020.2.0.64

(Released December 07, 2020)


Coming soon...



Release 2020.1.0.22 to 2020.1.1.7

(Released July 01, 2020)


IMPORTANT INFORMATION                

In continuation of the 2019 breaking API changes, Pixyz Studio/Batch 2020.1 Python API becomes more typed and structured. To help migration from 2019 to 2020, find more information here


REMOVED FUNCTIONS

Module: IO

  • io.exportSceneToShowIn3D()


Module: Scenario

  • scenario.selectIdentical() (replaced by "scenario.selectSimilar()")


ADDED FUNCTIONS

Module: Scenario

  • scenario.createInstancesBySimilarity()
  • scenario.selectSimilar()


MODIFIED FUNCTIONS

Module: Algo

mapUvOnBox

        mapUvOnBox(occurrences, affine box, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a box

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine box :  Box

                Affine transformation of the box Box definition

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


mapUvOnCylinder

        mapUvOnCylinder(occurrences, affine cylinder, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a cylinder

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine cylinder : Cylinder

                Affine transformation of the cylinder Cylinder definition

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


mapUvOnPlane 

        mapUvOnPlane(occurrences, affine Plane, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a plane

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine plane : Plane

                Affine transformation of the plane Plane definition

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


mapUvOnSphere

        mapUvOnSphere(occurrences, affine sphere, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a sphere

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine sphere : Sphere

                Affine transformation of the sphere Sphere definition

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel



Release 2019.2.1.12 to 2020.1.0.22

(Released April 20, 2020)


IMPORTANT INFORMATION                

In continuation of the 2019 breaking API changes, Pixyz Studio/Batch 2020.1 Python API becomes more typed and structured. To help migration from 2019 to 2020, find more information here


REMOVED FUNCTIONS

Module: Algo

  • algo.combineMeshesByVisibleMaterials
  • algo.fillNormalMap
  • algo.toEditableMesh


Module: CAD

  • cad.addSurfaceDefinition()


Module: IO

  • io.importWizard() (replaced by "wizardio.importWizard)")


ADDED FUNCTIONS

Module: Algo

  • algo.crackNonManifoldVertices
  • algo.decimatePoint        s
  • algo.lineToTexture
  • algo.moebiusCracker
  • algo.optimizeTextureSize
  • algo.removeMultiplePolygon
  • algo.sewBoundary
  • algo.sweep


Module: CAD

  • cad.createCoEdge
  • cad.getFaceParametricBoundaries


Module: Geom

  • geom.fromTRS
  • geom.toTRS


Module: IO

  • io.importFiles()


Module: Material

  • material.getImageSize
  • material.resizeImage


Module: Scene

  • scene.createCone
  • scene.createCube
  • scene.createCylinder
  • scene.createImmersion
  • scene.createOccurrenceFromText
  • scene.createPlane
  • scene.createRayProber
  • scene.createTorus
  • scene.getPartsModels
  • scene.insertDefaultLightsInTree
  • scene.mergePartsByName
  • scene.selectPartOccurrencesInBox
  • scene.updateRayProber


Module: View

  • view.addNotification
  • view.createViewer
  • view.fitView
  • view.getDepthTextureHandle
  • view.getMainViewerCuttingPlaneProperty
  • view.getMainViewerExplodeViewProperty
  • view.getMainViewerProperty
  • viewer.removeRoot
  • viewer.setCameraPosition
  • viewer.setMainViewerCuttingPlaneProperty
  • viewer.setMainViewerExplodeViewProperty ?
  • viewer.setMainViewerProperty
  • viewer.setViewerMatrices
  • viewer.takeScreenshot


ADDED MODULE

  • CoreGUI
  • SceenGUI
  • ViewGUI
  • WizardIO


RENAMED FUNCTIONS

Module: Algo

  • algo.backToBRep -> material.algo.backToInitialBRep


Module: CAD

  • cad.getLoopOrientedEdges -> cad.getLoopCoEdges


MODIFIED FUNCTIONS

Module: Algo

bakeMaps

        bakeMaps(destinationOccurrences, sourceOccurrences, mapsToBake, /, channel, resolution, padding, shareMaps, mapSuffix, additionalCustomMaps, tolerance)

        Bake texture maps on meshes from self or other meshes

        Parameters

        ----------

        destinationOccurrences : OccurrenceList

                Occurrences of the meshes where to store the baked map

       

        sourceOccurrences : OccurrenceList

                Occurrences of components from which to bake maps (if empty use destination)

       

        mapsToBake : MapTypeList

                List of map to generate (Normal, Diffuse, ...)

       

        channel : Int , optional

                (default: 0)

                UV channel of destOccurrence to use for the map generation

       

        resolution : Int , optional

                (default: 1024)

                Map resolution

       

        padding : Int , optional

                (default: 1)

                Add padding to the map

       

        shareMaps : Boolean , optional

                (default: true)

                If true, all the destinationOccurrences will share the same maps

       

        mapSuffix : String , optional

                (default: "")

                Add a suffix to the map names

       

        additionalCustomMaps : CustomBakeMapList , optional

                (default: )

                Additional custom maps to bake

       

        tolerance : Distance , optional

                (default: -1)

                Tolerance of projection for baking from source to destination

       

        Returns:

        -------

        bakedMaps : ImageList

                Baked map list

mapUvOnBox

        mapUvOnBox(occurrences, affine, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a box

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine : Affine Box

                Affine transformation of the box

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


mapUvOnCylinder

        mapUvOnCylinder(occurrences, affine, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a cylinder

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine : Affine Cylinder

                Affine transformation of the cylinder

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


mapUvOnPlane 

        mapUvOnPlane(occurrences, affine, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a plane

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine : Affine Plane

                Affine transformation of the plane

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


mapUvOnSphere

        mapUvOnSphere(occurrences, affine, /, channel, overideExistingUvs)

        Generate texture coordinates using the projection on a sphere

        Parameters

        ----------

        occurrences : OccurrenceList

                Occurrences of part to process

       

        affine : Affine Sphere

                Affine transformation of the sphere

       

        channel : Int , optional

                (default: 0)

                The UV channel which will contains the texture coordinates

       

        overideExistingUvs : Boolean , optional

                (default: true)

                If True, overide existing UVs on channel


Module: CAD

createLoop

        createLoop(edges coEdges, orientations, /, check)

        Create a loop from a set of edges of a set of orientations

        Parameters

        ----------

        edges coEdges : CoEdgeList

                List of edges coEdges composing the loop

       

        orientations : OrientationList

                List of orientations for each edges


        check : Boolean , optional

                (default: true)

                If true, the loop check if edges are well connected or not


getCoEdgeDefinition

        getCoEdgeDefinition(coEdge)

        get all parameters contained in the coEdge

        Parameters

        ----------

        coEdge : CoEdge

                The coEdge

       

        Returns:

        -------

        edge : Edge

                The edge of the coEdge

       

        edgeOrientation : Orientation

                Orientation of the edge

       

        loop : Loop

                The loop containing the coEdge

       

        surface : Surface

                The surface of the coEdge

       

        parametricCurve : LimitedSurface

                The parametricCurve of the coEdge


getEdgeDefinition

        getEdgeDefinition(edge)

        get all parameters contained in the edge

        Parameters

        ----------

        edge : Edge

                The edge

       

        Returns:

        -------

        vertex1 : Vertex

                The first vertex of the edge

       

        vertex2 : Vertex

                The second vertex of the edge

       

        curve : Curve

                The curve of the edge

       

        bounds : Bounds1D

                The bounds of the edge

       

        surfaceDefinitions : EdgeSurfaceDefinitionList

                Surfaces linked to the edges


getFaceDefinition

        getFaceDefinition(face)

        get all parameters contain in the face

        Parameters

        ----------

        face : Face

                The face

       

        Returns:

        -------

        surface : Surface

                The surface contain within the face

       

        loops : LoopList

                The loops contain within the face

       

        orientation : Orientation

                Relative orientation of the surface


getLoopOrientedEdges getLoopCoEdges

        getLoopCoEdges(loop)

        get all orientedEdges coEdges contain in the loop

        Parameters

        ----------

        loop : Loop

                The loop

     

        Returns:

        -------

        orientedEdges coEdges : CoEdgeList

                The orientedEdges coEdges contain within the loop

   

Module: Core

setModuleProperty

        setModuleProperty(module, propertyName, propertyValue)

        Set the value of a module property

        Parameters

        ----------

        module : String

                Name of the module

       

        propertyName : String

                The property name

       

        propertyValue : String

                The property value

       

        Returns:

        -------

        value : String

                The property value as String


Module: Scenario

generateLODChain

        generateLODChain(occurrences, /, decimateParametersList)

        Automatically generates 3 LODs for the current selection.

        Parameters

        ----------

        occurrences : OccurrenceList

                Scene paths of components to process

       

        decimateParametersList : DecimateParametersList , optional

                (default: [scenario.DecimateParameters(1., 0.1, 5.), scenario.DecimateParameters(2., 1., 10.)])

                The list of all LOD decimate parameters


generatePhantomMesh

        generatePhantomMesh(occurrences, /, generateDiffuseMap)

        Automatically generates one unique optimized mesh out of the models in the scene, with material(s).

        Parameters

        ----------

        occurrences : OccurrenceList

                Scene path of component to process

       

        generateDiffuseMap : GenerateDiffuseMap , optional

                (default: ["yes", [1024, 1]] scenario.BakeOptions(1024, 1)])


Module: Scene

createSpotLight

        createSpotLight(color, power, /, position, direction, cutoff)

        Create a new spot light

        Parameters

        ----------

        color : Color

                Color of the light

       

        power : Double

                Intensity of the light

       

        position : Point3 , optional

                (default: )

                Relative position of the light

       

        direction : Vector3 , optional

                (default: [0,0,1] geom.Vector3(0,0,1))

                Relative direction of the light

       

        cutoff : Angle , optional

                (default: 20)

                Cutoff angle of the spot light

       

        Returns:

        -------

        light : SpotLight

                The created spot light


makeInstanceUnique

        makeInstanceUnique(root occurrences, /)

        Singularize all instances on the sub-tree of an occurrence

        Parameters

        ----------

        root occurrences : Occurrence OccurrenceList , optional

                (default: 0)

                Root occurrence for the process


resetTransform

        resetTransform(root, keepPartTransform, / /, recursive, keepInstantiation, keepPartTransform)

        Set all transformation matrices to identity in a sub-tree

        Parameters

        ----------

        root : Occurrence, optional

          (default: 0)                                        

                Root occurrence for the process

       

        recursive : Boolean , optional

                (default: true)

                If False, transformation will be applied only on the root and its components

       

        keepInstantiation : Boolean , optional

                (default: true)

                If False, all occurrences will be singularized

       

        keepPartTransform : Boolean , optional

                (default: false)

                If False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices)


Module: View

getCurrentCamera

        getCurrentCamera()

        Returns the information of the current camera (used in the main viewer)

        Returns:

        -------

       position : Point3  camera : Camera

                Position of the camera Current camera