cPy.cModel module#
- class JType(value)[source]#
Bases:
EnumFlags and types for snapping joints.- AxialMask = 255#
- Vertical = 256#
- Horizontal = 512#
- Free = 1024#
- Tile = 2048#
- TypeMask = 61440#
- Type1 = 4096#
- Type2 = 8192#
- Type3 = 16384#
- Type4 = 32768#
- IsConnector = 65536#
- IsPlug = 131072#
- KeepDirection = 262144#
- ManualRotate = 524288#
- AutoFlipX = 1048576#
- AutoFlipY = 2097152#
- AutoFlipZ = 4194304#
- class VolMarker[source]#
Bases:
objectmark pints in space, used for inter-volume segmental selection- Empty: bool#
- Activated: bool#
- Initial: any#
- class ABOcTree[source]#
Bases:
objectAxis-Aligned Box Octree for fast spatial lookups of volume cells.- Depth: int#
- Levels: any#
- class SpOcTree[source]#
Bases:
objectSpatial Octree implementation for raycasting.- L0: any#
- Side: float#
- NeedFreeze: bool#
- Root: any#
- Temp: any#
- class VolumeColorizer[source]#
Bases:
objectHelper class to handle volumetric color rendering and layer management.- cells: any#
- SingleLayer: int#
- class VolumeObject[source]#
Bases:
BaseClassOne layer without hierarchy in the SculptRoom.Represents volume object. Volume object may be in volume or surfacerepresentations depends on boolInSurfaceRepresentation().In volume mode voxels are modified and then mesh is generated.In surface mode mesh is modified then voxels are generated.The transform matrix of volume corresponds to latest selected instance inVoxTree.There may be multiple references fromVoxTreeto the sameVolumeObject.VolumeObjectis voxel/surface object not placed in tree.VoxTreeBranchis the object reference.All activeVoxelObject’s are kept as linear set inVTreearray.RootVTreeconsists of hiererchial set of references of objects from this array.EachVolumeObjectcontains complete information about geometry in local space.Correct transform matrices are kept inVoxTreeBranchthat refers thisVolumeObject.Transform matrices inVolumeObjectcorrespond to non-instancedVoxTreeelement.If object is instance transform matrix inVolumeObjectisdifferent formVoxTreeBranchtransform.see VoxTreeBranch- linkedToRetopoObj: bool#
- topologyLockedByLinkedObject: bool#
- SpaceID: int#
- Unique ID of the volume, same as
VoxTreeBranch::SpaceID.
- LoadTimeSpaceID: int#
- Ghost: bool#
- boolean_root: any#
- GetSummaryCutExcept(p: cVec3, except_vo: VolumeObject, root: any = None, density: float = None) cVec3[source]#
- CuttingOperation: int#
- 0 - none, 1 - subtract, 2 - intersect, 3 - add
- FlipFaces: bool#
- BooleansDisabled: bool#
- Subd: any#
- CurrentSubdLevel: int#
- volumetricalGettter: any#
- linkedObjects: any#
- NGObjectIdx: int#
- AverageEdgeLengthInPen: float = 0.0#
- BackBufferTextureID: int = 573#
- BackBufferDepthID: int = 574#
- BBSizeX: int = -1#
- BBSizeY: int = -1#
- RenderStamp: any = 4#
- static int VoxThreshold; // without implementation
- LightScatter: float = 0.0#
- GloballyAllowVoxelColoring: bool = False#
- Value:
#00000000
- GloballyIntentVoxelColoring: bool = False#
- Value:
#00000000
- IsExternalLight: float = 0.0#
1for external light,0for panorama.
- AllowBB: bool = True#
- WholeDirty: bool = True#
- Incremental: bool = False#
- AllowProgress: bool = False#
- IgnoreDropUndo: bool = False#
- NoVoxMerge: bool = False#
- InvisibleMode: bool = True#
- GlobalSortTriangles: bool = False#
- OldColor: any#
- Color to be restored when volume will be turned back to surface mode.
- ScaleChange: float#
- How scale is changed when passed to proxy mode.
- VolumeExtrusion: float#
- bkCells: any#
- LocalAABB: any#
- PickFarPlane: float#
- < AABB in local space
- PickNearPlane: float#
- < far plane position in picked radius
- PickAvgPlane: float#
- < closest plane position in picked radius
- PickPlane: float#
- < average plane position in picked radius
- PickListDirty: int#
- < plane position of picked center
- LastDrawn: any#
- Border: int#
- < last drawn bound box of cells centers in local space
- MinCell: any#
- < border for dencity falloff in voxel objects, usually is 4
- MaxCell: any#
- < min for bound box of cell indices, x,y,z
- Visible: bool#
- < transform from global to local space
- InCache: bool#
- < better refer visibility from VoxTreeBranch
- SurfaceColorChanged: bool#
- < is in cache state
- RawObjTris: int#
- RawInSurfaceRepresentation: int#
- CurCacheMethod: int#
- LastPolycount: int#
- ScaleFactor: float#
- Environment: VolumeObject#
- < scale factor, it is like simplified transform from local to global space. If you need to get some distance approx in local space, divide it on ScaleFactor
- HiddenVolume: VolumeObject#
- IdxAllocator: any#
- Allows to allocate / free global indices for mesh represented by
MeshInVCell.
- TempRef: VolumeObject#
- CellsChanged: bool#
- HasLeakyPos: bool#
- CompletelyRebuilt: bool#
- HasTransparency: bool#
- < this is for undo, it indicates that structure of volume changed drastically, almost no correstondence between old and new
- RenderJustFacture: bool#
- < for render - nood to sort triangles or not
- SomethingNewSelected: bool = False#
- Joints: any#
- Joints of all merged objects
- BackupJoints: any#
- AddJoint(J: any, GlobalTransform: cMat4)[source]#
- Add joint to volume, GlobalTransform is transform matrix for model in world space
- Color: int#
- ApproxColor: int#
- ApproxSpec: int#
- < bot baking of approximate shader color
- ApproxMet: int#
- Est: any#
- PbrEst: any#
- < estimate hader approximately
- Shader: any#
- SubCellSize: int#
- DefCellSize: int#
- DefCellShift: int#
- NumBackups: int#
- SurfaceChanged: bool#
- NeedOcTreeRefine: bool#
- SimpleStampMode: bool#
- HideMode: bool#
- InSurfaceRepresentation: bool#
- RenderOrder: any#
- GetObjectColor(pos: cVec3, Specular: int, spop: int, met: int, Normal: cVec3, srs: any = None, Cavity: float = 0, PixSize: float = 0) cVec4[source]#
- GetAverageVoxelNormalInSphere(Center: cVec3, Radius: float) cVec3[source]#
- Create shape in volume using getter and StartPoint recursively. All points are in local space
- GetAverageVoxelNormalAndPosInSphere(Center: cVec3, Radius: float, nrmSampling: float = 1.0, posSampling: float = 1.0, FromBackup: bool = True, Preferred: cVec3 = cPy.cTypes.cVec3.Zero) cVec3[source]#
- CreateFuncShapeCUDA(fn: any, Pos: cVec3, Where: any, Subtract: int, Additive: bool = False, ComplexCheck: bool = False, UseTemp: bool = False, Extrusion: int = 0)[source]#
- Creates the arbitrary volxels shape
- Parameters:
fn – the callback that defines the shape. Gets position of the point returns the value 0..1 to be set as voxel value
Subtract (int) – Subtract = 0: add, 1:subtract, 255: replace
UseTemp (bool) – set true if you want modify the cell afterward, all passed values will be kept in temp location and placed into the cell after the whole operation will be completed.
- CreateFuncShapeWeighted(fn: any, Pos: cVec3, Where: any, Subtract: bool, Additive: bool = False)[source]#
- CreateSphereSegment(Start: cVec3, End: cVec3, RadiusS: float, RadiusE: float, Subtract: int, Additive: bool = False)[source]#
- TransferSphereSegment(Dest: VolumeObject, Start: cVec3, End: cVec3, RadiusS: float, RadiusE: float)[source]#
- TransferSphereSegmentSymm(Hide: bool, Start: cVec3, End: cVec3, RadiusS: float, RadiusE: float)[source]#
- CreateSphereSegmentSymm(Start: cVec3, End: cVec3, RadiusS: float, RadiusE: float, Subtract: int, Additive: bool = False)[source]#
- CopySphereSegmentSymm(Start: cVec3, End: cVec3, RadiusS: float, RadiusE: float, Subtract: bool)[source]#
- CreateSegment(Start: cVec3, NS: cVec3, AspectS: float, End: cVec3, NE: cVec3, AspectE: float, R1: float, R2: float, ExtraLayerWidth: float, Subtract: bool)[source]#
- CreateSegmentSymm(Start: cVec3, NS: cVec3, AspectS: float, End: cVec3, NE: cVec3, AspectE: float, R1: float, R2: float, ExtraLayerWidth: float, Subtract: bool, DoubleSided: bool = False, PlaneLimit: bool = False)[source]#
- void CreateLimSegment(Vector3D Start,Vector3D NS,float AspectS,Vector3D End,Vector3D NE,float AspectE,float R1,float R2,cPlane PL,float ExtraLayerWidth,bool Subtract); // implementation not found
- PerformSmoothing(Pos: cVec3, Radius: float, AddValue: float = 0, AddMode: int = 0)[source]#
- void CreateLimSegmentSymm(Vector3D Start,Vector3D NS,float AspectS,Vector3D End,Vector3D NE,float AspectE,float R1,float R2,cPlane PL,float ExtraLayerWidth,bool Subtract,bool DoubleSided=false); // implementation not found
- PerformPinchVox(Pos1: cVec3, Radius1: float, N1: cVec3, Pos2: cVec3, Radius2: float, N2: cVec3, Degree: float, Shift: cVec3)[source]#
- PerformPinchVoxSymm(Pos1: cVec3, Radius1: float, N1: cVec3, Pos2: cVec3, Radius2: float, N2: cVec3, Degree: float, Shift: cVec3)[source]#
- GrowSurface(Start: cVec3, NStart: cVec3, StartD: float, End: cVec3, NEnd: cVec3, EndD: float, R1: float, R2: float, Subtract: bool, UsePen: bool, UseTemp: bool)[source]#
- GrowSurfaceSymm(Start: cVec3, NStart: cVec3, StartD: float, End: cVec3, NEnd: cVec3, EndD: float, R1: float, R2: float, Subtract: bool, UsePen: bool, UseTemp: bool)[source]#
- AddCellTriangulation(cx: int, cy: int, cz: int) any[source]#
- void DrawPressStroke(Vector3D Start,Vector3D End,Vector3D NStart,Vector3D NEnd,float R1,float R2,float Pressure,bool Subtract); // implementation not found
- AddIndexedCellTriangulation(cx: int, cy: int, cz: int) any[source]#
- void AddGlobalCellTriangulationG(int cx, int cy, int cz, VolumeCell* vc, TriangulationContext* TC, const Matrix4D& M, cList_int * CellPos = NULL); // implementation not found
- GrowDensityInCell2(cx: int, cy: int, cz: int) any[source]#
- VolumeCell* GrowSurfaceInCell(int cx,int cy,int cz); // implementation not found
- MarkDirtyCell(cx: int, cy: int, cz: int, onlymesh: bool = False, MultiThread: bool = False)[source]#
- GetCutByParents(Pos: cVec3, max_density: float = None, except_vo: VolumeObject = None) float[source]#
- GetSummaryCut(Pos: cVec3, max_density: float = None, except_vo: VolumeObject = None) float[source]#
- GetInterpLSumm(dst: any, pos: cVec3, con: any, TempStorage: any)[source]#
- static float GetCut(Vector3D Pos, float* max_density, VolumeObject* except); // implementation not found
- GetInterpColorThrough(Pos: cVec3, Specular: int = None, me: int = None, Normal: cVec3 = None, srs: any = None) int[source]#
- GetInterpColorThroughLayered(Pos: cVec3, Info: any, N1: cVec3, srs: any = None, PixSize: float = 0)[source]#
- static Render(IncludingPMS: bool = False, IncludingRtp: bool = False, ShadowOnly: bool = False)[source]#
- StoreLayerToFile(y: float, Name: str)[source]#
- void ApplyToPickPool(Vector3D Pos,float Radius,fnGetSurfDisp4* fn,fnGetSurfDisp2* Reader,float SmDeg); // implementation not found
- StoreGlobalIds(VO: VolumeObject, BS: any)[source]#
- RestoreGlobalIds(VO: VolumeObject, BS: any)[source]#
- ApplyHoleRect(Dest: VolumeObject = None, SplitBorder: float = 0, EraseOld: bool = True, Additive: bool = False)[source]#
- VoxelizePureGeometry(Manually: bool, AsShell: bool, tovox: bool = True, suggestedpoly: int = 0)[source]#
- GetDimensionsInBasis(x: cVec3 = cPy.cTypes.cVec3.AxisX, y: cVec3 = cPy.cTypes.cVec3.AxisY, z: cVec3 = cPy.cTypes.cVec3.AxisZ) any[source]#
- MergeWithGivenPolycount(PolyCount: int, dest: VolumeObject, undo: bool, shelldepth: float = 0) float[source]#
- MergeAdaptively(PolyCount: int, dest: VolumeObject) float[source]#
- SetSurfPlaneSymm(Pos: cVec3, Radius: float, D: float = 0, Dir: cVec3 = cPy.cTypes.cVec3.Zero, SmDegree: float = 0)[source]#
- WrapCell2(cx: int, cy: int, cz: int, AdditionalSource: VolumeObject)[source]#
- CloseHolesFastAndGood(weld: bool, maxcontour: int = 100000) any[source]#
- if maxcontour == 0 it just returns (HolesCount,MaxHole)
- CloseSurfHoles(interp: bool = True, type: int = 0, Accuracy: float = 0.22, MaxContourLength: int = 10000000)[source]#
- MarkFreezeInSurfMode(Pos: cVec3, Radius: float, Pos1: cVec3, Radius1: float, Inv: bool, Degree: float, Degree1: float, Additive: bool)[source]#
- MarkFreezeInSurfModeSymm(Pos: cVec3, Radius: float, Pos1: cVec3, Radius1: float, Inv: bool, Degree: float, Degree1: float, Additive: bool)[source]#
- CreateSegSelection(P1: cVec3, P2: cVec3, EyeDir: cVec3, PP: any, LSP: cMat4, Mode: int, SubMode: int) cVec3[source]#
- CreateRectSelection(EyeDir: cVec3, PP: any, LSP: cMat4, Mode: int, SubMode: int, FreezeOnly: bool, WeightMod: float = 1.0) cVec3[source]#
- CreateSegSelectionSymm(P1: cVec3, P2: cVec3, EyeDir: cVec3, PP: any, LSP: cMat4, Mode: int, SubMode: int) cVec3[source]#
- CreateRectSelectionSymm(EyeDir: cVec3, PP: any, LSP: cMat4, Mode: int, SubMode: int, FreezeOnly: bool, WeightMod: float = 1.0) cVec3[source]#
- CopyTo(Dest: VolumeObject, Undo: bool = True)[source]#
- MergeToOtherVO(VO: VolumeObject, Sub: int = False)[source]#
- MergeHullToOtherVO(VO: VolumeObject, In: float, Out: float, ReScale: bool)[source]#
- RemoveConnectedParts(pt: cVec3, remBB: any, MaxRadius: float)[source]#
- Remove parts, connected to nearest point
- ToSTL(OnlyThis: bool, BS: any, SingleM: cMat4 = cPy.cTypes.cMat4.Identity, OnlySel: bool = False) bool[source]#
- Throw to
cMeshContainer.For example| cMeshContainer mc; | this->ToRawMesh( true, true, &mc, Matrix4D::Identity, false );
odo Note unobvious params.
- ExportRawVoxels(File: str, bits: int, CreateHeader: bool, color: bool, gloss: bool, layers: bool)[source]#
- ImportRawVoxels(File: str, offset: int, bits: int, Lx: int, Ly: int, Lz: int, Scale: float)[source]#
- EstimateInitialParameters(File: str, offset: int, bits: int, Lx: int, Ly: int, Lz: int) bool[source]#
- SplitInTwo(InsertInTree: bool, EraseOld: bool, subtree: bool = False, changetool: bool = True) VolumeObject[source]#
- Barelief(Org: cVec3, Dir: cVec3, Coef: float, FreeEdges: bool = False, Tapering: float = 0, KeepScale: bool = False, Undo: bool = True, ExDensity: float = 1.0, KeepBottom: bool = False)[source]#
- LegacyBarelief(Org: cVec3, Dir: cVec3, Coef: float, FreeEdges: bool = False, Tapering: float = 0, KeepScale: bool = False, Undo: bool = True, ExDensity: float = 1.0, KeepBottom: bool = False)[source]#
- CreateIndexedStructure2()[source]#
- < fills GlobalVertIndices for every cell, assigns global index for each vertex
- class SmoothParams[source]#
Bases:
BaseClass- SmoothingDegree: float#
- Tangent: bool#
- Relaxation: bool#
- KeepSharpEdges: bool#
- KeepOpenEdges: bool#
- InvertFreeze: bool#
- class VolumeCell[source]#
Bases:
objectContains voxel values.Each volume / surface object consists of cells. In case of voxels all cells has same widthin space - 8 voxels, array of voxels is 9x9x9 - last, 9’s is from right neighbour cell.In voxel mode you are operating with voxels, surface will be generated by voxels using marshing cubes.In case of surface there is no voxel data (polygons / layers / colors) are kept inVolumeCellAttrib.- Attr: any#
- Represents cell’s polygonal surface. If it is
nullptr, there are no faces in the cell.
- Owner: VolumeObject#
- BackupDropTick: int#
- Cells before this change. Undo will get to this state when applied.
- Backup: VolumeCell#
- Temp: any#
- Values: any#
- Pointer to voxels array 9x9x9. Voxel values itself, <=32767 - empty space, >=32768 - filled space.n For details, it may be zero if all voxels are the same. In this case
SameValuecontains this same value. Surface is determined by the value 32767 using marching cubes.
- Layers: any#
- SameValue: any#
- If cell is completely filled or empty and
Values == nullptrthe value is used as cell filler.
- boolean_hash: float#
- RenderStamp: any#
- Nx: any#
- < cell is locked for changes, rather used for temporary purposes
- class VolumeCellAttrib[source]#
Bases:
objectMain brick in voxel / surface structure.It contains polygonal geometry, color layers if given cell of the surfacepointer to this structure kept inVolumeCell.- RctX: int#
- RctY: int#
- RctW: int#
- RctH: int#
- VertsAB: any#
- Verts: any#
- Vertices of the mesh in the cell. Of course, same vertex may be present in neighbour cells and sometimes you need to identify that 2 vertices from different cells represent single global index. There are two ways. Using
Statusfield inMCVertexthat represents edge status. It has global index for every vertex in cell.
- BackupVerts: any#
- LeakyPos: any#
- BackupIds: any#
- Verticies and indicies before this change. Undo will get to this state when applied.
- OldVerts: any#
- Positions / normals of vertices before entering surface mode.
- Indices: any#
- Indices of mesh in the cell. They refer vertices in this cell. Each three indices represent triangle.
- TempVerts: any#
- GlobalVertIndices: cList_DWORD#
- GlobalVertIndices are references of global vertices indices. GlobalVertIndices corresponds to vertex list Verts. Each vertex in Verts corresponds to item in GlobalVertIndices. If GlobalVertIndices is empty - there are no global indexation in the mesh. Each value is DWORD. Highest bit (0x80000000) is set up if the vertex is on the edge of the cell. The global index itself is GlobalVertIndices[i]&0x7FFFFFFFFF
- Layers: any#
- CurLayerInvisible: bool = False#
- CurLayerDepthMod: float = 1.0#
- UseLayerScale: bool = False#
- InvisLayerWarning: bool = False#
- UpdateLayersSumm(vo: VolumeObject)[source]#
- Dirty: any#
- For tracking persistent data.